agent-dealer 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/server/dist/queue/answers.test.js +117 -0
- package/bundle/server/dist/queue/dispatcher.js +164 -2
- package/bundle/server/dist/queue/plan-gate.test.js +55 -0
- package/bundle/server/dist/repository/runs.js +17 -1
- package/bundle/server/dist/routes/index.js +34 -8
- package/bundle/server/dist/runners/claude.js +9 -8
- package/bundle/server/dist/runners/persist.js +17 -4
- package/bundle/server/dist/runners/prompts.js +52 -1
- package/bundle/server/dist/runners/prompts.test.js +63 -0
- package/bundle/server/dist/runners/reflect.js +1 -1
- package/bundle/server/dist/runners/stream-json.js +28 -0
- package/bundle/server/dist/runners/stream-json.test.js +57 -0
- package/bundle/server/dist/usage-summary.js +9 -4
- package/bundle/server/package.json +1 -1
- package/bundle/server/static-ui/assets/index-CH7u5bXC.js +78 -0
- package/bundle/server/static-ui/assets/index-CKuYOeDN.css +1 -0
- package/bundle/server/static-ui/index.html +2 -2
- package/bundle/shared/dist/budget.d.ts +1 -1
- package/bundle/shared/dist/budget.js +3 -3
- package/bundle/shared/dist/index.d.ts +306 -91
- package/bundle/shared/dist/index.js +15 -0
- package/bundle/shared/dist/plan-triage.d.ts +317 -0
- package/bundle/shared/dist/plan-triage.js +65 -0
- package/bundle/shared/dist/plan-triage.test.d.ts +1 -0
- package/bundle/shared/dist/plan-triage.test.js +66 -0
- package/bundle/shared/package.json +1 -1
- package/package.json +1 -1
- package/bundle/server/static-ui/assets/index-ChdPKYDd.css +0 -1
- package/bundle/server/static-ui/assets/index-hIzZ8TM8.js +0 -77
|
@@ -0,0 +1,78 @@
|
|
|
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 c of s)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function i(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(s){if(s.ep)return;s.ep=!0;const c=i(s);fetch(s.href,c)}})();function _y(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Lo={exports:{}},ur={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var tg;function yb(){if(tg)return ur;tg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,s,c){var f=null;if(c!==void 0&&(f=""+c),s.key!==void 0&&(f=""+s.key),"key"in s){c={};for(var h in s)h!=="key"&&(c[h]=s[h])}else c=s;return s=c.ref,{$$typeof:t,type:r,key:f,ref:s!==void 0?s:null,props:c}}return ur.Fragment=l,ur.jsx=i,ur.jsxs=i,ur}var ng;function xb(){return ng||(ng=1,Lo.exports=yb()),Lo.exports}var g=xb(),Bo={exports:{}},Ae={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var lg;function bb(){if(lg)return Ae;lg=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"),c=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"),b=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function k(A){return A===null||typeof A!="object"?null:(A=v&&A[v]||A["@@iterator"],typeof A=="function"?A:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M=Object.assign,U={};function j(A,Q,w){this.props=A,this.context=Q,this.refs=U,this.updater=w||_}j.prototype.isReactComponent={},j.prototype.setState=function(A,Q){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,Q,"setState")},j.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Z(){}Z.prototype=j.prototype;function H(A,Q,w){this.props=A,this.context=Q,this.refs=U,this.updater=w||_}var le=H.prototype=new Z;le.constructor=H,M(le,j.prototype),le.isPureReactComponent=!0;var W=Array.isArray;function O(){}var J={H:null,A:null,T:null,S:null},oe=Object.prototype.hasOwnProperty;function fe(A,Q,w){var re=w.ref;return{$$typeof:t,type:A,key:Q,ref:re!==void 0?re:null,props:w}}function z(A,Q){return fe(A.type,Q,A.props)}function I(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function $(A){var Q={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(w){return Q[w]})}var me=/\/+/g;function ae(A,Q){return typeof A=="object"&&A!==null&&A.key!=null?$(""+A.key):Q.toString(36)}function ee(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(Q){A.status==="pending"&&(A.status="fulfilled",A.value=Q)},function(Q){A.status==="pending"&&(A.status="rejected",A.reason=Q)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function N(A,Q,w,re,be){var ye=typeof A;(ye==="undefined"||ye==="boolean")&&(A=null);var je=!1;if(A===null)je=!0;else switch(ye){case"bigint":case"string":case"number":je=!0;break;case"object":switch(A.$$typeof){case t:case l:je=!0;break;case b:return je=A._init,N(je(A._payload),Q,w,re,be)}}if(je)return be=be(A),je=re===""?"."+ae(A,0):re,W(be)?(w="",je!=null&&(w=je.replace(me,"$&/")+"/"),N(be,Q,w,"",function(Nt){return Nt})):be!=null&&(I(be)&&(be=z(be,w+(be.key==null||A&&A.key===be.key?"":(""+be.key).replace(me,"$&/")+"/")+je)),Q.push(be)),1;je=0;var Ve=re===""?".":re+":";if(W(A))for(var Qe=0;Qe<A.length;Qe++)re=A[Qe],ye=Ve+ae(re,Qe),je+=N(re,Q,w,ye,be);else if(Qe=k(A),typeof Qe=="function")for(A=Qe.call(A),Qe=0;!(re=A.next()).done;)re=re.value,ye=Ve+ae(re,Qe++),je+=N(re,Q,w,ye,be);else if(ye==="object"){if(typeof A.then=="function")return N(ee(A),Q,w,re,be);throw Q=String(A),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return je}function K(A,Q,w){if(A==null)return A;var re=[],be=0;return N(A,re,"","",function(ye){return Q.call(w,ye,be++)}),re}function ue(A){if(A._status===-1){var Q=A._result;Q=Q(),Q.then(function(w){(A._status===0||A._status===-1)&&(A._status=1,A._result=w)},function(w){(A._status===0||A._status===-1)&&(A._status=2,A._result=w)}),A._status===-1&&(A._status=0,A._result=Q)}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 Q=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(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},E={map:K,forEach:function(A,Q,w){K(A,function(){Q.apply(this,arguments)},w)},count:function(A){var Q=0;return K(A,function(){Q++}),Q},toArray:function(A){return K(A,function(Q){return Q})||[]},only:function(A){if(!I(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Ae.Activity=y,Ae.Children=E,Ae.Component=j,Ae.Fragment=i,Ae.Profiler=s,Ae.PureComponent=H,Ae.StrictMode=r,Ae.Suspense=p,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=J,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(A){return J.H.useMemoCache(A)}},Ae.cache=function(A){return function(){return A.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(A,Q,w){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var re=M({},A.props),be=A.key;if(Q!=null)for(ye in Q.key!==void 0&&(be=""+Q.key),Q)!oe.call(Q,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&Q.ref===void 0||(re[ye]=Q[ye]);var ye=arguments.length-2;if(ye===1)re.children=w;else if(1<ye){for(var je=Array(ye),Ve=0;Ve<ye;Ve++)je[Ve]=arguments[Ve+2];re.children=je}return fe(A.type,be,re)},Ae.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:c,_context:A},A},Ae.createElement=function(A,Q,w){var re,be={},ye=null;if(Q!=null)for(re in Q.key!==void 0&&(ye=""+Q.key),Q)oe.call(Q,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(be[re]=Q[re]);var je=arguments.length-2;if(je===1)be.children=w;else if(1<je){for(var Ve=Array(je),Qe=0;Qe<je;Qe++)Ve[Qe]=arguments[Qe+2];be.children=Ve}if(A&&A.defaultProps)for(re in je=A.defaultProps,je)be[re]===void 0&&(be[re]=je[re]);return fe(A,ye,be)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(A){return{$$typeof:h,render:A}},Ae.isValidElement=I,Ae.lazy=function(A){return{$$typeof:b,_payload:{_status:-1,_result:A},_init:ue}},Ae.memo=function(A,Q){return{$$typeof:m,type:A,compare:Q===void 0?null:Q}},Ae.startTransition=function(A){var Q=J.T,w={};J.T=w;try{var re=A(),be=J.S;be!==null&&be(w,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(O,se)}catch(ye){se(ye)}finally{Q!==null&&w.types!==null&&(Q.types=w.types),J.T=Q}},Ae.unstable_useCacheRefresh=function(){return J.H.useCacheRefresh()},Ae.use=function(A){return J.H.use(A)},Ae.useActionState=function(A,Q,w){return J.H.useActionState(A,Q,w)},Ae.useCallback=function(A,Q){return J.H.useCallback(A,Q)},Ae.useContext=function(A){return J.H.useContext(A)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(A,Q){return J.H.useDeferredValue(A,Q)},Ae.useEffect=function(A,Q){return J.H.useEffect(A,Q)},Ae.useEffectEvent=function(A){return J.H.useEffectEvent(A)},Ae.useId=function(){return J.H.useId()},Ae.useImperativeHandle=function(A,Q,w){return J.H.useImperativeHandle(A,Q,w)},Ae.useInsertionEffect=function(A,Q){return J.H.useInsertionEffect(A,Q)},Ae.useLayoutEffect=function(A,Q){return J.H.useLayoutEffect(A,Q)},Ae.useMemo=function(A,Q){return J.H.useMemo(A,Q)},Ae.useOptimistic=function(A,Q){return J.H.useOptimistic(A,Q)},Ae.useReducer=function(A,Q,w){return J.H.useReducer(A,Q,w)},Ae.useRef=function(A){return J.H.useRef(A)},Ae.useState=function(A){return J.H.useState(A)},Ae.useSyncExternalStore=function(A,Q,w){return J.H.useSyncExternalStore(A,Q,w)},Ae.useTransition=function(){return J.H.useTransition()},Ae.version="19.2.7",Ae}var ag;function Nf(){return ag||(ag=1,Bo.exports=bb()),Bo.exports}var Y=Nf(),Uo={exports:{}},sr={},Ho={exports:{}},qo={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/var ig;function vb(){return ig||(ig=1,(function(t){function l(N,K){var ue=N.length;N.push(K);e:for(;0<ue;){var se=ue-1>>>1,E=N[se];if(0<s(E,K))N[se]=K,N[ue]=E,ue=se;else break e}}function i(N){return N.length===0?null:N[0]}function r(N){if(N.length===0)return null;var K=N[0],ue=N.pop();if(ue!==K){N[0]=ue;e:for(var se=0,E=N.length,A=E>>>1;se<A;){var Q=2*(se+1)-1,w=N[Q],re=Q+1,be=N[re];if(0>s(w,ue))re<E&&0>s(be,w)?(N[se]=be,N[re]=ue,se=re):(N[se]=w,N[Q]=ue,se=Q);else if(re<E&&0>s(be,ue))N[se]=be,N[re]=ue,se=re;else break e}}return K}function s(N,K){var ue=N.sortIndex-K.sortIndex;return ue!==0?ue:N.id-K.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var p=[],m=[],b=1,y=null,v=3,k=!1,_=!1,M=!1,U=!1,j=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function le(N){for(var K=i(m);K!==null;){if(K.callback===null)r(m);else if(K.startTime<=N)r(m),K.sortIndex=K.expirationTime,l(p,K);else break;K=i(m)}}function W(N){if(M=!1,le(N),!_)if(i(p)!==null)_=!0,O||(O=!0,$());else{var K=i(m);K!==null&&ee(W,K.startTime-N)}}var O=!1,J=-1,oe=5,fe=-1;function z(){return U?!0:!(t.unstable_now()-fe<oe)}function I(){if(U=!1,O){var N=t.unstable_now();fe=N;var K=!0;try{e:{_=!1,M&&(M=!1,Z(J),J=-1),k=!0;var ue=v;try{t:{for(le(N),y=i(p);y!==null&&!(y.expirationTime>N&&z());){var se=y.callback;if(typeof se=="function"){y.callback=null,v=y.priorityLevel;var E=se(y.expirationTime<=N);if(N=t.unstable_now(),typeof E=="function"){y.callback=E,le(N),K=!0;break t}y===i(p)&&r(p),le(N)}else r(p);y=i(p)}if(y!==null)K=!0;else{var A=i(m);A!==null&&ee(W,A.startTime-N),K=!1}}break e}finally{y=null,v=ue,k=!1}K=void 0}}finally{K?$():O=!1}}}var $;if(typeof H=="function")$=function(){H(I)};else if(typeof MessageChannel<"u"){var me=new MessageChannel,ae=me.port2;me.port1.onmessage=I,$=function(){ae.postMessage(null)}}else $=function(){j(I,0)};function ee(N,K){J=j(function(){N(t.unstable_now())},K)}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(N){N.callback=null},t.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):oe=0<N?Math.floor(1e3/N):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(N){switch(v){case 1:case 2:case 3:var K=3;break;default:K=v}var ue=v;v=K;try{return N()}finally{v=ue}},t.unstable_requestPaint=function(){U=!0},t.unstable_runWithPriority=function(N,K){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var ue=v;v=N;try{return K()}finally{v=ue}},t.unstable_scheduleCallback=function(N,K,ue){var se=t.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?se+ue:se):ue=se,N){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=ue+E,N={id:b++,callback:K,priorityLevel:N,startTime:ue,expirationTime:E,sortIndex:-1},ue>se?(N.sortIndex=ue,l(m,N),i(p)===null&&N===i(m)&&(M?(Z(J),J=-1):M=!0,ee(W,ue-se))):(N.sortIndex=E,l(p,N),_||k||(_=!0,O||(O=!0,$()))),N},t.unstable_shouldYield=z,t.unstable_wrapCallback=function(N){var K=v;return function(){var ue=v;v=K;try{return N.apply(this,arguments)}finally{v=ue}}}})(qo)),qo}var rg;function kb(){return rg||(rg=1,Ho.exports=vb()),Ho.exports}var Vo={exports:{}},zt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var ug;function Sb(){if(ug)return zt;ug=1;var t=Nf();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(l(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(p,m,b){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:p,containerInfo:m,implementation:b}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return zt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,zt.createPortal=function(p,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return c(p,m,null,b)},zt.flushSync=function(p){var m=f.T,b=r.p;try{if(f.T=null,r.p=2,p)return p()}finally{f.T=m,r.p=b,r.d.f()}},zt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},zt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},zt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var b=m.as,y=h(b,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,k=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:k}):b==="script"&&r.d.X(p,{crossOrigin:y,integrity:v,fetchPriority:k,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},zt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=h(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},zt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,y=h(b,m.crossOrigin);r.d.L(p,b,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},zt.preloadModule=function(p,m){if(typeof p=="string")if(m){var b=h(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},zt.requestFormReset=function(p){r.d.r(p)},zt.unstable_batchedUpdates=function(p,m){return p(m)},zt.useFormState=function(p,m,b){return f.H.useFormState(p,m,b)},zt.useFormStatus=function(){return f.H.useHostTransitionStatus()},zt.version="19.2.7",zt}var sg;function wb(){if(sg)return Vo.exports;sg=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(),Vo.exports=Sb(),Vo.exports}/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var cg;function _b(){if(cg)return sr;cg=1;var t=kb(),l=Nf(),i=wb();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 c(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(c(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,u=n;;){var o=a.return;if(o===null)break;var d=o.alternate;if(d===null){if(u=o.return,u!==null){a=u;continue}break}if(o.child===d.child){for(d=o.child;d;){if(d===a)return p(o),e;if(d===u)return p(o),n;d=d.sibling}throw Error(r(188))}if(a.return!==u.return)a=o,u=d;else{for(var x=!1,S=o.child;S;){if(S===a){x=!0,a=o,u=d;break}if(S===u){x=!0,u=o,a=d;break}S=S.sibling}if(!x){for(S=d.child;S;){if(S===a){x=!0,a=d,u=o;break}if(S===u){x=!0,u=d,a=o;break}S=S.sibling}if(!x)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 b(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=b(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),k=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),H=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),J=Symbol.for("react.memo"),oe=Symbol.for("react.lazy"),fe=Symbol.for("react.activity"),z=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 me=Symbol.for("react.client.reference");function ae(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case M:return"Fragment";case j:return"Profiler";case U:return"StrictMode";case W:return"Suspense";case O:return"SuspenseList";case fe:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case H:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case le:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case J:return n=e.displayName||null,n!==null?n:ae(e.type)||"Memo";case oe:n=e._payload,e=e._init;try{return ae(e(n))}catch{}}return null}var ee=Array.isArray,N=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},se=[],E=-1;function A(e){return{current:e}}function Q(e){0>E||(e.current=se[E],se[E]=null,E--)}function w(e,n){E++,se[E]=e.current,e.current=n}var re=A(null),be=A(null),ye=A(null),je=A(null);function Ve(e,n){switch(w(ye,n),w(be,e),w(re,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?_p(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=_p(n),e=Ep(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Q(re),w(re,e)}function Qe(){Q(re),Q(be),Q(ye)}function Nt(e){e.memoizedState!==null&&w(je,e);var n=re.current,a=Ep(n,e.type);n!==a&&(w(be,e),w(re,a))}function En(e){be.current===e&&(Q(re),Q(be)),je.current===e&&(Q(je),lr._currentValue=ue)}var Dn,et;function Dt(e){if(Dn===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Dn=n&&n[1]||"",et=-1<a.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+Dn+e+et}var on=!1;function fn(e,n){if(!e||on)return"";on=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var P=function(){throw Error()};if(Object.defineProperty(P.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(P,[])}catch(V){var B=V}Reflect.construct(e,[],P)}else{try{P.call()}catch(V){B=V}e.call(P.prototype)}}else{try{throw Error()}catch(V){B=V}(P=e())&&typeof P.catch=="function"&&P.catch(function(){})}}catch(V){if(V&&B&&typeof V.stack=="string")return[V.stack,B.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=u.DetermineComponentFrameRoot(),x=d[0],S=d[1];if(x&&S){var C=x.split(`
|
|
44
|
+
`),L=S.split(`
|
|
45
|
+
`);for(o=u=0;u<C.length&&!C[u].includes("DetermineComponentFrameRoot");)u++;for(;o<L.length&&!L[o].includes("DetermineComponentFrameRoot");)o++;if(u===C.length||o===L.length)for(u=C.length-1,o=L.length-1;1<=u&&0<=o&&C[u]!==L[o];)o--;for(;1<=u&&0<=o;u--,o--)if(C[u]!==L[o]){if(u!==1||o!==1)do if(u--,o--,0>o||C[u]!==L[o]){var F=`
|
|
46
|
+
`+C[u].replace(" at new "," at ");return e.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",e.displayName)),F}while(1<=u&&0<=o);break}}}finally{on=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Dt(a):""}function ol(e,n){switch(e.tag){case 26:case 27:case 5:return Dt(e.type);case 16:return Dt("Lazy");case 13:return e.child!==n&&n!==null?Dt("Suspense Fallback"):Dt("Suspense");case 19:return Dt("SuspenseList");case 0:case 15:return fn(e.type,!1);case 11:return fn(e.type.render,!1);case 1:return fn(e.type,!0);case 31:return Dt("Activity");default:return""}}function ha(e){try{var n="",a=null;do n+=ol(e,a),a=e,e=e.return;while(e);return n}catch(u){return`
|
|
47
|
+
Error generating stack: `+u.message+`
|
|
48
|
+
`+u.stack}}var ma=Object.prototype.hasOwnProperty,pa=t.unstable_scheduleCallback,pi=t.unstable_cancelCallback,vs=t.unstable_shouldYield,ks=t.unstable_requestPaint,Bt=t.unstable_now,Ss=t.unstable_getCurrentPriorityLevel,G=t.unstable_ImmediatePriority,ie=t.unstable_UserBlockingPriority,we=t.unstable_NormalPriority,ze=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Wt=t.log,Vn=t.unstable_setDisableYieldValue,Ut=null,kt=null;function It(e){if(typeof Wt=="function"&&Vn(e),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(Ut,e)}catch{}}var tt=Math.clz32?Math.clz32:l0,fl=Math.log,Cn=Math.LN2;function l0(e){return e>>>=0,e===0?32:31-(fl(e)/Cn|0)|0}var Cr=256,Ar=262144,Tr=4194304;function Yl(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 jr(e,n,a){var u=e.pendingLanes;if(u===0)return 0;var o=0,d=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var S=u&134217727;return S!==0?(u=S&~d,u!==0?o=Yl(u):(x&=S,x!==0?o=Yl(x):a||(a=S&~e,a!==0&&(o=Yl(a))))):(S=u&~d,S!==0?o=Yl(S):x!==0?o=Yl(x):a||(a=u&~e,a!==0&&(o=Yl(a)))),o===0?0:n!==0&&n!==o&&(n&d)===0&&(d=o&-o,a=n&-n,d>=a||d===32&&(a&4194048)!==0)?n:o}function gi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function a0(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 id(){var e=Tr;return Tr<<=1,(Tr&62914560)===0&&(Tr=4194304),e}function ws(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function yi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function i0(e,n,a,u,o,d){var x=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 S=e.entanglements,C=e.expirationTimes,L=e.hiddenUpdates;for(a=x&~a;0<a;){var F=31-tt(a),P=1<<F;S[F]=0,C[F]=-1;var B=L[F];if(B!==null)for(L[F]=null,F=0;F<B.length;F++){var V=B[F];V!==null&&(V.lane&=-536870913)}a&=~P}u!==0&&rd(e,u,0),d!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=d&~(x&~n))}function rd(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 ud(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var u=31-tt(a),o=1<<u;o&n|e[u]&n&&(e[u]|=n),a&=~o}}function sd(e,n){var a=n&-n;return a=(a&42)!==0?1:_s(a),(a&(e.suspendedLanes|n))!==0?0:a}function _s(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 Es(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function cd(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:Xp(e.type))}function od(e,n){var a=K.p;try{return K.p=e,n()}finally{K.p=a}}var dl=Math.random().toString(36).slice(2),Et="__reactFiber$"+dl,Zt="__reactProps$"+dl,ga="__reactContainer$"+dl,Cs="__reactEvents$"+dl,r0="__reactListeners$"+dl,u0="__reactHandles$"+dl,fd="__reactResources$"+dl,xi="__reactMarker$"+dl;function As(e){delete e[Et],delete e[Zt],delete e[Cs],delete e[r0],delete e[u0]}function ya(e){var n=e[Et];if(n)return n;for(var a=e.parentNode;a;){if(n=a[ga]||a[Et]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=zp(e);e!==null;){if(a=e[Et])return a;e=zp(e)}return n}e=a,a=e.parentNode}return null}function xa(e){if(e=e[Et]||e[ga]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function bi(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function ba(e){var n=e[fd];return n||(n=e[fd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function wt(e){e[xi]=!0}var dd=new Set,hd={};function Il(e,n){va(e,n),va(e+"Capture",n)}function va(e,n){for(hd[e]=n,e=0;e<n.length;e++)dd.add(n[e])}var s0=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]*$"),md={},pd={};function c0(e){return ma.call(pd,e)?!0:ma.call(md,e)?!1:s0.test(e)?pd[e]=!0:(md[e]=!0,!1)}function Nr(e,n,a){if(c0(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 Dr(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 Yn(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 gd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function o0(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 o=u.get,d=u.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return o.call(this)},set:function(x){a=""+x,d.call(this,x)}}),Object.defineProperty(e,n,{enumerable:u.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ts(e){if(!e._valueTracker){var n=gd(e)?"checked":"value";e._valueTracker=o0(e,n,""+e[n])}}function yd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),u="";return e&&(u=gd(e)?e.checked?"true":"false":e.value),e=u,e!==a?(n.setValue(e),!0):!1}function zr(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 f0=/[\n"\\]/g;function hn(e){return e.replace(f0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function js(e,n,a,u,o,d,x,S){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),n!=null?x==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+dn(n)):e.value!==""+dn(n)&&(e.value=""+dn(n)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),n!=null?Ns(e,x,dn(n)):a!=null?Ns(e,x,dn(a)):u!=null&&e.removeAttribute("value"),o==null&&d!=null&&(e.defaultChecked=!!d),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+dn(S):e.removeAttribute("name")}function xd(e,n,a,u,o,d,x,S){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)){Ts(e);return}a=a!=null?""+dn(a):"",n=n!=null?""+dn(n):a,S||n===e.value||(e.value=n),e.defaultValue=n}u=u??o,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=S?e.checked:!!u,e.defaultChecked=!!u,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Ts(e)}function Ns(e,n,a){n==="number"&&zr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ka(e,n,a,u){if(e=e.options,n){n={};for(var o=0;o<a.length;o++)n["$"+a[o]]=!0;for(a=0;a<e.length;a++)o=n.hasOwnProperty("$"+e[a].value),e[a].selected!==o&&(e[a].selected=o),o&&u&&(e[a].defaultSelected=!0)}else{for(a=""+dn(a),n=null,o=0;o<e.length;o++){if(e[o].value===a){e[o].selected=!0,u&&(e[o].defaultSelected=!0);return}n!==null||e[o].disabled||(n=e[o])}n!==null&&(n.selected=!0)}}function bd(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 vd(e,n,a,u){if(n==null){if(u!=null){if(a!=null)throw Error(r(92));if(ee(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),Ts(e)}function Sa(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var d0=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 kd(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||d0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function Sd(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 o in n)u=n[o],n.hasOwnProperty(o)&&a[o]!==u&&kd(e,o,u)}else for(var d in n)n.hasOwnProperty(d)&&kd(e,d,n[d])}function Ds(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 h0=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"]]),m0=/^[\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 Or(e){return m0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function In(){}var zs=null;function Os(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var wa=null,_a=null;function wd(e){var n=xa(e);if(n&&(e=n.stateNode)){var a=e[Zt]||null;e:switch(e=n.stateNode,n.type){case"input":if(js(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 o=u[Zt]||null;if(!o)throw Error(r(90));js(u,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(n=0;n<a.length;n++)u=a[n],u.form===e.form&&yd(u)}break e;case"textarea":bd(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&ka(e,!!a.multiple,n,!1)}}}var Ms=!1;function _d(e,n,a){if(Ms)return e(n,a);Ms=!0;try{var u=e(n);return u}finally{if(Ms=!1,(wa!==null||_a!==null)&&(vu(),wa&&(n=wa,e=_a,_a=wa=null,wd(n),e)))for(n=0;n<e.length;n++)wd(e[n])}}function vi(e,n){var a=e.stateNode;if(a===null)return null;var u=a[Zt]||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 Zn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rs=!1;if(Zn)try{var ki={};Object.defineProperty(ki,"passive",{get:function(){Rs=!0}}),window.addEventListener("test",ki,ki),window.removeEventListener("test",ki,ki)}catch{Rs=!1}var hl=null,Ls=null,Mr=null;function Ed(){if(Mr)return Mr;var e,n=Ls,a=n.length,u,o="value"in hl?hl.value:hl.textContent,d=o.length;for(e=0;e<a&&n[e]===o[e];e++);var x=a-e;for(u=1;u<=x&&n[a-u]===o[d-u];u++);return Mr=o.slice(e,1<u?1-u:void 0)}function Rr(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 Lr(){return!0}function Cd(){return!1}function Ft(e){function n(a,u,o,d,x){this._reactName=a,this._targetInst=o,this.type=u,this.nativeEvent=d,this.target=x,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(a=e[S],this[S]=a?a(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Lr:Cd,this.isPropagationStopped=Cd,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=Lr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Lr)},persist:function(){},isPersistent:Lr}),n}var Zl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Br=Ft(Zl),Si=y({},Zl,{view:0,detail:0}),p0=Ft(Si),Bs,Us,wi,Ur=y({},Si,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qs,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!==wi&&(wi&&e.type==="mousemove"?(Bs=e.screenX-wi.screenX,Us=e.screenY-wi.screenY):Us=Bs=0,wi=e),Bs)},movementY:function(e){return"movementY"in e?e.movementY:Us}}),Ad=Ft(Ur),g0=y({},Ur,{dataTransfer:0}),y0=Ft(g0),x0=y({},Si,{relatedTarget:0}),Hs=Ft(x0),b0=y({},Zl,{animationName:0,elapsedTime:0,pseudoElement:0}),v0=Ft(b0),k0=y({},Zl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),S0=Ft(k0),w0=y({},Zl,{data:0}),Td=Ft(w0),_0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},E0={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"},C0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function A0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=C0[e])?!!n[e]:!1}function qs(){return A0}var T0=y({},Si,{key:function(e){if(e.key){var n=_0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Rr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?E0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qs,charCode:function(e){return e.type==="keypress"?Rr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Rr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),j0=Ft(T0),N0=y({},Ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jd=Ft(N0),D0=y({},Si,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qs}),z0=Ft(D0),O0=y({},Zl,{propertyName:0,elapsedTime:0,pseudoElement:0}),M0=Ft(O0),R0=y({},Ur,{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}),L0=Ft(R0),B0=y({},Zl,{newState:0,oldState:0}),U0=Ft(B0),H0=[9,13,27,32],Vs=Zn&&"CompositionEvent"in window,_i=null;Zn&&"documentMode"in document&&(_i=document.documentMode);var q0=Zn&&"TextEvent"in window&&!_i,Nd=Zn&&(!Vs||_i&&8<_i&&11>=_i),Dd=" ",zd=!1;function Od(e,n){switch(e){case"keyup":return H0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Md(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ea=!1;function V0(e,n){switch(e){case"compositionend":return Md(n);case"keypress":return n.which!==32?null:(zd=!0,Dd);case"textInput":return e=n.data,e===Dd&&zd?null:e;default:return null}}function Y0(e,n){if(Ea)return e==="compositionend"||!Vs&&Od(e,n)?(e=Ed(),Mr=Ls=hl=null,Ea=!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 Nd&&n.locale!=="ko"?null:n.data;default:return null}}var I0={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 Rd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!I0[e.type]:n==="textarea"}function Ld(e,n,a,u){wa?_a?_a.push(u):_a=[u]:wa=u,n=Au(n,"onChange"),0<n.length&&(a=new Br("onChange","change",null,a,u),e.push({event:a,listeners:n}))}var Ei=null,Ci=null;function Z0(e){xp(e,0)}function Hr(e){var n=bi(e);if(yd(n))return e}function Bd(e,n){if(e==="change")return n}var Ud=!1;if(Zn){var Ys;if(Zn){var Is="oninput"in document;if(!Is){var Hd=document.createElement("div");Hd.setAttribute("oninput","return;"),Is=typeof Hd.oninput=="function"}Ys=Is}else Ys=!1;Ud=Ys&&(!document.documentMode||9<document.documentMode)}function qd(){Ei&&(Ei.detachEvent("onpropertychange",Vd),Ci=Ei=null)}function Vd(e){if(e.propertyName==="value"&&Hr(Ci)){var n=[];Ld(n,Ci,e,Os(e)),_d(Z0,n)}}function F0(e,n,a){e==="focusin"?(qd(),Ei=n,Ci=a,Ei.attachEvent("onpropertychange",Vd)):e==="focusout"&&qd()}function Q0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hr(Ci)}function G0(e,n){if(e==="click")return Hr(n)}function X0(e,n){if(e==="input"||e==="change")return Hr(n)}function K0(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var en=typeof Object.is=="function"?Object.is:K0;function Ai(e,n){if(en(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 o=a[u];if(!ma.call(n,o)||!en(e[o],n[o]))return!1}return!0}function Yd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Id(e,n){var a=Yd(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=Yd(a)}}function Zd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Zd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Fd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=zr(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=zr(e.document)}return n}function Zs(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 J0=Zn&&"documentMode"in document&&11>=document.documentMode,Ca=null,Fs=null,Ti=null,Qs=!1;function Qd(e,n,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Qs||Ca==null||Ca!==zr(u)||(u=Ca,"selectionStart"in u&&Zs(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}),Ti&&Ai(Ti,u)||(Ti=u,u=Au(Fs,"onSelect"),0<u.length&&(n=new Br("onSelect","select",null,n,a),e.push({event:n,listeners:u}),n.target=Ca)))}function Fl(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var Aa={animationend:Fl("Animation","AnimationEnd"),animationiteration:Fl("Animation","AnimationIteration"),animationstart:Fl("Animation","AnimationStart"),transitionrun:Fl("Transition","TransitionRun"),transitionstart:Fl("Transition","TransitionStart"),transitioncancel:Fl("Transition","TransitionCancel"),transitionend:Fl("Transition","TransitionEnd")},Gs={},Gd={};Zn&&(Gd=document.createElement("div").style,"AnimationEvent"in window||(delete Aa.animationend.animation,delete Aa.animationiteration.animation,delete Aa.animationstart.animation),"TransitionEvent"in window||delete Aa.transitionend.transition);function Ql(e){if(Gs[e])return Gs[e];if(!Aa[e])return e;var n=Aa[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in Gd)return Gs[e]=n[a];return e}var Xd=Ql("animationend"),Kd=Ql("animationiteration"),Jd=Ql("animationstart"),$0=Ql("transitionrun"),P0=Ql("transitionstart"),W0=Ql("transitioncancel"),$d=Ql("transitionend"),Pd=new Map,Xs="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(" ");Xs.push("scrollEnd");function An(e,n){Pd.set(e,n),Il(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=[],Ta=0,Ks=0;function Vr(){for(var e=Ta,n=Ks=Ta=0;n<e;){var a=mn[n];mn[n++]=null;var u=mn[n];mn[n++]=null;var o=mn[n];mn[n++]=null;var d=mn[n];if(mn[n++]=null,u!==null&&o!==null){var x=u.pending;x===null?o.next=o:(o.next=x.next,x.next=o),u.pending=o}d!==0&&Wd(a,o,d)}}function Yr(e,n,a,u){mn[Ta++]=e,mn[Ta++]=n,mn[Ta++]=a,mn[Ta++]=u,Ks|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function Js(e,n,a,u){return Yr(e,n,a,u),Ir(e)}function Gl(e,n){return Yr(e,null,null,n),Ir(e)}function Wd(e,n,a){e.lanes|=a;var u=e.alternate;u!==null&&(u.lanes|=a);for(var o=!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||(o=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,o&&n!==null&&(o=31-tt(a),e=d.hiddenUpdates,u=e[o],u===null?e[o]=[n]:u.push(n),n.lane=a|536870912),d):null}function Ir(e){if(50<Ji)throw Ji=0,io=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ja={};function e1(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 tn(e,n,a,u){return new e1(e,n,a,u)}function $s(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Fn(e,n){var a=e.alternate;return a===null?(a=tn(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 eh(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 Zr(e,n,a,u,o,d){var x=0;if(u=e,typeof e=="function")$s(e)&&(x=1);else if(typeof e=="string")x=ib(e,a,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case fe:return e=tn(31,a,n,o),e.elementType=fe,e.lanes=d,e;case M:return Xl(a.children,o,d,n);case U:x=8,o|=24;break;case j:return e=tn(12,a,n,o|2),e.elementType=j,e.lanes=d,e;case W:return e=tn(13,a,n,o),e.elementType=W,e.lanes=d,e;case O:return e=tn(19,a,n,o),e.elementType=O,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:x=10;break e;case Z:x=9;break e;case le:x=11;break e;case J:x=14;break e;case oe:x=16,u=null;break e}x=29,a=Error(r(130,e===null?"null":typeof e,"")),u=null}return n=tn(x,a,n,o),n.elementType=e,n.type=u,n.lanes=d,n}function Xl(e,n,a,u){return e=tn(7,e,u,n),e.lanes=a,e}function Ps(e,n,a){return e=tn(6,e,null,n),e.lanes=a,e}function th(e){var n=tn(18,null,null,0);return n.stateNode=e,n}function Ws(e,n,a){return n=tn(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var nh=new WeakMap;function pn(e,n){if(typeof e=="object"&&e!==null){var a=nh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:ha(n)},nh.set(e,n),n)}return{value:e,source:n,stack:ha(n)}}var Na=[],Da=0,Fr=null,ji=0,gn=[],yn=0,ml=null,zn=1,On="";function Qn(e,n){Na[Da++]=ji,Na[Da++]=Fr,Fr=e,ji=n}function lh(e,n,a){gn[yn++]=zn,gn[yn++]=On,gn[yn++]=ml,ml=e;var u=zn;e=On;var o=32-tt(u)-1;u&=~(1<<o),a+=1;var d=32-tt(n)+o;if(30<d){var x=o-o%5;d=(u&(1<<x)-1).toString(32),u>>=x,o-=x,zn=1<<32-tt(n)+o|a<<o|u,On=d+e}else zn=1<<d|a<<o|u,On=e}function ec(e){e.return!==null&&(Qn(e,1),lh(e,1,0))}function tc(e){for(;e===Fr;)Fr=Na[--Da],Na[Da]=null,ji=Na[--Da],Na[Da]=null;for(;e===ml;)ml=gn[--yn],gn[yn]=null,On=gn[--yn],gn[yn]=null,zn=gn[--yn],gn[yn]=null}function ah(e,n){gn[yn++]=zn,gn[yn++]=On,gn[yn++]=ml,zn=n.id,On=n.overflow,ml=e}var Ct=null,rt=null,Ue=!1,pl=null,xn=!1,nc=Error(r(519));function gl(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ni(pn(n,e)),nc}function ih(e){var n=e.stateNode,a=e.type,u=e.memoizedProps;switch(n[Et]=e,n[Zt]=u,a){case"dialog":Me("cancel",n),Me("close",n);break;case"iframe":case"object":case"embed":Me("load",n);break;case"video":case"audio":for(a=0;a<Pi.length;a++)Me(Pi[a],n);break;case"source":Me("error",n);break;case"img":case"image":case"link":Me("error",n),Me("load",n);break;case"details":Me("toggle",n);break;case"input":Me("invalid",n),xd(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Me("invalid",n);break;case"textarea":Me("invalid",n),vd(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||Sp(n.textContent,a)?(u.popover!=null&&(Me("beforetoggle",n),Me("toggle",n)),u.onScroll!=null&&Me("scroll",n),u.onScrollEnd!=null&&Me("scrollend",n),u.onClick!=null&&(n.onclick=In),n=!0):n=!1,n||gl(e,!0)}function rh(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:Ct=Ct.return}}function za(e){if(e!==Ct)return!1;if(!Ue)return rh(e),Ue=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||ko(e.type,e.memoizedProps)),a=!a),a&&rt&&gl(e),rh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));rt=Dp(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));rt=Dp(e)}else n===27?(n=rt,Nl(e.type)?(e=Co,Co=null,rt=e):rt=n):rt=Ct?vn(e.stateNode.nextSibling):null;return!0}function Kl(){rt=Ct=null,Ue=!1}function lc(){var e=pl;return e!==null&&(Kt===null?Kt=e:Kt.push.apply(Kt,e),pl=null),e}function Ni(e){pl===null?pl=[e]:pl.push(e)}var ac=A(null),Jl=null,Gn=null;function yl(e,n,a){w(ac,n._currentValue),n._currentValue=a}function Xn(e){e._currentValue=ac.current,Q(ac)}function ic(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 rc(e,n,a,u){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var d=o.dependencies;if(d!==null){var x=o.child;d=d.firstContext;e:for(;d!==null;){var S=d;d=o;for(var C=0;C<n.length;C++)if(S.context===n[C]){d.lanes|=a,S=d.alternate,S!==null&&(S.lanes|=a),ic(d.return,a,e),u||(x=null);break e}d=S.next}}else if(o.tag===18){if(x=o.return,x===null)throw Error(r(341));x.lanes|=a,d=x.alternate,d!==null&&(d.lanes|=a),ic(x,a,e),x=null}else x=o.child;if(x!==null)x.return=o;else for(x=o;x!==null;){if(x===e){x=null;break}if(o=x.sibling,o!==null){o.return=x.return,x=o;break}x=x.return}o=x}}function Oa(e,n,a,u){e=null;for(var o=n,d=!1;o!==null;){if(!d){if((o.flags&524288)!==0)d=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var x=o.alternate;if(x===null)throw Error(r(387));if(x=x.memoizedProps,x!==null){var S=o.type;en(o.pendingProps.value,x.value)||(e!==null?e.push(S):e=[S])}}else if(o===je.current){if(x=o.alternate,x===null)throw Error(r(387));x.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(lr):e=[lr])}o=o.return}e!==null&&rc(n,e,a,u),n.flags|=262144}function Qr(e){for(e=e.firstContext;e!==null;){if(!en(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $l(e){Jl=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function At(e){return uh(Jl,e)}function Gr(e,n){return Jl===null&&$l(e),uh(e,n)}function uh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Gn===null){if(e===null)throw Error(r(308));Gn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Gn=Gn.next=n;return a}var t1=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()})}},n1=t.unstable_scheduleCallback,l1=t.unstable_NormalPriority,pt={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function uc(){return{controller:new t1,data:new Map,refCount:0}}function Di(e){e.refCount--,e.refCount===0&&n1(l1,function(){e.controller.abort()})}var zi=null,sc=0,Ma=0,Ra=null;function a1(e,n){if(zi===null){var a=zi=[];sc=0,Ma=fo(),Ra={status:"pending",value:void 0,then:function(u){a.push(u)}}}return sc++,n.then(sh,sh),n}function sh(){if(--sc===0&&zi!==null){Ra!==null&&(Ra.status="fulfilled");var e=zi;zi=null,Ma=0,Ra=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function i1(e,n){var a=[],u={status:"pending",value:null,reason:null,then:function(o){a.push(o)}};return e.then(function(){u.status="fulfilled",u.value=n;for(var o=0;o<a.length;o++)(0,a[o])(n)},function(o){for(u.status="rejected",u.reason=o,o=0;o<a.length;o++)(0,a[o])(void 0)}),u}var ch=N.S;N.S=function(e,n){Qm=Bt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&a1(e,n),ch!==null&&ch(e,n)};var Pl=A(null);function cc(){var e=Pl.current;return e!==null?e:nt.pooledCache}function Xr(e,n){n===null?w(Pl,Pl.current):w(Pl,n.pool)}function oh(){var e=cc();return e===null?null:{parent:pt._currentValue,pool:e}}var La=Error(r(460)),oc=Error(r(474)),Kr=Error(r(542)),Jr={then:function(){}};function fh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function dh(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,mh(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 o=n;o.status="fulfilled",o.value=u}},function(u){if(n.status==="pending"){var o=n;o.status="rejected",o.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,mh(e),e}throw ea=n,La}}function Wl(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ea=a,La):a}}var ea=null;function hh(){if(ea===null)throw Error(r(459));var e=ea;return ea=null,e}function mh(e){if(e===La||e===Kr)throw Error(r(483))}var Ba=null,Oi=0;function $r(e){var n=Oi;return Oi+=1,Ba===null&&(Ba=[]),dh(Ba,e,n)}function Mi(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Pr(e,n){throw n.$$typeof===v?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function ph(e){function n(D,T){if(e){var R=D.deletions;R===null?(D.deletions=[T],D.flags|=16):R.push(T)}}function a(D,T){if(!e)return null;for(;T!==null;)n(D,T),T=T.sibling;return null}function u(D){for(var T=new Map;D!==null;)D.key!==null?T.set(D.key,D):T.set(D.index,D),D=D.sibling;return T}function o(D,T){return D=Fn(D,T),D.index=0,D.sibling=null,D}function d(D,T,R){return D.index=R,e?(R=D.alternate,R!==null?(R=R.index,R<T?(D.flags|=67108866,T):R):(D.flags|=67108866,T)):(D.flags|=1048576,T)}function x(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function S(D,T,R,X){return T===null||T.tag!==6?(T=Ps(R,D.mode,X),T.return=D,T):(T=o(T,R),T.return=D,T)}function C(D,T,R,X){var xe=R.type;return xe===M?F(D,T,R.props.children,X,R.key):T!==null&&(T.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===oe&&Wl(xe)===T.type)?(T=o(T,R.props),Mi(T,R),T.return=D,T):(T=Zr(R.type,R.key,R.props,null,D.mode,X),Mi(T,R),T.return=D,T)}function L(D,T,R,X){return T===null||T.tag!==4||T.stateNode.containerInfo!==R.containerInfo||T.stateNode.implementation!==R.implementation?(T=Ws(R,D.mode,X),T.return=D,T):(T=o(T,R.children||[]),T.return=D,T)}function F(D,T,R,X,xe){return T===null||T.tag!==7?(T=Xl(R,D.mode,X,xe),T.return=D,T):(T=o(T,R),T.return=D,T)}function P(D,T,R){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=Ps(""+T,D.mode,R),T.return=D,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case k:return R=Zr(T.type,T.key,T.props,null,D.mode,R),Mi(R,T),R.return=D,R;case _:return T=Ws(T,D.mode,R),T.return=D,T;case oe:return T=Wl(T),P(D,T,R)}if(ee(T)||$(T))return T=Xl(T,D.mode,R,null),T.return=D,T;if(typeof T.then=="function")return P(D,$r(T),R);if(T.$$typeof===H)return P(D,Gr(D,T),R);Pr(D,T)}return null}function B(D,T,R,X){var xe=T!==null?T.key:null;if(typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint")return xe!==null?null:S(D,T,""+R,X);if(typeof R=="object"&&R!==null){switch(R.$$typeof){case k:return R.key===xe?C(D,T,R,X):null;case _:return R.key===xe?L(D,T,R,X):null;case oe:return R=Wl(R),B(D,T,R,X)}if(ee(R)||$(R))return xe!==null?null:F(D,T,R,X,null);if(typeof R.then=="function")return B(D,T,$r(R),X);if(R.$$typeof===H)return B(D,T,Gr(D,R),X);Pr(D,R)}return null}function V(D,T,R,X,xe){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return D=D.get(R)||null,S(T,D,""+X,xe);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case k:return D=D.get(X.key===null?R:X.key)||null,C(T,D,X,xe);case _:return D=D.get(X.key===null?R:X.key)||null,L(T,D,X,xe);case oe:return X=Wl(X),V(D,T,R,X,xe)}if(ee(X)||$(X))return D=D.get(R)||null,F(T,D,X,xe,null);if(typeof X.then=="function")return V(D,T,R,$r(X),xe);if(X.$$typeof===H)return V(D,T,R,Gr(T,X),xe);Pr(T,X)}return null}function de(D,T,R,X){for(var xe=null,Ye=null,pe=T,Ne=T=0,Be=null;pe!==null&&Ne<R.length;Ne++){pe.index>Ne?(Be=pe,pe=null):Be=pe.sibling;var Ie=B(D,pe,R[Ne],X);if(Ie===null){pe===null&&(pe=Be);break}e&&pe&&Ie.alternate===null&&n(D,pe),T=d(Ie,T,Ne),Ye===null?xe=Ie:Ye.sibling=Ie,Ye=Ie,pe=Be}if(Ne===R.length)return a(D,pe),Ue&&Qn(D,Ne),xe;if(pe===null){for(;Ne<R.length;Ne++)pe=P(D,R[Ne],X),pe!==null&&(T=d(pe,T,Ne),Ye===null?xe=pe:Ye.sibling=pe,Ye=pe);return Ue&&Qn(D,Ne),xe}for(pe=u(pe);Ne<R.length;Ne++)Be=V(pe,D,Ne,R[Ne],X),Be!==null&&(e&&Be.alternate!==null&&pe.delete(Be.key===null?Ne:Be.key),T=d(Be,T,Ne),Ye===null?xe=Be:Ye.sibling=Be,Ye=Be);return e&&pe.forEach(function(Rl){return n(D,Rl)}),Ue&&Qn(D,Ne),xe}function ke(D,T,R,X){if(R==null)throw Error(r(151));for(var xe=null,Ye=null,pe=T,Ne=T=0,Be=null,Ie=R.next();pe!==null&&!Ie.done;Ne++,Ie=R.next()){pe.index>Ne?(Be=pe,pe=null):Be=pe.sibling;var Rl=B(D,pe,Ie.value,X);if(Rl===null){pe===null&&(pe=Be);break}e&&pe&&Rl.alternate===null&&n(D,pe),T=d(Rl,T,Ne),Ye===null?xe=Rl:Ye.sibling=Rl,Ye=Rl,pe=Be}if(Ie.done)return a(D,pe),Ue&&Qn(D,Ne),xe;if(pe===null){for(;!Ie.done;Ne++,Ie=R.next())Ie=P(D,Ie.value,X),Ie!==null&&(T=d(Ie,T,Ne),Ye===null?xe=Ie:Ye.sibling=Ie,Ye=Ie);return Ue&&Qn(D,Ne),xe}for(pe=u(pe);!Ie.done;Ne++,Ie=R.next())Ie=V(pe,D,Ne,Ie.value,X),Ie!==null&&(e&&Ie.alternate!==null&&pe.delete(Ie.key===null?Ne:Ie.key),T=d(Ie,T,Ne),Ye===null?xe=Ie:Ye.sibling=Ie,Ye=Ie);return e&&pe.forEach(function(gb){return n(D,gb)}),Ue&&Qn(D,Ne),xe}function Pe(D,T,R,X){if(typeof R=="object"&&R!==null&&R.type===M&&R.key===null&&(R=R.props.children),typeof R=="object"&&R!==null){switch(R.$$typeof){case k:e:{for(var xe=R.key;T!==null;){if(T.key===xe){if(xe=R.type,xe===M){if(T.tag===7){a(D,T.sibling),X=o(T,R.props.children),X.return=D,D=X;break e}}else if(T.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===oe&&Wl(xe)===T.type){a(D,T.sibling),X=o(T,R.props),Mi(X,R),X.return=D,D=X;break e}a(D,T);break}else n(D,T);T=T.sibling}R.type===M?(X=Xl(R.props.children,D.mode,X,R.key),X.return=D,D=X):(X=Zr(R.type,R.key,R.props,null,D.mode,X),Mi(X,R),X.return=D,D=X)}return x(D);case _:e:{for(xe=R.key;T!==null;){if(T.key===xe)if(T.tag===4&&T.stateNode.containerInfo===R.containerInfo&&T.stateNode.implementation===R.implementation){a(D,T.sibling),X=o(T,R.children||[]),X.return=D,D=X;break e}else{a(D,T);break}else n(D,T);T=T.sibling}X=Ws(R,D.mode,X),X.return=D,D=X}return x(D);case oe:return R=Wl(R),Pe(D,T,R,X)}if(ee(R))return de(D,T,R,X);if($(R)){if(xe=$(R),typeof xe!="function")throw Error(r(150));return R=xe.call(R),ke(D,T,R,X)}if(typeof R.then=="function")return Pe(D,T,$r(R),X);if(R.$$typeof===H)return Pe(D,T,Gr(D,R),X);Pr(D,R)}return typeof R=="string"&&R!==""||typeof R=="number"||typeof R=="bigint"?(R=""+R,T!==null&&T.tag===6?(a(D,T.sibling),X=o(T,R),X.return=D,D=X):(a(D,T),X=Ps(R,D.mode,X),X.return=D,D=X),x(D)):a(D,T)}return function(D,T,R,X){try{Oi=0;var xe=Pe(D,T,R,X);return Ba=null,xe}catch(pe){if(pe===La||pe===Kr)throw pe;var Ye=tn(29,pe,null,D.mode);return Ye.lanes=X,Ye.return=D,Ye}finally{}}}var ta=ph(!0),gh=ph(!1),xl=!1;function fc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dc(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 bl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vl(e,n,a){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(Fe&2)!==0){var o=u.pending;return o===null?n.next=n:(n.next=o.next,o.next=n),u.pending=n,n=Ir(e),Wd(e,null,a),n}return Yr(e,u,n,a),Ir(e)}function Ri(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,ud(e,a)}}function hc(e,n){var a=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var o=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?o=d=x:d=d.next=x,a=a.next}while(a!==null);d===null?o=d=n:d=d.next=n}else o=d=n;a={baseState:u.baseState,firstBaseUpdate:o,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 mc=!1;function Li(){if(mc){var e=Ra;if(e!==null)throw e}}function Bi(e,n,a,u){mc=!1;var o=e.updateQueue;xl=!1;var d=o.firstBaseUpdate,x=o.lastBaseUpdate,S=o.shared.pending;if(S!==null){o.shared.pending=null;var C=S,L=C.next;C.next=null,x===null?d=L:x.next=L,x=C;var F=e.alternate;F!==null&&(F=F.updateQueue,S=F.lastBaseUpdate,S!==x&&(S===null?F.firstBaseUpdate=L:S.next=L,F.lastBaseUpdate=C))}if(d!==null){var P=o.baseState;x=0,F=L=C=null,S=d;do{var B=S.lane&-536870913,V=B!==S.lane;if(V?(Le&B)===B:(u&B)===B){B!==0&&B===Ma&&(mc=!0),F!==null&&(F=F.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var de=e,ke=S;B=n;var Pe=a;switch(ke.tag){case 1:if(de=ke.payload,typeof de=="function"){P=de.call(Pe,P,B);break e}P=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=ke.payload,B=typeof de=="function"?de.call(Pe,P,B):de,B==null)break e;P=y({},P,B);break e;case 2:xl=!0}}B=S.callback,B!==null&&(e.flags|=64,V&&(e.flags|=8192),V=o.callbacks,V===null?o.callbacks=[B]:V.push(B))}else V={lane:B,tag:S.tag,payload:S.payload,callback:S.callback,next:null},F===null?(L=F=V,C=P):F=F.next=V,x|=B;if(S=S.next,S===null){if(S=o.shared.pending,S===null)break;V=S,S=V.next,V.next=null,o.lastBaseUpdate=V,o.shared.pending=null}}while(!0);F===null&&(C=P),o.baseState=C,o.firstBaseUpdate=L,o.lastBaseUpdate=F,d===null&&(o.shared.lanes=0),El|=x,e.lanes=x,e.memoizedState=P}}function yh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function xh(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)yh(a[e],n)}var Ua=A(null),Wr=A(0);function bh(e,n){e=ll,w(Wr,e),w(Ua,n),ll=e|n.baseLanes}function pc(){w(Wr,ll),w(Ua,Ua.current)}function gc(){ll=Wr.current,Q(Ua),Q(Wr)}var nn=A(null),bn=null;function kl(e){var n=e.alternate;w(ht,ht.current&1),w(nn,e),bn===null&&(n===null||Ua.current!==null||n.memoizedState!==null)&&(bn=e)}function yc(e){w(ht,ht.current),w(nn,e),bn===null&&(bn=e)}function vh(e){e.tag===22?(w(ht,ht.current),w(nn,e),bn===null&&(bn=e)):Sl()}function Sl(){w(ht,ht.current),w(nn,nn.current)}function ln(e){Q(nn),bn===e&&(bn=null),Q(ht)}var ht=A(0);function eu(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||_o(a)||Eo(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 Kn=0,Te=null,Je=null,gt=null,tu=!1,Ha=!1,na=!1,nu=0,Ui=0,qa=null,r1=0;function ft(){throw Error(r(321))}function xc(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!en(e[a],n[a]))return!1;return!0}function bc(e,n,a,u,o,d){return Kn=d,Te=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,N.H=e===null||e.memoizedState===null?lm:Mc,na=!1,d=a(u,o),na=!1,Ha&&(d=Sh(n,a,u,o)),kh(e),d}function kh(e){N.H=Vi;var n=Je!==null&&Je.next!==null;if(Kn=0,gt=Je=Te=null,tu=!1,Ui=0,qa=null,n)throw Error(r(300));e===null||yt||(e=e.dependencies,e!==null&&Qr(e)&&(yt=!0))}function Sh(e,n,a,u){Te=e;var o=0;do{if(Ha&&(qa=null),Ui=0,Ha=!1,25<=o)throw Error(r(301));if(o+=1,gt=Je=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}N.H=am,d=n(a,u)}while(Ha);return d}function u1(){var e=N.H,n=e.useState()[0];return n=typeof n.then=="function"?Hi(n):n,e=e.useState()[0],(Je!==null?Je.memoizedState:null)!==e&&(Te.flags|=1024),n}function vc(){var e=nu!==0;return nu=0,e}function kc(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Sc(e){if(tu){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}tu=!1}Kn=0,gt=Je=Te=null,Ha=!1,Ui=nu=0,qa=null}function Ht(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gt===null?Te.memoizedState=gt=e:gt=gt.next=e,gt}function mt(){if(Je===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Je.next;var n=gt===null?Te.memoizedState:gt.next;if(n!==null)gt=n,Je=e;else{if(e===null)throw Te.alternate===null?Error(r(467)):Error(r(310));Je=e,e={memoizedState:Je.memoizedState,baseState:Je.baseState,baseQueue:Je.baseQueue,queue:Je.queue,next:null},gt===null?Te.memoizedState=gt=e:gt=gt.next=e}return gt}function lu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hi(e){var n=Ui;return Ui+=1,qa===null&&(qa=[]),e=dh(qa,e,n),n=Te,(gt===null?n.memoizedState:gt.next)===null&&(n=n.alternate,N.H=n===null||n.memoizedState===null?lm:Mc),e}function au(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Hi(e);if(e.$$typeof===H)return At(e)}throw Error(r(438,String(e)))}function wc(e){var n=null,a=Te.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var u=Te.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(o){return o.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=lu(),Te.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]=z;return n.index++,a}function Jn(e,n){return typeof n=="function"?n(e):n}function iu(e){var n=mt();return _c(n,Je,e)}function _c(e,n,a){var u=e.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var o=e.baseQueue,d=u.pending;if(d!==null){if(o!==null){var x=o.next;o.next=d.next,d.next=x}n.baseQueue=o=d,u.pending=null}if(d=e.baseState,o===null)e.memoizedState=d;else{n=o.next;var S=x=null,C=null,L=n,F=!1;do{var P=L.lane&-536870913;if(P!==L.lane?(Le&P)===P:(Kn&P)===P){var B=L.revertLane;if(B===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),P===Ma&&(F=!0);else if((Kn&B)===B){L=L.next,B===Ma&&(F=!0);continue}else P={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(S=C=P,x=d):C=C.next=P,Te.lanes|=B,El|=B;P=L.action,na&&a(d,P),d=L.hasEagerState?L.eagerState:a(d,P)}else B={lane:P,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(S=C=B,x=d):C=C.next=B,Te.lanes|=P,El|=P;L=L.next}while(L!==null&&L!==n);if(C===null?x=d:C.next=S,!en(d,e.memoizedState)&&(yt=!0,F&&(a=Ra,a!==null)))throw a;e.memoizedState=d,e.baseState=x,e.baseQueue=C,u.lastRenderedState=d}return o===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function Ec(e){var n=mt(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var u=a.dispatch,o=a.pending,d=n.memoizedState;if(o!==null){a.pending=null;var x=o=o.next;do d=e(d,x.action),x=x.next;while(x!==o);en(d,n.memoizedState)||(yt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),a.lastRenderedState=d}return[d,u]}function wh(e,n,a){var u=Te,o=mt(),d=Ue;if(d){if(a===void 0)throw Error(r(407));a=a()}else a=n();var x=!en((Je||o).memoizedState,a);if(x&&(o.memoizedState=a,yt=!0),o=o.queue,Tc(Ch.bind(null,u,o,e),[e]),o.getSnapshot!==n||x||gt!==null&>.memoizedState.tag&1){if(u.flags|=2048,Va(9,{destroy:void 0},Eh.bind(null,u,o,a,n),null),nt===null)throw Error(r(349));d||(Kn&127)!==0||_h(u,n,a)}return a}function _h(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=Te.updateQueue,n===null?(n=lu(),Te.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function Eh(e,n,a,u){n.value=a,n.getSnapshot=u,Ah(n)&&Th(e)}function Ch(e,n,a){return a(function(){Ah(n)&&Th(e)})}function Ah(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!en(e,a)}catch{return!0}}function Th(e){var n=Gl(e,2);n!==null&&Jt(n,e,2)}function Cc(e){var n=Ht();if(typeof e=="function"){var a=e;if(e=a(),na){It(!0);try{a()}finally{It(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:e},n}function jh(e,n,a,u){return e.baseState=a,_c(e,Je,typeof u=="function"?u:Jn)}function s1(e,n,a,u,o){if(su(e))throw Error(r(485));if(e=n.action,e!==null){var d={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){d.listeners.push(x)}};N.T!==null?a(!0):d.isTransition=!1,u(d),a=n.pending,a===null?(d.next=n.pending=d,Nh(n,d)):(d.next=a.next,n.pending=a.next=d)}}function Nh(e,n){var a=n.action,u=n.payload,o=e.state;if(n.isTransition){var d=N.T,x={};N.T=x;try{var S=a(o,u),C=N.S;C!==null&&C(x,S),Dh(e,n,S)}catch(L){Ac(e,n,L)}finally{d!==null&&x.types!==null&&(d.types=x.types),N.T=d}}else try{d=a(o,u),Dh(e,n,d)}catch(L){Ac(e,n,L)}}function Dh(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){zh(e,n,u)},function(u){return Ac(e,n,u)}):zh(e,n,a)}function zh(e,n,a){n.status="fulfilled",n.value=a,Oh(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,Nh(e,a)))}function Ac(e,n,a){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=a,Oh(n),n=n.next;while(n!==u)}e.action=null}function Oh(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Mh(e,n){return n}function Rh(e,n){if(Ue){var a=nt.formState;if(a!==null){e:{var u=Te;if(Ue){if(rt){t:{for(var o=rt,d=xn;o.nodeType!==8;){if(!d){o=null;break t}if(o=vn(o.nextSibling),o===null){o=null;break t}}d=o.data,o=d==="F!"||d==="F"?o:null}if(o){rt=vn(o.nextSibling),u=o.data==="F!";break e}}gl(u)}u=!1}u&&(n=a[0])}}return a=Ht(),a.memoizedState=a.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Mh,lastRenderedState:n},a.queue=u,a=em.bind(null,Te,u),u.dispatch=a,u=Cc(!1),d=Oc.bind(null,Te,!1,u.queue),u=Ht(),o={state:n,dispatch:null,action:e,pending:null},u.queue=o,a=s1.bind(null,Te,o,d,a),o.dispatch=a,u.memoizedState=e,[n,a,!1]}function Lh(e){var n=mt();return Bh(n,Je,e)}function Bh(e,n,a){if(n=_c(e,n,Mh)[0],e=iu(Jn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Hi(n)}catch(x){throw x===La?Kr:x}else u=n;n=mt();var o=n.queue,d=o.dispatch;return a!==n.memoizedState&&(Te.flags|=2048,Va(9,{destroy:void 0},c1.bind(null,o,a),null)),[u,d,e]}function c1(e,n){e.action=n}function Uh(e){var n=mt(),a=Je;if(a!==null)return Bh(n,a,e);mt(),n=n.memoizedState,a=mt();var u=a.queue.dispatch;return a.memoizedState=e,[n,u,!1]}function Va(e,n,a,u){return e={tag:e,create:a,deps:u,inst:n,next:null},n=Te.updateQueue,n===null&&(n=lu(),Te.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 Hh(){return mt().memoizedState}function ru(e,n,a,u){var o=Ht();Te.flags|=e,o.memoizedState=Va(1|n,{destroy:void 0},a,u===void 0?null:u)}function uu(e,n,a,u){var o=mt();u=u===void 0?null:u;var d=o.memoizedState.inst;Je!==null&&u!==null&&xc(u,Je.memoizedState.deps)?o.memoizedState=Va(n,d,a,u):(Te.flags|=e,o.memoizedState=Va(1|n,d,a,u))}function qh(e,n){ru(8390656,8,e,n)}function Tc(e,n){uu(2048,8,e,n)}function o1(e){Te.flags|=4;var n=Te.updateQueue;if(n===null)n=lu(),Te.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function Vh(e){var n=mt().memoizedState;return o1({ref:n,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Yh(e,n){return uu(4,2,e,n)}function Ih(e,n){return uu(4,4,e,n)}function Zh(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 Fh(e,n,a){a=a!=null?a.concat([e]):null,uu(4,4,Zh.bind(null,n,e),a)}function jc(){}function Qh(e,n){var a=mt();n=n===void 0?null:n;var u=a.memoizedState;return n!==null&&xc(n,u[1])?u[0]:(a.memoizedState=[e,n],e)}function Gh(e,n){var a=mt();n=n===void 0?null:n;var u=a.memoizedState;if(n!==null&&xc(n,u[1]))return u[0];if(u=e(),na){It(!0);try{e()}finally{It(!1)}}return a.memoizedState=[u,n],u}function Nc(e,n,a){return a===void 0||(Kn&1073741824)!==0&&(Le&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=Xm(),Te.lanes|=e,El|=e,a)}function Xh(e,n,a,u){return en(a,n)?a:Ua.current!==null?(e=Nc(e,a,u),en(e,n)||(yt=!0),e):(Kn&42)===0||(Kn&1073741824)!==0&&(Le&261930)===0?(yt=!0,e.memoizedState=a):(e=Xm(),Te.lanes|=e,El|=e,n)}function Kh(e,n,a,u,o){var d=K.p;K.p=d!==0&&8>d?d:8;var x=N.T,S={};N.T=S,Oc(e,!1,n,a);try{var C=o(),L=N.S;if(L!==null&&L(S,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var F=i1(C,u);qi(e,n,F,un(e))}else qi(e,n,u,un(e))}catch(P){qi(e,n,{then:function(){},status:"rejected",reason:P},un())}finally{K.p=d,x!==null&&S.types!==null&&(x.types=S.types),N.T=x}}function f1(){}function Dc(e,n,a,u){if(e.tag!==5)throw Error(r(476));var o=Jh(e).queue;Kh(e,o,n,ue,a===null?f1:function(){return $h(e),a(u)})}function Jh(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:ue},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 $h(e){var n=Jh(e);n.next===null&&(n=e.alternate.memoizedState),qi(e,n.next.queue,{},un())}function zc(){return At(lr)}function Ph(){return mt().memoizedState}function Wh(){return mt().memoizedState}function d1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=un();e=bl(a);var u=vl(n,e,a);u!==null&&(Jt(u,n,a),Ri(u,n,a)),n={cache:uc()},e.payload=n;return}n=n.return}}function h1(e,n,a){var u=un();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},su(e)?tm(n,a):(a=Js(e,n,a,u),a!==null&&(Jt(a,e,u),nm(a,n,u)))}function em(e,n,a){var u=un();qi(e,n,a,u)}function qi(e,n,a,u){var o={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(su(e))tm(n,o);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var x=n.lastRenderedState,S=d(x,a);if(o.hasEagerState=!0,o.eagerState=S,en(S,x))return Yr(e,n,o,0),nt===null&&Vr(),!1}catch{}finally{}if(a=Js(e,n,o,u),a!==null)return Jt(a,e,u),nm(a,n,u),!0}return!1}function Oc(e,n,a,u){if(u={lane:2,revertLane:fo(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},su(e)){if(n)throw Error(r(479))}else n=Js(e,a,u,2),n!==null&&Jt(n,e,2)}function su(e){var n=e.alternate;return e===Te||n!==null&&n===Te}function tm(e,n){Ha=tu=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function nm(e,n,a){if((a&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,ud(e,a)}}var Vi={readContext:At,use:au,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};Vi.useEffectEvent=ft;var lm={readContext:At,use:au,useCallback:function(e,n){return Ht().memoizedState=[e,n===void 0?null:n],e},useContext:At,useEffect:qh,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ru(4194308,4,Zh.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ru(4194308,4,e,n)},useInsertionEffect:function(e,n){ru(4,2,e,n)},useMemo:function(e,n){var a=Ht();n=n===void 0?null:n;var u=e();if(na){It(!0);try{e()}finally{It(!1)}}return a.memoizedState=[u,n],u},useReducer:function(e,n,a){var u=Ht();if(a!==void 0){var o=a(n);if(na){It(!0);try{a(n)}finally{It(!1)}}}else o=n;return u.memoizedState=u.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},u.queue=e,e=e.dispatch=h1.bind(null,Te,e),[u.memoizedState,e]},useRef:function(e){var n=Ht();return e={current:e},n.memoizedState=e},useState:function(e){e=Cc(e);var n=e.queue,a=em.bind(null,Te,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:jc,useDeferredValue:function(e,n){var a=Ht();return Nc(a,e,n)},useTransition:function(){var e=Cc(!1);return e=Kh.bind(null,Te,e.queue,!0,!1),Ht().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var u=Te,o=Ht();if(Ue){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),nt===null)throw Error(r(349));(Le&127)!==0||_h(u,n,a)}o.memoizedState=a;var d={value:a,getSnapshot:n};return o.queue=d,qh(Ch.bind(null,u,d,e),[e]),u.flags|=2048,Va(9,{destroy:void 0},Eh.bind(null,u,d,a,n),null),a},useId:function(){var e=Ht(),n=nt.identifierPrefix;if(Ue){var a=On,u=zn;a=(u&~(1<<32-tt(u)-1)).toString(32)+a,n="_"+n+"R_"+a,a=nu++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=r1++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:zc,useFormState:Rh,useActionState:Rh,useOptimistic:function(e){var n=Ht();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Oc.bind(null,Te,!0,a),a.dispatch=n,[e,n]},useMemoCache:wc,useCacheRefresh:function(){return Ht().memoizedState=d1.bind(null,Te)},useEffectEvent:function(e){var n=Ht(),a={impl:e};return n.memoizedState=a,function(){if((Fe&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Mc={readContext:At,use:au,useCallback:Qh,useContext:At,useEffect:Tc,useImperativeHandle:Fh,useInsertionEffect:Yh,useLayoutEffect:Ih,useMemo:Gh,useReducer:iu,useRef:Hh,useState:function(){return iu(Jn)},useDebugValue:jc,useDeferredValue:function(e,n){var a=mt();return Xh(a,Je.memoizedState,e,n)},useTransition:function(){var e=iu(Jn)[0],n=mt().memoizedState;return[typeof e=="boolean"?e:Hi(e),n]},useSyncExternalStore:wh,useId:Ph,useHostTransitionStatus:zc,useFormState:Lh,useActionState:Lh,useOptimistic:function(e,n){var a=mt();return jh(a,Je,e,n)},useMemoCache:wc,useCacheRefresh:Wh};Mc.useEffectEvent=Vh;var am={readContext:At,use:au,useCallback:Qh,useContext:At,useEffect:Tc,useImperativeHandle:Fh,useInsertionEffect:Yh,useLayoutEffect:Ih,useMemo:Gh,useReducer:Ec,useRef:Hh,useState:function(){return Ec(Jn)},useDebugValue:jc,useDeferredValue:function(e,n){var a=mt();return Je===null?Nc(a,e,n):Xh(a,Je.memoizedState,e,n)},useTransition:function(){var e=Ec(Jn)[0],n=mt().memoizedState;return[typeof e=="boolean"?e:Hi(e),n]},useSyncExternalStore:wh,useId:Ph,useHostTransitionStatus:zc,useFormState:Uh,useActionState:Uh,useOptimistic:function(e,n){var a=mt();return Je!==null?jh(a,Je,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:wc,useCacheRefresh:Wh};am.useEffectEvent=Vh;function Rc(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 Lc={enqueueSetState:function(e,n,a){e=e._reactInternals;var u=un(),o=bl(u);o.payload=n,a!=null&&(o.callback=a),n=vl(e,o,u),n!==null&&(Jt(n,e,u),Ri(n,e,u))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var u=un(),o=bl(u);o.tag=1,o.payload=n,a!=null&&(o.callback=a),n=vl(e,o,u),n!==null&&(Jt(n,e,u),Ri(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=un(),u=bl(a);u.tag=2,n!=null&&(u.callback=n),n=vl(e,u,a),n!==null&&(Jt(n,e,a),Ri(n,e,a))}};function im(e,n,a,u,o,d,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,d,x):n.prototype&&n.prototype.isPureReactComponent?!Ai(a,u)||!Ai(o,d):!0}function rm(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&&Lc.enqueueReplaceState(n,n.state,null)}function la(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 o in e)a[o]===void 0&&(a[o]=e[o])}return a}function um(e){qr(e)}function sm(e){console.error(e)}function cm(e){qr(e)}function cu(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function om(e,n,a){try{var u=e.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function Bc(e,n,a){return a=bl(a),a.tag=3,a.payload={element:null},a.callback=function(){cu(e,n)},a}function fm(e){return e=bl(e),e.tag=3,e}function dm(e,n,a,u){var o=a.type.getDerivedStateFromError;if(typeof o=="function"){var d=u.value;e.payload=function(){return o(d)},e.callback=function(){om(n,a,u)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){om(n,a,u),typeof o!="function"&&(Cl===null?Cl=new Set([this]):Cl.add(this));var S=u.stack;this.componentDidCatch(u.value,{componentStack:S!==null?S:""})})}function m1(e,n,a,u,o){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=a.alternate,n!==null&&Oa(n,a,o,!0),a=nn.current,a!==null){switch(a.tag){case 31:case 13:return bn===null?ku():a.alternate===null&&dt===0&&(dt=3),a.flags&=-257,a.flags|=65536,a.lanes=o,u===Jr?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([u]):n.add(u),so(e,u,o)),!1;case 22:return a.flags|=65536,u===Jr?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)),so(e,u,o)),!1}throw Error(r(435,a.tag))}return so(e,u,o),ku(),!1}if(Ue)return n=nn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=o,u!==nc&&(e=Error(r(422),{cause:u}),Ni(pn(e,a)))):(u!==nc&&(n=Error(r(423),{cause:u}),Ni(pn(n,a))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,u=pn(u,a),o=Bc(e.stateNode,u,o),hc(e,o),dt!==4&&(dt=2)),!1;var d=Error(r(520),{cause:u});if(d=pn(d,a),Ki===null?Ki=[d]:Ki.push(d),dt!==4&&(dt=2),n===null)return!0;u=pn(u,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=o&-o,a.lanes|=e,e=Bc(a.stateNode,u,e),hc(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"&&(Cl===null||!Cl.has(d))))return a.flags|=65536,o&=-o,a.lanes|=o,o=fm(o),dm(o,e,a,u),hc(a,o),!1}a=a.return}while(a!==null);return!1}var Uc=Error(r(461)),yt=!1;function Tt(e,n,a,u){n.child=e===null?gh(n,null,a,u):ta(n,e.child,a,u)}function hm(e,n,a,u,o){a=a.render;var d=n.ref;if("ref"in u){var x={};for(var S in u)S!=="ref"&&(x[S]=u[S])}else x=u;return $l(n),u=bc(e,n,a,x,d,o),S=vc(),e!==null&&!yt?(kc(e,n,o),$n(e,n,o)):(Ue&&S&&ec(n),n.flags|=1,Tt(e,n,u,o),n.child)}function mm(e,n,a,u,o){if(e===null){var d=a.type;return typeof d=="function"&&!$s(d)&&d.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=d,pm(e,n,d,u,o)):(e=Zr(a.type,null,u,n,n.mode,o),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!Qc(e,o)){var x=d.memoizedProps;if(a=a.compare,a=a!==null?a:Ai,a(x,u)&&e.ref===n.ref)return $n(e,n,o)}return n.flags|=1,e=Fn(d,u),e.ref=n.ref,e.return=n,n.child=e}function pm(e,n,a,u,o){if(e!==null){var d=e.memoizedProps;if(Ai(d,u)&&e.ref===n.ref)if(yt=!1,n.pendingProps=u=d,Qc(e,o))(e.flags&131072)!==0&&(yt=!0);else return n.lanes=e.lanes,$n(e,n,o)}return Hc(e,n,a,u,o)}function gm(e,n,a,u){var o=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,o=0;u!==null;)o=o|u.lanes|u.childLanes,u=u.sibling;u=o&~d}else u=0,n.child=null;return ym(e,n,d,a,u)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xr(n,d!==null?d.cachePool:null),d!==null?bh(n,d):pc(),vh(n);else return u=n.lanes=536870912,ym(e,n,d!==null?d.baseLanes|a:a,a,u)}else d!==null?(Xr(n,d.cachePool),bh(n,d),Sl(),n.memoizedState=null):(e!==null&&Xr(n,null),pc(),Sl());return Tt(e,n,o,a),n.child}function Yi(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function ym(e,n,a,u,o){var d=cc();return d=d===null?null:{parent:pt._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},e!==null&&Xr(n,null),pc(),vh(n),e!==null&&Oa(e,n,u,!0),n.childLanes=o,null}function ou(e,n){return n=du({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function xm(e,n,a){return ta(n,e.child,null,a),e=ou(n,n.pendingProps),e.flags|=2,ln(n),n.memoizedState=null,e}function p1(e,n,a){var u=n.pendingProps,o=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ue){if(u.mode==="hidden")return e=ou(n,u),n.lanes=536870912,Yi(null,e);if(yc(n),(e=rt)?(e=Np(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ml!==null?{id:zn,overflow:On}:null,retryLane:536870912,hydrationErrors:null},a=th(e),a.return=n,n.child=a,Ct=n,rt=null)):e=null,e===null)throw gl(n);return n.lanes=536870912,null}return ou(n,u)}var d=e.memoizedState;if(d!==null){var x=d.dehydrated;if(yc(n),o)if(n.flags&256)n.flags&=-257,n=xm(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(yt||Oa(e,n,a,!1),o=(a&e.childLanes)!==0,yt||o){if(u=nt,u!==null&&(x=sd(u,a),x!==0&&x!==d.retryLane))throw d.retryLane=x,Gl(e,x),Jt(u,e,x),Uc;ku(),n=xm(e,n,a)}else e=d.treeContext,rt=vn(x.nextSibling),Ct=n,Ue=!0,pl=null,xn=!1,e!==null&&ah(n,e),n=ou(n,u),n.flags|=4096;return n}return e=Fn(e.child,{mode:u.mode,children:u.children}),e.ref=n.ref,n.child=e,e.return=n,e}function fu(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 Hc(e,n,a,u,o){return $l(n),a=bc(e,n,a,u,void 0,o),u=vc(),e!==null&&!yt?(kc(e,n,o),$n(e,n,o)):(Ue&&u&&ec(n),n.flags|=1,Tt(e,n,a,o),n.child)}function bm(e,n,a,u,o,d){return $l(n),n.updateQueue=null,a=Sh(n,u,a,o),kh(e),u=vc(),e!==null&&!yt?(kc(e,n,d),$n(e,n,d)):(Ue&&u&&ec(n),n.flags|=1,Tt(e,n,a,d),n.child)}function vm(e,n,a,u,o){if($l(n),n.stateNode===null){var d=ja,x=a.contextType;typeof x=="object"&&x!==null&&(d=At(x)),d=new a(u,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Lc,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=u,d.state=n.memoizedState,d.refs={},fc(n),x=a.contextType,d.context=typeof x=="object"&&x!==null?At(x):ja,d.state=n.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(Rc(n,a,x,u),d.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(x=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),x!==d.state&&Lc.enqueueReplaceState(d,d.state,null),Bi(n,u,d,o),Li(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){d=n.stateNode;var S=n.memoizedProps,C=la(a,S);d.props=C;var L=d.context,F=a.contextType;x=ja,typeof F=="object"&&F!==null&&(x=At(F));var P=a.getDerivedStateFromProps;F=typeof P=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=n.pendingProps!==S,F||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||L!==x)&&rm(n,d,u,x),xl=!1;var B=n.memoizedState;d.state=B,Bi(n,u,d,o),Li(),L=n.memoizedState,S||B!==L||xl?(typeof P=="function"&&(Rc(n,a,P,u),L=n.memoizedState),(C=xl||im(n,a,C,u,B,L,x))?(F||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=L),d.props=u,d.state=L,d.context=x,u=C):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{d=n.stateNode,dc(e,n),x=n.memoizedProps,F=la(a,x),d.props=F,P=n.pendingProps,B=d.context,L=a.contextType,C=ja,typeof L=="object"&&L!==null&&(C=At(L)),S=a.getDerivedStateFromProps,(L=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x!==P||B!==C)&&rm(n,d,u,C),xl=!1,B=n.memoizedState,d.state=B,Bi(n,u,d,o),Li();var V=n.memoizedState;x!==P||B!==V||xl||e!==null&&e.dependencies!==null&&Qr(e.dependencies)?(typeof S=="function"&&(Rc(n,a,S,u),V=n.memoizedState),(F=xl||im(n,a,F,u,B,V,C)||e!==null&&e.dependencies!==null&&Qr(e.dependencies))?(L||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(u,V,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(u,V,C)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&B===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&B===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=V),d.props=u,d.state=V,d.context=C,u=F):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&B===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&B===e.memoizedState||(n.flags|=1024),u=!1)}return d=u,fu(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=ta(n,e.child,null,o),n.child=ta(n,null,a,o)):Tt(e,n,a,o),n.memoizedState=d.state,e=n.child):e=$n(e,n,o),e}function km(e,n,a,u){return Kl(),n.flags|=256,Tt(e,n,a,u),n.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Vc(e){return{baseLanes:e,cachePool:oh()}}function Yc(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=rn),e}function Sm(e,n,a){var u=n.pendingProps,o=!1,d=(n.flags&128)!==0,x;if((x=d)||(x=e!==null&&e.memoizedState===null?!1:(ht.current&2)!==0),x&&(o=!0,n.flags&=-129),x=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ue){if(o?kl(n):Sl(),(e=rt)?(e=Np(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ml!==null?{id:zn,overflow:On}:null,retryLane:536870912,hydrationErrors:null},a=th(e),a.return=n,n.child=a,Ct=n,rt=null)):e=null,e===null)throw gl(n);return Eo(e)?n.lanes=32:n.lanes=536870912,null}var S=u.children;return u=u.fallback,o?(Sl(),o=n.mode,S=du({mode:"hidden",children:S},o),u=Xl(u,o,a,null),S.return=n,u.return=n,S.sibling=u,n.child=S,u=n.child,u.memoizedState=Vc(a),u.childLanes=Yc(e,x,a),n.memoizedState=qc,Yi(null,u)):(kl(n),Ic(n,S))}var C=e.memoizedState;if(C!==null&&(S=C.dehydrated,S!==null)){if(d)n.flags&256?(kl(n),n.flags&=-257,n=Zc(e,n,a)):n.memoizedState!==null?(Sl(),n.child=e.child,n.flags|=128,n=null):(Sl(),S=u.fallback,o=n.mode,u=du({mode:"visible",children:u.children},o),S=Xl(S,o,a,null),S.flags|=2,u.return=n,S.return=n,u.sibling=S,n.child=u,ta(n,e.child,null,a),u=n.child,u.memoizedState=Vc(a),u.childLanes=Yc(e,x,a),n.memoizedState=qc,n=Yi(null,u));else if(kl(n),Eo(S)){if(x=S.nextSibling&&S.nextSibling.dataset,x)var L=x.dgst;x=L,u=Error(r(419)),u.stack="",u.digest=x,Ni({value:u,source:null,stack:null}),n=Zc(e,n,a)}else if(yt||Oa(e,n,a,!1),x=(a&e.childLanes)!==0,yt||x){if(x=nt,x!==null&&(u=sd(x,a),u!==0&&u!==C.retryLane))throw C.retryLane=u,Gl(e,u),Jt(x,e,u),Uc;_o(S)||ku(),n=Zc(e,n,a)}else _o(S)?(n.flags|=192,n.child=e.child,n=null):(e=C.treeContext,rt=vn(S.nextSibling),Ct=n,Ue=!0,pl=null,xn=!1,e!==null&&ah(n,e),n=Ic(n,u.children),n.flags|=4096);return n}return o?(Sl(),S=u.fallback,o=n.mode,C=e.child,L=C.sibling,u=Fn(C,{mode:"hidden",children:u.children}),u.subtreeFlags=C.subtreeFlags&65011712,L!==null?S=Fn(L,S):(S=Xl(S,o,a,null),S.flags|=2),S.return=n,u.return=n,u.sibling=S,n.child=u,Yi(null,u),u=n.child,S=e.child.memoizedState,S===null?S=Vc(a):(o=S.cachePool,o!==null?(C=pt._currentValue,o=o.parent!==C?{parent:C,pool:C}:o):o=oh(),S={baseLanes:S.baseLanes|a,cachePool:o}),u.memoizedState=S,u.childLanes=Yc(e,x,a),n.memoizedState=qc,Yi(e.child,u)):(kl(n),a=e.child,e=a.sibling,a=Fn(a,{mode:"visible",children:u.children}),a.return=n,a.sibling=null,e!==null&&(x=n.deletions,x===null?(n.deletions=[e],n.flags|=16):x.push(e)),n.child=a,n.memoizedState=null,a)}function Ic(e,n){return n=du({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function du(e,n){return e=tn(22,e,null,n),e.lanes=0,e}function Zc(e,n,a){return ta(n,e.child,null,a),e=Ic(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function wm(e,n,a){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),ic(e.return,n,a)}function Fc(e,n,a,u,o,d){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:o,treeForkCount:d}:(x.isBackwards=n,x.rendering=null,x.renderingStartTime=0,x.last=u,x.tail=a,x.tailMode=o,x.treeForkCount=d)}function _m(e,n,a){var u=n.pendingProps,o=u.revealOrder,d=u.tail;u=u.children;var x=ht.current,S=(x&2)!==0;if(S?(x=x&1|2,n.flags|=128):x&=1,w(ht,x),Tt(e,n,u,a),u=Ue?ji:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wm(e,a,n);else if(e.tag===19)wm(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(o){case"forwards":for(a=n.child,o=null;a!==null;)e=a.alternate,e!==null&&eu(e)===null&&(o=a),a=a.sibling;a=o,a===null?(o=n.child,n.child=null):(o=a.sibling,a.sibling=null),Fc(n,!1,o,a,d,u);break;case"backwards":case"unstable_legacy-backwards":for(a=null,o=n.child,n.child=null;o!==null;){if(e=o.alternate,e!==null&&eu(e)===null){n.child=o;break}e=o.sibling,o.sibling=a,a=o,o=e}Fc(n,!0,a,null,d,u);break;case"together":Fc(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function $n(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),El|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Oa(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=Fn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=Fn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function Qc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Qr(e)))}function g1(e,n,a){switch(n.tag){case 3:Ve(n,n.stateNode.containerInfo),yl(n,pt,e.memoizedState.cache),Kl();break;case 27:case 5:Nt(n);break;case 4:Ve(n,n.stateNode.containerInfo);break;case 10:yl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,yc(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(kl(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Sm(e,n,a):(kl(n),e=$n(e,n,a),e!==null?e.sibling:null);kl(n);break;case 19:var o=(e.flags&128)!==0;if(u=(a&n.childLanes)!==0,u||(Oa(e,n,a,!1),u=(a&n.childLanes)!==0),o){if(u)return _m(e,n,a);n.flags|=128}if(o=n.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),w(ht,ht.current),u)break;return null;case 22:return n.lanes=0,gm(e,n,a,n.pendingProps);case 24:yl(n,pt,e.memoizedState.cache)}return $n(e,n,a)}function Em(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)yt=!0;else{if(!Qc(e,a)&&(n.flags&128)===0)return yt=!1,g1(e,n,a);yt=(e.flags&131072)!==0}else yt=!1,Ue&&(n.flags&1048576)!==0&&lh(n,ji,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(e=Wl(n.elementType),n.type=e,typeof e=="function")$s(e)?(u=la(e,u),n.tag=1,n=vm(null,n,e,u,a)):(n.tag=0,n=Hc(null,n,e,u,a));else{if(e!=null){var o=e.$$typeof;if(o===le){n.tag=11,n=hm(null,n,e,u,a);break e}else if(o===J){n.tag=14,n=mm(null,n,e,u,a);break e}}throw n=ae(e)||e,Error(r(306,n,""))}}return n;case 0:return Hc(e,n,n.type,n.pendingProps,a);case 1:return u=n.type,o=la(u,n.pendingProps),vm(e,n,u,o,a);case 3:e:{if(Ve(n,n.stateNode.containerInfo),e===null)throw Error(r(387));u=n.pendingProps;var d=n.memoizedState;o=d.element,dc(e,n),Bi(n,u,null,a);var x=n.memoizedState;if(u=x.cache,yl(n,pt,u),u!==d.cache&&rc(n,[pt],a,!0),Li(),u=x.element,d.isDehydrated)if(d={element:u,isDehydrated:!1,cache:x.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=km(e,n,u,a);break e}else if(u!==o){o=pn(Error(r(424)),n),Ni(o),n=km(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),Ct=n,Ue=!0,pl=null,xn=!0,a=gh(n,null,u,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(Kl(),u===o){n=$n(e,n,a);break e}Tt(e,n,u,a)}n=n.child}return n;case 26:return fu(e,n),e===null?(a=Lp(n.type,null,n.pendingProps,null))?n.memoizedState=a:Ue||(a=n.type,e=n.pendingProps,u=Tu(ye.current).createElement(a),u[Et]=n,u[Zt]=e,jt(u,a,e),wt(u),n.stateNode=u):n.memoizedState=Lp(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Nt(n),e===null&&Ue&&(u=n.stateNode=Op(n.type,n.pendingProps,ye.current),Ct=n,xn=!0,o=rt,Nl(n.type)?(Co=o,rt=vn(u.firstChild)):rt=o),Tt(e,n,n.pendingProps.children,a),fu(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ue&&((o=u=rt)&&(u=Q1(u,n.type,n.pendingProps,xn),u!==null?(n.stateNode=u,Ct=n,rt=vn(u.firstChild),xn=!1,o=!0):o=!1),o||gl(n)),Nt(n),o=n.type,d=n.pendingProps,x=e!==null?e.memoizedProps:null,u=d.children,ko(o,d)?u=null:x!==null&&ko(o,x)&&(n.flags|=32),n.memoizedState!==null&&(o=bc(e,n,u1,null,null,a),lr._currentValue=o),fu(e,n),Tt(e,n,u,a),n.child;case 6:return e===null&&Ue&&((e=a=rt)&&(a=G1(a,n.pendingProps,xn),a!==null?(n.stateNode=a,Ct=n,rt=null,e=!0):e=!1),e||gl(n)),null;case 13:return Sm(e,n,a);case 4:return Ve(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=ta(n,null,u,a):Tt(e,n,u,a),n.child;case 11:return hm(e,n,n.type,n.pendingProps,a);case 7:return Tt(e,n,n.pendingProps,a),n.child;case 8:return Tt(e,n,n.pendingProps.children,a),n.child;case 12:return Tt(e,n,n.pendingProps.children,a),n.child;case 10:return u=n.pendingProps,yl(n,n.type,u.value),Tt(e,n,u.children,a),n.child;case 9:return o=n.type._context,u=n.pendingProps.children,$l(n),o=At(o),u=u(o),n.flags|=1,Tt(e,n,u,a),n.child;case 14:return mm(e,n,n.type,n.pendingProps,a);case 15:return pm(e,n,n.type,n.pendingProps,a);case 19:return _m(e,n,a);case 31:return p1(e,n,a);case 22:return gm(e,n,a,n.pendingProps);case 24:return $l(n),u=At(pt),e===null?(o=cc(),o===null&&(o=nt,d=uc(),o.pooledCache=d,d.refCount++,d!==null&&(o.pooledCacheLanes|=a),o=d),n.memoizedState={parent:u,cache:o},fc(n),yl(n,pt,o)):((e.lanes&a)!==0&&(dc(e,n),Bi(n,null,null,a),Li()),o=e.memoizedState,d=n.memoizedState,o.parent!==u?(o={parent:u,cache:u},n.memoizedState=o,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=o),yl(n,pt,u)):(u=d.cache,yl(n,pt,u),u!==o.cache&&rc(n,[pt],a,!0))),Tt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function Pn(e){e.flags|=4}function Gc(e,n,a,u,o){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Pm())e.flags|=8192;else throw ea=Jr,oc}else e.flags&=-16777217}function Cm(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Vp(n))if(Pm())e.flags|=8192;else throw ea=Jr,oc}function hu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?id():536870912,e.lanes|=n,Fa|=n)}function Ii(e,n){if(!Ue)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 o=e.child;o!==null;)a|=o.lanes|o.childLanes,u|=o.subtreeFlags&65011712,u|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)a|=o.lanes|o.childLanes,u|=o.subtreeFlags,u|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=u,e.childLanes=a,n}function y1(e,n,a){var u=n.pendingProps;switch(tc(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),Xn(pt),Qe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(za(n)?Pn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,lc())),ut(n),null;case 26:var o=n.type,d=n.memoizedState;return e===null?(Pn(n),d!==null?(ut(n),Cm(n,d)):(ut(n),Gc(n,o,null,u,a))):d?d!==e.memoizedState?(Pn(n),ut(n),Cm(n,d)):(ut(n),n.flags&=-16777217):(e=e.memoizedProps,e!==u&&Pn(n),ut(n),Gc(n,o,e,u,a)),null;case 27:if(En(n),a=ye.current,o=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&Pn(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return ut(n),null}e=re.current,za(n)?ih(n):(e=Op(o,u,a),n.stateNode=e,Pn(n))}return ut(n),null;case 5:if(En(n),o=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&Pn(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return ut(n),null}if(d=re.current,za(n))ih(n);else{var x=Tu(ye.current);switch(d){case 1:d=x.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:d=x.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":d=x.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":d=x.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":d=x.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof u.is=="string"?x.createElement("select",{is:u.is}):x.createElement("select"),u.multiple?d.multiple=!0:u.size&&(d.size=u.size);break;default:d=typeof u.is=="string"?x.createElement(o,{is:u.is}):x.createElement(o)}}d[Et]=n,d[Zt]=u;e:for(x=n.child;x!==null;){if(x.tag===5||x.tag===6)d.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===n)break e;for(;x.sibling===null;){if(x.return===null||x.return===n)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}n.stateNode=d;e:switch(jt(d,o,u),o){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Pn(n)}}return ut(n),Gc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==u&&Pn(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(r(166));if(e=ye.current,za(n)){if(e=n.stateNode,a=n.memoizedProps,u=null,o=Ct,o!==null)switch(o.tag){case 27:case 5:u=o.memoizedProps}e[Et]=n,e=!!(e.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||Sp(e.nodeValue,a)),e||gl(n,!0)}else e=Tu(e).createTextNode(u),e[Et]=n,n.stateNode=e}return ut(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(u=za(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[Et]=n}else Kl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ut(n),e=!1}else a=lc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(ln(n),n):(ln(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(o=za(n),u!==null&&u.dehydrated!==null){if(e===null){if(!o)throw Error(r(318));if(o=n.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(r(317));o[Et]=n}else Kl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ut(n),o=!1}else o=lc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return n.flags&256?(ln(n),n):(ln(n),null)}return ln(n),(n.flags&128)!==0?(n.lanes=a,n):(a=u!==null,e=e!==null&&e.memoizedState!==null,a&&(u=n.child,o=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(o=u.alternate.memoizedState.cachePool.pool),d=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(d=u.memoizedState.cachePool.pool),d!==o&&(u.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),hu(n,n.updateQueue),ut(n),null);case 4:return Qe(),e===null&&go(n.stateNode.containerInfo),ut(n),null;case 10:return Xn(n.type),ut(n),null;case 19:if(Q(ht),u=n.memoizedState,u===null)return ut(n),null;if(o=(n.flags&128)!==0,d=u.rendering,d===null)if(o)Ii(u,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=eu(e),d!==null){for(n.flags|=128,Ii(u,!1),e=d.updateQueue,n.updateQueue=e,hu(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)eh(a,e),a=a.sibling;return w(ht,ht.current&1|2),Ue&&Qn(n,u.treeForkCount),n.child}e=e.sibling}u.tail!==null&&Bt()>xu&&(n.flags|=128,o=!0,Ii(u,!1),n.lanes=4194304)}else{if(!o)if(e=eu(d),e!==null){if(n.flags|=128,o=!0,e=e.updateQueue,n.updateQueue=e,hu(n,e),Ii(u,!0),u.tail===null&&u.tailMode==="hidden"&&!d.alternate&&!Ue)return ut(n),null}else 2*Bt()-u.renderingStartTime>xu&&a!==536870912&&(n.flags|=128,o=!0,Ii(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=Bt(),e.sibling=null,a=ht.current,w(ht,o?a&1|2:a&1),Ue&&Qn(n,u.treeForkCount),e):(ut(n),null);case 22:case 23:return ln(n),gc(),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&&hu(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&&Q(Pl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Xn(pt),ut(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function x1(e,n){switch(tc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Xn(pt),Qe(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return En(n),null;case 31:if(n.memoizedState!==null){if(ln(n),n.alternate===null)throw Error(r(340));Kl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(ln(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Kl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Q(ht),null;case 4:return Qe(),null;case 10:return Xn(n.type),null;case 22:case 23:return ln(n),gc(),e!==null&&Q(Pl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Xn(pt),null;case 25:return null;default:return null}}function Am(e,n){switch(tc(n),n.tag){case 3:Xn(pt),Qe();break;case 26:case 27:case 5:En(n);break;case 4:Qe();break;case 31:n.memoizedState!==null&&ln(n);break;case 13:ln(n);break;case 19:Q(ht);break;case 10:Xn(n.type);break;case 22:case 23:ln(n),gc(),e!==null&&Q(Pl);break;case 24:Xn(pt)}}function Zi(e,n){try{var a=n.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var o=u.next;a=o;do{if((a.tag&e)===e){u=void 0;var d=a.create,x=a.inst;u=d(),x.destroy=u}a=a.next}while(a!==o)}}catch(S){Ke(n,n.return,S)}}function wl(e,n,a){try{var u=n.updateQueue,o=u!==null?u.lastEffect:null;if(o!==null){var d=o.next;u=d;do{if((u.tag&e)===e){var x=u.inst,S=x.destroy;if(S!==void 0){x.destroy=void 0,o=n;var C=a,L=S;try{L()}catch(F){Ke(o,C,F)}}}u=u.next}while(u!==d)}}catch(F){Ke(n,n.return,F)}}function Tm(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{xh(n,a)}catch(u){Ke(e,e.return,u)}}}function jm(e,n,a){a.props=la(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(u){Ke(e,n,u)}}function Fi(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(o){Ke(e,n,o)}}function Mn(e,n){var a=e.ref,u=e.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(o){Ke(e,n,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(o){Ke(e,n,o)}else a.current=null}function Nm(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(o){Ke(e,e.return,o)}}function Xc(e,n,a){try{var u=e.stateNode;q1(u,e.type,a,n),u[Zt]=n}catch(o){Ke(e,e.return,o)}}function Dm(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Nl(e.type)||e.tag===4}function Kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Dm(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&&Nl(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 Jc(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&&Nl(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Jc(e,n,a),e=e.sibling;e!==null;)Jc(e,n,a),e=e.sibling}function mu(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&&Nl(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(mu(e,n,a),e=e.sibling;e!==null;)mu(e,n,a),e=e.sibling}function zm(e){var n=e.stateNode,a=e.memoizedProps;try{for(var u=e.type,o=n.attributes;o.length;)n.removeAttributeNode(o[0]);jt(n,u,a),n[Et]=e,n[Zt]=a}catch(d){Ke(e,e.return,d)}}var Wn=!1,xt=!1,$c=!1,Om=typeof WeakSet=="function"?WeakSet:Set,_t=null;function b1(e,n){if(e=e.containerInfo,bo=Ru,e=Fd(e),Zs(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 o=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var x=0,S=-1,C=-1,L=0,F=0,P=e,B=null;t:for(;;){for(var V;P!==a||o!==0&&P.nodeType!==3||(S=x+o),P!==d||u!==0&&P.nodeType!==3||(C=x+u),P.nodeType===3&&(x+=P.nodeValue.length),(V=P.firstChild)!==null;)B=P,P=V;for(;;){if(P===e)break t;if(B===a&&++L===o&&(S=x),B===d&&++F===u&&(C=x),(V=P.nextSibling)!==null)break;P=B,B=P.parentNode}P=V}a=S===-1||C===-1?null:{start:S,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(vo={focusedElem:e,selectionRange:a},Ru=!1,_t=n;_t!==null;)if(n=_t,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,_t=e;else for(;_t!==null;){switch(n=_t,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++)o=e[a],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=n,o=d.memoizedProps,d=d.memoizedState,u=a.stateNode;try{var de=la(a.type,o);e=u.getSnapshotBeforeUpdate(de,d),u.__reactInternalSnapshotBeforeUpdate=e}catch(ke){Ke(a,a.return,ke)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)wo(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":wo(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,_t=e;break}_t=n.return}}function Mm(e,n,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:tl(e,a),u&4&&Zi(5,a);break;case 1:if(tl(e,a),u&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(x){Ke(a,a.return,x)}else{var o=la(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(o,n,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Ke(a,a.return,x)}}u&64&&Tm(a),u&512&&Fi(a,a.return);break;case 3:if(tl(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{xh(e,n)}catch(x){Ke(a,a.return,x)}}break;case 27:n===null&&u&4&&zm(a);case 26:case 5:tl(e,a),n===null&&u&4&&Nm(a),u&512&&Fi(a,a.return);break;case 12:tl(e,a);break;case 31:tl(e,a),u&4&&Bm(e,a);break;case 13:tl(e,a),u&4&&Um(e,a),u&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=T1.bind(null,a),X1(e,a))));break;case 22:if(u=a.memoizedState!==null||Wn,!u){n=n!==null&&n.memoizedState!==null||xt,o=Wn;var d=xt;Wn=u,(xt=n)&&!d?nl(e,a,(a.subtreeFlags&8772)!==0):tl(e,a),Wn=o,xt=d}break;case 30:break;default:tl(e,a)}}function Rm(e){var n=e.alternate;n!==null&&(e.alternate=null,Rm(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&As(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 st=null,Qt=!1;function el(e,n,a){for(a=a.child;a!==null;)Lm(e,n,a),a=a.sibling}function Lm(e,n,a){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(Ut,a)}catch{}switch(a.tag){case 26:xt||Mn(a,n),el(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:xt||Mn(a,n);var u=st,o=Qt;Nl(a.type)&&(st=a.stateNode,Qt=!1),el(e,n,a),er(a.stateNode),st=u,Qt=o;break;case 5:xt||Mn(a,n);case 6:if(u=st,o=Qt,st=null,el(e,n,a),st=u,Qt=o,st!==null)if(Qt)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(a.stateNode)}catch(d){Ke(a,n,d)}else try{st.removeChild(a.stateNode)}catch(d){Ke(a,n,d)}break;case 18:st!==null&&(Qt?(e=st,Tp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Wa(e)):Tp(st,a.stateNode));break;case 4:u=st,o=Qt,st=a.stateNode.containerInfo,Qt=!0,el(e,n,a),st=u,Qt=o;break;case 0:case 11:case 14:case 15:wl(2,a,n),xt||wl(4,a,n),el(e,n,a);break;case 1:xt||(Mn(a,n),u=a.stateNode,typeof u.componentWillUnmount=="function"&&jm(a,n,u)),el(e,n,a);break;case 21:el(e,n,a);break;case 22:xt=(u=xt)||a.memoizedState!==null,el(e,n,a),xt=u;break;default:el(e,n,a)}}function Bm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wa(e)}catch(a){Ke(n,n.return,a)}}}function Um(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wa(e)}catch(a){Ke(n,n.return,a)}}function v1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Om),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Om),n;default:throw Error(r(435,e.tag))}}function pu(e,n){var a=v1(e);n.forEach(function(u){if(!a.has(u)){a.add(u);var o=j1.bind(null,e,u);u.then(o,o)}})}function Gt(e,n){var a=n.deletions;if(a!==null)for(var u=0;u<a.length;u++){var o=a[u],d=e,x=n,S=x;e:for(;S!==null;){switch(S.tag){case 27:if(Nl(S.type)){st=S.stateNode,Qt=!1;break e}break;case 5:st=S.stateNode,Qt=!1;break e;case 3:case 4:st=S.stateNode.containerInfo,Qt=!0;break e}S=S.return}if(st===null)throw Error(r(160));Lm(d,x,o),st=null,Qt=!1,d=o.alternate,d!==null&&(d.return=null),o.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Hm(n,e),n=n.sibling}var Tn=null;function Hm(e,n){var a=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gt(n,e),Xt(e),u&4&&(wl(3,e,e.return),Zi(3,e),wl(5,e,e.return));break;case 1:Gt(n,e),Xt(e),u&512&&(xt||a===null||Mn(a,a.return)),u&64&&Wn&&(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 o=Tn;if(Gt(n,e),Xt(e),u&512&&(xt||a===null||Mn(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,o=o.ownerDocument||o;t:switch(u){case"title":d=o.getElementsByTagName("title")[0],(!d||d[xi]||d[Et]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=o.createElement(u),o.head.insertBefore(d,o.querySelector("head > title"))),jt(d,u,a),d[Et]=e,wt(d),u=d;break e;case"link":var x=Hp("link","href",o).get(u+(a.href||""));if(x){for(var S=0;S<x.length;S++)if(d=x[S],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)){x.splice(S,1);break t}}d=o.createElement(u),jt(d,u,a),o.head.appendChild(d);break;case"meta":if(x=Hp("meta","content",o).get(u+(a.content||""))){for(S=0;S<x.length;S++)if(d=x[S],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)){x.splice(S,1);break t}}d=o.createElement(u),jt(d,u,a),o.head.appendChild(d);break;default:throw Error(r(468,u))}d[Et]=e,wt(d),u=d}e.stateNode=u}else qp(o,e.type,e.stateNode);else e.stateNode=Up(o,u,e.memoizedProps);else d!==u?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,u===null?qp(o,e.type,e.stateNode):Up(o,u,e.memoizedProps)):u===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Gt(n,e),Xt(e),u&512&&(xt||a===null||Mn(a,a.return)),a!==null&&u&4&&Xc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Gt(n,e),Xt(e),u&512&&(xt||a===null||Mn(a,a.return)),e.flags&32){o=e.stateNode;try{Sa(o,"")}catch(de){Ke(e,e.return,de)}}u&4&&e.stateNode!=null&&(o=e.memoizedProps,Xc(e,o,a!==null?a.memoizedProps:o)),u&1024&&($c=!0);break;case 6:if(Gt(n,e),Xt(e),u&4){if(e.stateNode===null)throw Error(r(162));u=e.memoizedProps,a=e.stateNode;try{a.nodeValue=u}catch(de){Ke(e,e.return,de)}}break;case 3:if(Du=null,o=Tn,Tn=ju(n.containerInfo),Gt(n,e),Tn=o,Xt(e),u&4&&a!==null&&a.memoizedState.isDehydrated)try{Wa(n.containerInfo)}catch(de){Ke(e,e.return,de)}$c&&($c=!1,qm(e));break;case 4:u=Tn,Tn=ju(e.stateNode.containerInfo),Gt(n,e),Xt(e),Tn=u;break;case 12:Gt(n,e),Xt(e);break;case 31:Gt(n,e),Xt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,pu(e,u)));break;case 13:Gt(n,e),Xt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(yu=Bt()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,pu(e,u)));break;case 22:o=e.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,L=Wn,F=xt;if(Wn=L||o,xt=F||C,Gt(n,e),xt=F,Wn=L,Xt(e),u&8192)e:for(n=e.stateNode,n._visibility=o?n._visibility&-2:n._visibility|1,o&&(a===null||C||Wn||xt||aa(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){C=a=n;try{if(d=C.stateNode,o)x=d.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{S=C.stateNode;var P=C.memoizedProps.style,B=P!=null&&P.hasOwnProperty("display")?P.display:null;S.style.display=B==null||typeof B=="boolean"?"":(""+B).trim()}}catch(de){Ke(C,C.return,de)}}}else if(n.tag===6){if(a===null){C=n;try{C.stateNode.nodeValue=o?"":C.memoizedProps}catch(de){Ke(C,C.return,de)}}}else if(n.tag===18){if(a===null){C=n;try{var V=C.stateNode;o?jp(V,!0):jp(C.stateNode,!1)}catch(de){Ke(C,C.return,de)}}}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,pu(e,a))));break;case 19:Gt(n,e),Xt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,pu(e,u)));break;case 30:break;case 21:break;default:Gt(n,e),Xt(e)}}function Xt(e){var n=e.flags;if(n&2){try{for(var a,u=e.return;u!==null;){if(Dm(u)){a=u;break}u=u.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var o=a.stateNode,d=Kc(e);mu(e,d,o);break;case 5:var x=a.stateNode;a.flags&32&&(Sa(x,""),a.flags&=-33);var S=Kc(e);mu(e,S,x);break;case 3:case 4:var C=a.stateNode.containerInfo,L=Kc(e);Jc(e,L,C);break;default:throw Error(r(161))}}catch(F){Ke(e,e.return,F)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function qm(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;qm(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function tl(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Mm(e,n.alternate,n),n=n.sibling}function aa(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:wl(4,n,n.return),aa(n);break;case 1:Mn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&jm(n,n.return,a),aa(n);break;case 27:er(n.stateNode);case 26:case 5:Mn(n,n.return),aa(n);break;case 22:n.memoizedState===null&&aa(n);break;case 30:aa(n);break;default:aa(n)}e=e.sibling}}function nl(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,o=e,d=n,x=d.flags;switch(d.tag){case 0:case 11:case 15:nl(o,d,a),Zi(4,d);break;case 1:if(nl(o,d,a),u=d,o=u.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(L){Ke(u,u.return,L)}if(u=d,o=u.updateQueue,o!==null){var S=u.stateNode;try{var C=o.shared.hiddenCallbacks;if(C!==null)for(o.shared.hiddenCallbacks=null,o=0;o<C.length;o++)yh(C[o],S)}catch(L){Ke(u,u.return,L)}}a&&x&64&&Tm(d),Fi(d,d.return);break;case 27:zm(d);case 26:case 5:nl(o,d,a),a&&u===null&&x&4&&Nm(d),Fi(d,d.return);break;case 12:nl(o,d,a);break;case 31:nl(o,d,a),a&&x&4&&Bm(o,d);break;case 13:nl(o,d,a),a&&x&4&&Um(o,d);break;case 22:d.memoizedState===null&&nl(o,d,a),Fi(d,d.return);break;case 30:break;default:nl(o,d,a)}n=n.sibling}}function Pc(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&&Di(a))}function Wc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Di(e))}function jn(e,n,a,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Vm(e,n,a,u),n=n.sibling}function Vm(e,n,a,u){var o=n.flags;switch(n.tag){case 0:case 11:case 15:jn(e,n,a,u),o&2048&&Zi(9,n);break;case 1:jn(e,n,a,u);break;case 3:jn(e,n,a,u),o&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Di(e)));break;case 12:if(o&2048){jn(e,n,a,u),e=n.stateNode;try{var d=n.memoizedProps,x=d.id,S=d.onPostCommit;typeof S=="function"&&S(x,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,x=n.alternate,n.memoizedState!==null?d._visibility&2?jn(e,n,a,u):Qi(e,n):d._visibility&2?jn(e,n,a,u):(d._visibility|=2,Ya(e,n,a,u,(n.subtreeFlags&10256)!==0||!1)),o&2048&&Pc(x,n);break;case 24:jn(e,n,a,u),o&2048&&Wc(n.alternate,n);break;default:jn(e,n,a,u)}}function Ya(e,n,a,u,o){for(o=o&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,x=n,S=a,C=u,L=x.flags;switch(x.tag){case 0:case 11:case 15:Ya(d,x,S,C,o),Zi(8,x);break;case 23:break;case 22:var F=x.stateNode;x.memoizedState!==null?F._visibility&2?Ya(d,x,S,C,o):Qi(d,x):(F._visibility|=2,Ya(d,x,S,C,o)),o&&L&2048&&Pc(x.alternate,x);break;case 24:Ya(d,x,S,C,o),o&&L&2048&&Wc(x.alternate,x);break;default:Ya(d,x,S,C,o)}n=n.sibling}}function Qi(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,u=n,o=u.flags;switch(u.tag){case 22:Qi(a,u),o&2048&&Pc(u.alternate,u);break;case 24:Qi(a,u),o&2048&&Wc(u.alternate,u);break;default:Qi(a,u)}n=n.sibling}}var Gi=8192;function Ia(e,n,a){if(e.subtreeFlags&Gi)for(e=e.child;e!==null;)Ym(e,n,a),e=e.sibling}function Ym(e,n,a){switch(e.tag){case 26:Ia(e,n,a),e.flags&Gi&&e.memoizedState!==null&&rb(a,Tn,e.memoizedState,e.memoizedProps);break;case 5:Ia(e,n,a);break;case 3:case 4:var u=Tn;Tn=ju(e.stateNode.containerInfo),Ia(e,n,a),Tn=u;break;case 22:e.memoizedState===null&&(u=e.alternate,u!==null&&u.memoizedState!==null?(u=Gi,Gi=16777216,Ia(e,n,a),Gi=u):Ia(e,n,a));break;default:Ia(e,n,a)}}function Im(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 Xi(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];_t=u,Fm(u,e)}Im(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zm(e),e=e.sibling}function Zm(e){switch(e.tag){case 0:case 11:case 15:Xi(e),e.flags&2048&&wl(9,e,e.return);break;case 3:Xi(e);break;case 12:Xi(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,gu(e)):Xi(e);break;default:Xi(e)}}function gu(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];_t=u,Fm(u,e)}Im(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:wl(8,n,n.return),gu(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,gu(n));break;default:gu(n)}e=e.sibling}}function Fm(e,n){for(;_t!==null;){var a=_t;switch(a.tag){case 0:case 11:case 15:wl(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:Di(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,_t=u;else e:for(a=e;_t!==null;){u=_t;var o=u.sibling,d=u.return;if(Rm(u),u===a){_t=null;break e}if(o!==null){o.return=d,_t=o;break e}_t=d}}}var k1={getCacheForType:function(e){var n=At(pt),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return At(pt).controller.signal}},S1=typeof WeakMap=="function"?WeakMap:Map,Fe=0,nt=null,Oe=null,Le=0,Xe=0,an=null,_l=!1,Za=!1,eo=!1,ll=0,dt=0,El=0,ia=0,to=0,rn=0,Fa=0,Ki=null,Kt=null,no=!1,yu=0,Qm=0,xu=1/0,bu=null,Cl=null,St=0,Al=null,Qa=null,al=0,lo=0,ao=null,Gm=null,Ji=0,io=null;function un(){return(Fe&2)!==0&&Le!==0?Le&-Le:N.T!==null?fo():cd()}function Xm(){if(rn===0)if((Le&536870912)===0||Ue){var e=Ar;Ar<<=1,(Ar&3932160)===0&&(Ar=262144),rn=e}else rn=536870912;return e=nn.current,e!==null&&(e.flags|=32),rn}function Jt(e,n,a){(e===nt&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)&&(Ga(e,0),Tl(e,Le,rn,!1)),yi(e,a),((Fe&2)===0||e!==nt)&&(e===nt&&((Fe&2)===0&&(ia|=a),dt===4&&Tl(e,Le,rn,!1)),Rn(e))}function Km(e,n,a){if((Fe&6)!==0)throw Error(r(327));var u=!a&&(n&127)===0&&(n&e.expiredLanes)===0||gi(e,n),o=u?E1(e,n):uo(e,n,!0),d=u;do{if(o===0){Za&&!u&&Tl(e,n,0,!1);break}else{if(a=e.current.alternate,d&&!w1(a)){o=uo(e,n,!1),d=!1;continue}if(o===2){if(d=n,e.errorRecoveryDisabledLanes&d)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){n=x;e:{var S=e;o=Ki;var C=S.current.memoizedState.isDehydrated;if(C&&(Ga(S,x).flags|=256),x=uo(S,x,!1),x!==2){if(eo&&!C){S.errorRecoveryDisabledLanes|=d,ia|=d,o=4;break e}d=Kt,Kt=o,d!==null&&(Kt===null?Kt=d:Kt.push.apply(Kt,d))}o=x}if(d=!1,o!==2)continue}}if(o===1){Ga(e,0),Tl(e,n,0,!0);break}e:{switch(u=e,d=o,d){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Tl(u,n,rn,!_l);break e;case 2:Kt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(o=yu+300-Bt(),10<o)){if(Tl(u,n,rn,!_l),jr(u,0,!0)!==0)break e;al=n,u.timeoutHandle=Cp(Jm.bind(null,u,a,Kt,bu,no,n,rn,ia,Fa,_l,d,"Throttled",-0,0),o);break e}Jm(u,a,Kt,bu,no,n,rn,ia,Fa,_l,d,null,-0,0)}}break}while(!0);Rn(e)}function Jm(e,n,a,u,o,d,x,S,C,L,F,P,B,V){if(e.timeoutHandle=-1,P=n.subtreeFlags,P&8192||(P&16785408)===16785408){P={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},Ym(n,d,P);var de=(d&62914560)===d?yu-Bt():(d&4194048)===d?Qm-Bt():0;if(de=ub(P,de),de!==null){al=d,e.cancelPendingCommit=de(ap.bind(null,e,n,d,a,u,o,x,S,C,F,P,null,B,V)),Tl(e,d,x,!L);return}}ap(e,n,d,a,u,o,x,S,C)}function w1(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 o=a[u],d=o.getSnapshot;o=o.value;try{if(!en(d(),o))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 Tl(e,n,a,u){n&=~to,n&=~ia,e.suspendedLanes|=n,e.pingedLanes&=~n,u&&(e.warmLanes|=n),u=e.expirationTimes;for(var o=n;0<o;){var d=31-tt(o),x=1<<d;u[d]=-1,o&=~x}a!==0&&rd(e,a,n)}function vu(){return(Fe&6)===0?($i(0),!1):!0}function ro(){if(Oe!==null){if(Xe===0)var e=Oe.return;else e=Oe,Gn=Jl=null,Sc(e),Ba=null,Oi=0,e=Oe;for(;e!==null;)Am(e.alternate,e),e=e.return;Oe=null}}function Ga(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,I1(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),al=0,ro(),nt=e,Oe=a=Fn(e.current,null),Le=n,Xe=0,an=null,_l=!1,Za=gi(e,n),eo=!1,Fa=rn=to=ia=El=dt=0,Kt=Ki=null,no=!1,(n&8)!==0&&(n|=n&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=n;0<u;){var o=31-tt(u),d=1<<o;n|=e[o],u&=~d}return ll=n,Vr(),a}function $m(e,n){Te=null,N.H=Vi,n===La||n===Kr?(n=hh(),Xe=3):n===oc?(n=hh(),Xe=4):Xe=n===Uc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,an=n,Oe===null&&(dt=1,cu(e,pn(n,e.current)))}function Pm(){var e=nn.current;return e===null?!0:(Le&4194048)===Le?bn===null:(Le&62914560)===Le||(Le&536870912)!==0?e===bn:!1}function Wm(){var e=N.H;return N.H=Vi,e===null?Vi:e}function ep(){var e=N.A;return N.A=k1,e}function ku(){dt=4,_l||(Le&4194048)!==Le&&nn.current!==null||(Za=!0),(El&134217727)===0&&(ia&134217727)===0||nt===null||Tl(nt,Le,rn,!1)}function uo(e,n,a){var u=Fe;Fe|=2;var o=Wm(),d=ep();(nt!==e||Le!==n)&&(bu=null,Ga(e,n)),n=!1;var x=dt;e:do try{if(Xe!==0&&Oe!==null){var S=Oe,C=an;switch(Xe){case 8:ro(),x=6;break e;case 3:case 2:case 9:case 6:nn.current===null&&(n=!0);var L=Xe;if(Xe=0,an=null,Xa(e,S,C,L),a&&Za){x=0;break e}break;default:L=Xe,Xe=0,an=null,Xa(e,S,C,L)}}_1(),x=dt;break}catch(F){$m(e,F)}while(!0);return n&&e.shellSuspendCounter++,Gn=Jl=null,Fe=u,N.H=o,N.A=d,Oe===null&&(nt=null,Le=0,Vr()),x}function _1(){for(;Oe!==null;)tp(Oe)}function E1(e,n){var a=Fe;Fe|=2;var u=Wm(),o=ep();nt!==e||Le!==n?(bu=null,xu=Bt()+500,Ga(e,n)):Za=gi(e,n);e:do try{if(Xe!==0&&Oe!==null){n=Oe;var d=an;t:switch(Xe){case 1:Xe=0,an=null,Xa(e,n,d,1);break;case 2:case 9:if(fh(d)){Xe=0,an=null,np(n);break}n=function(){Xe!==2&&Xe!==9||nt!==e||(Xe=7),Rn(e)},d.then(n,n);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:fh(d)?(Xe=0,an=null,np(n)):(Xe=0,an=null,Xa(e,n,d,7));break;case 5:var x=null;switch(Oe.tag){case 26:x=Oe.memoizedState;case 5:case 27:var S=Oe;if(x?Vp(x):S.stateNode.complete){Xe=0,an=null;var C=S.sibling;if(C!==null)Oe=C;else{var L=S.return;L!==null?(Oe=L,Su(L)):Oe=null}break t}}Xe=0,an=null,Xa(e,n,d,5);break;case 6:Xe=0,an=null,Xa(e,n,d,6);break;case 8:ro(),dt=6;break e;default:throw Error(r(462))}}C1();break}catch(F){$m(e,F)}while(!0);return Gn=Jl=null,N.H=u,N.A=o,Fe=a,Oe!==null?0:(nt=null,Le=0,Vr(),dt)}function C1(){for(;Oe!==null&&!vs();)tp(Oe)}function tp(e){var n=Em(e.alternate,e,ll);e.memoizedProps=e.pendingProps,n===null?Su(e):Oe=n}function np(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=bm(a,n,n.pendingProps,n.type,void 0,Le);break;case 11:n=bm(a,n,n.pendingProps,n.type.render,n.ref,Le);break;case 5:Sc(n);default:Am(a,n),n=Oe=eh(n,ll),n=Em(a,n,ll)}e.memoizedProps=e.pendingProps,n===null?Su(e):Oe=n}function Xa(e,n,a,u){Gn=Jl=null,Sc(n),Ba=null,Oi=0;var o=n.return;try{if(m1(e,o,n,a,Le)){dt=1,cu(e,pn(a,e.current)),Oe=null;return}}catch(d){if(o!==null)throw Oe=o,d;dt=1,cu(e,pn(a,e.current)),Oe=null;return}n.flags&32768?(Ue||u===1?e=!0:Za||(Le&536870912)!==0?e=!1:(_l=e=!0,(u===2||u===9||u===3||u===6)&&(u=nn.current,u!==null&&u.tag===13&&(u.flags|=16384))),lp(n,e)):Su(n)}function Su(e){var n=e;do{if((n.flags&32768)!==0){lp(n,_l);return}e=n.return;var a=y1(n.alternate,n,ll);if(a!==null){Oe=a;return}if(n=n.sibling,n!==null){Oe=n;return}Oe=n=e}while(n!==null);dt===0&&(dt=5)}function lp(e,n){do{var a=x1(e.alternate,e);if(a!==null){a.flags&=32767,Oe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Oe=e;return}Oe=e=a}while(e!==null);dt=6,Oe=null}function ap(e,n,a,u,o,d,x,S,C){e.cancelPendingCommit=null;do wu();while(St!==0);if((Fe&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(d=n.lanes|n.childLanes,d|=Ks,i0(e,a,d,x,S,C),e===nt&&(Oe=nt=null,Le=0),Qa=n,Al=e,al=a,lo=d,ao=o,Gm=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,N1(we,function(){return cp(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=N.T,N.T=null,o=K.p,K.p=2,x=Fe,Fe|=4;try{b1(e,n,a)}finally{Fe=x,K.p=o,N.T=u}}St=1,ip(),rp(),up()}}function ip(){if(St===1){St=0;var e=Al,n=Qa,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=N.T,N.T=null;var u=K.p;K.p=2;var o=Fe;Fe|=4;try{Hm(n,e);var d=vo,x=Fd(e.containerInfo),S=d.focusedElem,C=d.selectionRange;if(x!==S&&S&&S.ownerDocument&&Zd(S.ownerDocument.documentElement,S)){if(C!==null&&Zs(S)){var L=C.start,F=C.end;if(F===void 0&&(F=L),"selectionStart"in S)S.selectionStart=L,S.selectionEnd=Math.min(F,S.value.length);else{var P=S.ownerDocument||document,B=P&&P.defaultView||window;if(B.getSelection){var V=B.getSelection(),de=S.textContent.length,ke=Math.min(C.start,de),Pe=C.end===void 0?ke:Math.min(C.end,de);!V.extend&&ke>Pe&&(x=Pe,Pe=ke,ke=x);var D=Id(S,ke),T=Id(S,Pe);if(D&&T&&(V.rangeCount!==1||V.anchorNode!==D.node||V.anchorOffset!==D.offset||V.focusNode!==T.node||V.focusOffset!==T.offset)){var R=P.createRange();R.setStart(D.node,D.offset),V.removeAllRanges(),ke>Pe?(V.addRange(R),V.extend(T.node,T.offset)):(R.setEnd(T.node,T.offset),V.addRange(R))}}}}for(P=[],V=S;V=V.parentNode;)V.nodeType===1&&P.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<P.length;S++){var X=P[S];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}Ru=!!bo,vo=bo=null}finally{Fe=o,K.p=u,N.T=a}}e.current=n,St=2}}function rp(){if(St===2){St=0;var e=Al,n=Qa,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=N.T,N.T=null;var u=K.p;K.p=2;var o=Fe;Fe|=4;try{Mm(e,n.alternate,n)}finally{Fe=o,K.p=u,N.T=a}}St=3}}function up(){if(St===4||St===3){St=0,ks();var e=Al,n=Qa,a=al,u=Gm;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?St=5:(St=0,Qa=Al=null,sp(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(Cl=null),Es(a),n=n.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(Ut,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=N.T,o=K.p,K.p=2,N.T=null;try{for(var d=e.onRecoverableError,x=0;x<u.length;x++){var S=u[x];d(S.value,{componentStack:S.stack})}}finally{N.T=n,K.p=o}}(al&3)!==0&&wu(),Rn(e),o=e.pendingLanes,(a&261930)!==0&&(o&42)!==0?e===io?Ji++:(Ji=0,io=e):Ji=0,$i(0)}}function sp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Di(n)))}function wu(){return ip(),rp(),up(),cp()}function cp(){if(St!==5)return!1;var e=Al,n=lo;lo=0;var a=Es(al),u=N.T,o=K.p;try{K.p=32>a?32:a,N.T=null,a=ao,ao=null;var d=Al,x=al;if(St=0,Qa=Al=null,al=0,(Fe&6)!==0)throw Error(r(331));var S=Fe;if(Fe|=4,Zm(d.current),Vm(d,d.current,x,a),Fe=S,$i(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(Ut,d)}catch{}return!0}finally{K.p=o,N.T=u,sp(e,n)}}function op(e,n,a){n=pn(a,n),n=Bc(e.stateNode,n,2),e=vl(e,n,2),e!==null&&(yi(e,2),Rn(e))}function Ke(e,n,a){if(e.tag===3)op(e,e,a);else for(;n!==null;){if(n.tag===3){op(n,e,a);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Cl===null||!Cl.has(u))){e=pn(a,e),a=fm(2),u=vl(n,a,2),u!==null&&(dm(a,u,n,e),yi(u,2),Rn(u));break}}n=n.return}}function so(e,n,a){var u=e.pingCache;if(u===null){u=e.pingCache=new S1;var o=new Set;u.set(n,o)}else o=u.get(n),o===void 0&&(o=new Set,u.set(n,o));o.has(a)||(eo=!0,o.add(a),e=A1.bind(null,e,n,a),n.then(e,e))}function A1(e,n,a){var u=e.pingCache;u!==null&&u.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,nt===e&&(Le&a)===a&&(dt===4||dt===3&&(Le&62914560)===Le&&300>Bt()-yu?(Fe&2)===0&&Ga(e,0):to|=a,Fa===Le&&(Fa=0)),Rn(e)}function fp(e,n){n===0&&(n=id()),e=Gl(e,n),e!==null&&(yi(e,n),Rn(e))}function T1(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),fp(e,a)}function j1(e,n){var a=0;switch(e.tag){case 31:case 13:var u=e.stateNode,o=e.memoizedState;o!==null&&(a=o.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),fp(e,a)}function N1(e,n){return pa(e,n)}var _u=null,Ka=null,co=!1,Eu=!1,oo=!1,jl=0;function Rn(e){e!==Ka&&e.next===null&&(Ka===null?_u=Ka=e:Ka=Ka.next=e),Eu=!0,co||(co=!0,z1())}function $i(e,n){if(!oo&&Eu){oo=!0;do for(var a=!1,u=_u;u!==null;){if(e!==0){var o=u.pendingLanes;if(o===0)var d=0;else{var x=u.suspendedLanes,S=u.pingedLanes;d=(1<<31-tt(42|e)+1)-1,d&=o&~(x&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,pp(u,d))}else d=Le,d=jr(u,u===nt?d:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(d&3)===0||gi(u,d)||(a=!0,pp(u,d));u=u.next}while(a);oo=!1}}function D1(){dp()}function dp(){Eu=co=!1;var e=0;jl!==0&&Y1()&&(e=jl);for(var n=Bt(),a=null,u=_u;u!==null;){var o=u.next,d=hp(u,n);d===0?(u.next=null,a===null?_u=o:a.next=o,o===null&&(Ka=a)):(a=u,(e!==0||(d&3)!==0)&&(Eu=!0)),u=o}St!==0&&St!==5||$i(e),jl!==0&&(jl=0)}function hp(e,n){for(var a=e.suspendedLanes,u=e.pingedLanes,o=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var x=31-tt(d),S=1<<x,C=o[x];C===-1?((S&a)===0||(S&u)!==0)&&(o[x]=a0(S,n)):C<=n&&(e.expiredLanes|=S),d&=~S}if(n=nt,a=Le,a=jr(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,a===0||e===n&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&pi(u),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||gi(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(u!==null&&pi(u),Es(a)){case 2:case 8:a=ie;break;case 32:a=we;break;case 268435456:a=Ge;break;default:a=we}return u=mp.bind(null,e),a=pa(a,u),e.callbackPriority=n,e.callbackNode=a,n}return u!==null&&u!==null&&pi(u),e.callbackPriority=2,e.callbackNode=null,2}function mp(e,n){if(St!==0&&St!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(wu()&&e.callbackNode!==a)return null;var u=Le;return u=jr(e,e===nt?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(Km(e,u,n),hp(e,Bt()),e.callbackNode!=null&&e.callbackNode===a?mp.bind(null,e):null)}function pp(e,n){if(wu())return null;Km(e,n,!0)}function z1(){Z1(function(){(Fe&6)!==0?pa(G,D1):dp()})}function fo(){if(jl===0){var e=Ma;e===0&&(e=Cr,Cr<<=1,(Cr&261888)===0&&(Cr=256)),jl=e}return jl}function gp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Or(""+e)}function yp(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 O1(e,n,a,u,o){if(n==="submit"&&a&&a.stateNode===o){var d=gp((o[Zt]||null).action),x=u.submitter;x&&(n=(n=x[Zt]||null)?gp(n.formAction):x.getAttribute("formAction"),n!==null&&(d=n,x=null));var S=new Br("action","action",null,u,o);e.push({event:S,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(jl!==0){var C=x?yp(o,x):new FormData(o);Dc(a,{pending:!0,data:C,method:o.method,action:d},null,C)}}else typeof d=="function"&&(S.preventDefault(),C=x?yp(o,x):new FormData(o),Dc(a,{pending:!0,data:C,method:o.method,action:d},d,C))},currentTarget:o}]})}}for(var ho=0;ho<Xs.length;ho++){var mo=Xs[ho],M1=mo.toLowerCase(),R1=mo[0].toUpperCase()+mo.slice(1);An(M1,"on"+R1)}An(Xd,"onAnimationEnd"),An(Kd,"onAnimationIteration"),An(Jd,"onAnimationStart"),An("dblclick","onDoubleClick"),An("focusin","onFocus"),An("focusout","onBlur"),An($0,"onTransitionRun"),An(P0,"onTransitionStart"),An(W0,"onTransitionCancel"),An($d,"onTransitionEnd"),va("onMouseEnter",["mouseout","mouseover"]),va("onMouseLeave",["mouseout","mouseover"]),va("onPointerEnter",["pointerout","pointerover"]),va("onPointerLeave",["pointerout","pointerover"]),Il("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Il("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Il("onBeforeInput",["compositionend","keypress","textInput","paste"]),Il("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Il("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Il("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pi="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(" "),L1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pi));function xp(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var u=e[a],o=u.event;u=u.listeners;e:{var d=void 0;if(n)for(var x=u.length-1;0<=x;x--){var S=u[x],C=S.instance,L=S.currentTarget;if(S=S.listener,C!==d&&o.isPropagationStopped())break e;d=S,o.currentTarget=L;try{d(o)}catch(F){qr(F)}o.currentTarget=null,d=C}else for(x=0;x<u.length;x++){if(S=u[x],C=S.instance,L=S.currentTarget,S=S.listener,C!==d&&o.isPropagationStopped())break e;d=S,o.currentTarget=L;try{d(o)}catch(F){qr(F)}o.currentTarget=null,d=C}}}}function Me(e,n){var a=n[Cs];a===void 0&&(a=n[Cs]=new Set);var u=e+"__bubble";a.has(u)||(bp(n,e,2,!1),a.add(u))}function po(e,n,a){var u=0;n&&(u|=4),bp(a,e,u,n)}var Cu="_reactListening"+Math.random().toString(36).slice(2);function go(e){if(!e[Cu]){e[Cu]=!0,dd.forEach(function(a){a!=="selectionchange"&&(L1.has(a)||po(a,!1,e),po(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Cu]||(n[Cu]=!0,po("selectionchange",!1,n))}}function bp(e,n,a,u){switch(Xp(n)){case 2:var o=ob;break;case 8:o=fb;break;default:o=Do}a=o.bind(null,n,a,e),o=void 0,!Rs||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(o=!0),u?o!==void 0?e.addEventListener(n,a,{capture:!0,passive:o}):e.addEventListener(n,a,!0):o!==void 0?e.addEventListener(n,a,{passive:o}):e.addEventListener(n,a,!1)}function yo(e,n,a,u,o){var d=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var x=u.tag;if(x===3||x===4){var S=u.stateNode.containerInfo;if(S===o)break;if(x===4)for(x=u.return;x!==null;){var C=x.tag;if((C===3||C===4)&&x.stateNode.containerInfo===o)return;x=x.return}for(;S!==null;){if(x=ya(S),x===null)return;if(C=x.tag,C===5||C===6||C===26||C===27){u=d=x;continue e}S=S.parentNode}}u=u.return}_d(function(){var L=d,F=Os(a),P=[];e:{var B=Pd.get(e);if(B!==void 0){var V=Br,de=e;switch(e){case"keypress":if(Rr(a)===0)break e;case"keydown":case"keyup":V=j0;break;case"focusin":de="focus",V=Hs;break;case"focusout":de="blur",V=Hs;break;case"beforeblur":case"afterblur":V=Hs;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":V=Ad;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=y0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=z0;break;case Xd:case Kd:case Jd:V=v0;break;case $d:V=M0;break;case"scroll":case"scrollend":V=p0;break;case"wheel":V=L0;break;case"copy":case"cut":case"paste":V=S0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=jd;break;case"toggle":case"beforetoggle":V=U0}var ke=(n&4)!==0,Pe=!ke&&(e==="scroll"||e==="scrollend"),D=ke?B!==null?B+"Capture":null:B;ke=[];for(var T=L,R;T!==null;){var X=T;if(R=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||R===null||D===null||(X=vi(T,D),X!=null&&ke.push(Wi(T,X,R))),Pe)break;T=T.return}0<ke.length&&(B=new V(B,de,null,a,F),P.push({event:B,listeners:ke}))}}if((n&7)===0){e:{if(B=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",B&&a!==zs&&(de=a.relatedTarget||a.fromElement)&&(ya(de)||de[ga]))break e;if((V||B)&&(B=F.window===F?F:(B=F.ownerDocument)?B.defaultView||B.parentWindow:window,V?(de=a.relatedTarget||a.toElement,V=L,de=de?ya(de):null,de!==null&&(Pe=c(de),ke=de.tag,de!==Pe||ke!==5&&ke!==27&&ke!==6)&&(de=null)):(V=null,de=L),V!==de)){if(ke=Ad,X="onMouseLeave",D="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(ke=jd,X="onPointerLeave",D="onPointerEnter",T="pointer"),Pe=V==null?B:bi(V),R=de==null?B:bi(de),B=new ke(X,T+"leave",V,a,F),B.target=Pe,B.relatedTarget=R,X=null,ya(F)===L&&(ke=new ke(D,T+"enter",de,a,F),ke.target=R,ke.relatedTarget=Pe,X=ke),Pe=X,V&&de)t:{for(ke=B1,D=V,T=de,R=0,X=D;X;X=ke(X))R++;X=0;for(var xe=T;xe;xe=ke(xe))X++;for(;0<R-X;)D=ke(D),R--;for(;0<X-R;)T=ke(T),X--;for(;R--;){if(D===T||T!==null&&D===T.alternate){ke=D;break t}D=ke(D),T=ke(T)}ke=null}else ke=null;V!==null&&vp(P,B,V,ke,!1),de!==null&&Pe!==null&&vp(P,Pe,de,ke,!0)}}e:{if(B=L?bi(L):window,V=B.nodeName&&B.nodeName.toLowerCase(),V==="select"||V==="input"&&B.type==="file")var Ye=Bd;else if(Rd(B))if(Ud)Ye=X0;else{Ye=Q0;var pe=F0}else V=B.nodeName,!V||V.toLowerCase()!=="input"||B.type!=="checkbox"&&B.type!=="radio"?L&&Ds(L.elementType)&&(Ye=Bd):Ye=G0;if(Ye&&(Ye=Ye(e,L))){Ld(P,Ye,a,F);break e}pe&&pe(e,B,L),e==="focusout"&&L&&B.type==="number"&&L.memoizedProps.value!=null&&Ns(B,"number",B.value)}switch(pe=L?bi(L):window,e){case"focusin":(Rd(pe)||pe.contentEditable==="true")&&(Ca=pe,Fs=L,Ti=null);break;case"focusout":Ti=Fs=Ca=null;break;case"mousedown":Qs=!0;break;case"contextmenu":case"mouseup":case"dragend":Qs=!1,Qd(P,a,F);break;case"selectionchange":if(J0)break;case"keydown":case"keyup":Qd(P,a,F)}var Ne;if(Vs)e:{switch(e){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Ea?Od(e,a)&&(Be="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Be="onCompositionStart");Be&&(Nd&&a.locale!=="ko"&&(Ea||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Ea&&(Ne=Ed()):(hl=F,Ls="value"in hl?hl.value:hl.textContent,Ea=!0)),pe=Au(L,Be),0<pe.length&&(Be=new Td(Be,e,null,a,F),P.push({event:Be,listeners:pe}),Ne?Be.data=Ne:(Ne=Md(a),Ne!==null&&(Be.data=Ne)))),(Ne=q0?V0(e,a):Y0(e,a))&&(Be=Au(L,"onBeforeInput"),0<Be.length&&(pe=new Td("onBeforeInput","beforeinput",null,a,F),P.push({event:pe,listeners:Be}),pe.data=Ne)),O1(P,e,L,a,F)}xp(P,n)})}function Wi(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Au(e,n){for(var a=n+"Capture",u=[];e!==null;){var o=e,d=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||d===null||(o=vi(e,a),o!=null&&u.unshift(Wi(e,o,d)),o=vi(e,n),o!=null&&u.push(Wi(e,o,d))),e.tag===3)return u;e=e.return}return[]}function B1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function vp(e,n,a,u,o){for(var d=n._reactName,x=[];a!==null&&a!==u;){var S=a,C=S.alternate,L=S.stateNode;if(S=S.tag,C!==null&&C===u)break;S!==5&&S!==26&&S!==27||L===null||(C=L,o?(L=vi(a,d),L!=null&&x.unshift(Wi(a,L,C))):o||(L=vi(a,d),L!=null&&x.push(Wi(a,L,C)))),a=a.return}x.length!==0&&e.push({event:n,listeners:x})}var U1=/\r\n?/g,H1=/\u0000|\uFFFD/g;function kp(e){return(typeof e=="string"?e:""+e).replace(U1,`
|
|
49
|
+
`).replace(H1,"")}function Sp(e,n){return n=kp(n),kp(e)===n}function $e(e,n,a,u,o,d){switch(a){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Sa(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Sa(e,""+u);break;case"className":Dr(e,"class",u);break;case"tabIndex":Dr(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Dr(e,a,u);break;case"style":Sd(e,u,d);break;case"data":if(n!=="object"){Dr(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=Or(""+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"&&$e(e,n,"name",o.name,o,null),$e(e,n,"formEncType",o.formEncType,o,null),$e(e,n,"formMethod",o.formMethod,o,null),$e(e,n,"formTarget",o.formTarget,o,null)):($e(e,n,"encType",o.encType,o,null),$e(e,n,"method",o.method,o,null),$e(e,n,"target",o.target,o,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=Or(""+u),e.setAttribute(a,u);break;case"onClick":u!=null&&(e.onclick=In);break;case"onScroll":u!=null&&Me("scroll",e);break;case"onScrollEnd":u!=null&&Me("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(o.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=Or(""+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":Me("beforetoggle",e),Me("toggle",e),Nr(e,"popover",u);break;case"xlinkActuate":Yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Yn(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Yn(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Yn(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Yn(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Nr(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=h0.get(a)||a,Nr(e,a,u))}}function xo(e,n,a,u,o,d){switch(a){case"style":Sd(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(o.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof u=="string"?Sa(e,u):(typeof u=="number"||typeof u=="bigint")&&Sa(e,""+u);break;case"onScroll":u!=null&&Me("scroll",e);break;case"onScrollEnd":u!=null&&Me("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(!hd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(o=a.endsWith("Capture"),n=a.slice(2,o?a.length-7:void 0),d=e[Zt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(n,d,o),typeof u=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,u,o);break e}a in e?e[a]=u:u===!0?e.setAttribute(a,""):Nr(e,a,u)}}}function jt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var u=!1,o=!1,d;for(d in a)if(a.hasOwnProperty(d)){var x=a[d];if(x!=null)switch(d){case"src":u=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:$e(e,n,d,x,a,null)}}o&&$e(e,n,"srcSet",a.srcSet,a,null),u&&$e(e,n,"src",a.src,a,null);return;case"input":Me("invalid",e);var S=d=x=o=null,C=null,L=null;for(u in a)if(a.hasOwnProperty(u)){var F=a[u];if(F!=null)switch(u){case"name":o=F;break;case"type":x=F;break;case"checked":C=F;break;case"defaultChecked":L=F;break;case"value":d=F;break;case"defaultValue":S=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(r(137,n));break;default:$e(e,n,u,F,a,null)}}xd(e,d,S,C,L,x,o,!1);return;case"select":Me("invalid",e),u=x=d=null;for(o in a)if(a.hasOwnProperty(o)&&(S=a[o],S!=null))switch(o){case"value":d=S;break;case"defaultValue":x=S;break;case"multiple":u=S;default:$e(e,n,o,S,a,null)}n=d,a=x,e.multiple=!!u,n!=null?ka(e,!!u,n,!1):a!=null&&ka(e,!!u,a,!0);return;case"textarea":Me("invalid",e),d=o=u=null;for(x in a)if(a.hasOwnProperty(x)&&(S=a[x],S!=null))switch(x){case"value":u=S;break;case"defaultValue":o=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:$e(e,n,x,S,a,null)}vd(e,u,o,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:$e(e,n,C,u,a,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(u=0;u<Pi.length;u++)Me(Pi[u],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(L in a)if(a.hasOwnProperty(L)&&(u=a[L],u!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:$e(e,n,L,u,a,null)}return;default:if(Ds(n)){for(F in a)a.hasOwnProperty(F)&&(u=a[F],u!==void 0&&xo(e,n,F,u,a,void 0));return}}for(S in a)a.hasOwnProperty(S)&&(u=a[S],u!=null&&$e(e,n,S,u,a,null))}function q1(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 o=null,d=null,x=null,S=null,C=null,L=null,F=null;for(V in a){var P=a[V];if(a.hasOwnProperty(V)&&P!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":C=P;default:u.hasOwnProperty(V)||$e(e,n,V,null,u,P)}}for(var B in u){var V=u[B];if(P=a[B],u.hasOwnProperty(B)&&(V!=null||P!=null))switch(B){case"type":d=V;break;case"name":o=V;break;case"checked":L=V;break;case"defaultChecked":F=V;break;case"value":x=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,n));break;default:V!==P&&$e(e,n,B,V,u,P)}}js(e,x,S,C,L,F,d,o);return;case"select":V=x=S=B=null;for(d in a)if(C=a[d],a.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":V=C;default:u.hasOwnProperty(d)||$e(e,n,d,null,u,C)}for(o in u)if(d=u[o],C=a[o],u.hasOwnProperty(o)&&(d!=null||C!=null))switch(o){case"value":B=d;break;case"defaultValue":S=d;break;case"multiple":x=d;default:d!==C&&$e(e,n,o,d,u,C)}n=S,a=x,u=V,B!=null?ka(e,!!a,B,!1):!!u!=!!a&&(n!=null?ka(e,!!a,n,!0):ka(e,!!a,a?[]:"",!1));return;case"textarea":V=B=null;for(S in a)if(o=a[S],a.hasOwnProperty(S)&&o!=null&&!u.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:$e(e,n,S,null,u,o)}for(x in u)if(o=u[x],d=a[x],u.hasOwnProperty(x)&&(o!=null||d!=null))switch(x){case"value":B=o;break;case"defaultValue":V=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(r(91));break;default:o!==d&&$e(e,n,x,o,u,d)}bd(e,B,V);return;case"option":for(var de in a)if(B=a[de],a.hasOwnProperty(de)&&B!=null&&!u.hasOwnProperty(de))switch(de){case"selected":e.selected=!1;break;default:$e(e,n,de,null,u,B)}for(C in u)if(B=u[C],V=a[C],u.hasOwnProperty(C)&&B!==V&&(B!=null||V!=null))switch(C){case"selected":e.selected=B&&typeof B!="function"&&typeof B!="symbol";break;default:$e(e,n,C,B,u,V)}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 ke in a)B=a[ke],a.hasOwnProperty(ke)&&B!=null&&!u.hasOwnProperty(ke)&&$e(e,n,ke,null,u,B);for(L in u)if(B=u[L],V=a[L],u.hasOwnProperty(L)&&B!==V&&(B!=null||V!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,n));break;default:$e(e,n,L,B,u,V)}return;default:if(Ds(n)){for(var Pe in a)B=a[Pe],a.hasOwnProperty(Pe)&&B!==void 0&&!u.hasOwnProperty(Pe)&&xo(e,n,Pe,void 0,u,B);for(F in u)B=u[F],V=a[F],!u.hasOwnProperty(F)||B===V||B===void 0&&V===void 0||xo(e,n,F,B,u,V);return}}for(var D in a)B=a[D],a.hasOwnProperty(D)&&B!=null&&!u.hasOwnProperty(D)&&$e(e,n,D,null,u,B);for(P in u)B=u[P],V=a[P],!u.hasOwnProperty(P)||B===V||B==null&&V==null||$e(e,n,P,B,u,V)}function wp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function V1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),u=0;u<a.length;u++){var o=a[u],d=o.transferSize,x=o.initiatorType,S=o.duration;if(d&&S&&wp(x)){for(x=0,S=o.responseEnd,u+=1;u<a.length;u++){var C=a[u],L=C.startTime;if(L>S)break;var F=C.transferSize,P=C.initiatorType;F&&wp(P)&&(C=C.responseEnd,x+=F*(C<S?1:(S-L)/(C-L)))}if(--u,n+=8*(d+x)/(o.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 bo=null,vo=null;function Tu(e){return e.nodeType===9?e:e.ownerDocument}function _p(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 Ep(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 ko(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 So=null;function Y1(){var e=window.event;return e&&e.type==="popstate"?e===So?!1:(So=e,!0):(So=null,!1)}var Cp=typeof setTimeout=="function"?setTimeout:void 0,I1=typeof clearTimeout=="function"?clearTimeout:void 0,Ap=typeof Promise=="function"?Promise:void 0,Z1=typeof queueMicrotask=="function"?queueMicrotask:typeof Ap<"u"?function(e){return Ap.resolve(null).then(e).catch(F1)}:Cp;function F1(e){setTimeout(function(){throw e})}function Nl(e){return e==="head"}function Tp(e,n){var a=n,u=0;do{var o=a.nextSibling;if(e.removeChild(a),o&&o.nodeType===8)if(a=o.data,a==="/$"||a==="/&"){if(u===0){e.removeChild(o),Wa(n);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")er(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,er(a);for(var d=a.firstChild;d;){var x=d.nextSibling,S=d.nodeName;d[xi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=x}}else a==="body"&&er(e.ownerDocument.body);a=o}while(a);Wa(n)}function jp(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 wo(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":wo(a),As(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Q1(e,n,a,u){for(;e.nodeType===1;){var o=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[xi])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!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=vn(e.nextSibling),e===null)break}return null}function G1(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 Np(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 _o(e){return e.data==="$?"||e.data==="$~"}function Eo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function X1(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 Co=null;function Dp(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 zp(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 Op(e,n,a){switch(n=Tu(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 er(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);As(e)}var kn=new Map,Mp=new Set;function ju(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var il=K.d;K.d={f:K1,r:J1,D:$1,C:P1,L:W1,m:eb,X:nb,S:tb,M:lb};function K1(){var e=il.f(),n=vu();return e||n}function J1(e){var n=xa(e);n!==null&&n.tag===5&&n.type==="form"?$h(n):il.r(e)}var Ja=typeof document>"u"?null:document;function Rp(e,n,a){var u=Ja;if(u&&typeof n=="string"&&n){var o=hn(n);o='link[rel="'+e+'"][href="'+o+'"]',typeof a=="string"&&(o+='[crossorigin="'+a+'"]'),Mp.has(o)||(Mp.add(o),e={rel:e,crossOrigin:a,href:n},u.querySelector(o)===null&&(n=u.createElement("link"),jt(n,"link",e),wt(n),u.head.appendChild(n)))}}function $1(e){il.D(e),Rp("dns-prefetch",e,null)}function P1(e,n){il.C(e,n),Rp("preconnect",e,n)}function W1(e,n,a){il.L(e,n,a);var u=Ja;if(u&&e&&n){var o='link[rel="preload"][as="'+hn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(o+='[imagesrcset="'+hn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(o+='[imagesizes="'+hn(a.imageSizes)+'"]')):o+='[href="'+hn(e)+'"]';var d=o;switch(n){case"style":d=$a(e);break;case"script":d=Pa(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(o)!==null||n==="style"&&u.querySelector(tr(d))||n==="script"&&u.querySelector(nr(d))||(n=u.createElement("link"),jt(n,"link",e),wt(n),u.head.appendChild(n)))}}function eb(e,n){il.m(e,n);var a=Ja;if(a&&e){var u=n&&typeof n.as=="string"?n.as:"script",o='link[rel="modulepreload"][as="'+hn(u)+'"][href="'+hn(e)+'"]',d=o;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Pa(e)}if(!kn.has(d)&&(e=y({rel:"modulepreload",href:e},n),kn.set(d,e),a.querySelector(o)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(nr(d)))return}u=a.createElement("link"),jt(u,"link",e),wt(u),a.head.appendChild(u)}}}function tb(e,n,a){il.S(e,n,a);var u=Ja;if(u&&e){var o=ba(u).hoistableStyles,d=$a(e);n=n||"default";var x=o.get(d);if(!x){var S={loading:0,preload:null};if(x=u.querySelector(tr(d)))S.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=kn.get(d))&&Ao(e,a);var C=x=u.createElement("link");wt(C),jt(C,"link",e),C._p=new Promise(function(L,F){C.onload=L,C.onerror=F}),C.addEventListener("load",function(){S.loading|=1}),C.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Nu(x,n,u)}x={type:"stylesheet",instance:x,count:1,state:S},o.set(d,x)}}}function nb(e,n){il.X(e,n);var a=Ja;if(a&&e){var u=ba(a).hoistableScripts,o=Pa(e),d=u.get(o);d||(d=a.querySelector(nr(o)),d||(e=y({src:e,async:!0},n),(n=kn.get(o))&&To(e,n),d=a.createElement("script"),wt(d),jt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(o,d))}}function lb(e,n){il.M(e,n);var a=Ja;if(a&&e){var u=ba(a).hoistableScripts,o=Pa(e),d=u.get(o);d||(d=a.querySelector(nr(o)),d||(e=y({src:e,async:!0,type:"module"},n),(n=kn.get(o))&&To(e,n),d=a.createElement("script"),wt(d),jt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(o,d))}}function Lp(e,n,a,u){var o=(o=ye.current)?ju(o):null;if(!o)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=$a(a.href),a=ba(o).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=$a(a.href);var d=ba(o).hoistableStyles,x=d.get(e);if(x||(o=o.ownerDocument||o,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,x),(d=o.querySelector(tr(e)))&&!d._p&&(x.instance=d,x.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||ab(o,e,a,x.state))),n&&u===null)throw Error(r(528,""));return x}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=Pa(a),a=ba(o).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 $a(e){return'href="'+hn(e)+'"'}function tr(e){return'link[rel="stylesheet"]['+e+"]"}function Bp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function ab(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}),jt(n,"link",a),wt(n),e.head.appendChild(n))}function Pa(e){return'[src="'+hn(e)+'"]'}function nr(e){return"script[async]"+e}function Up(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,wt(u),u;var o=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),wt(u),jt(u,"style",o),Nu(u,a.precedence,e),n.instance=u;case"stylesheet":o=$a(a.href);var d=e.querySelector(tr(o));if(d)return n.state.loading|=4,n.instance=d,wt(d),d;u=Bp(a),(o=kn.get(o))&&Ao(u,o),d=(e.ownerDocument||e).createElement("link"),wt(d);var x=d;return x._p=new Promise(function(S,C){x.onload=S,x.onerror=C}),jt(d,"link",u),n.state.loading|=4,Nu(d,a.precedence,e),n.instance=d;case"script":return d=Pa(a.src),(o=e.querySelector(nr(d)))?(n.instance=o,wt(o),o):(u=a,(o=kn.get(d))&&(u=y({},a),To(u,o)),e=e.ownerDocument||e,o=e.createElement("script"),wt(o),jt(o,"link",u),e.head.appendChild(o),n.instance=o);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,Nu(u,a.precedence,e));return n.instance}function Nu(e,n,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=u.length?u[u.length-1]:null,d=o,x=0;x<u.length;x++){var S=u[x];if(S.dataset.precedence===n)d=S;else if(d!==o)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function Ao(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function To(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Du=null;function Hp(e,n,a){if(Du===null){var u=new Map,o=Du=new Map;o.set(a,u)}else o=Du,u=o.get(a),u||(u=new Map,o.set(a,u));if(u.has(e))return u;for(u.set(e,null),a=a.getElementsByTagName(e),o=0;o<a.length;o++){var d=a[o];if(!(d[xi]||d[Et]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var x=d.getAttribute(n)||"";x=e+x;var S=u.get(x);S?S.push(d):u.set(x,[d])}}return u}function qp(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function ib(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 Vp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function rb(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 o=$a(u.href),d=n.querySelector(tr(o));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=zu.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=d,wt(d);return}d=n.ownerDocument||n,u=Bp(u),(o=kn.get(o))&&Ao(u,o),d=d.createElement("link"),wt(d);var x=d;x._p=new Promise(function(S,C){x.onload=S,x.onerror=C}),jt(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=zu.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var jo=0;function ub(e,n){return e.stylesheets&&e.count===0&&Mu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var u=setTimeout(function(){if(e.stylesheets&&Mu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&jo===0&&(jo=62500*V1());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Mu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>jo?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(u),clearTimeout(o)}}:null}function zu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Mu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ou=null;function Mu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ou=new Map,n.forEach(sb,e),Ou=null,zu.call(e))}function sb(e,n){if(!(n.state.loading&4)){var a=Ou.get(e);if(a)var u=a.get(null);else{a=new Map,Ou.set(e,a);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<o.length;d++){var x=o[d];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),u=x)}u&&a.set(null,u)}o=n.instance,x=o.getAttribute("data-precedence"),d=a.get(x)||u,d===u&&a.set(null,o),a.set(x,o),this.count++,u=zu.bind(this),o.addEventListener("load",u),o.addEventListener("error",u),d?d.parentNode.insertBefore(o,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),n.state.loading|=4}}var lr={$$typeof:H,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function cb(e,n,a,u,o,d,x,S,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=ws(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ws(0),this.hiddenUpdates=ws(null),this.identifierPrefix=u,this.onUncaughtError=o,this.onCaughtError=d,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Yp(e,n,a,u,o,d,x,S,C,L,F,P){return e=new cb(e,n,a,x,C,L,F,P,S),n=1,d===!0&&(n|=24),d=tn(3,null,null,n),e.current=d,d.stateNode=e,n=uc(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:u,isDehydrated:a,cache:n},fc(d),e}function Ip(e){return e?(e=ja,e):ja}function Zp(e,n,a,u,o,d){o=Ip(o),u.context===null?u.context=o:u.pendingContext=o,u=bl(n),u.payload={element:a},d=d===void 0?null:d,d!==null&&(u.callback=d),a=vl(e,u,n),a!==null&&(Jt(a,e,n),Ri(a,e,n))}function Fp(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function No(e,n){Fp(e,n),(e=e.alternate)&&Fp(e,n)}function Qp(e){if(e.tag===13||e.tag===31){var n=Gl(e,67108864);n!==null&&Jt(n,e,67108864),No(e,67108864)}}function Gp(e){if(e.tag===13||e.tag===31){var n=un();n=_s(n);var a=Gl(e,n);a!==null&&Jt(a,e,n),No(e,n)}}var Ru=!0;function ob(e,n,a,u){var o=N.T;N.T=null;var d=K.p;try{K.p=2,Do(e,n,a,u)}finally{K.p=d,N.T=o}}function fb(e,n,a,u){var o=N.T;N.T=null;var d=K.p;try{K.p=8,Do(e,n,a,u)}finally{K.p=d,N.T=o}}function Do(e,n,a,u){if(Ru){var o=zo(u);if(o===null)yo(e,n,u,Lu,a),Kp(e,u);else if(hb(o,e,n,a,u))u.stopPropagation();else if(Kp(e,u),n&4&&-1<db.indexOf(e)){for(;o!==null;){var d=xa(o);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var x=Yl(d.pendingLanes);if(x!==0){var S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;x;){var C=1<<31-tt(x);S.entanglements[1]|=C,x&=~C}Rn(d),(Fe&6)===0&&(xu=Bt()+500,$i(0))}}break;case 31:case 13:S=Gl(d,2),S!==null&&Jt(S,d,2),vu(),No(d,2)}if(d=zo(u),d===null&&yo(e,n,u,Lu,a),d===o)break;o=d}o!==null&&u.stopPropagation()}else yo(e,n,u,null,a)}}function zo(e){return e=Os(e),Oo(e)}var Lu=null;function Oo(e){if(Lu=null,e=ya(e),e!==null){var n=c(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 Lu=e,null}function Xp(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(Ss()){case G:return 2;case ie:return 8;case we:case ze:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Mo=!1,Dl=null,zl=null,Ol=null,ar=new Map,ir=new Map,Ml=[],db="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 Kp(e,n){switch(e){case"focusin":case"focusout":Dl=null;break;case"dragenter":case"dragleave":zl=null;break;case"mouseover":case"mouseout":Ol=null;break;case"pointerover":case"pointerout":ar.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ir.delete(n.pointerId)}}function rr(e,n,a,u,o,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:a,eventSystemFlags:u,nativeEvent:d,targetContainers:[o]},n!==null&&(n=xa(n),n!==null&&Qp(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,o!==null&&n.indexOf(o)===-1&&n.push(o),e)}function hb(e,n,a,u,o){switch(n){case"focusin":return Dl=rr(Dl,e,n,a,u,o),!0;case"dragenter":return zl=rr(zl,e,n,a,u,o),!0;case"mouseover":return Ol=rr(Ol,e,n,a,u,o),!0;case"pointerover":var d=o.pointerId;return ar.set(d,rr(ar.get(d)||null,e,n,a,u,o)),!0;case"gotpointercapture":return d=o.pointerId,ir.set(d,rr(ir.get(d)||null,e,n,a,u,o)),!0}return!1}function Jp(e){var n=ya(e.target);if(n!==null){var a=c(n);if(a!==null){if(n=a.tag,n===13){if(n=f(a),n!==null){e.blockedOn=n,od(e.priority,function(){Gp(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,od(e.priority,function(){Gp(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 Bu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=zo(e.nativeEvent);if(a===null){a=e.nativeEvent;var u=new a.constructor(a.type,a);zs=u,a.target.dispatchEvent(u),zs=null}else return n=xa(a),n!==null&&Qp(n),e.blockedOn=a,!1;n.shift()}return!0}function $p(e,n,a){Bu(e)&&a.delete(n)}function mb(){Mo=!1,Dl!==null&&Bu(Dl)&&(Dl=null),zl!==null&&Bu(zl)&&(zl=null),Ol!==null&&Bu(Ol)&&(Ol=null),ar.forEach($p),ir.forEach($p)}function Uu(e,n){e.blockedOn===n&&(e.blockedOn=null,Mo||(Mo=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,mb)))}var Hu=null;function Pp(e){Hu!==e&&(Hu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hu===e&&(Hu=null);for(var n=0;n<e.length;n+=3){var a=e[n],u=e[n+1],o=e[n+2];if(typeof u!="function"){if(Oo(u||a)===null)continue;break}var d=xa(a);d!==null&&(e.splice(n,3),n-=3,Dc(d,{pending:!0,data:o,method:a.method,action:u},u,o))}}))}function Wa(e){function n(C){return Uu(C,e)}Dl!==null&&Uu(Dl,e),zl!==null&&Uu(zl,e),Ol!==null&&Uu(Ol,e),ar.forEach(n),ir.forEach(n);for(var a=0;a<Ml.length;a++){var u=Ml[a];u.blockedOn===e&&(u.blockedOn=null)}for(;0<Ml.length&&(a=Ml[0],a.blockedOn===null);)Jp(a),a.blockedOn===null&&Ml.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var o=a[u],d=a[u+1],x=o[Zt]||null;if(typeof d=="function")x||Pp(a);else if(x){var S=null;if(d&&d.hasAttribute("formAction")){if(o=d,x=d[Zt]||null)S=x.formAction;else if(Oo(o)!==null)continue}else S=x.action;typeof S=="function"?a[u+1]=S:(a.splice(u,3),u-=3),Pp(a)}}}function Wp(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(x){return o=x})},focusReset:"manual",scroll:"manual"})}function n(){o!==null&&(o(),o=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,o=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),o!==null&&(o(),o=null)}}}function Ro(e){this._internalRoot=e}qu.prototype.render=Ro.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,u=un();Zp(a,u,e,n,null,null)},qu.prototype.unmount=Ro.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Zp(e.current,2,null,e,null,null),vu(),n[ga]=null}};function qu(e){this._internalRoot=e}qu.prototype.unstable_scheduleHydration=function(e){if(e){var n=cd();e={blockedOn:null,target:e,priority:n};for(var a=0;a<Ml.length&&n!==0&&n<Ml[a].priority;a++);Ml.splice(a,0,e),a===0&&Jp(e)}};var eg=l.version;if(eg!=="19.2.7")throw Error(r(527,eg,"19.2.7"));K.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?b(e):null,e=e===null?null:e.stateNode,e};var pb={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{Ut=Vu.inject(pb),kt=Vu}catch{}}return sr.createRoot=function(e,n){if(!s(e))throw Error(r(299));var a=!1,u="",o=um,d=sm,x=cm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(x=n.onRecoverableError)),n=Yp(e,1,!1,null,null,a,u,null,o,d,x,Wp),e[ga]=n.current,go(e),new Ro(n)},sr.hydrateRoot=function(e,n,a){if(!s(e))throw Error(r(299));var u=!1,o="",d=um,x=sm,S=cm,C=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(o=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(S=a.onRecoverableError),a.formState!==void 0&&(C=a.formState)),n=Yp(e,1,!0,n,a??null,u,o,C,d,x,S,Wp),n.context=Ip(null),a=n.current,u=un(),u=_s(u),o=bl(u),o.callback=null,vl(a,o,u),a=u,n.current.lanes=a,yi(n,a),Rn(n),e[ga]=n.current,go(e),new qu(n)},sr.version="19.2.7",sr}var og;function Eb(){if(og)return Uo.exports;og=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(),Uo.exports=_b(),Uo.exports}var Cb=Eb();const Ey=new Map,Yo=new Map;function cf(t){return Ey.get(t)??null}function Ab(t,l){l.models.length!==0&&Ey.set(t,l)}function Tb(t,l){const i=cf(t);if(i)return Promise.resolve(i);const r=Yo.get(t);if(r)return r;const s=l().then(c=>(Ab(t,c),c)).finally(()=>Yo.delete(t));return Yo.set(t,s),s}const it="";async function fg(){const t=await fetch(`${it}/api/snapshot`);if(!t.ok)throw new Error("Failed to fetch snapshot");return t.json()}async function ai(t){const l=await fetch(`${it}/api/runs/${t}`);if(!l.ok)throw new Error("Not found");return l.json()}async function jb(){const t=await fetch(`${it}/api/intake/linear`);if(!t.ok)throw new Error(await t.text());return(await t.json()).candidates??[]}async function Xu(){const t=await fetch(`${it}/api/intake/linear/status`);if(!t.ok)throw new Error(await t.text());return t.json()}async function Df(){const t=await fetch(`${it}/api/intake/linear/config`);if(!t.ok)throw new Error(await t.text());return t.json()}async function Nb(t){const l=await fetch(`${it}/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 Db(t,l){const i=await fetch(`${it}/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 zb(t){const l=await fetch(`${it}/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 Ob(t,l){const i=await fetch(`${it}/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 Mb(t){const l=await fetch(`${it}/api/agents/${t}`,{method:"DELETE"});if(!l.ok)throw new Error(await l.text())}async function zf(t){const l=await fetch(`${it}/api/runs/${t}/cancel`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function Rb(t){const l=await fetch(`${it}/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 dg(t,l,i,r){const s=await fetch(`${it}/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 Lb(t,l,i){const r=await fetch(`${it}/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}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function Bb(t,l,i){const r=await fetch(`${it}/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 Ub(t,l,i){const r=await fetch(`${it}/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 Hb(t){const l=await fetch(`${it}/api/runs/${t}/approve`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function qb(t,l,i,r){const s=await fetch(`${it}/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 Vb(t){const l=await fetch(`${it}/api/runs/${t}/playbook-patch/apply`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function Yb(t){const l=await fetch(`${it}/api/runs/${t}/playbook-patch/dismiss`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function Ib(t,l){return Tb(t,async()=>{const r=await fetch(`${it}/api/runtimes/${t}/models`);if(!r.ok)throw new Error(await r.text());return r.json()})}async function Zb(){const t=await fetch(`${it}/api/agent-deck/status`);if(!t.ok)throw new Error(await t.text());return t.json()}async function Fb(){return(await(await fetch(`${it}/api/agent-deck/decks`)).json()).data??[]}async function Qb(t){return(await(await fetch(`${it}/api/agent-deck/decks/${t}/playbooks`)).json()).data??[]}function Gb(t){const l=new EventSource(`${it}/api/events`);return l.onmessage=i=>{try{t(JSON.parse(i.data))}catch{}},l.onerror=()=>{l.close()},()=>l.close()}async function Xb(t,l="transcript"){const i=await fetch(`${it}/api/runs/${t}/log-tail?kind=${l}`);if(!i.ok)throw new Error(await i.text());return(await i.json()).content}function Hl(t){if(!t.contentJson)return null;try{return JSON.parse(t.contentJson)}catch{return null}}function Ku(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 Sn(t,l){return[...t].reverse().find(i=>i.kind===l)}function Kb(t){var i;const l=Sn(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 Cy(t,l,i){const r=t.filter(c=>c.kind===l);for(let c=r.length-1;c>=0;c--){const f=Hl(r[c]);if(f&&f.phase===i)return f}const s=r[r.length-1];return s?Hl(s):null}function Ju(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 c=Math.floor(s/60);if(c<24)return`${c}h ago`;const f=Math.floor(c/24);return f<7?`${f}d ago`:new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Ay(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),c=i%60;return c>0?`${s}h ${c}m`:`${s}h`}return i>0?r>0?`${i}m ${r}s`:`${i}m`:`${r}s`}function ca(t){return t==="claude_code"?"Claude":t==="cursor_local"?"Cursor":"No agent"}function cs(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 Of(t){return{code:"Code",communication:"Slack",email:"Email",research:"Research",content:"Content",other:"Other"}[t]??t}function $u(t){return t.source==="linear"&&t.externalLabel?t.externalLabel:t.source==="linear"&&t.externalId?t.externalId:t.source==="linear"?"Linear":"Manual"}function Ty(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 Mf(t){return t.deckName?t.deckName:t.deckId?`deck ${t.deckId.slice(0,8)}…`:null}function ot({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 jy({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 Ze;(function(t){t.assertEqual=s=>{};function l(s){}t.assertIs=l;function i(s){throw new Error}t.assertNever=i,t.arrayToEnum=s=>{const c={};for(const f of s)c[f]=f;return c},t.getValidEnumValues=s=>{const c=t.objectKeys(s).filter(h=>typeof s[s[h]]!="number"),f={};for(const h of c)f[h]=s[h];return t.objectValues(f)},t.objectValues=s=>t.objectKeys(s).map(function(c){return s[c]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const c=[];for(const f in s)Object.prototype.hasOwnProperty.call(s,f)&&c.push(f);return c},t.find=(s,c)=>{for(const f of s)if(c(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,c=" | "){return s.map(f=>typeof f=="string"?`'${f}'`:f).join(c)}t.joinValues=r,t.jsonStringifyReplacer=(s,c)=>typeof c=="bigint"?c.toString():c})(Ze||(Ze={}));var hg;(function(t){t.mergeShapes=(l,i)=>({...l,...i})})(hg||(hg={}));const he=Ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Bl=t=>{switch(typeof t){case"undefined":return he.undefined;case"string":return he.string;case"number":return Number.isNaN(t)?he.nan:he.number;case"boolean":return he.boolean;case"function":return he.function;case"bigint":return he.bigint;case"symbol":return he.symbol;case"object":return Array.isArray(t)?he.array:t===null?he.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?he.promise:typeof Map<"u"&&t instanceof Map?he.map:typeof Set<"u"&&t instanceof Set?he.set:typeof Date<"u"&&t instanceof Date?he.date:he.object;default:return he.unknown}},ne=Ze.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 sl 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(c){return c.message},r={_errors:[]},s=c=>{for(const f of c.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 sl))throw new Error(`Not a ZodError: ${l}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ze.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 c=s.path[0];i[c]=i[c]||[],i[c].push(l(s))}else r.push(l(s));return{formErrors:r,fieldErrors:i}}get formErrors(){return this.flatten()}}sl.create=t=>new sl(t);const of=(t,l)=>{let i;switch(t.code){case ne.invalid_type:t.received===he.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case ne.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,Ze.jsonStringifyReplacer)}`;break;case ne.unrecognized_keys:i=`Unrecognized key(s) in object: ${Ze.joinValues(t.keys,", ")}`;break;case ne.invalid_union:i="Invalid input";break;case ne.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${Ze.joinValues(t.options)}`;break;case ne.invalid_enum_value:i=`Invalid enum value. Expected ${Ze.joinValues(t.options)}, received '${t.received}'`;break;case ne.invalid_arguments:i="Invalid function arguments";break;case ne.invalid_return_type:i="Invalid function return type";break;case ne.invalid_date:i="Invalid date";break;case ne.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}"`:Ze.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case ne.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 ne.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 ne.custom:i="Invalid input";break;case ne.invalid_intersection_types:i="Intersection results could not be merged";break;case ne.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case ne.not_finite:i="Number must be finite";break;default:i=l.defaultError,Ze.assertNever(t)}return{message:i}};let Jb=of;function $b(){return Jb}const Pb=t=>{const{data:l,path:i,errorMaps:r,issueData:s}=t,c=[...i,...s.path||[]],f={...s,path:c};if(s.message!==void 0)return{...s,path:c,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:c,message:h}};function ce(t,l){const i=$b(),r=Pb({issueData:l,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,i,i===of?void 0:of].filter(s=>!!s)});t.common.issues.push(r)}class Yt{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 Ce;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 c=await s.key,f=await s.value;r.push({key:c,value:f})}return Yt.mergeObjectSync(l,r)}static mergeObjectSync(l,i){const r={};for(const s of i){const{key:c,value:f}=s;if(c.status==="aborted"||f.status==="aborted")return Ce;c.status==="dirty"&&l.dirty(),f.status==="dirty"&&l.dirty(),c.value!=="__proto__"&&(typeof f.value<"u"||s.alwaysSet)&&(r[c.value]=f.value)}return{status:l.value,value:r}}}const Ce=Object.freeze({status:"aborted"}),hr=t=>({status:"dirty",value:t}),_n=t=>({status:"valid",value:t}),mg=t=>t.status==="aborted",pg=t=>t.status==="dirty",ii=t=>t.status==="valid",Pu=t=>typeof Promise<"u"&&t instanceof Promise;var ge;(function(t){t.errToObj=l=>typeof l=="string"?{message:l}:l||{},t.toString=l=>typeof l=="string"?l:l==null?void 0:l.message})(ge||(ge={}));class Un{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 gg=(t,l)=>{if(ii(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 sl(t.common.issues);return this._error=i,this._error}}};function De(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 He{get description(){return this._def.description}_getType(l){return Bl(l.data)}_getOrReturnCtx(l,i){return i||{common:l.parent.common,data:l.data,parsedType:Bl(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}_processInputParams(l){return{status:new Yt,ctx:{common:l.parent.common,data:l.data,parsedType:Bl(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}}_parseSync(l){const i=this._parse(l);if(Pu(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:Bl(l)},s=this._parseSync({data:l,path:r.path,parent:r});return gg(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:Bl(l)};if(!this["~standard"].async)try{const c=this._parseSync({data:l,path:[],parent:i});return ii(c)?{value:c.value}:{issues:i.common.issues}}catch(c){(s=(r=c==null?void 0:c.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(c=>ii(c)?{value:c.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:Bl(l)},s=this._parse({data:l,path:r.path,parent:r}),c=await(Pu(s)?s:Promise.resolve(s));return gg(r,c)}refine(l,i){const r=s=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(s):i;return this._refinement((s,c)=>{const f=l(s),h=()=>c.addIssue({code:ne.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 si({schema:this,typeName:_e.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 Ul.create(this,this._def)}nullable(){return ci.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Bn.create(this)}promise(){return ls.create(this,this._def)}or(l){return es.create([this,l],this._def)}and(l){return ts.create(this,l,this._def)}transform(l){return new si({...De(this._def),schema:this,typeName:_e.ZodEffects,effect:{type:"transform",transform:l}})}default(l){const i=typeof l=="function"?l:()=>l;return new hf({...De(this._def),innerType:this,defaultValue:i,typeName:_e.ZodDefault})}brand(){return new kv({typeName:_e.ZodBranded,type:this,...De(this._def)})}catch(l){const i=typeof l=="function"?l:()=>l;return new mf({...De(this._def),innerType:this,catchValue:i,typeName:_e.ZodCatch})}describe(l){const i=this.constructor;return new i({...this._def,description:l})}pipe(l){return Rf.create(this,l)}readonly(){return pf.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Wb=/^c[^\s-]{8,}$/i,ev=/^[0-9a-z]+$/,tv=/^[0-9A-HJKMNP-TV-Z]{26}$/i,nv=/^[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,lv=/^[a-z0-9_-]{21}$/i,av=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,iv=/^[-+]?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)?)??$/,rv=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,uv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Io;const sv=/^(?:(?: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])$/,cv=/^(?:(?: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])$/,ov=/^(([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]))$/,fv=/^(([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])$/,dv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,hv=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ny="((\\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])))",mv=new RegExp(`^${Ny}$`);function Dy(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 pv(t){return new RegExp(`^${Dy(t)}$`)}function gv(t){let l=`${Ny}T${Dy(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 yv(t,l){return!!((l==="v4"||!l)&&sv.test(t)||(l==="v6"||!l)&&ov.test(t))}function xv(t,l){if(!av.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 bv(t,l){return!!((l==="v4"||!l)&&cv.test(t)||(l==="v6"||!l)&&fv.test(t))}class ul extends He{_parse(l){if(this._def.coerce&&(l.data=String(l.data)),this._getType(l)!==he.string){const c=this._getOrReturnCtx(l);return ce(c,{code:ne.invalid_type,expected:he.string,received:c.parsedType}),Ce}const r=new Yt;let s;for(const c of this._def.checks)if(c.kind==="min")l.data.length<c.value&&(s=this._getOrReturnCtx(l,s),ce(s,{code:ne.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),r.dirty());else if(c.kind==="max")l.data.length>c.value&&(s=this._getOrReturnCtx(l,s),ce(s,{code:ne.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!1,message:c.message}),r.dirty());else if(c.kind==="length"){const f=l.data.length>c.value,h=l.data.length<c.value;(f||h)&&(s=this._getOrReturnCtx(l,s),f?ce(s,{code:ne.too_big,maximum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}):h&&ce(s,{code:ne.too_small,minimum:c.value,type:"string",inclusive:!0,exact:!0,message:c.message}),r.dirty())}else if(c.kind==="email")rv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"email",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="emoji")Io||(Io=new RegExp(uv,"u")),Io.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"emoji",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="uuid")nv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"uuid",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="nanoid")lv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"nanoid",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="cuid")Wb.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"cuid",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="cuid2")ev.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"cuid2",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="ulid")tv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"ulid",code:ne.invalid_string,message:c.message}),r.dirty());else if(c.kind==="url")try{new URL(l.data)}catch{s=this._getOrReturnCtx(l,s),ce(s,{validation:"url",code:ne.invalid_string,message:c.message}),r.dirty()}else c.kind==="regex"?(c.regex.lastIndex=0,c.regex.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"regex",code:ne.invalid_string,message:c.message}),r.dirty())):c.kind==="trim"?l.data=l.data.trim():c.kind==="includes"?l.data.includes(c.value,c.position)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ne.invalid_string,validation:{includes:c.value,position:c.position},message:c.message}),r.dirty()):c.kind==="toLowerCase"?l.data=l.data.toLowerCase():c.kind==="toUpperCase"?l.data=l.data.toUpperCase():c.kind==="startsWith"?l.data.startsWith(c.value)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ne.invalid_string,validation:{startsWith:c.value},message:c.message}),r.dirty()):c.kind==="endsWith"?l.data.endsWith(c.value)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ne.invalid_string,validation:{endsWith:c.value},message:c.message}),r.dirty()):c.kind==="datetime"?gv(c).test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ne.invalid_string,validation:"datetime",message:c.message}),r.dirty()):c.kind==="date"?mv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ne.invalid_string,validation:"date",message:c.message}),r.dirty()):c.kind==="time"?pv(c).test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{code:ne.invalid_string,validation:"time",message:c.message}),r.dirty()):c.kind==="duration"?iv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"duration",code:ne.invalid_string,message:c.message}),r.dirty()):c.kind==="ip"?yv(l.data,c.version)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"ip",code:ne.invalid_string,message:c.message}),r.dirty()):c.kind==="jwt"?xv(l.data,c.alg)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"jwt",code:ne.invalid_string,message:c.message}),r.dirty()):c.kind==="cidr"?bv(l.data,c.version)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"cidr",code:ne.invalid_string,message:c.message}),r.dirty()):c.kind==="base64"?dv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"base64",code:ne.invalid_string,message:c.message}),r.dirty()):c.kind==="base64url"?hv.test(l.data)||(s=this._getOrReturnCtx(l,s),ce(s,{validation:"base64url",code:ne.invalid_string,message:c.message}),r.dirty()):Ze.assertNever(c);return{status:r.value,value:l.data}}_regex(l,i,r){return this.refinement(s=>l.test(s),{validation:i,code:ne.invalid_string,...ge.errToObj(r)})}_addCheck(l){return new ul({...this._def,checks:[...this._def.checks,l]})}email(l){return this._addCheck({kind:"email",...ge.errToObj(l)})}url(l){return this._addCheck({kind:"url",...ge.errToObj(l)})}emoji(l){return this._addCheck({kind:"emoji",...ge.errToObj(l)})}uuid(l){return this._addCheck({kind:"uuid",...ge.errToObj(l)})}nanoid(l){return this._addCheck({kind:"nanoid",...ge.errToObj(l)})}cuid(l){return this._addCheck({kind:"cuid",...ge.errToObj(l)})}cuid2(l){return this._addCheck({kind:"cuid2",...ge.errToObj(l)})}ulid(l){return this._addCheck({kind:"ulid",...ge.errToObj(l)})}base64(l){return this._addCheck({kind:"base64",...ge.errToObj(l)})}base64url(l){return this._addCheck({kind:"base64url",...ge.errToObj(l)})}jwt(l){return this._addCheck({kind:"jwt",...ge.errToObj(l)})}ip(l){return this._addCheck({kind:"ip",...ge.errToObj(l)})}cidr(l){return this._addCheck({kind:"cidr",...ge.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,...ge.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,...ge.errToObj(l==null?void 0:l.message)})}duration(l){return this._addCheck({kind:"duration",...ge.errToObj(l)})}regex(l,i){return this._addCheck({kind:"regex",regex:l,...ge.errToObj(i)})}includes(l,i){return this._addCheck({kind:"includes",value:l,position:i==null?void 0:i.position,...ge.errToObj(i==null?void 0:i.message)})}startsWith(l,i){return this._addCheck({kind:"startsWith",value:l,...ge.errToObj(i)})}endsWith(l,i){return this._addCheck({kind:"endsWith",value:l,...ge.errToObj(i)})}min(l,i){return this._addCheck({kind:"min",value:l,...ge.errToObj(i)})}max(l,i){return this._addCheck({kind:"max",value:l,...ge.errToObj(i)})}length(l,i){return this._addCheck({kind:"length",value:l,...ge.errToObj(i)})}nonempty(l){return this.min(1,ge.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:_e.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...De(t)});function vv(t,l){const i=(t.toString().split(".")[1]||"").length,r=(l.toString().split(".")[1]||"").length,s=i>r?i:r,c=Number.parseInt(t.toFixed(s).replace(".","")),f=Number.parseInt(l.toFixed(s).replace(".",""));return c%f/10**s}class ri extends He{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)!==he.number){const c=this._getOrReturnCtx(l);return ce(c,{code:ne.invalid_type,expected:he.number,received:c.parsedType}),Ce}let r;const s=new Yt;for(const c of this._def.checks)c.kind==="int"?Ze.isInteger(l.data)||(r=this._getOrReturnCtx(l,r),ce(r,{code:ne.invalid_type,expected:"integer",received:"float",message:c.message}),s.dirty()):c.kind==="min"?(c.inclusive?l.data<c.value:l.data<=c.value)&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ne.too_small,minimum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),s.dirty()):c.kind==="max"?(c.inclusive?l.data>c.value:l.data>=c.value)&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ne.too_big,maximum:c.value,type:"number",inclusive:c.inclusive,exact:!1,message:c.message}),s.dirty()):c.kind==="multipleOf"?vv(l.data,c.value)!==0&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ne.not_multiple_of,multipleOf:c.value,message:c.message}),s.dirty()):c.kind==="finite"?Number.isFinite(l.data)||(r=this._getOrReturnCtx(l,r),ce(r,{code:ne.not_finite,message:c.message}),s.dirty()):Ze.assertNever(c);return{status:s.value,value:l.data}}gte(l,i){return this.setLimit("min",l,!0,ge.toString(i))}gt(l,i){return this.setLimit("min",l,!1,ge.toString(i))}lte(l,i){return this.setLimit("max",l,!0,ge.toString(i))}lt(l,i){return this.setLimit("max",l,!1,ge.toString(i))}setLimit(l,i,r,s){return new ri({...this._def,checks:[...this._def.checks,{kind:l,value:i,inclusive:r,message:ge.toString(s)}]})}_addCheck(l){return new ri({...this._def,checks:[...this._def.checks,l]})}int(l){return this._addCheck({kind:"int",message:ge.toString(l)})}positive(l){return this._addCheck({kind:"min",value:0,inclusive:!1,message:ge.toString(l)})}negative(l){return this._addCheck({kind:"max",value:0,inclusive:!1,message:ge.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:0,inclusive:!0,message:ge.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:0,inclusive:!0,message:ge.toString(l)})}multipleOf(l,i){return this._addCheck({kind:"multipleOf",value:l,message:ge.toString(i)})}finite(l){return this._addCheck({kind:"finite",message:ge.toString(l)})}safe(l){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:ge.toString(l)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:ge.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"&&Ze.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)}}ri.create=t=>new ri({checks:[],typeName:_e.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...De(t)});class xr extends He{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)!==he.bigint)return this._getInvalidInput(l);let r;const s=new Yt;for(const c of this._def.checks)c.kind==="min"?(c.inclusive?l.data<c.value:l.data<=c.value)&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ne.too_small,type:"bigint",minimum:c.value,inclusive:c.inclusive,message:c.message}),s.dirty()):c.kind==="max"?(c.inclusive?l.data>c.value:l.data>=c.value)&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ne.too_big,type:"bigint",maximum:c.value,inclusive:c.inclusive,message:c.message}),s.dirty()):c.kind==="multipleOf"?l.data%c.value!==BigInt(0)&&(r=this._getOrReturnCtx(l,r),ce(r,{code:ne.not_multiple_of,multipleOf:c.value,message:c.message}),s.dirty()):Ze.assertNever(c);return{status:s.value,value:l.data}}_getInvalidInput(l){const i=this._getOrReturnCtx(l);return ce(i,{code:ne.invalid_type,expected:he.bigint,received:i.parsedType}),Ce}gte(l,i){return this.setLimit("min",l,!0,ge.toString(i))}gt(l,i){return this.setLimit("min",l,!1,ge.toString(i))}lte(l,i){return this.setLimit("max",l,!0,ge.toString(i))}lt(l,i){return this.setLimit("max",l,!1,ge.toString(i))}setLimit(l,i,r,s){return new xr({...this._def,checks:[...this._def.checks,{kind:l,value:i,inclusive:r,message:ge.toString(s)}]})}_addCheck(l){return new xr({...this._def,checks:[...this._def.checks,l]})}positive(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:ge.toString(l)})}negative(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:ge.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:ge.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:ge.toString(l)})}multipleOf(l,i){return this._addCheck({kind:"multipleOf",value:l,message:ge.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}}xr.create=t=>new xr({checks:[],typeName:_e.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...De(t)});class ff extends He{_parse(l){if(this._def.coerce&&(l.data=!!l.data),this._getType(l)!==he.boolean){const r=this._getOrReturnCtx(l);return ce(r,{code:ne.invalid_type,expected:he.boolean,received:r.parsedType}),Ce}return _n(l.data)}}ff.create=t=>new ff({typeName:_e.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...De(t)});class Wu extends He{_parse(l){if(this._def.coerce&&(l.data=new Date(l.data)),this._getType(l)!==he.date){const c=this._getOrReturnCtx(l);return ce(c,{code:ne.invalid_type,expected:he.date,received:c.parsedType}),Ce}if(Number.isNaN(l.data.getTime())){const c=this._getOrReturnCtx(l);return ce(c,{code:ne.invalid_date}),Ce}const r=new Yt;let s;for(const c of this._def.checks)c.kind==="min"?l.data.getTime()<c.value&&(s=this._getOrReturnCtx(l,s),ce(s,{code:ne.too_small,message:c.message,inclusive:!0,exact:!1,minimum:c.value,type:"date"}),r.dirty()):c.kind==="max"?l.data.getTime()>c.value&&(s=this._getOrReturnCtx(l,s),ce(s,{code:ne.too_big,message:c.message,inclusive:!0,exact:!1,maximum:c.value,type:"date"}),r.dirty()):Ze.assertNever(c);return{status:r.value,value:new Date(l.data.getTime())}}_addCheck(l){return new Wu({...this._def,checks:[...this._def.checks,l]})}min(l,i){return this._addCheck({kind:"min",value:l.getTime(),message:ge.toString(i)})}max(l,i){return this._addCheck({kind:"max",value:l.getTime(),message:ge.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}}Wu.create=t=>new Wu({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:_e.ZodDate,...De(t)});class yg extends He{_parse(l){if(this._getType(l)!==he.symbol){const r=this._getOrReturnCtx(l);return ce(r,{code:ne.invalid_type,expected:he.symbol,received:r.parsedType}),Ce}return _n(l.data)}}yg.create=t=>new yg({typeName:_e.ZodSymbol,...De(t)});class xg extends He{_parse(l){if(this._getType(l)!==he.undefined){const r=this._getOrReturnCtx(l);return ce(r,{code:ne.invalid_type,expected:he.undefined,received:r.parsedType}),Ce}return _n(l.data)}}xg.create=t=>new xg({typeName:_e.ZodUndefined,...De(t)});class bg extends He{_parse(l){if(this._getType(l)!==he.null){const r=this._getOrReturnCtx(l);return ce(r,{code:ne.invalid_type,expected:he.null,received:r.parsedType}),Ce}return _n(l.data)}}bg.create=t=>new bg({typeName:_e.ZodNull,...De(t)});class vg extends He{constructor(){super(...arguments),this._any=!0}_parse(l){return _n(l.data)}}vg.create=t=>new vg({typeName:_e.ZodAny,...De(t)});class kg extends He{constructor(){super(...arguments),this._unknown=!0}_parse(l){return _n(l.data)}}kg.create=t=>new kg({typeName:_e.ZodUnknown,...De(t)});class ql extends He{_parse(l){const i=this._getOrReturnCtx(l);return ce(i,{code:ne.invalid_type,expected:he.never,received:i.parsedType}),Ce}}ql.create=t=>new ql({typeName:_e.ZodNever,...De(t)});class Sg extends He{_parse(l){if(this._getType(l)!==he.undefined){const r=this._getOrReturnCtx(l);return ce(r,{code:ne.invalid_type,expected:he.void,received:r.parsedType}),Ce}return _n(l.data)}}Sg.create=t=>new Sg({typeName:_e.ZodVoid,...De(t)});class Bn extends He{_parse(l){const{ctx:i,status:r}=this._processInputParams(l),s=this._def;if(i.parsedType!==he.array)return ce(i,{code:ne.invalid_type,expected:he.array,received:i.parsedType}),Ce;if(s.exactLength!==null){const f=i.data.length>s.exactLength.value,h=i.data.length<s.exactLength.value;(f||h)&&(ce(i,{code:f?ne.too_big:ne.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&&(ce(i,{code:ne.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&&(ce(i,{code:ne.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 Un(i,f,i.path,h)))).then(f=>Yt.mergeArray(r,f));const c=[...i.data].map((f,h)=>s.type._parseSync(new Un(i,f,i.path,h)));return Yt.mergeArray(r,c)}get element(){return this._def.type}min(l,i){return new Bn({...this._def,minLength:{value:l,message:ge.toString(i)}})}max(l,i){return new Bn({...this._def,maxLength:{value:l,message:ge.toString(i)}})}length(l,i){return new Bn({...this._def,exactLength:{value:l,message:ge.toString(i)}})}nonempty(l){return this.min(1,l)}}Bn.create=(t,l)=>new Bn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:_e.ZodArray,...De(l)});function ti(t){if(t instanceof vt){const l={};for(const i in t.shape){const r=t.shape[i];l[i]=Ul.create(ti(r))}return new vt({...t._def,shape:()=>l})}else return t instanceof Bn?new Bn({...t._def,type:ti(t.element)}):t instanceof Ul?Ul.create(ti(t.unwrap())):t instanceof ci?ci.create(ti(t.unwrap())):t instanceof oa?oa.create(t.items.map(l=>ti(l))):t}class vt extends He{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=Ze.objectKeys(l);return this._cached={shape:l,keys:i},this._cached}_parse(l){if(this._getType(l)!==he.object){const m=this._getOrReturnCtx(l);return ce(m,{code:ne.invalid_type,expected:he.object,received:m.parsedType}),Ce}const{status:r,ctx:s}=this._processInputParams(l),{shape:c,keys:f}=this._getCached(),h=[];if(!(this._def.catchall instanceof ql&&this._def.unknownKeys==="strip"))for(const m in s.data)f.includes(m)||h.push(m);const p=[];for(const m of f){const b=c[m],y=s.data[m];p.push({key:{status:"valid",value:m},value:b._parse(new Un(s,y,s.path,m)),alwaysSet:m in s.data})}if(this._def.catchall instanceof ql){const m=this._def.unknownKeys;if(m==="passthrough")for(const b of h)p.push({key:{status:"valid",value:b},value:{status:"valid",value:s.data[b]}});else if(m==="strict")h.length>0&&(ce(s,{code:ne.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 b of h){const y=s.data[b];p.push({key:{status:"valid",value:b},value:m._parse(new Un(s,y,s.path,b)),alwaysSet:b in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const m=[];for(const b of p){const y=await b.key,v=await b.value;m.push({key:y,value:v,alwaysSet:b.alwaysSet})}return m}).then(m=>Yt.mergeObjectSync(r,m)):Yt.mergeObjectSync(r,p)}get shape(){return this._def.shape()}strict(l){return ge.errToObj,new vt({...this._def,unknownKeys:"strict",...l!==void 0?{errorMap:(i,r)=>{var c,f;const s=((f=(c=this._def).errorMap)==null?void 0:f.call(c,i,r).message)??r.defaultError;return i.code==="unrecognized_keys"?{message:ge.errToObj(l).message??s}:{message:s}}}:{}})}strip(){return new vt({...this._def,unknownKeys:"strip"})}passthrough(){return new vt({...this._def,unknownKeys:"passthrough"})}extend(l){return new vt({...this._def,shape:()=>({...this._def.shape(),...l})})}merge(l){return new vt({unknownKeys:l._def.unknownKeys,catchall:l._def.catchall,shape:()=>({...this._def.shape(),...l._def.shape()}),typeName:_e.ZodObject})}setKey(l,i){return this.augment({[l]:i})}catchall(l){return new vt({...this._def,catchall:l})}pick(l){const i={};for(const r of Ze.objectKeys(l))l[r]&&this.shape[r]&&(i[r]=this.shape[r]);return new vt({...this._def,shape:()=>i})}omit(l){const i={};for(const r of Ze.objectKeys(this.shape))l[r]||(i[r]=this.shape[r]);return new vt({...this._def,shape:()=>i})}deepPartial(){return ti(this)}partial(l){const i={};for(const r of Ze.objectKeys(this.shape)){const s=this.shape[r];l&&!l[r]?i[r]=s:i[r]=s.optional()}return new vt({...this._def,shape:()=>i})}required(l){const i={};for(const r of Ze.objectKeys(this.shape))if(l&&!l[r])i[r]=this.shape[r];else{let c=this.shape[r];for(;c instanceof Ul;)c=c._def.innerType;i[r]=c}return new vt({...this._def,shape:()=>i})}keyof(){return zy(Ze.objectKeys(this.shape))}}vt.create=(t,l)=>new vt({shape:()=>t,unknownKeys:"strip",catchall:ql.create(),typeName:_e.ZodObject,...De(l)});vt.strictCreate=(t,l)=>new vt({shape:()=>t,unknownKeys:"strict",catchall:ql.create(),typeName:_e.ZodObject,...De(l)});vt.lazycreate=(t,l)=>new vt({shape:t,unknownKeys:"strip",catchall:ql.create(),typeName:_e.ZodObject,...De(l)});class es extends He{_parse(l){const{ctx:i}=this._processInputParams(l),r=this._def.options;function s(c){for(const h of c)if(h.result.status==="valid")return h.result;for(const h of c)if(h.result.status==="dirty")return i.common.issues.push(...h.ctx.common.issues),h.result;const f=c.map(h=>new sl(h.ctx.common.issues));return ce(i,{code:ne.invalid_union,unionErrors:f}),Ce}if(i.common.async)return Promise.all(r.map(async c=>{const f={...i,common:{...i.common,issues:[]},parent:null};return{result:await c._parseAsync({data:i.data,path:i.path,parent:f}),ctx:f}})).then(s);{let c;const f=[];for(const p of r){const m={...i,common:{...i.common,issues:[]},parent:null},b=p._parseSync({data:i.data,path:i.path,parent:m});if(b.status==="valid")return b;b.status==="dirty"&&!c&&(c={result:b,ctx:m}),m.common.issues.length&&f.push(m.common.issues)}if(c)return i.common.issues.push(...c.ctx.common.issues),c.result;const h=f.map(p=>new sl(p));return ce(i,{code:ne.invalid_union,unionErrors:h}),Ce}}get options(){return this._def.options}}es.create=(t,l)=>new es({options:t,typeName:_e.ZodUnion,...De(l)});function df(t,l){const i=Bl(t),r=Bl(l);if(t===l)return{valid:!0,data:t};if(i===he.object&&r===he.object){const s=Ze.objectKeys(l),c=Ze.objectKeys(t).filter(h=>s.indexOf(h)!==-1),f={...t,...l};for(const h of c){const p=df(t[h],l[h]);if(!p.valid)return{valid:!1};f[h]=p.data}return{valid:!0,data:f}}else if(i===he.array&&r===he.array){if(t.length!==l.length)return{valid:!1};const s=[];for(let c=0;c<t.length;c++){const f=t[c],h=l[c],p=df(f,h);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return i===he.date&&r===he.date&&+t==+l?{valid:!0,data:t}:{valid:!1}}class ts extends He{_parse(l){const{status:i,ctx:r}=this._processInputParams(l),s=(c,f)=>{if(mg(c)||mg(f))return Ce;const h=df(c.value,f.value);return h.valid?((pg(c)||pg(f))&&i.dirty(),{status:i.value,value:h.data}):(ce(r,{code:ne.invalid_intersection_types}),Ce)};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(([c,f])=>s(c,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}))}}ts.create=(t,l,i)=>new ts({left:t,right:l,typeName:_e.ZodIntersection,...De(i)});class oa extends He{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==he.array)return ce(r,{code:ne.invalid_type,expected:he.array,received:r.parsedType}),Ce;if(r.data.length<this._def.items.length)return ce(r,{code:ne.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ce;!this._def.rest&&r.data.length>this._def.items.length&&(ce(r,{code:ne.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const c=[...r.data].map((f,h)=>{const p=this._def.items[h]||this._def.rest;return p?p._parse(new Un(r,f,r.path,h)):null}).filter(f=>!!f);return r.common.async?Promise.all(c).then(f=>Yt.mergeArray(i,f)):Yt.mergeArray(i,c)}get items(){return this._def.items}rest(l){return new oa({...this._def,rest:l})}}oa.create=(t,l)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new oa({items:t,typeName:_e.ZodTuple,rest:null,...De(l)})};class ns extends He{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!==he.object)return ce(r,{code:ne.invalid_type,expected:he.object,received:r.parsedType}),Ce;const s=[],c=this._def.keyType,f=this._def.valueType;for(const h in r.data)s.push({key:c._parse(new Un(r,h,r.path,h)),value:f._parse(new Un(r,r.data[h],r.path,h)),alwaysSet:h in r.data});return r.common.async?Yt.mergeObjectAsync(i,s):Yt.mergeObjectSync(i,s)}get element(){return this._def.valueType}static create(l,i,r){return i instanceof He?new ns({keyType:l,valueType:i,typeName:_e.ZodRecord,...De(r)}):new ns({keyType:ul.create(),valueType:l,typeName:_e.ZodRecord,...De(i)})}}class wg extends He{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!==he.map)return ce(r,{code:ne.invalid_type,expected:he.map,received:r.parsedType}),Ce;const s=this._def.keyType,c=this._def.valueType,f=[...r.data.entries()].map(([h,p],m)=>({key:s._parse(new Un(r,h,r.path,[m,"key"])),value:c._parse(new Un(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,b=await p.value;if(m.status==="aborted"||b.status==="aborted")return Ce;(m.status==="dirty"||b.status==="dirty")&&i.dirty(),h.set(m.value,b.value)}return{status:i.value,value:h}})}else{const h=new Map;for(const p of f){const m=p.key,b=p.value;if(m.status==="aborted"||b.status==="aborted")return Ce;(m.status==="dirty"||b.status==="dirty")&&i.dirty(),h.set(m.value,b.value)}return{status:i.value,value:h}}}}wg.create=(t,l,i)=>new wg({valueType:l,keyType:t,typeName:_e.ZodMap,...De(i)});class br extends He{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==he.set)return ce(r,{code:ne.invalid_type,expected:he.set,received:r.parsedType}),Ce;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(ce(r,{code:ne.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&&(ce(r,{code:ne.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),i.dirty());const c=this._def.valueType;function f(p){const m=new Set;for(const b of p){if(b.status==="aborted")return Ce;b.status==="dirty"&&i.dirty(),m.add(b.value)}return{status:i.value,value:m}}const h=[...r.data.values()].map((p,m)=>c._parse(new Un(r,p,r.path,m)));return r.common.async?Promise.all(h).then(p=>f(p)):f(h)}min(l,i){return new br({...this._def,minSize:{value:l,message:ge.toString(i)}})}max(l,i){return new br({...this._def,maxSize:{value:l,message:ge.toString(i)}})}size(l,i){return this.min(l,i).max(l,i)}nonempty(l){return this.min(1,l)}}br.create=(t,l)=>new br({valueType:t,minSize:null,maxSize:null,typeName:_e.ZodSet,...De(l)});class _g extends He{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})}}_g.create=(t,l)=>new _g({getter:t,typeName:_e.ZodLazy,...De(l)});class Eg extends He{_parse(l){if(l.data!==this._def.value){const i=this._getOrReturnCtx(l);return ce(i,{received:i.data,code:ne.invalid_literal,expected:this._def.value}),Ce}return{status:"valid",value:l.data}}get value(){return this._def.value}}Eg.create=(t,l)=>new Eg({value:t,typeName:_e.ZodLiteral,...De(l)});function zy(t,l){return new ui({values:t,typeName:_e.ZodEnum,...De(l)})}class ui extends He{_parse(l){if(typeof l.data!="string"){const i=this._getOrReturnCtx(l),r=this._def.values;return ce(i,{expected:Ze.joinValues(r),received:i.parsedType,code:ne.invalid_type}),Ce}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 ce(i,{received:i.data,code:ne.invalid_enum_value,options:r}),Ce}return _n(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 ui.create(l,{...this._def,...i})}exclude(l,i=this._def){return ui.create(this.options.filter(r=>!l.includes(r)),{...this._def,...i})}}ui.create=zy;class Cg extends He{_parse(l){const i=Ze.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(l);if(r.parsedType!==he.string&&r.parsedType!==he.number){const s=Ze.objectValues(i);return ce(r,{expected:Ze.joinValues(s),received:r.parsedType,code:ne.invalid_type}),Ce}if(this._cache||(this._cache=new Set(Ze.getValidEnumValues(this._def.values))),!this._cache.has(l.data)){const s=Ze.objectValues(i);return ce(r,{received:r.data,code:ne.invalid_enum_value,options:s}),Ce}return _n(l.data)}get enum(){return this._def.values}}Cg.create=(t,l)=>new Cg({values:t,typeName:_e.ZodNativeEnum,...De(l)});class ls extends He{unwrap(){return this._def.type}_parse(l){const{ctx:i}=this._processInputParams(l);if(i.parsedType!==he.promise&&i.common.async===!1)return ce(i,{code:ne.invalid_type,expected:he.promise,received:i.parsedType}),Ce;const r=i.parsedType===he.promise?i.data:Promise.resolve(i.data);return _n(r.then(s=>this._def.type.parseAsync(s,{path:i.path,errorMap:i.common.contextualErrorMap})))}}ls.create=(t,l)=>new ls({type:t,typeName:_e.ZodPromise,...De(l)});class si extends He{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===_e.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(l){const{status:i,ctx:r}=this._processInputParams(l),s=this._def.effect||null,c={addIssue:f=>{ce(r,f),f.fatal?i.abort():i.dirty()},get path(){return r.path}};if(c.addIssue=c.addIssue.bind(c),s.type==="preprocess"){const f=s.transform(r.data,c);if(r.common.async)return Promise.resolve(f).then(async h=>{if(i.value==="aborted")return Ce;const p=await this._def.schema._parseAsync({data:h,path:r.path,parent:r});return p.status==="aborted"?Ce:p.status==="dirty"||i.value==="dirty"?hr(p.value):p});{if(i.value==="aborted")return Ce;const h=this._def.schema._parseSync({data:f,path:r.path,parent:r});return h.status==="aborted"?Ce:h.status==="dirty"||i.value==="dirty"?hr(h.value):h}}if(s.type==="refinement"){const f=h=>{const p=s.refinement(h,c);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"?Ce:(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"?Ce:(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(!ii(f))return Ce;const h=s.transform(f.value,c);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=>ii(f)?Promise.resolve(s.transform(f.value,c)).then(h=>({status:i.value,value:h})):Ce);Ze.assertNever(s)}}si.create=(t,l,i)=>new si({schema:t,typeName:_e.ZodEffects,effect:l,...De(i)});si.createWithPreprocess=(t,l,i)=>new si({schema:l,effect:{type:"preprocess",transform:t},typeName:_e.ZodEffects,...De(i)});class Ul extends He{_parse(l){return this._getType(l)===he.undefined?_n(void 0):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}Ul.create=(t,l)=>new Ul({innerType:t,typeName:_e.ZodOptional,...De(l)});class ci extends He{_parse(l){return this._getType(l)===he.null?_n(null):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}ci.create=(t,l)=>new ci({innerType:t,typeName:_e.ZodNullable,...De(l)});class hf extends He{_parse(l){const{ctx:i}=this._processInputParams(l);let r=i.data;return i.parsedType===he.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}hf.create=(t,l)=>new hf({innerType:t,typeName:_e.ZodDefault,defaultValue:typeof l.default=="function"?l.default:()=>l.default,...De(l)});class mf extends He{_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 Pu(s)?s.then(c=>({status:"valid",value:c.status==="valid"?c.value:this._def.catchValue({get error(){return new sl(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new sl(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}mf.create=(t,l)=>new mf({innerType:t,typeName:_e.ZodCatch,catchValue:typeof l.catch=="function"?l.catch:()=>l.catch,...De(l)});class Ag extends He{_parse(l){if(this._getType(l)!==he.nan){const r=this._getOrReturnCtx(l);return ce(r,{code:ne.invalid_type,expected:he.nan,received:r.parsedType}),Ce}return{status:"valid",value:l.data}}}Ag.create=t=>new Ag({typeName:_e.ZodNaN,...De(t)});class kv extends He{_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 Rf extends He{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.common.async)return(async()=>{const c=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return c.status==="aborted"?Ce:c.status==="dirty"?(i.dirty(),hr(c.value)):this._def.out._parseAsync({data:c.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ce: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 Rf({in:l,out:i,typeName:_e.ZodPipeline})}}class pf extends He{_parse(l){const i=this._def.innerType._parse(l),r=s=>(ii(s)&&(s.value=Object.freeze(s.value)),s);return Pu(i)?i.then(s=>r(s)):r(i)}unwrap(){return this._def.innerType}}pf.create=(t,l)=>new pf({innerType:t,typeName:_e.ZodReadonly,...De(l)});var _e;(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"})(_e||(_e={}));const q=ul.create,We=ri.create,Mt=ff.create;ql.create;const ct=Bn.create,Se=vt.create;es.create;ts.create;oa.create;const Sv=ns.create,Rt=ui.create;ls.create;Ul.create;ci.create;const Hn=Rt(["claude_code","cursor_local"]),Vt=Se({maxTurns:We().positive().nullable().optional(),maxBudgetUsd:We().positive().nullable().optional()}),Lf=Se({plan:Vt.optional(),execute:Vt.optional(),reflect:Vt.optional()});function wv(t){if(!(t!=null&&t.trim()))return null;try{const l=Vt.parse(JSON.parse(t));return l.maxTurns==null&&l.maxBudgetUsd==null?null:l}catch{return null}}function _v(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:Vt.parse({maxTurns:l.maxTurns??null,maxBudgetUsd:l.maxBudgetUsd??null})}:Lf.parse(l)}catch{return{}}}const Ev="00000000-0000-4000-a000-000000000001",as="auto",Cv=Se({code:Rt(["cli_missing","runtime_auth","deck_offline","workspace_missing","mcp_not_registered"]),message:q()}),Av=Se({id:q().uuid(),name:q(),runtime:Hn,workspaceRoot:q().nullable(),deckId:q().uuid().nullable(),deckName:q().nullable(),playbookId:q().nullable(),defaultPlanModel:q().nullable(),defaultExecuteModel:q().nullable(),defaultPlanBudgetJson:q().nullable(),defaultExecuteBudgetJson:q().nullable(),isBuiltin:Mt(),createdAt:q(),updatedAt:q()}),Oy=Av.extend({healthy:Mt(),issues:ct(Cv)});Se({name:q().min(1),runtime:Hn,workspaceRoot:q().min(1),deckId:q().uuid().optional(),playbookId:q().optional(),defaultPlanModel:q().nullable().optional(),defaultExecuteModel:q().nullable().optional(),defaultPlanBudget:Vt.nullable().optional(),defaultExecuteBudget:Vt.nullable().optional()});Se({name:q().min(1).optional(),runtime:Hn.optional(),workspaceRoot:q().nullable().optional(),deckId:q().uuid().nullable().optional(),playbookId:q().nullable().optional(),defaultPlanModel:q().nullable().optional(),defaultExecuteModel:q().nullable().optional(),defaultPlanBudget:Vt.nullable().optional(),defaultExecuteBudget:Vt.nullable().optional()});Se({agents:ct(Oy),issueCount:We()});function Tv(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 My(t){var i,r,s;if((i=t.blocker)!=null&&i.summary)return{detected:!0,summary:t.blocker.summary};const l=Tv(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 jv=Se({label:q().min(1).max(60),description:q().max(200).optional()}),Ry=Se({id:q().regex(/^q\d+$/),question:q().min(1).max(300),options:ct(jv).min(2).max(4)}),Ly=Rt(["trivial","needs_review"]);Se({verdict:Ly,rationale:q().min(1).max(300),questions:ct(Ry).max(3).default([])}).refine(t=>t.verdict!=="trivial"||t.questions.length===0,{message:"trivial verdict cannot carry questions"});Se({verdict:Ly,rationale:q(),questions:ct(Ry),sessionId:q().optional(),parseFallback:Mt(),consumed:Mt().default(!1)});const By=Se({questionId:q(),selectedLabel:q().max(60).optional(),freeText:q().min(1).max(2e3).optional()}).refine(t=>t.selectedLabel?!t.freeText:!!t.freeText,{message:"Provide exactly one of selectedLabel or freeText"});Se({answers:ct(By).min(1),executeModel:q().nullable().optional(),executeBudget:Vt.nullable().optional()});Se({answers:ct(By),outcome:Rt(["approved","redraft"]),answeredAt:q()});const Nv=Rt(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),Uy=Rt(["code","communication","email","research","content","other"]),Dv=Rt(["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","document","research_brief","deliverable","feedback","playbook_patch","reflect_status","linear_sync"]),os=Rt(["plan","execute","reflect"]),zv=Rt(["proposed","applied","dismissed"]),Hy=Rt(["retry","approve"]);Se({playbookId:q(),playbookTitle:q().optional(),previousBody:q(),proposedBody:q(),rationale:q(),status:zv,trigger:Hy,appliedAt:q().optional()});Se({status:Rt(["pending","completed","failed","skipped"]),trigger:Hy,error:q().optional()});const Ov=Se({type:Rt(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:q(),toolName:q().optional()});Se({phase:os,runtime:Hn,entries:ct(Ov)});const Mv=Se({phase:os,runtime:Hn,totalCostUsd:We().optional(),inputTokens:We().optional(),outputTokens:We().optional(),cacheReadTokens:We().optional(),cacheWriteTokens:We().optional(),durationMs:We().optional(),model:q().optional(),numTurns:We().optional(),maxTurns:We().optional(),maxBudgetUsd:We().optional()}),Rv=Se({label:q(),usage:Mv,maxTurns:We().optional(),maxBudgetUsd:We().optional()});Se({lines:ct(Rv),total:Se({totalCostUsd:We(),inputTokens:We(),outputTokens:We(),durationMs:We(),numTurns:We()})});Se({phase:os,runtime:Hn,sessionId:q()});Se({phase:os,exitCode:We(),resultText:q().optional(),isError:Mt().optional(),blocker:Se({summary:q().optional()}).optional()});Se({path:q(),title:q(),markdown:q()});Se({markdown:q(),sessionId:q().optional()});const Lv=Rt(["manual","linear"]);Se({id:q(),title:q(),description:q().optional(),url:q().optional()});const rl=Se({id:q().uuid(),source:Lv,externalId:q().nullable(),externalLabel:q().nullable(),taskCategory:Uy,title:q(),description:q().nullable(),repo:q().nullable(),artifactWorkspace:q().nullable(),agentId:q().uuid().nullable(),agentName:q().nullable(),deckId:q().nullable(),deckName:q().nullable(),playbookId:q().nullable(),runtime:Hn.nullable(),planModel:q().nullable(),executeModel:q().nullable(),status:Nv,lineageId:q().uuid().nullable(),acceptanceCriteria:q().nullable(),approvalGatesJson:q().nullable(),budgetJson:q().nullable(),createdAt:q(),updatedAt:q()});Se({id:q().uuid(),runId:q().uuid(),kind:Dv,contentJson:q().nullable(),blobPath:q().nullable(),author:Rt(["human","agent","system"]),createdAt:q()});Se({id:q().uuid(),runId:q().uuid(),type:q(),payloadJson:q().nullable(),ts:q()});Se({title:q().min(1),description:q().optional(),taskCategory:Uy.default("other"),repo:q().optional(),artifactWorkspace:q().optional(),acceptanceCriteria:q().optional(),status:Rt(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:q().uuid(),planModel:q().nullable().optional(),executeModel:q().nullable().optional(),budget:Lf.optional()});Se({runtime:Hn,deckId:q().uuid().optional(),playbookId:q().optional(),planModel:q().nullable().optional(),executeModel:q().nullable().optional(),budget:Lf.optional()});Se({planMarkdown:q(),approve:Mt().default(!1),planModel:q().nullable().optional(),executeModel:q().nullable().optional(),planBudget:Vt.nullable().optional(),executeBudget:Vt.nullable().optional()});Se({runtime:Hn.optional(),deckId:q().uuid().optional(),playbookId:q().optional(),executeModel:q().nullable().optional(),executeBudget:Vt.nullable().optional()});Se({feedback:q().min(1),planModel:q().nullable().optional(),executeModel:q().nullable().optional(),executeBudget:Vt.nullable().optional()});Se({id:q(),identifier:q(),title:q(),description:q().optional(),url:q(),state:q().optional(),labels:ct(q()).optional(),teamId:q().optional()});const Bv=Se({label:q().min(1),agentId:q().uuid()}),gf=Se({stateFilter:ct(q()),teamId:q().nullable(),assigneeMe:Mt(),defaultAgentId:q().uuid().nullable(),syncEnabled:Mt(),routingRules:ct(Bv)});gf.extend({persisted:gf,envOverrides:Se({stateFilter:Mt(),teamId:Mt()})});gf.partial();Se({connected:Mt(),viewer:Se({id:q(),name:q(),email:q().optional()}).optional(),error:q().optional()});Se({agentId:q().uuid(),reason:q()});Se({host:q(),port:We().int().min(1).max(65535),envOverride:Mt()});Se({host:q().min(1).optional(),port:We().int().min(1).max(65535).optional()});Se({connected:Mt(),apiUrl:q(),mcpUrl:q(),deckCount:We().optional(),envOverride:Mt(),error:q().optional()});Se({agentId:q().uuid().optional(),autoAgent:Mt().optional(),planModel:q().nullable().optional()}).refine(t=>t.agentId!==void 0||t.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});Se({planModel:q().nullable().optional(),planBudget:Vt.nullable().optional()});const Uv=Se({id:q(),label:q()});Se({runtime:Hn,models:ct(Uv),source:Rt(["live","fallback"])});Se({planReviewCount:We(),resultReviewCount:We(),maxConcurrent:We(),planningActiveRuns:ct(rl),planningQueuedRuns:ct(rl),runningRuns:ct(rl),waitingExecution:ct(rl),resultReviewRuns:ct(rl),recentDone:ct(rl),awaitingPlanReview:ct(rl),awaitingAnswerRuns:ct(rl),openQuestionCounts:Sv(q(),We()),autoApprovedRunIds:ct(q()),runs:ct(rl),agentDeckOnline:Mt(),agents:ct(Oy),agentIssueCount:We()});function Hv(t){return t||as}function Bf({runtime:t,label:l,value:i,onChange:r,defaultModelId:s,disabled:c,compact:f}){const h=cf(t),[p,m]=Y.useState((h==null?void 0:h.models)??[]),[b,y]=Y.useState((h==null?void 0:h.source)??"fallback"),[v,k]=Y.useState(!h);Y.useEffect(()=>{const U=cf(t);if(U){m(U.models),y(U.source),k(!1);return}k(!0),Ib(t).then(j=>{m(j.models),y(j.source)}).catch(()=>m([])).finally(()=>k(!1))},[t]);const _=Y.useMemo(()=>{var U,j;if(t==="cursor_local"){const Z=Hv(s);return((U=p.find(H=>H.id===Z))==null?void 0:U.label)??"Auto (subscription pool)"}return s?((j=p.find(Z=>Z.id===s))==null?void 0:j.label)??s:"runtime default"},[t,s,p]),M=t==="cursor_local"?v?"Loading models…":`Agent default (${_})`:v?"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:c||v,value:i,onChange:U=>r(U.target.value),children:[g.jsx("option",{value:"",children:M}),p.map(U=>g.jsx("option",{value:U.id,children:U.label},U.id))]}),t==="cursor_local"&&!v&&!f&&g.jsx("p",{className:"text-xs text-white/40",children:"Auto and Composer use your Cursor subscription pool. Other models draw API credits."}),b==="fallback"&&p.length>0&&!v&&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 oi({phase:t,runtime:l,model:i,onModelChange:r,budget:s,onBudgetChange:c,defaultModelId:f,disabled:h,showHint:p=!0}){const m=b=>c({...s,...b});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(Bf,{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:"Default",disabled:h,value:s.maxTurns,onChange:b=>m({maxTurns:b.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:"Default",disabled:h,value:s.maxBudgetUsd,onChange:b=>m({maxBudgetUsd:b.target.value})})]})]}),p&&g.jsx("p",{className:"text-xs text-white/40",children:"Blank turns or USD = runtime default (no cap)."})]})}function Tg({value:t,onChange:l,agentDeckOnline:i,disabled:r}){const[s,c]=Y.useState([]),[f,h]=Y.useState([]);Y.useEffect(()=>{Fb().then(c).catch(()=>c([]))},[]),Y.useEffect(()=>{if(!t.deckId){h([]);return}Qb(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 b=m.target.value;p({runtime:b,...b==="cursor_local"?{defaultPlanModel:as,defaultExecuteModel:as}:{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(oi,{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(oi,{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 fs(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 ds({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,c)=>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})]},c))})]}):null}function qy(t,l){return l!=null&&t>=l}function qv({used:t,max:l}){const i=qy(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 Vv({used:t,max:l}){const i=qy(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 Yv({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(qv,{used:l.numTurns,max:i},"turns")),l.totalCostUsd!=null&&s.push(g.jsx(Vv,{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(Ay(l.durationMs)),g.jsx(g.Fragment,{children:s.map((c,f)=>g.jsxs("span",{children:[f>0&&" · ",c]},f))})}function hs({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(Yv,{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&&Ay(t.total.durationMs)].filter(Boolean).join(" · ")]})]})}function Iv(t,l){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const Zv=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fv=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qv={};function jg(t,l){return(Qv.jsx?Fv:Zv).test(t)}const Gv=/[ \t\n\f\r]/g;function Xv(t){return typeof t=="object"?t.type==="text"?Ng(t.value):!1:Ng(t)}function Ng(t){return t.replace(Gv,"")===""}class wr{constructor(l,i,r){this.normal=i,this.property=l,r&&(this.space=r)}}wr.prototype.normal={};wr.prototype.property={};wr.prototype.space=void 0;function Vy(t,l){const i={},r={};for(const s of t)Object.assign(i,s.property),Object.assign(r,s.normal);return new wr(i,r,l)}function yf(t){return t.toLowerCase()}class Pt{constructor(l,i){this.attribute=i,this.property=l}}Pt.prototype.attribute="";Pt.prototype.booleanish=!1;Pt.prototype.boolean=!1;Pt.prototype.commaOrSpaceSeparated=!1;Pt.prototype.commaSeparated=!1;Pt.prototype.defined=!1;Pt.prototype.mustUseProperty=!1;Pt.prototype.number=!1;Pt.prototype.overloadedBoolean=!1;Pt.prototype.property="";Pt.prototype.spaceSeparated=!1;Pt.prototype.space=void 0;let Kv=0;const Ee=da(),bt=da(),xf=da(),te=da(),lt=da(),sa=da(),sn=da();function da(){return 2**++Kv}const bf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ee,booleanish:bt,commaOrSpaceSeparated:sn,commaSeparated:sa,number:te,overloadedBoolean:xf,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Zo=Object.keys(bf);class Uf extends Pt{constructor(l,i,r,s){let c=-1;if(super(l,i),Dg(this,"space",s),typeof r=="number")for(;++c<Zo.length;){const f=Zo[c];Dg(this,Zo[c],(r&bf[f])===bf[f])}}}Uf.prototype.defined=!0;function Dg(t,l,i){i&&(t[l]=i)}function hi(t){const l={},i={};for(const[r,s]of Object.entries(t.properties)){const c=new Uf(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(c.mustUseProperty=!0),l[r]=c,i[yf(r)]=r,i[yf(c.attribute)]=r}return new wr(l,i,t.space)}const Yy=hi({properties:{ariaActiveDescendant:null,ariaAtomic:bt,ariaAutoComplete:null,ariaBusy:bt,ariaChecked:bt,ariaColCount:te,ariaColIndex:te,ariaColSpan:te,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:bt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:bt,ariaFlowTo:lt,ariaGrabbed:bt,ariaHasPopup:null,ariaHidden:bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:te,ariaLive:null,ariaModal:bt,ariaMultiLine:bt,ariaMultiSelectable:bt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:te,ariaPressed:bt,ariaReadOnly:bt,ariaRelevant:null,ariaRequired:bt,ariaRoleDescription:lt,ariaRowCount:te,ariaRowIndex:te,ariaRowSpan:te,ariaSelected:bt,ariaSetSize:te,ariaSort:null,ariaValueMax:te,ariaValueMin:te,ariaValueNow:te,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function Iy(t,l){return l in t?t[l]:l}function Zy(t,l){return Iy(t,l.toLowerCase())}const Jv=hi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:sa,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Ee,allowPaymentRequest:Ee,allowUserMedia:Ee,alpha:Ee,alt:null,as:null,async:Ee,autoCapitalize:null,autoComplete:lt,autoFocus:Ee,autoPlay:Ee,blocking:lt,capture:null,charSet:null,checked:Ee,cite:null,className:lt,closedBy:null,colorSpace:null,cols:te,colSpan:te,command:null,commandFor:null,content:null,contentEditable:bt,controls:Ee,controlsList:lt,coords:te|sa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ee,defer:Ee,dir:null,dirName:null,disabled:Ee,download:xf,draggable:bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ee,formTarget:null,headers:lt,height:te,hidden:xf,high:te,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Ee,inputMode:null,integrity:null,is:null,isMap:Ee,itemId:null,itemProp:lt,itemRef:lt,itemScope:Ee,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ee,low:te,manifest:null,max:null,maxLength:te,media:null,method:null,min:null,minLength:te,multiple:Ee,muted:Ee,name:null,nonce:null,noModule:Ee,noValidate:Ee,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:Ee,optimum:te,pattern:null,ping:lt,placeholder:null,playsInline:Ee,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ee,referrerPolicy:null,rel:lt,required:Ee,reversed:Ee,rows:te,rowSpan:te,sandbox:lt,scope:null,scoped:Ee,seamless:Ee,selected:Ee,shadowRootClonable:Ee,shadowRootCustomElementRegistry:Ee,shadowRootDelegatesFocus:Ee,shadowRootMode:null,shadowRootSerializable:Ee,shape:null,size:te,sizes:null,slot:null,span:te,spellCheck:bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:te,step:null,style:null,tabIndex:te,target:null,title:null,translate:null,type:null,typeMustMatch:Ee,useMap:null,value:bt,width:te,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:te,borderColor:null,bottomMargin:te,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ee,declare:Ee,event:null,face:null,frame:null,frameBorder:null,hSpace:te,leftMargin:te,link:null,longDesc:null,lowSrc:null,marginHeight:te,marginWidth:te,noResize:Ee,noHref:Ee,noShade:Ee,noWrap:Ee,object:null,profile:null,prompt:null,rev:null,rightMargin:te,rules:null,scheme:null,scrolling:bt,standby:null,summary:null,text:null,topMargin:te,valueType:null,version:null,vAlign:null,vLink:null,vSpace:te,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ee,disablePictureInPicture:Ee,disableRemotePlayback:Ee,exportParts:sa,part:lt,prefix:null,property:null,results:te,security:null,unselectable:null},space:"html",transform:Zy}),$v=hi({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:sn,accentHeight:te,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:te,amplitude:te,arabicForm:null,ascent:te,attributeName:null,attributeType:null,azimuth:te,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:te,by:null,calcMode:null,capHeight:te,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:te,diffuseConstant:te,direction:null,display:null,dur:null,divisor:te,dominantBaseline:null,download:Ee,dx:null,dy:null,edgeMode:null,editable:null,elevation:te,enableBackground:null,end:null,event:null,exponent:te,externalResourcesRequired:null,fill:null,fillOpacity:te,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:sa,g2:sa,glyphName:sa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:te,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:te,horizOriginX:te,horizOriginY:te,id:null,ideographic:te,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:te,k:te,k1:te,k2:te,k3:te,k4:te,kernelMatrix:sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:te,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:te,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:te,overlineThickness:te,paintOrder:null,panose1:null,path:null,pathLength:te,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:te,pointsAtY:te,pointsAtZ:te,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sn,rev:sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sn,requiredFeatures:sn,requiredFonts:sn,requiredFormats:sn,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:te,specularExponent:te,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:te,strikethroughThickness:te,string:null,stroke:null,strokeDashArray:sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:te,strokeOpacity:te,strokeWidth:null,style:null,surfaceScale:te,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sn,tabIndex:te,tableValues:null,target:null,targetX:te,targetY:te,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:te,underlineThickness:te,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:te,values:null,vAlphabetic:te,vMathematical:te,vectorEffect:null,vHanging:te,vIdeographic:te,version:null,vertAdvY:te,vertOriginX:te,vertOriginY:te,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:te,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Iy}),Fy=hi({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()}}),Qy=hi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Zy}),Gy=hi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),Pv={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"},Wv=/[A-Z]/g,zg=/-[a-z]/g,e2=/^data[-\w.:]+$/i;function t2(t,l){const i=yf(l);let r=l,s=Pt;if(i in t.normal)return t.property[t.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&e2.test(l)){if(l.charAt(4)==="-"){const c=l.slice(5).replace(zg,l2);r="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=l.slice(4);if(!zg.test(c)){let f=c.replace(Wv,n2);f.charAt(0)!=="-"&&(f="-"+f),l="data"+f}}s=Uf}return new s(r,l)}function n2(t){return"-"+t.toLowerCase()}function l2(t){return t.charAt(1).toUpperCase()}const a2=Vy([Yy,Jv,Fy,Qy,Gy],"html"),Hf=Vy([Yy,$v,Fy,Qy,Gy],"svg");function i2(t){return t.join(" ").trim()}var ei={},Fo,Og;function r2(){if(Og)return Fo;Og=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,h=/^\s+|\s+$/g,p=`
|
|
50
|
+
`,m="/",b="*",y="",v="comment",k="declaration";function _(U,j){if(typeof U!="string")throw new TypeError("First argument must be a string");if(!U)return[];j=j||{};var Z=1,H=1;function le(ae){var ee=ae.match(l);ee&&(Z+=ee.length);var N=ae.lastIndexOf(p);H=~N?ae.length-N:H+ae.length}function W(){var ae={line:Z,column:H};return function(ee){return ee.position=new O(ae),fe(),ee}}function O(ae){this.start=ae,this.end={line:Z,column:H},this.source=j.source}O.prototype.content=U;function J(ae){var ee=new Error(j.source+":"+Z+":"+H+": "+ae);if(ee.reason=ae,ee.filename=j.source,ee.line=Z,ee.column=H,ee.source=U,!j.silent)throw ee}function oe(ae){var ee=ae.exec(U);if(ee){var N=ee[0];return le(N),U=U.slice(N.length),ee}}function fe(){oe(i)}function z(ae){var ee;for(ae=ae||[];ee=I();)ee!==!1&&ae.push(ee);return ae}function I(){var ae=W();if(!(m!=U.charAt(0)||b!=U.charAt(1))){for(var ee=2;y!=U.charAt(ee)&&(b!=U.charAt(ee)||m!=U.charAt(ee+1));)++ee;if(ee+=2,y===U.charAt(ee-1))return J("End of comment missing");var N=U.slice(2,ee-2);return H+=2,le(N),U=U.slice(ee),H+=2,ae({type:v,comment:N})}}function $(){var ae=W(),ee=oe(r);if(ee){if(I(),!oe(s))return J("property missing ':'");var N=oe(c),K=ae({type:k,property:M(ee[0].replace(t,y)),value:N?M(N[0].replace(t,y)):y});return oe(f),K}}function me(){var ae=[];z(ae);for(var ee;ee=$();)ee!==!1&&(ae.push(ee),z(ae));return ae}return fe(),me()}function M(U){return U?U.replace(h,y):y}return Fo=_,Fo}var Mg;function u2(){if(Mg)return ei;Mg=1;var t=ei&&ei.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ei,"__esModule",{value:!0}),ei.default=i;const l=t(r2());function i(r,s){let c=null;if(!r||typeof r!="string")return c;const f=(0,l.default)(r),h=typeof s=="function";return f.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:b}=p;h?s(m,b,p):b&&(c=c||{},c[m]=b)}),c}return ei}var cr={},Rg;function s2(){if(Rg)return cr;Rg=1,Object.defineProperty(cr,"__esModule",{value:!0}),cr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,c=function(m){return!m||i.test(m)||t.test(m)},f=function(m,b){return b.toUpperCase()},h=function(m,b){return"".concat(b,"-")},p=function(m,b){return b===void 0&&(b={}),c(m)?m:(m=m.toLowerCase(),b.reactCompat?m=m.replace(s,h):m=m.replace(r,h),m.replace(l,f))};return cr.camelCase=p,cr}var or,Lg;function c2(){if(Lg)return or;Lg=1;var t=or&&or.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},l=t(u2()),i=s2();function r(s,c){var f={};return!s||typeof s!="string"||(0,l.default)(s,function(h,p){h&&p&&(f[(0,i.camelCase)(h,c)]=p)}),f}return r.default=r,or=r,or}var o2=c2();const f2=_y(o2),Xy=Ky("end"),qf=Ky("start");function Ky(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 d2(t){const l=qf(t),i=Xy(t);if(l&&i)return{start:l,end:i}}function pr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Bg(t.position):"start"in t||"end"in t?Bg(t):"line"in t||"column"in t?vf(t):""}function vf(t){return Ug(t&&t.line)+":"+Ug(t&&t.column)}function Bg(t){return vf(t&&t.start)+"-"+vf(t&&t.end)}function Ug(t){return t&&typeof t=="number"?t:1}class Lt extends Error{constructor(l,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let s="",c={},f=!1;if(i&&("line"in i&&"column"in i?c={place:i}:"start"in i&&"end"in i?c={place:i}:"type"in i?c={ancestors:[i],place:i.position}:c={...i}),typeof l=="string"?s=l:!c.cause&&l&&(f=!0,s=l.message,c.cause=l),!c.ruleId&&!c.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?c.ruleId=r:(c.source=r.slice(0,p),c.ruleId=r.slice(p+1))}if(!c.place&&c.ancestors&&c.ancestors){const p=c.ancestors[c.ancestors.length-1];p&&(c.place=p.position)}const h=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.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=pr(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=f&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Lt.prototype.file="";Lt.prototype.name="";Lt.prototype.reason="";Lt.prototype.message="";Lt.prototype.stack="";Lt.prototype.column=void 0;Lt.prototype.line=void 0;Lt.prototype.ancestors=void 0;Lt.prototype.cause=void 0;Lt.prototype.fatal=void 0;Lt.prototype.place=void 0;Lt.prototype.ruleId=void 0;Lt.prototype.source=void 0;const Vf={}.hasOwnProperty,h2=new Map,m2=/[A-Z]/g,p2=new Set(["table","tbody","thead","tfoot","tr"]),g2=new Set(["td","th"]),Jy="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function y2(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=E2(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=_2(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"?Hf:a2,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},c=$y(s,t,void 0);return c&&typeof c!="string"?c:s.create(t,s.Fragment,{children:c||void 0},void 0)}function $y(t,l,i){if(l.type==="element")return x2(t,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return b2(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return k2(t,l,i);if(l.type==="mdxjsEsm")return v2(t,l);if(l.type==="root")return S2(t,l,i);if(l.type==="text")return w2(t,l)}function x2(t,l,i){const r=t.schema;let s=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Hf,t.schema=s),t.ancestors.push(l);const c=Wy(t,l.tagName,!1),f=C2(t,l);let h=If(t,l);return p2.has(l.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!Xv(p):!0})),Py(t,f,c,l),Yf(f,h),t.ancestors.pop(),t.schema=r,t.create(l,c,f,i)}function b2(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)}vr(t,l.position)}function v2(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);vr(t,l.position)}function k2(t,l,i){const r=t.schema;let s=r;l.name==="svg"&&r.space==="html"&&(s=Hf,t.schema=s),t.ancestors.push(l);const c=l.name===null?t.Fragment:Wy(t,l.name,!0),f=A2(t,l),h=If(t,l);return Py(t,f,c,l),Yf(f,h),t.ancestors.pop(),t.schema=r,t.create(l,c,f,i)}function S2(t,l,i){const r={};return Yf(r,If(t,l)),t.create(l,t.Fragment,r,i)}function w2(t,l){return l.value}function Py(t,l,i,r){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(l.node=r)}function Yf(t,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(t.children=i)}}function _2(t,l,i){return r;function r(s,c,f,h){const m=Array.isArray(f.children)?i:l;return h?m(c,f,h):m(c,f)}}function E2(t,l){return i;function i(r,s,c,f){const h=Array.isArray(c.children),p=qf(r);return l(s,c,f,h,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function C2(t,l){const i={};let r,s;for(s in l.properties)if(s!=="children"&&Vf.call(l.properties,s)){const c=T2(t,s,l.properties[s]);if(c){const[f,h]=c;t.tableCellAlignToStyle&&f==="align"&&typeof h=="string"&&g2.has(l.tagName)?r=h:i[f]=h}}if(r){const c=i.style||(i.style={});c[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function A2(t,l){const i={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const c=r.data.estree.body[0];c.type;const f=c.expression;f.type;const h=f.properties[0];h.type,Object.assign(i,t.evaluater.evaluateExpression(h.argument))}else vr(t,l.position);else{const s=r.name;let c;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,c=t.evaluater.evaluateExpression(h.expression)}else vr(t,l.position);else c=r.value===null?!0:r.value;i[s]=c}return i}function If(t,l){const i=[];let r=-1;const s=t.passKeys?new Map:h2;for(;++r<l.children.length;){const c=l.children[r];let f;if(t.passKeys){const p=c.type==="element"?c.tagName:c.type==="mdxJsxFlowElement"||c.type==="mdxJsxTextElement"?c.name:void 0;if(p){const m=s.get(p)||0;f=p+"-"+m,s.set(p,m+1)}}const h=$y(t,c,f);h!==void 0&&i.push(h)}return i}function T2(t,l,i){const r=t2(t.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?Iv(i):i2(i)),r.property==="style"){let s=typeof i=="object"?i:j2(t,String(i));return t.stylePropertyNameCase==="css"&&(s=N2(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&r.space?Pv[r.property]||r.property:r.attribute,i]}}function j2(t,l){try{return f2(l,{reactCompat:!0})}catch(i){if(t.ignoreInvalidStyle)return{};const r=i,s=new Lt("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=Jy+"#cannot-parse-style-attribute",s}}function Wy(t,l,i){let r;if(!i)r={type:"Literal",value:l};else if(l.includes(".")){const s=l.split(".");let c=-1,f;for(;++c<s.length;){const h=jg(s[c])?{type:"Identifier",name:s[c]}:{type:"Literal",value:s[c]};f=f?{type:"MemberExpression",object:f,property:h,computed:!!(c&&h.type==="Literal"),optional:!1}:h}r=f}else r=jg(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const s=r.value;return Vf.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(r);vr(t)}function vr(t,l){const i=new Lt("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=Jy+"#cannot-handle-mdx-estrees-without-createevaluater",i}function N2(t){const l={};let i;for(i in t)Vf.call(t,i)&&(l[D2(i)]=t[i]);return l}function D2(t){let l=t.replace(m2,z2);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function z2(t){return"-"+t.toLowerCase()}const Qo={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"]},O2={};function Zf(t,l){const i=O2,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,s=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return ex(t,r,s)}function ex(t,l,i){if(M2(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 Hg(t.children,l,i)}return Array.isArray(t)?Hg(t,l,i):""}function Hg(t,l,i){const r=[];let s=-1;for(;++s<t.length;)r[s]=ex(t[s],l,i);return r.join("")}function M2(t){return!!(t&&typeof t=="object")}const qg=document.createElement("i");function Ff(t){const l="&"+t+";";qg.innerHTML=l;const i=qg.textContent;return i.charCodeAt(i.length-1)===59&&t!=="semi"||i===l?!1:i}function cn(t,l,i,r){const s=t.length;let c=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);c<r.length;)f=r.slice(c,c+1e4),f.unshift(l,0),t.splice(...f),c+=1e4,l+=1e4}function wn(t,l){return t.length>0?(cn(t,t.length,0,l),t):l}const Vg={}.hasOwnProperty;function tx(t){const l={};let i=-1;for(;++i<t.length;)R2(l,t[i]);return l}function R2(t,l){let i;for(i in l){const s=(Vg.call(t,i)?t[i]:void 0)||(t[i]={}),c=l[i];let f;if(c)for(f in c){Vg.call(s,f)||(s[f]=[]);const h=c[f];L2(s[f],Array.isArray(h)?h:h?[h]:[])}}}function L2(t,l){let i=-1;const r=[];for(;++i<l.length;)(l[i].add==="after"?t:r).push(l[i]);cn(t,0,0,r)}function nx(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 Nn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const qt=Vl(/[A-Za-z]/),Ot=Vl(/[\dA-Za-z]/),B2=Vl(/[#-'*+\--9=?A-Z^-~]/);function is(t){return t!==null&&(t<32||t===127)}const kf=Vl(/\d/),U2=Vl(/[\dA-Fa-f]/),H2=Vl(/[!-/:-@[-`{-~]/);function ve(t){return t!==null&&t<-2}function at(t){return t!==null&&(t<0||t===32)}function Re(t){return t===-2||t===-1||t===32}const ms=Vl(new RegExp("\\p{P}|\\p{S}","u")),fa=Vl(/\s/);function Vl(t){return l;function l(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function mi(t){const l=[];let i=-1,r=0,s=0;for(;++i<t.length;){const c=t.charCodeAt(i);let f="";if(c===37&&Ot(t.charCodeAt(i+1))&&Ot(t.charCodeAt(i+2)))s=2;else if(c<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(c))||(f=String.fromCharCode(c));else if(c>55295&&c<57344){const h=t.charCodeAt(i+1);c<56320&&h>56319&&h<57344?(f=String.fromCharCode(c,h),s=1):f="�"}else f=String.fromCharCode(c);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 qe(t,l,i,r){const s=r?r-1:Number.POSITIVE_INFINITY;let c=0;return f;function f(p){return Re(p)?(t.enter(i),h(p)):l(p)}function h(p){return Re(p)&&c++<s?(t.consume(p),h):(t.exit(i),l(p))}}const q2={tokenize:V2};function V2(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"),qe(t,l,"linePrefix")}function s(h){return t.enter("paragraph"),c(h)}function c(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 ve(h)?(t.consume(h),t.exit("chunkText"),c):(t.consume(h),f)}}const Y2={tokenize:I2},Yg={tokenize:Z2};function I2(t){const l=this,i=[];let r=0,s,c,f;return h;function h(H){if(r<i.length){const le=i[r];return l.containerState=le[1],t.attempt(le[0].continuation,p,m)(H)}return m(H)}function p(H){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,s&&Z();const le=l.events.length;let W=le,O;for(;W--;)if(l.events[W][0]==="exit"&&l.events[W][1].type==="chunkFlow"){O=l.events[W][1].end;break}j(r);let J=le;for(;J<l.events.length;)l.events[J][1].end={...O},J++;return cn(l.events,W+1,0,l.events.slice(le)),l.events.length=J,m(H)}return h(H)}function m(H){if(r===i.length){if(!s)return v(H);if(s.currentConstruct&&s.currentConstruct.concrete)return _(H);l.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Yg,b,y)(H)}function b(H){return s&&Z(),j(r),v(H)}function y(H){return l.parser.lazy[l.now().line]=r!==i.length,f=l.now().offset,_(H)}function v(H){return l.containerState={},t.attempt(Yg,k,_)(H)}function k(H){return r++,i.push([l.currentConstruct,l.containerState]),v(H)}function _(H){if(H===null){s&&Z(),j(0),t.consume(H);return}return s=s||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:c}),M(H)}function M(H){if(H===null){U(t.exit("chunkFlow"),!0),j(0),t.consume(H);return}return ve(H)?(t.consume(H),U(t.exit("chunkFlow")),r=0,l.interrupt=void 0,h):(t.consume(H),M)}function U(H,le){const W=l.sliceStream(H);if(le&&W.push(null),H.previous=c,c&&(c.next=H),c=H,s.defineSkip(H.start),s.write(W),l.parser.lazy[H.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 J=l.events.length;let oe=J,fe,z;for(;oe--;)if(l.events[oe][0]==="exit"&&l.events[oe][1].type==="chunkFlow"){if(fe){z=l.events[oe][1].end;break}fe=!0}for(j(r),O=J;O<l.events.length;)l.events[O][1].end={...z},O++;cn(l.events,oe+1,0,l.events.slice(J)),l.events.length=O}}function j(H){let le=i.length;for(;le-- >H;){const W=i[le];l.containerState=W[1],W[0].exit.call(l,t)}i.length=H}function Z(){s.write([null]),c=void 0,s=void 0,l.containerState._closeFlow=void 0}}function Z2(t,l,i){return qe(t,t.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function fi(t){if(t===null||at(t)||fa(t))return 1;if(ms(t))return 2}function ps(t,l,i){const r=[];let s=-1;for(;++s<t.length;){const c=t[s].resolveAll;c&&!r.includes(c)&&(l=c(l,i),r.push(c))}return l}const Sf={name:"attention",resolveAll:F2,tokenize:Q2};function F2(t,l){let i=-1,r,s,c,f,h,p,m,b;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},v={...t[i][1].start};Ig(y,-p),Ig(v,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:v},c={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",c,l]]),m=wn(m,ps(l.parser.constructs.insideSpan.null,t.slice(r+1,i),l)),m=wn(m,[["exit",c,l],["enter",h,l],["exit",h,l],["exit",s,l]]),t[i][1].end.offset-t[i][1].start.offset?(b=2,m=wn(m,[["enter",t[i][1],l],["exit",t[i][1],l]])):b=0,cn(t,r-1,i-r+3,m),i=r+m.length-b-2;break}}for(i=-1;++i<t.length;)t[i][1].type==="attentionSequence"&&(t[i][1].type="data");return t}function Q2(t,l){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,s=fi(r);let c;return f;function f(p){return c=p,t.enter("attentionSequence"),h(p)}function h(p){if(p===c)return t.consume(p),h;const m=t.exit("attentionSequence"),b=fi(p),y=!b||b===2&&s||i.includes(p),v=!s||s===2&&b||i.includes(r);return m._open=!!(c===42?y:y&&(s||!v)),m._close=!!(c===42?v:v&&(b||!y)),l(p)}}function Ig(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const G2={name:"autolink",tokenize:X2};function X2(t,l,i){let r=0;return s;function s(k){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(k),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),c}function c(k){return qt(k)?(t.consume(k),f):k===64?i(k):m(k)}function f(k){return k===43||k===45||k===46||Ot(k)?(r=1,h(k)):m(k)}function h(k){return k===58?(t.consume(k),r=0,p):(k===43||k===45||k===46||Ot(k))&&r++<32?(t.consume(k),h):(r=0,m(k))}function p(k){return k===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(k),t.exit("autolinkMarker"),t.exit("autolink"),l):k===null||k===32||k===60||is(k)?i(k):(t.consume(k),p)}function m(k){return k===64?(t.consume(k),b):B2(k)?(t.consume(k),m):i(k)}function b(k){return Ot(k)?y(k):i(k)}function y(k){return k===46?(t.consume(k),r=0,b):k===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(k),t.exit("autolinkMarker"),t.exit("autolink"),l):v(k)}function v(k){if((k===45||Ot(k))&&r++<63){const _=k===45?v:y;return t.consume(k),_}return i(k)}}const _r={partial:!0,tokenize:K2};function K2(t,l,i){return r;function r(c){return Re(c)?qe(t,s,"linePrefix")(c):s(c)}function s(c){return c===null||ve(c)?l(c):i(c)}}const lx={continuation:{tokenize:$2},exit:P2,name:"blockQuote",tokenize:J2};function J2(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"),c}return i(f)}function c(f){return Re(f)?(t.enter("blockQuotePrefixWhitespace"),t.consume(f),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(f))}}function $2(t,l,i){const r=this;return s;function s(f){return Re(f)?qe(t,c,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):c(f)}function c(f){return t.attempt(lx,l,i)(f)}}function P2(t){t.exit("blockQuote")}const ax={name:"characterEscape",tokenize:W2};function W2(t,l,i){return r;function r(c){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(c),t.exit("escapeMarker"),s}function s(c){return H2(c)?(t.enter("characterEscapeValue"),t.consume(c),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):i(c)}}const ix={name:"characterReference",tokenize:ek};function ek(t,l,i){const r=this;let s=0,c,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"),c=31,f=Ot,b(y))}function m(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),c=6,f=U2,b):(t.enter("characterReferenceValue"),c=7,f=kf,b(y))}function b(y){if(y===59&&s){const v=t.exit("characterReferenceValue");return f===Ot&&!Ff(r.sliceSerialize(v))?i(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return f(y)&&s++<c?(t.consume(y),b):i(y)}}const Zg={partial:!0,tokenize:nk},Fg={concrete:!0,name:"codeFenced",tokenize:tk};function tk(t,l,i){const r=this,s={partial:!0,tokenize:W};let c=0,f=0,h;return p;function p(O){return m(O)}function m(O){const J=r.events[r.events.length-1];return c=J&&J[1].type==="linePrefix"?J[2].sliceSerialize(J[1],!0).length:0,h=O,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),b(O)}function b(O){return O===h?(f++,t.consume(O),b):f<3?i(O):(t.exit("codeFencedFenceSequence"),Re(O)?qe(t,y,"whitespace")(O):y(O))}function y(O){return O===null||ve(O)?(t.exit("codeFencedFence"),r.interrupt?l(O):t.check(Zg,M,le)(O)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),v(O))}function v(O){return O===null||ve(O)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(O)):Re(O)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),qe(t,k,"whitespace")(O)):O===96&&O===h?i(O):(t.consume(O),v)}function k(O){return O===null||ve(O)?y(O):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),_(O))}function _(O){return O===null||ve(O)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(O)):O===96&&O===h?i(O):(t.consume(O),_)}function M(O){return t.attempt(s,le,U)(O)}function U(O){return t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),j}function j(O){return c>0&&Re(O)?qe(t,Z,"linePrefix",c+1)(O):Z(O)}function Z(O){return O===null||ve(O)?t.check(Zg,M,le)(O):(t.enter("codeFlowValue"),H(O))}function H(O){return O===null||ve(O)?(t.exit("codeFlowValue"),Z(O)):(t.consume(O),H)}function le(O){return t.exit("codeFenced"),l(O)}function W(O,J,oe){let fe=0;return z;function z(ee){return O.enter("lineEnding"),O.consume(ee),O.exit("lineEnding"),I}function I(ee){return O.enter("codeFencedFence"),Re(ee)?qe(O,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):$(ee)}function $(ee){return ee===h?(O.enter("codeFencedFenceSequence"),me(ee)):oe(ee)}function me(ee){return ee===h?(fe++,O.consume(ee),me):fe>=f?(O.exit("codeFencedFenceSequence"),Re(ee)?qe(O,ae,"whitespace")(ee):ae(ee)):oe(ee)}function ae(ee){return ee===null||ve(ee)?(O.exit("codeFencedFence"),J(ee)):oe(ee)}}}function nk(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"),c)}function c(f){return r.parser.lazy[r.now().line]?i(f):l(f)}}const Go={name:"codeIndented",tokenize:ak},lk={partial:!0,tokenize:ik};function ak(t,l,i){const r=this;return s;function s(m){return t.enter("codeIndented"),qe(t,c,"linePrefix",5)(m)}function c(m){const b=r.events[r.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?f(m):i(m)}function f(m){return m===null?p(m):ve(m)?t.attempt(lk,f,p)(m):(t.enter("codeFlowValue"),h(m))}function h(m){return m===null||ve(m)?(t.exit("codeFlowValue"),f(m)):(t.consume(m),h)}function p(m){return t.exit("codeIndented"),l(m)}}function ik(t,l,i){const r=this;return s;function s(f){return r.parser.lazy[r.now().line]?i(f):ve(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),s):qe(t,c,"linePrefix",5)(f)}function c(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):ve(f)?s(f):i(f)}}const rk={name:"codeText",previous:sk,resolve:uk,tokenize:ck};function uk(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 sk(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ck(t,l,i){let r=0,s,c;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?(c=t.enter("codeTextSequence"),s=0,b(y)):ve(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||ve(y)?(t.exit("codeTextData"),p(y)):(t.consume(y),m)}function b(y){return y===96?(t.consume(y),s++,b):s===r?(t.exit("codeTextSequence"),t.exit("codeText"),l(y)):(c.type="codeTextData",m(y))}}class ok{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 c=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&fr(this.left,r),c.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),fr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),fr(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);fr(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);fr(this.left,i.reverse())}}}function fr(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 rx(t){const l={};let i=-1,r,s,c,f,h,p,m;const b=new ok(t);for(;++i<b.length;){for(;i in l;)i=l[i];if(r=b.get(i),i&&r[1].type==="chunkFlow"&&b.get(i-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,c=0,c<p.length&&p[c][1].type==="lineEndingBlank"&&(c+=2),c<p.length&&p[c][1].type==="content"))for(;++c<p.length&&p[c][1].type!=="content";)p[c][1].type==="chunkText"&&(p[c][1]._isInFirstContentOfListItem=!0,c++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,fk(b,i)),i=l[i],m=!0);else if(r[1]._container){for(c=i,s=void 0;c--;)if(f=b.get(c),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(s&&(b.get(s)[1].type="lineEndingBlank"),f[1].type="lineEnding",s=c);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;s&&(r[1].end={...b.get(s)[1].start},h=b.slice(s,i),h.unshift(r),b.splice(s,i-s+1,h))}}return cn(t,0,Number.POSITIVE_INFINITY,b.slice(0)),!m}function fk(t,l){const i=t.get(l)[1],r=t.get(l)[2];let s=l-1;const c=[];let f=i._tokenizer;f||(f=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const h=f.events,p=[],m={};let b,y,v=-1,k=i,_=0,M=0;const U=[M];for(;k;){for(;t.get(++s)[1]!==k;);c.push(s),k._tokenizer||(b=r.sliceStream(k),k.next||b.push(null),y&&f.defineSkip(k.start),k._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(b),k._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),y=k,k=k.next}for(k=i;++v<h.length;)h[v][0]==="exit"&&h[v-1][0]==="enter"&&h[v][1].type===h[v-1][1].type&&h[v][1].start.line!==h[v][1].end.line&&(M=v+1,U.push(M),k._tokenizer=void 0,k.previous=void 0,k=k.next);for(f.events=[],k?(k._tokenizer=void 0,k.previous=void 0):U.pop(),v=U.length;v--;){const j=h.slice(U[v],U[v+1]),Z=c.pop();p.push([Z,Z+j.length-1]),t.splice(Z,2,j)}for(p.reverse(),v=-1;++v<p.length;)m[_+p[v][0]]=_+p[v][1],_+=p[v][1]-p[v][0]-1;return m}const dk={resolve:mk,tokenize:pk},hk={partial:!0,tokenize:gk};function mk(t){return rx(t),t}function pk(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?c(h):ve(h)?t.check(hk,f,c)(h):(t.consume(h),s)}function c(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 gk(t,l,i){const r=this;return s;function s(f){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),qe(t,c,"linePrefix")}function c(f){if(f===null||ve(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 ux(t,l,i,r,s,c,f,h,p){const m=p||Number.POSITIVE_INFINITY;let b=0;return y;function y(j){return j===60?(t.enter(r),t.enter(s),t.enter(c),t.consume(j),t.exit(c),v):j===null||j===32||j===41||is(j)?i(j):(t.enter(r),t.enter(f),t.enter(h),t.enter("chunkString",{contentType:"string"}),M(j))}function v(j){return j===62?(t.enter(c),t.consume(j),t.exit(c),t.exit(s),t.exit(r),l):(t.enter(h),t.enter("chunkString",{contentType:"string"}),k(j))}function k(j){return j===62?(t.exit("chunkString"),t.exit(h),v(j)):j===null||j===60||ve(j)?i(j):(t.consume(j),j===92?_:k)}function _(j){return j===60||j===62||j===92?(t.consume(j),k):k(j)}function M(j){return!b&&(j===null||j===41||at(j))?(t.exit("chunkString"),t.exit(h),t.exit(f),t.exit(r),l(j)):b<m&&j===40?(t.consume(j),b++,M):j===41?(t.consume(j),b--,M):j===null||j===32||j===40||is(j)?i(j):(t.consume(j),j===92?U:M)}function U(j){return j===40||j===41||j===92?(t.consume(j),M):M(j)}}function sx(t,l,i,r,s,c){const f=this;let h=0,p;return m;function m(k){return t.enter(r),t.enter(s),t.consume(k),t.exit(s),t.enter(c),b}function b(k){return h>999||k===null||k===91||k===93&&!p||k===94&&!h&&"_hiddenFootnoteSupport"in f.parser.constructs?i(k):k===93?(t.exit(c),t.enter(s),t.consume(k),t.exit(s),t.exit(r),l):ve(k)?(t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),b):(t.enter("chunkString",{contentType:"string"}),y(k))}function y(k){return k===null||k===91||k===93||ve(k)||h++>999?(t.exit("chunkString"),b(k)):(t.consume(k),p||(p=!Re(k)),k===92?v:y)}function v(k){return k===91||k===92||k===93?(t.consume(k),h++,y):y(k)}}function cx(t,l,i,r,s,c){let f;return h;function h(v){return v===34||v===39||v===40?(t.enter(r),t.enter(s),t.consume(v),t.exit(s),f=v===40?41:v,p):i(v)}function p(v){return v===f?(t.enter(s),t.consume(v),t.exit(s),t.exit(r),l):(t.enter(c),m(v))}function m(v){return v===f?(t.exit(c),p(f)):v===null?i(v):ve(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),qe(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===f||v===null||ve(v)?(t.exit("chunkString"),m(v)):(t.consume(v),v===92?y:b)}function y(v){return v===f||v===92?(t.consume(v),b):b(v)}}function gr(t,l){let i;return r;function r(s){return ve(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i=!0,r):Re(s)?qe(t,r,i?"linePrefix":"lineSuffix")(s):l(s)}}const yk={name:"definition",tokenize:bk},xk={partial:!0,tokenize:vk};function bk(t,l,i){const r=this;let s;return c;function c(k){return t.enter("definition"),f(k)}function f(k){return sx.call(r,t,h,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(k)}function h(k){return s=Nn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),k===58?(t.enter("definitionMarker"),t.consume(k),t.exit("definitionMarker"),p):i(k)}function p(k){return at(k)?gr(t,m)(k):m(k)}function m(k){return ux(t,b,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(k)}function b(k){return t.attempt(xk,y,y)(k)}function y(k){return Re(k)?qe(t,v,"whitespace")(k):v(k)}function v(k){return k===null||ve(k)?(t.exit("definition"),r.parser.defined.push(s),l(k)):i(k)}}function vk(t,l,i){return r;function r(h){return at(h)?gr(t,s)(h):i(h)}function s(h){return cx(t,c,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function c(h){return Re(h)?qe(t,f,"whitespace")(h):f(h)}function f(h){return h===null||ve(h)?l(h):i(h)}}const kk={name:"hardBreakEscape",tokenize:Sk};function Sk(t,l,i){return r;function r(c){return t.enter("hardBreakEscape"),t.consume(c),s}function s(c){return ve(c)?(t.exit("hardBreakEscape"),l(c)):i(c)}}const wk={name:"headingAtx",resolve:_k,tokenize:Ek};function _k(t,l){let i=t.length-2,r=3,s,c;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},c={type:"chunkText",start:t[r][1].start,end:t[i][1].end,contentType:"text"},cn(t,r,i-r+1,[["enter",s,l],["enter",c,l],["exit",c,l],["exit",s,l]])),t}function Ek(t,l,i){let r=0;return s;function s(b){return t.enter("atxHeading"),c(b)}function c(b){return t.enter("atxHeadingSequence"),f(b)}function f(b){return b===35&&r++<6?(t.consume(b),f):b===null||at(b)?(t.exit("atxHeadingSequence"),h(b)):i(b)}function h(b){return b===35?(t.enter("atxHeadingSequence"),p(b)):b===null||ve(b)?(t.exit("atxHeading"),l(b)):Re(b)?qe(t,h,"whitespace")(b):(t.enter("atxHeadingText"),m(b))}function p(b){return b===35?(t.consume(b),p):(t.exit("atxHeadingSequence"),h(b))}function m(b){return b===null||b===35||at(b)?(t.exit("atxHeadingText"),h(b)):(t.consume(b),m)}}const Ck=["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"],Qg=["pre","script","style","textarea"],Ak={concrete:!0,name:"htmlFlow",resolveTo:Nk,tokenize:Dk},Tk={partial:!0,tokenize:Ok},jk={partial:!0,tokenize:zk};function Nk(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 Dk(t,l,i){const r=this;let s,c,f,h,p;return m;function m(w){return b(w)}function b(w){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(w),y}function y(w){return w===33?(t.consume(w),v):w===47?(t.consume(w),c=!0,M):w===63?(t.consume(w),s=3,r.interrupt?l:E):qt(w)?(t.consume(w),f=String.fromCharCode(w),U):i(w)}function v(w){return w===45?(t.consume(w),s=2,k):w===91?(t.consume(w),s=5,h=0,_):qt(w)?(t.consume(w),s=4,r.interrupt?l:E):i(w)}function k(w){return w===45?(t.consume(w),r.interrupt?l:E):i(w)}function _(w){const re="CDATA[";return w===re.charCodeAt(h++)?(t.consume(w),h===re.length?r.interrupt?l:$:_):i(w)}function M(w){return qt(w)?(t.consume(w),f=String.fromCharCode(w),U):i(w)}function U(w){if(w===null||w===47||w===62||at(w)){const re=w===47,be=f.toLowerCase();return!re&&!c&&Qg.includes(be)?(s=1,r.interrupt?l(w):$(w)):Ck.includes(f.toLowerCase())?(s=6,re?(t.consume(w),j):r.interrupt?l(w):$(w)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(w):c?Z(w):H(w))}return w===45||Ot(w)?(t.consume(w),f+=String.fromCharCode(w),U):i(w)}function j(w){return w===62?(t.consume(w),r.interrupt?l:$):i(w)}function Z(w){return Re(w)?(t.consume(w),Z):z(w)}function H(w){return w===47?(t.consume(w),z):w===58||w===95||qt(w)?(t.consume(w),le):Re(w)?(t.consume(w),H):z(w)}function le(w){return w===45||w===46||w===58||w===95||Ot(w)?(t.consume(w),le):W(w)}function W(w){return w===61?(t.consume(w),O):Re(w)?(t.consume(w),W):H(w)}function O(w){return w===null||w===60||w===61||w===62||w===96?i(w):w===34||w===39?(t.consume(w),p=w,J):Re(w)?(t.consume(w),O):oe(w)}function J(w){return w===p?(t.consume(w),p=null,fe):w===null||ve(w)?i(w):(t.consume(w),J)}function oe(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||at(w)?W(w):(t.consume(w),oe)}function fe(w){return w===47||w===62||Re(w)?H(w):i(w)}function z(w){return w===62?(t.consume(w),I):i(w)}function I(w){return w===null||ve(w)?$(w):Re(w)?(t.consume(w),I):i(w)}function $(w){return w===45&&s===2?(t.consume(w),N):w===60&&s===1?(t.consume(w),K):w===62&&s===4?(t.consume(w),A):w===63&&s===3?(t.consume(w),E):w===93&&s===5?(t.consume(w),se):ve(w)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(Tk,Q,me)(w)):w===null||ve(w)?(t.exit("htmlFlowData"),me(w)):(t.consume(w),$)}function me(w){return t.check(jk,ae,Q)(w)}function ae(w){return t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),ee}function ee(w){return w===null||ve(w)?me(w):(t.enter("htmlFlowData"),$(w))}function N(w){return w===45?(t.consume(w),E):$(w)}function K(w){return w===47?(t.consume(w),f="",ue):$(w)}function ue(w){if(w===62){const re=f.toLowerCase();return Qg.includes(re)?(t.consume(w),A):$(w)}return qt(w)&&f.length<8?(t.consume(w),f+=String.fromCharCode(w),ue):$(w)}function se(w){return w===93?(t.consume(w),E):$(w)}function E(w){return w===62?(t.consume(w),A):w===45&&s===2?(t.consume(w),E):$(w)}function A(w){return w===null||ve(w)?(t.exit("htmlFlowData"),Q(w)):(t.consume(w),A)}function Q(w){return t.exit("htmlFlow"),l(w)}}function zk(t,l,i){const r=this;return s;function s(f){return ve(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c):i(f)}function c(f){return r.parser.lazy[r.now().line]?i(f):l(f)}}function Ok(t,l,i){return r;function r(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(_r,l,i)}}const Mk={name:"htmlText",tokenize:Rk};function Rk(t,l,i){const r=this;let s,c,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),W):E===63?(t.consume(E),H):qt(E)?(t.consume(E),oe):i(E)}function m(E){return E===45?(t.consume(E),b):E===91?(t.consume(E),c=0,_):qt(E)?(t.consume(E),Z):i(E)}function b(E){return E===45?(t.consume(E),k):i(E)}function y(E){return E===null?i(E):E===45?(t.consume(E),v):ve(E)?(f=y,K(E)):(t.consume(E),y)}function v(E){return E===45?(t.consume(E),k):y(E)}function k(E){return E===62?N(E):E===45?v(E):y(E)}function _(E){const A="CDATA[";return E===A.charCodeAt(c++)?(t.consume(E),c===A.length?M:_):i(E)}function M(E){return E===null?i(E):E===93?(t.consume(E),U):ve(E)?(f=M,K(E)):(t.consume(E),M)}function U(E){return E===93?(t.consume(E),j):M(E)}function j(E){return E===62?N(E):E===93?(t.consume(E),j):M(E)}function Z(E){return E===null||E===62?N(E):ve(E)?(f=Z,K(E)):(t.consume(E),Z)}function H(E){return E===null?i(E):E===63?(t.consume(E),le):ve(E)?(f=H,K(E)):(t.consume(E),H)}function le(E){return E===62?N(E):H(E)}function W(E){return qt(E)?(t.consume(E),O):i(E)}function O(E){return E===45||Ot(E)?(t.consume(E),O):J(E)}function J(E){return ve(E)?(f=J,K(E)):Re(E)?(t.consume(E),J):N(E)}function oe(E){return E===45||Ot(E)?(t.consume(E),oe):E===47||E===62||at(E)?fe(E):i(E)}function fe(E){return E===47?(t.consume(E),N):E===58||E===95||qt(E)?(t.consume(E),z):ve(E)?(f=fe,K(E)):Re(E)?(t.consume(E),fe):N(E)}function z(E){return E===45||E===46||E===58||E===95||Ot(E)?(t.consume(E),z):I(E)}function I(E){return E===61?(t.consume(E),$):ve(E)?(f=I,K(E)):Re(E)?(t.consume(E),I):fe(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,me):ve(E)?(f=$,K(E)):Re(E)?(t.consume(E),$):(t.consume(E),ae)}function me(E){return E===s?(t.consume(E),s=void 0,ee):E===null?i(E):ve(E)?(f=me,K(E)):(t.consume(E),me)}function ae(E){return E===null||E===34||E===39||E===60||E===61||E===96?i(E):E===47||E===62||at(E)?fe(E):(t.consume(E),ae)}function ee(E){return E===47||E===62||at(E)?fe(E):i(E)}function N(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),l):i(E)}function K(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),ue}function ue(E){return Re(E)?qe(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 Qf={name:"labelEnd",resolveAll:Hk,resolveTo:qk,tokenize:Vk},Lk={tokenize:Yk},Bk={tokenize:Ik},Uk={tokenize:Zk};function Hk(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&&cn(t,0,t.length,i),t}function qk(t,l){let i=t.length,r=0,s,c,f,h;for(;i--;)if(s=t[i][1],c){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&&(c=i,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(f=i);const p={type:t[c][1].type==="labelLink"?"link":"image",start:{...t[c][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[c][1].start},end:{...t[f][1].end}},b={type:"labelText",start:{...t[c+r+2][1].end},end:{...t[f-2][1].start}};return h=[["enter",p,l],["enter",m,l]],h=wn(h,t.slice(c+1,c+r+3)),h=wn(h,[["enter",b,l]]),h=wn(h,ps(l.parser.constructs.insideSpan.null,t.slice(c+r+4,f-3),l)),h=wn(h,[["exit",b,l],t[f-2],t[f-1],["exit",m,l]]),h=wn(h,t.slice(f+1)),h=wn(h,[["exit",p,l]]),cn(t,c,t.length,h),t}function Vk(t,l,i){const r=this;let s=r.events.length,c,f;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){c=r.events[s][1];break}return h;function h(v){return c?c._inactive?y(v):(f=r.parser.defined.includes(Nn(r.sliceSerialize({start:c.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(v),t.exit("labelMarker"),t.exit("labelEnd"),p):i(v)}function p(v){return v===40?t.attempt(Lk,b,f?b:y)(v):v===91?t.attempt(Bk,b,f?m:y)(v):f?b(v):y(v)}function m(v){return t.attempt(Uk,b,y)(v)}function b(v){return l(v)}function y(v){return c._balanced=!0,i(v)}}function Yk(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 at(y)?gr(t,c)(y):c(y)}function c(y){return y===41?b(y):ux(t,f,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function f(y){return at(y)?gr(t,p)(y):b(y)}function h(y){return i(y)}function p(y){return y===34||y===39||y===40?cx(t,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):b(y)}function m(y){return at(y)?gr(t,b)(y):b(y)}function b(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),l):i(y)}}function Ik(t,l,i){const r=this;return s;function s(h){return sx.call(r,t,c,f,"reference","referenceMarker","referenceString")(h)}function c(h){return r.parser.defined.includes(Nn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(h):i(h)}function f(h){return i(h)}}function Zk(t,l,i){return r;function r(c){return t.enter("reference"),t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),s}function s(c){return c===93?(t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),t.exit("reference"),l):i(c)}}const Fk={name:"labelStartImage",resolveAll:Qf.resolveAll,tokenize:Qk};function Qk(t,l,i){const r=this;return s;function s(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),c}function c(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 Gk={name:"labelStartLink",resolveAll:Qf.resolveAll,tokenize:Xk};function Xk(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"),c}function c(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(f):l(f)}}const Xo={name:"lineEnding",tokenize:Kk};function Kk(t,l){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),qe(t,l,"linePrefix")}}const Gu={name:"thematicBreak",tokenize:Jk};function Jk(t,l,i){let r=0,s;return c;function c(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||ve(m))?(t.exit("thematicBreak"),l(m)):i(m)}function p(m){return m===s?(t.consume(m),r++,p):(t.exit("thematicBreakSequence"),Re(m)?qe(t,h,"whitespace")(m):h(m))}}const $t={continuation:{tokenize:eS},exit:nS,name:"list",tokenize:Wk},$k={partial:!0,tokenize:lS},Pk={partial:!0,tokenize:tS};function Wk(t,l,i){const r=this,s=r.events[r.events.length-1];let c=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return h;function h(k){const _=r.containerState.type||(k===42||k===43||k===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||k===r.containerState.marker:kf(k)){if(r.containerState.type||(r.containerState.type=_,t.enter(_,{_container:!0})),_==="listUnordered")return t.enter("listItemPrefix"),k===42||k===45?t.check(Gu,i,m)(k):m(k);if(!r.interrupt||k===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(k)}return i(k)}function p(k){return kf(k)&&++f<10?(t.consume(k),p):(!r.interrupt||f<2)&&(r.containerState.marker?k===r.containerState.marker:k===41||k===46)?(t.exit("listItemValue"),m(k)):i(k)}function m(k){return t.enter("listItemMarker"),t.consume(k),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||k,t.check(_r,r.interrupt?i:b,t.attempt($k,v,y))}function b(k){return r.containerState.initialBlankLine=!0,c++,v(k)}function y(k){return Re(k)?(t.enter("listItemPrefixWhitespace"),t.consume(k),t.exit("listItemPrefixWhitespace"),v):i(k)}function v(k){return r.containerState.size=c+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(k)}}function eS(t,l,i){const r=this;return r.containerState._closeFlow=void 0,t.check(_r,s,c);function s(h){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,qe(t,l,"listItemIndent",r.containerState.size+1)(h)}function c(h){return r.containerState.furtherBlankLines||!Re(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(Pk,l,f)(h))}function f(h){return r.containerState._closeFlow=!0,r.interrupt=void 0,qe(t,t.attempt($t,l,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function tS(t,l,i){const r=this;return qe(t,s,"listItemIndent",r.containerState.size+1);function s(c){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(c):i(c)}}function nS(t){t.exit(this.containerState.type)}function lS(t,l,i){const r=this;return qe(t,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(c){const f=r.events[r.events.length-1];return!Re(c)&&f&&f[1].type==="listItemPrefixWhitespace"?l(c):i(c)}}const Gg={name:"setextUnderline",resolveTo:aS,tokenize:iS};function aS(t,l){let i=t.length,r,s,c;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),!c&&t[i][1].type==="definition"&&(c=i);const f={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",c?(t.splice(s,0,["enter",f,l]),t.splice(c+1,0,["exit",t[r][1],l]),t[r][1].end={...t[c][1].end}):t[r][1]=f,t.push(["exit",f,l]),t}function iS(t,l,i){const r=this;let s;return c;function c(m){let b=r.events.length,y;for(;b--;)if(r.events[b][1].type!=="lineEnding"&&r.events[b][1].type!=="linePrefix"&&r.events[b][1].type!=="content"){y=r.events[b][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"),Re(m)?qe(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||ve(m)?(t.exit("setextHeadingLine"),l(m)):i(m)}}const rS={tokenize:uS};function uS(t){const l=this,i=t.attempt(_r,r,t.attempt(this.parser.constructs.flowInitial,s,qe(t,t.attempt(this.parser.constructs.flow,s,t.attempt(dk,s)),"linePrefix")));return i;function r(c){if(c===null){t.consume(c);return}return t.enter("lineEndingBlank"),t.consume(c),t.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function s(c){if(c===null){t.consume(c);return}return t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),l.currentConstruct=void 0,i}}const sS={resolveAll:fx()},cS=ox("string"),oS=ox("text");function ox(t){return{resolveAll:fx(t==="text"?fS:void 0),tokenize:l};function l(i){const r=this,s=this.parser.constructs[t],c=i.attempt(s,f,h);return f;function f(b){return m(b)?c(b):h(b)}function h(b){if(b===null){i.consume(b);return}return i.enter("data"),i.consume(b),p}function p(b){return m(b)?(i.exit("data"),c(b)):(i.consume(b),p)}function m(b){if(b===null)return!0;const y=s[b];let v=-1;if(y)for(;++v<y.length;){const k=y[v];if(!k.previous||k.previous.call(r,r.previous))return!0}return!1}}}function fx(t){return l;function l(i,r){let s=-1,c;for(;++s<=i.length;)c===void 0?i[s]&&i[s][1].type==="data"&&(c=s,s++):(!i[s]||i[s][1].type!=="data")&&(s!==c+2&&(i[c][1].end=i[s-1][1].end,i.splice(c+2,s-c-2),s=c+2),c=void 0);return t?t(i,r):i}}function fS(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 c=s.length,f=-1,h=0,p;for(;c--;){const m=s[c];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){c++;break}}if(l._contentTypeTextTrailing&&i===t.length&&(h=0),h){const m={type:i===t.length||p||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?f:r.start._bufferIndex+f,_index:r.start._index+c,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 dS={42:$t,43:$t,45:$t,48:$t,49:$t,50:$t,51:$t,52:$t,53:$t,54:$t,55:$t,56:$t,57:$t,62:lx},hS={91:yk},mS={[-2]:Go,[-1]:Go,32:Go},pS={35:wk,42:Gu,45:[Gg,Gu],60:Ak,61:Gg,95:Gu,96:Fg,126:Fg},gS={38:ix,92:ax},yS={[-5]:Xo,[-4]:Xo,[-3]:Xo,33:Fk,38:ix,42:Sf,60:[G2,Mk],91:Gk,92:[kk,ax],93:Qf,95:Sf,96:rk},xS={null:[Sf,sS]},bS={null:[42,95]},vS={null:[]},kS=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bS,contentInitial:hS,disable:vS,document:dS,flow:pS,flowInitial:mS,insideSpan:xS,string:gS,text:yS},Symbol.toStringTag,{value:"Module"}));function SS(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={},c=[];let f=[],h=[];const p={attempt:J(W),check:J(O),consume:Z,enter:H,exit:le,interrupt:J(O,{interrupt:!0})},m={code:null,containerState:{},defineSkip:M,events:[],now:_,parser:t,previous:null,sliceSerialize:v,sliceStream:k,write:y};let b=l.tokenize.call(m,p);return l.resolveAll&&c.push(l),m;function y(I){return f=wn(f,I),U(),f[f.length-1]!==null?[]:(oe(l,0),m.events=ps(c,m.events,m),m.events)}function v(I,$){return _S(k(I),$)}function k(I){return wS(f,I)}function _(){const{_bufferIndex:I,_index:$,line:me,column:ae,offset:ee}=r;return{_bufferIndex:I,_index:$,line:me,column:ae,offset:ee}}function M(I){s[I.line]=I.column,z()}function U(){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;)j($.charCodeAt(r._bufferIndex));else j($)}}function j(I){b=b(I)}function Z(I){ve(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,z()):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 H(I,$){const me=$||{};return me.type=I,me.start=_(),m.events.push(["enter",me,m]),h.push(me),me}function le(I){const $=h.pop();return $.end=_(),m.events.push(["exit",$,m]),$}function W(I,$){oe(I,$.from)}function O(I,$){$.restore()}function J(I,$){return me;function me(ae,ee,N){let K,ue,se,E;return Array.isArray(ae)?Q(ae):"tokenize"in ae?Q([ae]):A(ae);function A(ye){return je;function je(Ve){const Qe=Ve!==null&&ye[Ve],Nt=Ve!==null&&ye.null,En=[...Array.isArray(Qe)?Qe:Qe?[Qe]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return Q(En)(Ve)}}function Q(ye){return K=ye,ue=0,ye.length===0?N:w(ye[ue])}function w(ye){return je;function je(Ve){return E=fe(),se=ye,ye.partial||(m.currentConstruct=ye),ye.name&&m.parser.constructs.disable.null.includes(ye.name)?be():ye.tokenize.call($?Object.assign(Object.create(m),$):m,p,re,be)(Ve)}}function re(ye){return I(se,E),ee}function be(ye){return E.restore(),++ue<K.length?w(K[ue]):N}}}function oe(I,$){I.resolveAll&&!c.includes(I)&&c.push(I),I.resolve&&cn(m.events,$,m.events.length-$,I.resolve(m.events.slice($),m)),I.resolveTo&&(m.events=I.resolveTo(m.events,m))}function fe(){const I=_(),$=m.previous,me=m.currentConstruct,ae=m.events.length,ee=Array.from(h);return{from:ae,restore:N};function N(){r=I,m.previous=$,m.currentConstruct=me,m.events.length=ae,h=ee,z()}}function z(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function wS(t,l){const i=l.start._index,r=l.start._bufferIndex,s=l.end._index,c=l.end._bufferIndex;let f;if(i===s)f=[t[i].slice(r,c)];else{if(f=t.slice(i,s),r>-1){const h=f[0];typeof h=="string"?f[0]=h.slice(r):f.shift()}c>0&&f.push(t[s].slice(0,c))}return f}function _S(t,l){let i=-1;const r=[];let s;for(;++i<t.length;){const c=t[i];let f;if(typeof c=="string")f=c;else switch(c){case-5:{f="\r";break}case-4:{f=`
|
|
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(c)}s=c===-2,r.push(f)}return r.join("")}function ES(t){const r={constructs:tx([kS,...(t||{}).extensions||[]]),content:s(q2),defined:[],document:s(Y2),flow:s(rS),lazy:{},string:s(cS),text:s(oS)};return r;function s(c){return f;function f(h){return SS(r,c,h)}}}function CS(t){for(;!rx(t););return t}const Xg=/[\0\t\n\r]/g;function AS(){let t=1,l="",i=!0,r;return s;function s(c,f,h){const p=[];let m,b,y,v,k;for(c=l+(typeof c=="string"?c.toString():new TextDecoder(f||void 0).decode(c)),y=0,l="",i&&(c.charCodeAt(0)===65279&&y++,i=void 0);y<c.length;){if(Xg.lastIndex=y,m=Xg.exec(c),v=m&&m.index!==void 0?m.index:c.length,k=c.charCodeAt(v),!m){l=c.slice(y);break}if(k===10&&y===v&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),y<v&&(p.push(c.slice(y,v)),t+=v-y),k){case 0:{p.push(65533),t++;break}case 9:{for(b=Math.ceil(t/4)*4,p.push(-2);t++<b;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:r=!0,t=1}y=v+1}return h&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const TS=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function jS(t){return t.replace(TS,NS)}function NS(t,l,i){if(l)return l;if(i.charCodeAt(0)===35){const s=i.charCodeAt(1),c=s===120||s===88;return nx(i.slice(c?2:1),c?16:10)}return Ff(i)||t}const dx={}.hasOwnProperty;function DS(t,l,i){return l&&typeof l=="object"&&(i=l,l=void 0),zS(i)(CS(ES(i).document().write(AS()(t,l,!0))))}function zS(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(ma),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:c(on),blockQuote:c(Nt),characterEscape:fe,characterReference:fe,codeFenced:c(En),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:c(En,f),codeText:c(Dn,f),codeTextData:fe,data:fe,codeFlowValue:fe,definition:c(et),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:c(Dt),hardBreakEscape:c(fn),hardBreakTrailing:c(fn),htmlFlow:c(ol,f),htmlFlowData:fe,htmlText:c(ol,f),htmlTextData:fe,image:c(ha),label:f,link:c(ma),listItem:c(pi),listItemValue:v,listOrdered:c(pa,y),listUnordered:c(pa),paragraph:c(vs),reference:w,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:c(on),strong:c(ks),thematicBreak:c(Ss)},exit:{atxHeading:p(),atxHeadingSequence:W,autolink:p(),autolinkEmail:Qe,autolinkProtocol:Ve,blockQuote:p(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:ye,characterReference:je,codeFenced:p(U),codeFencedFence:M,codeFencedFenceInfo:k,codeFencedFenceMeta:_,codeFlowValue:z,codeIndented:p(j),codeText:p(ee),codeTextData:z,data:z,definition:p(),definitionDestinationString:le,definitionLabelString:Z,definitionTitleString:H,emphasis:p(),hardBreakEscape:p($),hardBreakTrailing:p($),htmlFlow:p(me),htmlFlowData:z,htmlText:p(ae),htmlTextData:z,image:p(K),label:se,labelText:ue,lineEnding:I,link:p(N),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:re,resourceDestinationString:E,resourceTitleString:A,resource:Q,setextHeading:p(oe),setextHeadingLineSequence:J,setextHeadingText:O,strong:p(),thematicBreak:p()}};hx(l,(t||{}).mdastExtensions||[]);const i={};return r;function r(G){let ie={type:"root",children:[]};const we={stack:[ie],tokenStack:[],config:l,enter:h,exit:m,buffer:f,resume:b,data:i},ze=[];let Ge=-1;for(;++Ge<G.length;)if(G[Ge][1].type==="listOrdered"||G[Ge][1].type==="listUnordered")if(G[Ge][0]==="enter")ze.push(Ge);else{const Wt=ze.pop();Ge=s(G,Wt,Ge)}for(Ge=-1;++Ge<G.length;){const Wt=l[G[Ge][0]];dx.call(Wt,G[Ge][1].type)&&Wt[G[Ge][1].type].call(Object.assign({sliceSerialize:G[Ge][2].sliceSerialize},we),G[Ge][1])}if(we.tokenStack.length>0){const Wt=we.tokenStack[we.tokenStack.length-1];(Wt[1]||Kg).call(we,void 0,Wt[0])}for(ie.position={start:Ll(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:Ll(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<l.transforms.length;)ie=l.transforms[Ge](ie)||ie;return ie}function s(G,ie,we){let ze=ie-1,Ge=-1,Wt=!1,Vn,Ut,kt,It;for(;++ze<=we;){const tt=G[ze];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Ge++:Ge--,It=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(Vn&&!It&&!Ge&&!kt&&(kt=ze),It=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:It=void 0}if(!Ge&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Ge===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(Vn){let fl=ze;for(Ut=void 0;fl--;){const Cn=G[fl];if(Cn[1].type==="lineEnding"||Cn[1].type==="lineEndingBlank"){if(Cn[0]==="exit")continue;Ut&&(G[Ut][1].type="lineEndingBlank",Wt=!0),Cn[1].type="lineEnding",Ut=fl}else if(!(Cn[1].type==="linePrefix"||Cn[1].type==="blockQuotePrefix"||Cn[1].type==="blockQuotePrefixWhitespace"||Cn[1].type==="blockQuoteMarker"||Cn[1].type==="listItemIndent"))break}kt&&(!Ut||kt<Ut)&&(Vn._spread=!0),Vn.end=Object.assign({},Ut?G[Ut][1].start:tt[1].end),G.splice(Ut||ze,0,["exit",Vn,tt[2]]),ze++,we++}if(tt[1].type==="listItemPrefix"){const fl={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};Vn=fl,G.splice(ze,0,["enter",fl,tt[2]]),ze++,we++,kt=void 0,It=!0}}}return G[ie][1]._spread=Wt,we}function c(G,ie){return we;function we(ze){h.call(this,G(ze),ze),ie&&ie.call(this,ze)}}function f(){this.stack.push({type:"fragment",children:[]})}function h(G,ie,we){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([ie,we||void 0]),G.position={start:Ll(ie.start),end:void 0}}function p(G){return ie;function ie(we){G&&G.call(this,we),m.call(this,we)}}function m(G,ie){const we=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==G.type&&(ie?ie.call(this,G,ze[0]):(ze[1]||Kg).call(this,G,ze[0]));else throw new Error("Cannot close `"+G.type+"` ("+pr({start:G.start,end:G.end})+"): it’s not open");we.position.end=Ll(G.end)}function b(){return Zf(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function v(G){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function k(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=G}function _(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=G}function M(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function U(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function j(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G.replace(/(\r?\n|\r)$/g,"")}function Z(G){const ie=this.resume(),we=this.stack[this.stack.length-1];we.label=ie,we.identifier=Nn(this.sliceSerialize(G)).toLowerCase()}function H(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.title=G}function le(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.url=G}function W(G){const ie=this.stack[this.stack.length-1];if(!ie.depth){const we=this.sliceSerialize(G).length;ie.depth=we}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function J(G){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function oe(){this.data.setextHeadingSlurpLineEnding=void 0}function fe(G){const we=this.stack[this.stack.length-1].children;let ze=we[we.length-1];(!ze||ze.type!=="text")&&(ze=Bt(),ze.position={start:Ll(G.start),end:void 0},we.push(ze)),this.stack.push(ze)}function z(G){const ie=this.stack.pop();ie.value+=this.sliceSerialize(G),ie.position.end=Ll(G.end)}function I(G){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const we=ie.children[ie.children.length-1];we.position.end=Ll(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(ie.type)&&(fe.call(this,G),z.call(this,G))}function $(){this.data.atHardBreak=!0}function me(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function ae(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function ee(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.value=G}function N(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ie,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function K(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ie,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function ue(G){const ie=this.sliceSerialize(G),we=this.stack[this.stack.length-2];we.label=jS(ie),we.identifier=Nn(ie).toLowerCase()}function se(){const G=this.stack[this.stack.length-1],ie=this.resume(),we=this.stack[this.stack.length-1];if(this.data.inReference=!0,we.type==="link"){const ze=G.children;we.children=ze}else we.alt=ie}function E(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.url=G}function A(){const G=this.resume(),ie=this.stack[this.stack.length-1];ie.title=G}function Q(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function re(G){const ie=this.resume(),we=this.stack[this.stack.length-1];we.label=ie,we.identifier=Nn(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function be(G){this.data.characterReferenceType=G.type}function ye(G){const ie=this.sliceSerialize(G),we=this.data.characterReferenceType;let ze;we?(ze=nx(ie,we==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=Ff(ie);const Ge=this.stack[this.stack.length-1];Ge.value+=ze}function je(G){const ie=this.stack.pop();ie.position.end=Ll(G.end)}function Ve(G){z.call(this,G);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(G)}function Qe(G){z.call(this,G);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(G)}function Nt(){return{type:"blockquote",children:[]}}function En(){return{type:"code",lang:null,meta:null,value:""}}function Dn(){return{type:"inlineCode",value:""}}function et(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Dt(){return{type:"emphasis",children:[]}}function on(){return{type:"heading",depth:0,children:[]}}function fn(){return{type:"break"}}function ol(){return{type:"html",value:""}}function ha(){return{type:"image",title:null,url:"",alt:null}}function ma(){return{type:"link",title:null,url:"",children:[]}}function pa(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function pi(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function vs(){return{type:"paragraph",children:[]}}function ks(){return{type:"strong",children:[]}}function Bt(){return{type:"text",value:""}}function Ss(){return{type:"thematicBreak"}}}function Ll(t){return{line:t.line,column:t.column,offset:t.offset}}function hx(t,l){let i=-1;for(;++i<l.length;){const r=l[i];Array.isArray(r)?hx(t,r):OS(t,r)}}function OS(t,l){let i;for(i in l)if(dx.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 Kg(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+pr({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+pr({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+pr({start:l.start,end:l.end})+") is still open")}function MS(t){const l=this;l.parser=i;function i(r){return DS(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function RS(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 LS(t,l){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,i),[t.applyData(l,i),{type:"text",value:`
|
|
53
|
+
`}]}function BS(t,l){const i=l.value?l.value+`
|
|
54
|
+
`:"",r={},s=l.lang?l.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let c={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};return l.meta&&(c.data={meta:l.meta}),t.patch(l,c),c=t.applyData(l,c),c={type:"element",tagName:"pre",properties:{},children:[c]},t.patch(l,c),c}function US(t,l){const i={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function HS(t,l){const i={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function qS(t,l){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),s=mi(r.toLowerCase()),c=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=c+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 VS(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 YS(t,l){if(t.options.allowDangerousHtml){const i={type:"raw",value:l.value};return t.patch(l,i),t.applyData(l,i)}}function mx(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),c=s[0];c&&c.type==="text"?c.value="["+c.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 IS(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return mx(t,l);const s={src:mi(r.url||""),alt:l.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const c={type:"element",tagName:"img",properties:s,children:[]};return t.patch(l,c),t.applyData(l,c)}function ZS(t,l){const i={src:mi(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 FS(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 QS(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return mx(t,l);const s={href:mi(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const c={type:"element",tagName:"a",properties:s,children:t.all(l)};return t.patch(l,c),t.applyData(l,c)}function GS(t,l){const i={href:mi(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 XS(t,l,i){const r=t.all(l),s=i?KS(i):px(l),c={},f=[];if(typeof l.checked=="boolean"){const b=r[0];let y;b&&b.type==="element"&&b.tagName==="p"?y=b:(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:[]}),c.className=["task-list-item"]}let h=-1;for(;++h<r.length;){const b=r[h];(s||h!==0||b.type!=="element"||b.tagName!=="p")&&f.push({type:"text",value:`
|
|
55
|
+
`}),b.type==="element"&&b.tagName==="p"&&!s?f.push(...b.children):f.push(b)}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:c,children:f};return t.patch(l,m),t.applyData(l,m)}function KS(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=px(i[r])}return l}function px(t){const l=t.spread;return l??t.children.length>1}function JS(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 c={type:"element",tagName:l.ordered?"ol":"ul",properties:i,children:t.wrap(r,!0)};return t.patch(l,c),t.applyData(l,c)}function $S(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 WS(t,l){const i={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function ew(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=qf(l.children[1]),p=Xy(l.children[l.children.length-1]);h&&p&&(f.position={start:h,end:p}),s.push(f)}const c={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(l,c),t.applyData(l,c)}function tw(t,l,i){const r=i?i.children:void 0,c=(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],v={},k=f?f[p]:void 0;k&&(v.align=k);let _={type:"element",tagName:c,properties:v,children:[]};y&&(_.children=t.all(y),t.patch(y,_),_=t.applyData(y,_)),m.push(_)}const b={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(l,b),t.applyData(l,b)}function nw(t,l){const i={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}const Jg=9,$g=32;function lw(t){const l=String(t),i=/\r?\n|\r/g;let r=i.exec(l),s=0;const c=[];for(;r;)c.push(Pg(l.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=i.exec(l);return c.push(Pg(l.slice(s),s>0,!1)),c.join("")}function Pg(t,l,i){let r=0,s=t.length;if(l){let c=t.codePointAt(r);for(;c===Jg||c===$g;)r++,c=t.codePointAt(r)}if(i){let c=t.codePointAt(s-1);for(;c===Jg||c===$g;)s--,c=t.codePointAt(s-1)}return s>r?t.slice(r,s):""}function aw(t,l){const i={type:"text",value:lw(String(l.value))};return t.patch(l,i),t.applyData(l,i)}function iw(t,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,i),t.applyData(l,i)}const rw={blockquote:RS,break:LS,code:BS,delete:US,emphasis:HS,footnoteReference:qS,heading:VS,html:YS,imageReference:IS,image:ZS,inlineCode:FS,linkReference:QS,link:GS,listItem:XS,list:JS,paragraph:$S,root:PS,strong:WS,table:ew,tableCell:nw,tableRow:tw,text:aw,thematicBreak:iw,toml:Yu,yaml:Yu,definition:Yu,footnoteDefinition:Yu};function Yu(){}const gx=-1,gs=0,yr=1,rs=2,Gf=3,Xf=4,Kf=5,Jf=6,yx=7,xx=8,uw=typeof self=="object"?self:globalThis,Wg=(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 uw[t](l)},sw=(t,l)=>{const i=(s,c)=>(t.set(c,s),s),r=s=>{if(t.has(s))return t.get(s);const[c,f]=l[s];switch(c){case gs:case gx:return i(f,s);case yr:{const h=i([],s);for(const p of f)h.push(r(p));return h}case rs:{const h=i({},s);for(const[p,m]of f)h[r(p)]=r(m);return h}case Gf:return i(new Date(f),s);case Xf:{const{source:h,flags:p}=f;return i(new RegExp(h,p),s)}case Kf:{const h=i(new Map,s);for(const[p,m]of f)h.set(r(p),r(m));return h}case Jf:{const h=i(new Set,s);for(const p of f)h.add(r(p));return h}case yx:{const{name:h,message:p}=f;return i(Wg(h,p),s)}case xx: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(Wg(c,f),s)};return r},ey=t=>sw(new Map,t)(0),ua="",{toString:cw}={},{keys:ow}=Object,dr=t=>{const l=typeof t;if(l!=="object"||!t)return[gs,l];const i=cw.call(t).slice(8,-1);switch(i){case"Array":return[yr,ua];case"Object":return[rs,ua];case"Date":return[Gf,ua];case"RegExp":return[Xf,ua];case"Map":return[Kf,ua];case"Set":return[Jf,ua];case"DataView":return[yr,i]}return i.includes("Array")?[yr,i]:i.includes("Error")?[yx,i]:[rs,i]},Iu=([t,l])=>t===gs&&(l==="function"||l==="symbol"),fw=(t,l,i,r)=>{const s=(f,h)=>{const p=r.push(f)-1;return i.set(h,p),p},c=f=>{if(i.has(f))return i.get(f);let[h,p]=dr(f);switch(h){case gs:{let b=f;switch(p){case"bigint":h=xx,b=f.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);b=null;break;case"undefined":return s([gx],f)}return s([h,b],f)}case yr:{if(p){let v=f;return p==="DataView"?v=new Uint8Array(f.buffer):p==="ArrayBuffer"&&(v=new Uint8Array(f)),s([p,[...v]],f)}const b=[],y=s([h,b],f);for(const v of f)b.push(c(v));return y}case rs:{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 c(f.toJSON());const b=[],y=s([h,b],f);for(const v of ow(f))(t||!Iu(dr(f[v])))&&b.push([c(v),c(f[v])]);return y}case Gf:return s([h,isNaN(f.getTime())?ua:f.toISOString()],f);case Xf:{const{source:b,flags:y}=f;return s([h,{source:b,flags:y}],f)}case Kf:{const b=[],y=s([h,b],f);for(const[v,k]of f)(t||!(Iu(dr(v))||Iu(dr(k))))&&b.push([c(v),c(k)]);return y}case Jf:{const b=[],y=s([h,b],f);for(const v of f)(t||!Iu(dr(v)))&&b.push(c(v));return y}}const{message:m}=f;return s([h,{name:p,message:m}],f)};return c},ty=(t,{json:l,lossy:i}={})=>{const r=[];return fw(!(l||i),!!l,new Map,r)(t),r},us=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?ey(ty(t,l)):structuredClone(t):(t,l)=>ey(ty(t,l));function dw(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 hw(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function mw(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||dw,r=t.options.footnoteBackLabel||hw,s=t.options.footnoteLabel||"Footnotes",c=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 b=t.all(m),y=String(m.identifier).toUpperCase(),v=mi(y.toLowerCase());let k=0;const _=[],M=t.footnoteCounts.get(y);for(;M!==void 0&&++k<=M;){_.length>0&&_.push({type:"text",value:" "});let Z=typeof i=="string"?i:i(p,k);typeof Z=="string"&&(Z={type:"text",value:Z}),_.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+v+(k>1?"-"+k:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,k),className:["data-footnote-backref"]},children:Array.isArray(Z)?Z:[Z]})}const U=b[b.length-1];if(U&&U.type==="element"&&U.tagName==="p"){const Z=U.children[U.children.length-1];Z&&Z.type==="text"?Z.value+=" ":U.children.push({type:"text",value:" "}),U.children.push(..._)}else b.push(..._);const j={type:"element",tagName:"li",properties:{id:l+"fn-"+v},children:t.wrap(b,!0)};t.patch(m,j),h.push(j)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:c,properties:{...us(f),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
57
|
+
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(h,!0)},{type:"text",value:`
|
|
58
|
+
`}]}}const ys=(function(t){if(t==null)return xw;if(typeof t=="function")return xs(t);if(typeof t=="object")return Array.isArray(t)?pw(t):gw(t);if(typeof t=="string")return yw(t);throw new Error("Expected function, string, or object as test")});function pw(t){const l=[];let i=-1;for(;++i<t.length;)l[i]=ys(t[i]);return xs(r);function r(...s){let c=-1;for(;++c<l.length;)if(l[c].apply(this,s))return!0;return!1}}function gw(t){const l=t;return xs(i);function i(r){const s=r;let c;for(c in t)if(s[c]!==l[c])return!1;return!0}}function yw(t){return xs(l);function l(i){return i&&i.type===t}}function xs(t){return l;function l(i,r,s){return!!(bw(i)&&t.call(this,i,typeof r=="number"?r:void 0,s||void 0))}}function xw(){return!0}function bw(t){return t!==null&&typeof t=="object"&&"type"in t}const bx=[],vw=!0,wf=!1,kw="skip";function vx(t,l,i,r){let s;typeof l=="function"&&typeof i!="function"?(r=i,i=l):s=l;const c=ys(s),f=r?-1:1;h(t,void 0,[])();function h(p,m,b){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const k=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(p.type+(k?"<"+k+">":""))+")"})}return v;function v(){let k=bx,_,M,U;if((!l||c(p,m,b[b.length-1]||void 0))&&(k=Sw(i(p,b)),k[0]===wf))return k;if("children"in p&&p.children){const j=p;if(j.children&&k[0]!==kw)for(M=(r?j.children.length:-1)+f,U=b.concat(j);M>-1&&M<j.children.length;){const Z=j.children[M];if(_=h(Z,M,U)(),_[0]===wf)return _;M=typeof _[1]=="number"?_[1]:M+f}}return k}}}function Sw(t){return Array.isArray(t)?t:typeof t=="number"?[vw,t]:t==null?bx:[t]}function $f(t,l,i,r){let s,c,f;typeof l=="function"&&typeof i!="function"?(c=void 0,f=l,s=i):(c=l,f=i,s=r),vx(t,c,h,s);function h(p,m){const b=m[m.length-1],y=b?b.children.indexOf(p):void 0;return f(p,y,b)}}const _f={}.hasOwnProperty,ww={};function _w(t,l){const i=l||ww,r=new Map,s=new Map,c=new Map,f={...rw,...i.handlers},h={all:m,applyData:Cw,definitionById:r,footnoteById:s,footnoteCounts:c,footnoteOrder:[],handlers:f,one:p,options:i,patch:Ew,wrap:Tw};return $f(t,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const y=b.type==="definition"?r:s,v=String(b.identifier).toUpperCase();y.has(v)||y.set(v,b)}}),h;function p(b,y){const v=b.type,k=h.handlers[v];if(_f.call(h.handlers,v)&&k)return k(h,b,y);if(h.options.passThrough&&h.options.passThrough.includes(v)){if("children"in b){const{children:M,...U}=b,j=us(U);return j.children=h.all(b),j}return us(b)}return(h.options.unknownHandler||Aw)(h,b,y)}function m(b){const y=[];if("children"in b){const v=b.children;let k=-1;for(;++k<v.length;){const _=h.one(v[k],b);if(_){if(k&&v[k-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=ny(_.value)),!Array.isArray(_)&&_.type==="element")){const M=_.children[0];M&&M.type==="text"&&(M.value=ny(M.value))}Array.isArray(_)?y.push(..._):y.push(_)}}}return y}}function Ew(t,l){t.position&&(l.position=d2(t))}function Cw(t,l){let i=l;if(t&&t.data){const r=t.data.hName,s=t.data.hChildren,c=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"&&c&&Object.assign(i.properties,us(c)),"children"in i&&i.children&&s!==null&&s!==void 0&&(i.children=s)}return i}function Aw(t,l){const i=l.data||{},r="value"in l&&!(_f.call(i,"hProperties")||_f.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 Tw(t,l){const i=[];let r=-1;for(l&&i.push({type:"text",value:`
|
|
59
|
+
`});++r<t.length;)r&&i.push({type:"text",value:`
|
|
60
|
+
`}),i.push(t[r]);return l&&t.length>0&&i.push({type:"text",value:`
|
|
61
|
+
`}),i}function ny(t){let l=0,i=t.charCodeAt(l);for(;i===9||i===32;)l++,i=t.charCodeAt(l);return t.slice(l)}function ly(t,l){const i=_w(t,l),r=i.one(t,void 0),s=mw(i),c=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&c.children.push({type:"text",value:`
|
|
62
|
+
`},s),c}function jw(t,l){return t&&"run"in t?async function(i,r){const s=ly(i,{file:r,...l});await t.run(s,r)}:function(i,r){return ly(i,{file:r,...t||l})}}function ay(t){if(t)throw t}var Ko,iy;function Nw(){if(iy)return Ko;iy=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]"},c=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var b=t.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!b&&!y)return!1;var v;for(v in m);return typeof v>"u"||t.call(m,v)},f=function(m,b){i&&b.name==="__proto__"?i(m,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):m[b.name]=b.newValue},h=function(m,b){if(b==="__proto__")if(t.call(m,b)){if(r)return r(m,b).value}else return;return m[b]};return Ko=function p(){var m,b,y,v,k,_,M=arguments[0],U=1,j=arguments.length,Z=!1;for(typeof M=="boolean"&&(Z=M,M=arguments[1]||{},U=2),(M==null||typeof M!="object"&&typeof M!="function")&&(M={});U<j;++U)if(m=arguments[U],m!=null)for(b in m)y=h(M,b),v=h(m,b),M!==v&&(Z&&v&&(c(v)||(k=s(v)))?(k?(k=!1,_=y&&s(y)?y:[]):_=y&&c(y)?y:{},f(M,{name:b,newValue:p(Z,_,v)})):typeof v<"u"&&f(M,{name:b,newValue:v}));return M},Ko}var Dw=Nw();const Jo=_y(Dw);function Ef(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 zw(){const t=[],l={run:i,use:r};return l;function i(...s){let c=-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 b=t[++c];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,b?Ow(b,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 Ow(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 b=m;if(h&&i)throw b;return s(b)}h||(p&&p.then&&typeof p.then=="function"?p.then(c,s):p instanceof Error?s(p):c(p))}function s(f,...h){i||(i=!0,l(f,...h))}function c(f){s(null,f)}}const Ln={basename:Mw,dirname:Rw,extname:Lw,join:Bw,sep:"/"};function Mw(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');Er(t);let i=0,r=-1,s=t.length,c;if(l===void 0||l.length===0||l.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(c){i=s+1;break}}else r<0&&(c=!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(c){i=s+1;break}}else f<0&&(c=!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 Rw(t){if(Er(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 Lw(t){Er(t);let l=t.length,i=-1,r=0,s=-1,c=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:c!==1&&(c=1):s>-1&&(c=-1)}return s<0||i<0||c===0||c===1&&s===i-1&&s===r+1?"":t.slice(s,i)}function Bw(...t){let l=-1,i;for(;++l<t.length;)Er(t[l]),t[l]&&(i=i===void 0?t[l]:i+"/"+t[l]);return i===void 0?".":Uw(i)}function Uw(t){Er(t);const l=t.codePointAt(0)===47;let i=Hw(t,!l);return i.length===0&&!l&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),l?"/"+i:i}function Hw(t,l){let i="",r=0,s=-1,c=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||c===1))if(s!==f-1&&c===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,c=0;continue}}else if(i.length>0){i="",r=0,s=f,c=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,c=0}else h===46&&c>-1?c++:c=-1}return i}function Er(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const qw={cwd:Vw};function Vw(){return"/"}function Cf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Yw(t){if(typeof t=="string")t=new URL(t);else if(!Cf(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 Iw(t)}function Iw(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 $o=["history","path","basename","stem","extname","dirname"];class kx{constructor(l){let i;l?Cf(l)?i={path:l}:typeof l=="string"||Zw(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":qw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<$o.length;){const c=$o[r];c in i&&i[c]!==void 0&&i[c]!==null&&(this[c]=c==="history"?[...i[c]]:i[c])}let s;for(s in i)$o.includes(s)||(this[s]=i[s])}get basename(){return typeof this.path=="string"?Ln.basename(this.path):void 0}set basename(l){Wo(l,"basename"),Po(l,"basename"),this.path=Ln.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Ln.dirname(this.path):void 0}set dirname(l){ry(this.basename,"dirname"),this.path=Ln.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Ln.extname(this.path):void 0}set extname(l){if(Po(l,"extname"),ry(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=Ln.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Cf(l)&&(l=Yw(l)),Wo(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Ln.basename(this.path,this.extname):void 0}set stem(l){Wo(l,"stem"),Po(l,"stem"),this.path=Ln.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 Lt(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 Po(t,l){if(t&&t.includes(Ln.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Ln.sep+"`")}function Wo(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function ry(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function Zw(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Fw=(function(t){const r=this.constructor.prototype,s=r[t],c=function(){return s.apply(c,arguments)};return Object.setPrototypeOf(c,r),c}),Qw={}.hasOwnProperty;class Pf extends Fw{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=zw()}copy(){const l=new Pf;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];l.use(...r)}return l.data(Jo(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(nf("data",this.frozen),this.namespace[l]=i,this):Qw.call(this.namespace,l)&&this.namespace[l]||void 0:l?(nf("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=Zu(l),r=this.parser||this.Parser;return ef("parse",r),r(String(i),i)}process(l,i){const r=this;return this.freeze(),ef("process",this.parser||this.Parser),tf("process",this.compiler||this.Compiler),i?s(void 0,i):new Promise(s);function s(c,f){const h=Zu(l),p=r.parse(h);r.run(p,h,function(b,y,v){if(b||!y||!v)return m(b);const k=y,_=r.stringify(k,v);Kw(_)?v.value=_:v.result=_,m(b,v)});function m(b,y){b||!y?f(b):c?c(y):i(void 0,y)}}}processSync(l){let i=!1,r;return this.freeze(),ef("processSync",this.parser||this.Parser),tf("processSync",this.compiler||this.Compiler),this.process(l,s),sy("processSync","process",i),r;function s(c,f){i=!0,ay(c),r=f}}run(l,i,r){uy(l),this.freeze();const s=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?c(void 0,r):new Promise(c);function c(f,h){const p=Zu(i);s.run(l,p,m);function m(b,y,v){const k=y||l;b?h(b):f?f(k):r(void 0,k,v)}}}runSync(l,i){let r=!1,s;return this.run(l,i,c),sy("runSync","run",r),s;function c(f,h){ay(f),s=h,r=!0}}stringify(l,i){this.freeze();const r=Zu(i),s=this.compiler||this.Compiler;return tf("stringify",s),uy(l),s(l,r)}use(l,...i){const r=this.attachers,s=this.namespace;if(nf("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 c(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[b,...y]=m;p(b,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=Jo(!0,s.settings,m.settings))}function h(m){let b=-1;if(m!=null)if(Array.isArray(m))for(;++b<m.length;){const y=m[b];c(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,b){let y=-1,v=-1;for(;++y<r.length;)if(r[y][0]===m){v=y;break}if(v===-1)r.push([m,...b]);else if(b.length>0){let[k,..._]=b;const M=r[v][1];Ef(M)&&Ef(k)&&(k=Jo(!0,M,k)),r[v]=[m,k,..._]}}}}const Gw=new Pf().freeze();function ef(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function tf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function nf(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 uy(t){if(!Ef(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function sy(t,l,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function Zu(t){return Xw(t)?t:new kx(t)}function Xw(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Kw(t){return typeof t=="string"||Jw(t)}function Jw(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const $w="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",cy=[],oy={allowDangerousHtml:!0},Pw=/^(https?|ircs?|mailto|xmpp)$/i,Ww=[{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 e4(t){const l=t4(t),i=n4(t);return l4(l.runSync(l.parse(i),i),t)}function t4(t){const l=t.rehypePlugins||cy,i=t.remarkPlugins||cy,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...oy}:oy;return Gw().use(MS).use(i).use(jw,r).use(l)}function n4(t){const l=t.children||"",i=new kx;return typeof l=="string"&&(i.value=l),i}function l4(t,l){const i=l.allowedElements,r=l.allowElement,s=l.components,c=l.disallowedElements,f=l.skipHtml,h=l.unwrapDisallowed,p=l.urlTransform||a4;for(const b of Ww)Object.hasOwn(l,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+$w+b.id,void 0);return $f(t,m),y2(t,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function m(b,y,v){if(b.type==="raw"&&v&&typeof y=="number")return f?v.children.splice(y,1):v.children[y]={type:"text",value:b.value},y;if(b.type==="element"){let k;for(k in Qo)if(Object.hasOwn(Qo,k)&&Object.hasOwn(b.properties,k)){const _=b.properties[k],M=Qo[k];(M===null||M.includes(b.tagName))&&(b.properties[k]=p(String(_||""),k,b))}}if(b.type==="element"){let k=i?!i.includes(b.tagName):c?c.includes(b.tagName):!1;if(!k&&r&&typeof y=="number"&&(k=!r(b,y,v)),k&&v&&typeof y=="number")return h&&b.children?v.children.splice(y,1,...b.children):v.children.splice(y,1),y}}}function a4(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||Pw.test(t.slice(0,l))?t:""}function fy(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 i4(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function r4(t,l,i){const s=ys((i||{}).ignore||[]),c=u4(l);let f=-1;for(;++f<c.length;)vx(t,"text",h);function h(m,b){let y=-1,v;for(;++y<b.length;){const k=b[y],_=v?v.children:void 0;if(s(k,_?_.indexOf(k):void 0,v))return;v=k}if(v)return p(m,b)}function p(m,b){const y=b[b.length-1],v=c[f][0],k=c[f][1];let _=0;const U=y.children.indexOf(m);let j=!1,Z=[];v.lastIndex=0;let H=v.exec(m.value);for(;H;){const le=H.index,W={index:H.index,input:H.input,stack:[...b,m]};let O=k(...H,W);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?v.lastIndex=le+1:(_!==le&&Z.push({type:"text",value:m.value.slice(_,le)}),Array.isArray(O)?Z.push(...O):O&&Z.push(O),_=le+H[0].length,j=!0),!v.global)break;H=v.exec(m.value)}return j?(_<m.value.length&&Z.push({type:"text",value:m.value.slice(_)}),y.children.splice(U,1,...Z)):Z=[m],U+Z.length}}function u4(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([s4(s[0]),c4(s[1])])}return l}function s4(t){return typeof t=="string"?new RegExp(i4(t),"g"):t}function c4(t){return typeof t=="function"?t:function(){return t}}const lf="phrasing",af=["autolink","link","image","label"];function o4(){return{transforms:[y4],enter:{literalAutolink:d4,literalAutolinkEmail:rf,literalAutolinkHttp:rf,literalAutolinkWww:rf},exit:{literalAutolink:g4,literalAutolinkEmail:p4,literalAutolinkHttp:h4,literalAutolinkWww:m4}}}function f4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:lf,notInConstruct:af},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:lf,notInConstruct:af},{character:":",before:"[ps]",after:"\\/",inConstruct:lf,notInConstruct:af}]}}function d4(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function rf(t){this.config.enter.autolinkProtocol.call(this,t)}function h4(t){this.config.exit.autolinkProtocol.call(this,t)}function m4(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 p4(t){this.config.exit.autolinkEmail.call(this,t)}function g4(t){this.exit(t)}function y4(t){r4(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,x4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),b4]],{ignore:["link","linkReference"]})}function x4(t,l,i,r,s){let c="";if(!Sx(s)||(/^w/i.test(l)&&(i=l+i,l="",c="http://"),!v4(i)))return!1;const f=k4(i+r);if(!f[0])return!1;const h={type:"link",title:null,url:c+l+f[0],children:[{type:"text",value:l+f[0]}]};return f[1]?[h,{type:"text",value:f[1]}]:h}function b4(t,l,i,r){return!Sx(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+i,children:[{type:"text",value:l+"@"+i}]}}function v4(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 k4(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=fy(t,"(");let c=fy(t,")");for(;r!==-1&&s>c;)t+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),c++;return[t,i]}function Sx(t,l){const i=t.input.charCodeAt(t.index-1);return(t.index===0||fa(i)||ms(i))&&(!l||i!==47)}wx.peek=N4;function S4(){this.buffer()}function w4(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function _4(){this.buffer()}function E4(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function C4(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Nn(this.sliceSerialize(t)).toLowerCase(),i.label=l}function A4(t){this.exit(t)}function T4(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Nn(this.sliceSerialize(t)).toLowerCase(),i.label=l}function j4(t){this.exit(t)}function N4(){return"["}function wx(t,l,i,r){const s=i.createTracker(r);let c=s.move("[^");const f=i.enter("footnoteReference"),h=i.enter("reference");return c+=s.move(i.safe(i.associationId(t),{after:"]",before:c})),h(),f(),c+=s.move("]"),c}function D4(){return{enter:{gfmFootnoteCallString:S4,gfmFootnoteCall:w4,gfmFootnoteDefinitionLabelString:_4,gfmFootnoteDefinition:E4},exit:{gfmFootnoteCallString:C4,gfmFootnoteCall:A4,gfmFootnoteDefinitionLabelString:T4,gfmFootnoteDefinition:j4}}}function z4(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:i,footnoteReference:wx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,s,c,f){const h=c.createTracker(f);let p=h.move("[^");const m=c.enter("footnoteDefinition"),b=c.enter("label");return p+=h.move(c.safe(c.associationId(r),{before:p,after:"]"})),b(),p+=h.move("]:"),r.children&&r.children.length>0&&(h.shift(4),p+=h.move((l?`
|
|
63
|
+
`:" ")+c.indentLines(c.containerFlow(r,h.current()),l?_x:O4))),m(),p}}function O4(t,l,i){return l===0?t:_x(t,l,i)}function _x(t,l,i){return(i?"":" ")+t}const M4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ex.peek=H4;function R4(){return{canContainEols:["delete"],enter:{strikethrough:B4},exit:{strikethrough:U4}}}function L4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:M4}],handlers:{delete:Ex}}}function B4(t){this.enter({type:"delete",children:[]},t)}function U4(t){this.exit(t)}function Ex(t,l,i,r){const s=i.createTracker(r),c=i.enter("strikethrough");let f=s.move("~~");return f+=i.containerPhrasing(t,{...s.current(),before:f,after:"~"}),f+=s.move("~~"),c(),f}function H4(){return"~"}function q4(t){return t.length}function V4(t,l){const i=l||{},r=(i.align||[]).concat(),s=i.stringLength||q4,c=[],f=[],h=[],p=[];let m=0,b=-1;for(;++b<t.length;){const M=[],U=[];let j=-1;for(t[b].length>m&&(m=t[b].length);++j<t[b].length;){const Z=Y4(t[b][j]);if(i.alignDelimiters!==!1){const H=s(Z);U[j]=H,(p[j]===void 0||H>p[j])&&(p[j]=H)}M.push(Z)}f[b]=M,h[b]=U}let y=-1;if(typeof r=="object"&&"length"in r)for(;++y<m;)c[y]=dy(r[y]);else{const M=dy(r);for(;++y<m;)c[y]=M}y=-1;const v=[],k=[];for(;++y<m;){const M=c[y];let U="",j="";M===99?(U=":",j=":"):M===108?U=":":M===114&&(j=":");let Z=i.alignDelimiters===!1?1:Math.max(1,p[y]-U.length-j.length);const H=U+"-".repeat(Z)+j;i.alignDelimiters!==!1&&(Z=U.length+Z+j.length,Z>p[y]&&(p[y]=Z),k[y]=Z),v[y]=H}f.splice(1,0,v),h.splice(1,0,k),b=-1;const _=[];for(;++b<f.length;){const M=f[b],U=h[b];y=-1;const j=[];for(;++y<m;){const Z=M[y]||"";let H="",le="";if(i.alignDelimiters!==!1){const W=p[y]-(U[y]||0),O=c[y];O===114?H=" ".repeat(W):O===99?W%2?(H=" ".repeat(W/2+.5),le=" ".repeat(W/2-.5)):(H=" ".repeat(W/2),le=H):le=" ".repeat(W)}i.delimiterStart!==!1&&!y&&j.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&Z==="")&&(i.delimiterStart!==!1||y)&&j.push(" "),i.alignDelimiters!==!1&&j.push(H),j.push(Z),i.alignDelimiters!==!1&&j.push(le),i.padding!==!1&&j.push(" "),(i.delimiterEnd!==!1||y!==m-1)&&j.push("|")}_.push(i.delimiterEnd===!1?j.join("").replace(/ +$/,""):j.join(""))}return _.join(`
|
|
64
|
+
`)}function Y4(t){return t==null?"":String(t)}function dy(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 I4(t,l,i,r){const s=i.enter("blockquote"),c=i.createTracker(r);c.move("> "),c.shift(2);const f=i.indentLines(i.containerFlow(t,c.current()),Z4);return s(),f}function Z4(t,l,i){return">"+(i?"":" ")+t}function F4(t,l){return hy(t,l.inConstruct,!0)&&!hy(t,l.notInConstruct,!1)}function hy(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 my(t,l,i,r){let s=-1;for(;++s<i.unsafe.length;)if(i.unsafe[s].character===`
|
|
65
|
+
`&&F4(i.stack,i.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
66
|
+
`}function Q4(t,l){const i=String(t);let r=i.indexOf(l),s=r,c=0,f=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++c>f&&(f=c):c=1,s=r+l.length,r=i.indexOf(l,s);return f}function G4(t,l){return!!(l.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function X4(t){const l=t.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function K4(t,l,i,r){const s=X4(i),c=t.value||"",f=s==="`"?"GraveAccent":"Tilde";if(G4(t,i)){const y=i.enter("codeIndented"),v=i.indentLines(c,J4);return y(),v}const h=i.createTracker(r),p=s.repeat(Math.max(Q4(c,s)+1,3)),m=i.enter("codeFenced");let b=h.move(p);if(t.lang){const y=i.enter(`codeFencedLang${f}`);b+=h.move(i.safe(t.lang,{before:b,after:" ",encode:["`"],...h.current()})),y()}if(t.lang&&t.meta){const y=i.enter(`codeFencedMeta${f}`);b+=h.move(" "),b+=h.move(i.safe(t.meta,{before:b,after:`
|
|
67
|
+
`,encode:["`"],...h.current()})),y()}return b+=h.move(`
|
|
68
|
+
`),c&&(b+=h.move(c+`
|
|
69
|
+
`)),b+=h.move(p),m(),b}function J4(t,l,i){return(i?"":" ")+t}function Wf(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 $4(t,l,i,r){const s=Wf(i),c=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${c}`),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 kr(t){return"&#x"+t.toString(16).toUpperCase()+";"}function ss(t,l,i){const r=fi(t),s=fi(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}}Cx.peek=W4;function Cx(t,l,i,r){const s=P4(i),c=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),b=ss(r.before.charCodeAt(r.before.length-1),m,s);b.inside&&(p=kr(m)+p.slice(1));const y=p.charCodeAt(p.length-1),v=ss(r.after.charCodeAt(0),y,s);v.inside&&(p=p.slice(0,-1)+kr(y));const k=f.move(s);return c(),i.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},h+p+k}function W4(t,l,i){return i.options.emphasis||"*"}function e_(t,l){let i=!1;return $f(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,wf}),!!((!t.depth||t.depth<3)&&Zf(t)&&(l.options.setext||i))}function t_(t,l,i,r){const s=Math.max(Math.min(6,t.depth||1),1),c=i.createTracker(r);if(e_(t,i)){const b=i.enter("headingSetext"),y=i.enter("phrasing"),v=i.containerPhrasing(t,{...c.current(),before:`
|
|
71
|
+
`,after:`
|
|
72
|
+
`});return y(),b(),v+`
|
|
73
|
+
`+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
74
|
+
`))+1))}const f="#".repeat(s),h=i.enter("headingAtx"),p=i.enter("phrasing");c.move(f+" ");let m=i.containerPhrasing(t,{before:"# ",after:`
|
|
75
|
+
`,...c.current()});return/^[\t ]/.test(m)&&(m=kr(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,i.options.closeAtx&&(m+=" "+f),p(),h(),m}Ax.peek=n_;function Ax(t){return t.value||""}function n_(){return"<"}Tx.peek=l_;function Tx(t,l,i,r){const s=Wf(i),c=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${c}`),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 l_(){return"!"}jx.peek=a_;function jx(t,l,i,r){const s=t.referenceType,c=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 b=i.stack;i.stack=[],f=i.enter("reference");const y=i.safe(i.associationId(t),{before:p,after:"]",...h.current()});return f(),i.stack=b,c(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function a_(){return"!"}Nx.peek=i_;function Nx(t,l,i){let r=t.value||"",s="`",c=-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+" ");++c<i.unsafe.length;){const f=i.unsafe[c],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 i_(){return"`"}function Dx(t,l){const i=Zf(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))}zx.peek=r_;function zx(t,l,i,r){const s=Wf(i),c=s==='"'?"Quote":"Apostrophe",f=i.createTracker(r);let h,p;if(Dx(t,i)){const b=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=b,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${c}`),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 r_(t,l,i){return Dx(t,i)?"<":"["}Ox.peek=u_;function Ox(t,l,i,r){const s=t.referenceType,c=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 b=i.stack;i.stack=[],f=i.enter("reference");const y=i.safe(i.associationId(t),{before:p,after:"]",...h.current()});return f(),i.stack=b,c(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function u_(){return"["}function ed(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 s_(t){const l=ed(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 c_(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 Mx(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 o_(t,l,i,r){const s=i.enter("list"),c=i.bulletCurrent;let f=t.ordered?c_(i):ed(i);const h=t.ordered?f==="."?")":".":s_(i);let p=l&&i.bulletLastUsed?f===i.bulletLastUsed:!1;if(!t.ordered){const b=t.children?t.children[0]:void 0;if((f==="*"||f==="-")&&b&&(!b.children||!b.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),Mx(i)===f&&b){let y=-1;for(;++y<t.children.length;){const v=t.children[y];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.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=c,s(),m}function f_(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 d_(t,l,i,r){const s=f_(i);let c=i.bulletCurrent||ed(i);l&&l.type==="list"&&l.ordered&&(c=(typeof l.start=="number"&&l.start>-1?l.start:1)+(i.options.incrementListMarker===!1?0:l.children.indexOf(t))+c);let f=c.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(c+" ".repeat(f-c.length)),h.shift(f);const p=i.enter("listItem"),m=i.indentLines(i.containerFlow(t,h.current()),b);return p(),m;function b(y,v,k){return v?(k?"":" ".repeat(f))+y:(k?c:c+" ".repeat(f-c.length))+y}}function h_(t,l,i,r){const s=i.enter("paragraph"),c=i.enter("phrasing"),f=i.containerPhrasing(t,r);return c(),s(),f}const m_=ys(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function p_(t,l,i,r){return(t.children.some(function(f){return m_(f)})?i.containerPhrasing:i.containerFlow).call(i,t,r)}function g_(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}Rx.peek=y_;function Rx(t,l,i,r){const s=g_(i),c=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),b=ss(r.before.charCodeAt(r.before.length-1),m,s);b.inside&&(p=kr(m)+p.slice(1));const y=p.charCodeAt(p.length-1),v=ss(r.after.charCodeAt(0),y,s);v.inside&&(p=p.slice(0,-1)+kr(y));const k=f.move(s+s);return c(),i.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},h+p+k}function y_(t,l,i){return i.options.strong||"*"}function x_(t,l,i,r){return i.safe(t.value,r)}function b_(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 v_(t,l,i){const r=(Mx(i)+(i.options.ruleSpaces?" ":"")).repeat(b_(i));return i.options.ruleSpaces?r.slice(0,-1):r}const Lx={blockquote:I4,break:my,code:K4,definition:$4,emphasis:Cx,hardBreak:my,heading:t_,html:Ax,image:Tx,imageReference:jx,inlineCode:Nx,link:zx,linkReference:Ox,list:o_,listItem:d_,paragraph:h_,root:p_,strong:Rx,text:x_,thematicBreak:v_};function k_(){return{enter:{table:S_,tableData:py,tableHeader:py,tableRow:__},exit:{codeText:E_,table:w_,tableData:uf,tableHeader:uf,tableRow:uf}}}function S_(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 w_(t){this.exit(t),this.data.inTable=void 0}function __(t){this.enter({type:"tableRow",children:[]},t)}function uf(t){this.exit(t)}function py(t){this.enter({type:"tableCell",children:[]},t)}function E_(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,C_));const i=this.stack[this.stack.length-1];i.type,i.value=l,this.exit(t)}function C_(t,l){return l==="|"?l:t}function A_(t){const l=t||{},i=l.tableCellPadding,r=l.tablePipeAlign,s=l.stringLength,c=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
76
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:f,tableCell:p,tableRow:h}};function f(k,_,M,U){return m(b(k,M,U),k.align)}function h(k,_,M,U){const j=y(k,M,U),Z=m([j]);return Z.slice(0,Z.indexOf(`
|
|
77
|
+
`))}function p(k,_,M,U){const j=M.enter("tableCell"),Z=M.enter("phrasing"),H=M.containerPhrasing(k,{...U,before:c,after:c});return Z(),j(),H}function m(k,_){return V4(k,{align:_,alignDelimiters:r,padding:i,stringLength:s})}function b(k,_,M){const U=k.children;let j=-1;const Z=[],H=_.enter("table");for(;++j<U.length;)Z[j]=y(U[j],_,M);return H(),Z}function y(k,_,M){const U=k.children;let j=-1;const Z=[],H=_.enter("tableRow");for(;++j<U.length;)Z[j]=p(U[j],k,_,M);return H(),Z}function v(k,_,M){let U=Lx.inlineCode(k,_,M);return M.stack.includes("tableCell")&&(U=U.replace(/\|/g,"\\$&")),U}}function T_(){return{exit:{taskListCheckValueChecked:gy,taskListCheckValueUnchecked:gy,paragraph:N_}}}function j_(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:D_}}}function gy(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function N_(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 c=-1,f;for(;++c<s.length;){const h=s[c];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 D_(t,l,i,r){const s=t.children[0],c=typeof t.checked=="boolean"&&s&&s.type==="paragraph",f="["+(t.checked?"x":" ")+"] ",h=i.createTracker(r);c&&h.move(f);let p=Lx.listItem(t,l,i,{...r,...h.current()});return c&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(b){return b+f}}function z_(){return[o4(),D4(),R4(),k_(),T_()]}function O_(t){return{extensions:[f4(),z4(t),L4(),A_(t),j_()]}}const M_={tokenize:q_,partial:!0},Bx={tokenize:V_,partial:!0},Ux={tokenize:Y_,partial:!0},Hx={tokenize:I_,partial:!0},R_={tokenize:Z_,partial:!0},qx={name:"wwwAutolink",tokenize:U_,previous:Yx},Vx={name:"protocolAutolink",tokenize:H_,previous:Ix},cl={name:"emailAutolink",tokenize:B_,previous:Zx},qn={};function L_(){return{text:qn}}let ra=48;for(;ra<123;)qn[ra]=cl,ra++,ra===58?ra=65:ra===91&&(ra=97);qn[43]=cl;qn[45]=cl;qn[46]=cl;qn[95]=cl;qn[72]=[cl,Vx];qn[104]=[cl,Vx];qn[87]=[cl,qx];qn[119]=[cl,qx];function B_(t,l,i){const r=this;let s,c;return f;function f(y){return!Af(y)||!Zx.call(r,r.previous)||td(r.events)?i(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(y))}function h(y){return Af(y)?(t.consume(y),h):y===64?(t.consume(y),p):i(y)}function p(y){return y===46?t.check(R_,b,m)(y):y===45||y===95||Ot(y)?(c=!0,t.consume(y),p):b(y)}function m(y){return t.consume(y),s=!0,p}function b(y){return c&&s&&qt(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(y)):i(y)}}function U_(t,l,i){const r=this;return s;function s(f){return f!==87&&f!==119||!Yx.call(r,r.previous)||td(r.events)?i(f):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(M_,t.attempt(Bx,t.attempt(Ux,c),i),i)(f))}function c(f){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(f)}}function H_(t,l,i){const r=this;let s="",c=!1;return f;function f(y){return(y===72||y===104)&&Ix.call(r,r.previous)&&!td(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),t.consume(y),h):i(y)}function h(y){if(qt(y)&&s.length<5)return s+=String.fromCodePoint(y),t.consume(y),h;if(y===58){const v=s.toLowerCase();if(v==="http"||v==="https")return t.consume(y),p}return i(y)}function p(y){return y===47?(t.consume(y),c?m:(c=!0,p)):i(y)}function m(y){return y===null||is(y)||at(y)||fa(y)||ms(y)?i(y):t.attempt(Bx,t.attempt(Ux,b),i)(y)}function b(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(y)}}function q_(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),c):i(f)}function c(f){return f===null?i(f):l(f)}}function V_(t,l,i){let r,s,c;return f;function f(m){return m===46||m===95?t.check(Hx,p,h)(m):m===null||at(m)||fa(m)||m!==45&&ms(m)?p(m):(c=!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||!c?i(m):l(m)}}function Y_(t,l){let i=0,r=0;return s;function s(f){return f===40?(i++,t.consume(f),s):f===41&&r<i?c(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(Hx,l,c)(f):f===null||at(f)||fa(f)?l(f):(t.consume(f),s)}function c(f){return f===41&&r++,t.consume(f),s}}function I_(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),c):h===93?(t.consume(h),s):h===60||h===null||at(h)||fa(h)?l(h):i(h)}function s(h){return h===null||h===40||h===91||at(h)||fa(h)?l(h):r(h)}function c(h){return qt(h)?f(h):i(h)}function f(h){return h===59?(t.consume(h),r):qt(h)?(t.consume(h),f):i(h)}}function Z_(t,l,i){return r;function r(c){return t.consume(c),s}function s(c){return Ot(c)?i(c):l(c)}}function Yx(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||at(t)}function Ix(t){return!qt(t)}function Zx(t){return!(t===47||Af(t))}function Af(t){return t===43||t===45||t===46||t===95||Ot(t)}function td(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 F_={tokenize:W_,partial:!0};function Q_(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:J_,continuation:{tokenize:$_},exit:P_}},text:{91:{name:"gfmFootnoteCall",tokenize:K_},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:G_,resolveTo:X_}}}}function G_(t,l,i){const r=this;let s=r.events.length;const c=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=Nn(r.sliceSerialize({start:f.end,end:r.now()}));return m.codePointAt(0)!==94||!c.includes(m.slice(1))?i(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),l(p))}}function X_(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 c={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},c.start),end:Object.assign({},c.end)},h=[t[i+1],t[i+2],["enter",r,l],t[i+3],t[i+4],["enter",s,l],["exit",s,l],["enter",c,l],["enter",f,l],["exit",f,l],["exit",c,l],t[t.length-2],t[t.length-1],["exit",r,l]];return t.splice(i,t.length-i+1,...h),t}function K_(t,l,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c=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(c>999||y===93&&!f||y===null||y===91||at(y))return i(y);if(y===93){t.exit("chunkString");const v=t.exit("gfmFootnoteCallString");return s.includes(Nn(r.sliceSerialize(v)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):i(y)}return at(y)||(f=!0),c++,t.consume(y),y===92?b:m}function b(y){return y===91||y===92||y===93?(t.consume(y),c++,m):m(y)}}function J_(t,l,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c,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",b):i(_)}function b(_){if(f>999||_===93&&!h||_===null||_===91||at(_))return i(_);if(_===93){t.exit("chunkString");const M=t.exit("gfmFootnoteDefinitionLabelString");return c=Nn(r.sliceSerialize(M)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),v}return at(_)||(h=!0),f++,t.consume(_),_===92?y:b}function y(_){return _===91||_===92||_===93?(t.consume(_),f++,b):b(_)}function v(_){return _===58?(t.enter("definitionMarker"),t.consume(_),t.exit("definitionMarker"),s.includes(c)||s.push(c),qe(t,k,"gfmFootnoteDefinitionWhitespace")):i(_)}function k(_){return l(_)}}function $_(t,l,i){return t.check(_r,l,t.attempt(F_,l,i))}function P_(t){t.exit("gfmFootnoteDefinition")}function W_(t,l,i){const r=this;return qe(t,s,"gfmFootnoteDefinitionIndent",5);function s(c){const f=r.events[r.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?l(c):i(c)}}function eE(t){let i=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:c,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 b={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)},v=[["enter",b,h],["enter",f[m][1],h],["exit",f[m][1],h],["enter",y,h]],k=h.parser.constructs.insideSpan.null;k&&cn(v,v.length,0,ps(k,f.slice(m+1,p),h)),cn(v,v.length,0,[["exit",y,h],["enter",f[p][1],h],["exit",f[p][1],h],["exit",b,h]]),cn(f,m-1,p-m+3,v),p=m+v.length-2;break}}for(p=-1;++p<f.length;)f[p][1].type==="strikethroughSequenceTemporary"&&(f[p][1].type="data");return f}function c(f,h,p){const m=this.previous,b=this.events;let y=0;return v;function v(_){return m===126&&b[b.length-1][1].type!=="characterEscape"?p(_):(f.enter("strikethroughSequenceTemporary"),k(_))}function k(_){const M=fi(m);if(_===126)return y>1?p(_):(f.consume(_),y++,k);if(y<2&&!i)return p(_);const U=f.exit("strikethroughSequenceTemporary"),j=fi(_);return U._open=!j||j===2&&!!M,U._close=!M||M===2&&!!j,h(_)}}}class tE{constructor(){this.map=[]}add(l,i,r){nE(this,l,i,r)}consume(l){if(this.map.sort(function(c,f){return c[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 c of s)l.push(c);s=r.pop()}this.map.length=0}}function nE(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 lE(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 c=r.length-1;r[c]=r[c]==="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 aE(){return{flow:{null:{name:"table",tokenize:iE,resolveAll:rE}}}}function iE(t,l,i){const r=this;let s=0,c=0,f;return h;function h(z){let I=r.events.length-1;for(;I>-1;){const ae=r.events[I][1].type;if(ae==="lineEnding"||ae==="linePrefix")I--;else break}const $=I>-1?r.events[I][1].type:null,me=$==="tableHead"||$==="tableRow"?O:p;return me===O&&r.parser.lazy[r.now().line]?i(z):me(z)}function p(z){return t.enter("tableHead"),t.enter("tableRow"),m(z)}function m(z){return z===124||(f=!0,c+=1),b(z)}function b(z){return z===null?i(z):ve(z)?c>1?(c=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(z),t.exit("lineEnding"),k):i(z):Re(z)?qe(t,b,"whitespace")(z):(c+=1,f&&(f=!1,s+=1),z===124?(t.enter("tableCellDivider"),t.consume(z),t.exit("tableCellDivider"),f=!0,b):(t.enter("data"),y(z)))}function y(z){return z===null||z===124||at(z)?(t.exit("data"),b(z)):(t.consume(z),z===92?v:y)}function v(z){return z===92||z===124?(t.consume(z),y):y(z)}function k(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(z):(t.enter("tableDelimiterRow"),f=!1,Re(z)?qe(t,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):_(z))}function _(z){return z===45||z===58?U(z):z===124?(f=!0,t.enter("tableCellDivider"),t.consume(z),t.exit("tableCellDivider"),M):W(z)}function M(z){return Re(z)?qe(t,U,"whitespace")(z):U(z)}function U(z){return z===58?(c+=1,f=!0,t.enter("tableDelimiterMarker"),t.consume(z),t.exit("tableDelimiterMarker"),j):z===45?(c+=1,j(z)):z===null||ve(z)?le(z):W(z)}function j(z){return z===45?(t.enter("tableDelimiterFiller"),Z(z)):W(z)}function Z(z){return z===45?(t.consume(z),Z):z===58?(f=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(z),t.exit("tableDelimiterMarker"),H):(t.exit("tableDelimiterFiller"),H(z))}function H(z){return Re(z)?qe(t,le,"whitespace")(z):le(z)}function le(z){return z===124?_(z):z===null||ve(z)?!f||s!==c?W(z):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(z)):W(z)}function W(z){return i(z)}function O(z){return t.enter("tableRow"),J(z)}function J(z){return z===124?(t.enter("tableCellDivider"),t.consume(z),t.exit("tableCellDivider"),J):z===null||ve(z)?(t.exit("tableRow"),l(z)):Re(z)?qe(t,J,"whitespace")(z):(t.enter("data"),oe(z))}function oe(z){return z===null||z===124||at(z)?(t.exit("data"),J(z)):(t.consume(z),z===92?fe:oe)}function fe(z){return z===92||z===124?(t.consume(z),oe):oe(z)}}function rE(t,l){let i=-1,r=!0,s=0,c=[0,0,0,0],f=[0,0,0,0],h=!1,p=0,m,b,y;const v=new tE;for(;++i<t.length;){const k=t[i],_=k[1];k[0]==="enter"?_.type==="tableHead"?(h=!1,p!==0&&(yy(v,l,p,m,b),b=void 0,p=0),m={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},v.add(i,0,[["enter",m,l]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,y=void 0,c=[0,0,0,0],f=[0,i+1,0,0],h&&(h=!1,b={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},v.add(i,0,[["enter",b,l]])),s=_.type==="tableDelimiterRow"?2:b?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,f[2]===0&&(c[1]!==0&&(f[0]=f[1],y=Fu(v,l,c,s,void 0,y),c=[0,0,0,0]),f[2]=i)):_.type==="tableCellDivider"&&(r?r=!1:(c[1]!==0&&(f[0]=f[1],y=Fu(v,l,c,s,void 0,y)),c=f,f=[c[1],i,0,0])):_.type==="tableHead"?(h=!0,p=i):_.type==="tableRow"||_.type==="tableDelimiterRow"?(p=i,c[1]!==0?(f[0]=f[1],y=Fu(v,l,c,s,i,y)):f[1]!==0&&(y=Fu(v,l,f,s,i,y)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(f[3]=i)}for(p!==0&&yy(v,l,p,m,b),v.consume(l.events),i=-1;++i<l.events.length;){const k=l.events[i];k[0]==="enter"&&k[1].type==="table"&&(k[1]._align=lE(l.events,i))}return t}function Fu(t,l,i,r,s,c){const f=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",h="tableContent";i[0]!==0&&(c.end=Object.assign({},ni(l.events,i[0])),t.add(i[0],0,[["exit",c,l]]));const p=ni(l.events,i[1]);if(c={type:f,start:Object.assign({},p),end:Object.assign({},p)},t.add(i[1],0,[["enter",c,l]]),i[2]!==0){const m=ni(l.events,i[2]),b=ni(l.events,i[3]),y={type:h,start:Object.assign({},m),end:Object.assign({},b)};if(t.add(i[2],0,[["enter",y,l]]),r!==2){const v=l.events[i[2]],k=l.events[i[3]];if(v[1].end=Object.assign({},k[1].end),v[1].type="chunkText",v[1].contentType="text",i[3]>i[2]+1){const _=i[2]+1,M=i[3]-i[2]-1;t.add(_,M,[])}}t.add(i[3]+1,0,[["exit",y,l]])}return s!==void 0&&(c.end=Object.assign({},ni(l.events,s)),t.add(s,0,[["exit",c,l]]),c=void 0),c}function yy(t,l,i,r,s){const c=[],f=ni(l.events,i);s&&(s.end=Object.assign({},f),c.push(["exit",s,l])),r.end=Object.assign({},f),c.push(["exit",r,l]),t.add(i+1,0,c)}function ni(t,l){const i=t[l],r=i[0]==="enter"?"start":"end";return i[1][r]}const uE={name:"tasklistCheck",tokenize:cE};function sE(){return{text:{91:uE}}}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"),c)}function c(p){return at(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 ve(p)?l(p):Re(p)?t.check({tokenize:oE},l,i)(p):i(p)}}function oE(t,l,i){return qe(t,r,"whitespace");function r(s){return s===null?i(s):l(s)}}function fE(t){return tx([L_(),Q_(),eE(t),aE(),sE()])}const dE={};function hE(t){const l=this,i=t||dE,r=l.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),c=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),f=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(fE(i)),c.push(z_()),f.push(O_(i))}function bs({source:t,className:l=""}){return t.trim()?g.jsx("div",{className:`markdown-body ${l}`.trim(),children:g.jsx(e4,{remarkPlugins:[hE],children:t})}):g.jsx("p",{className:"text-sm text-white/40 italic",children:"Empty"})}function Fx({execResult:t}){if(!t.resultText)return null;const l=My(t),i=l.detected;return g.jsxs("section",{className:"space-y-2",children:[i&&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"}),l.summary&&g.jsx("p",{className:"text-sm text-red-200/85 mt-1 leading-snug",children:l.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 ${i?"text-red-300":""}`,children:i?"Blocker details":"Result"}),g.jsx("div",{className:`markdown-body-panel markdown-body-panel--compact ${i?"border-red-400/30 bg-red-950/20":""}`,children:g.jsx(bs,{source:t.resultText})})]})}function mE(t){return t?My(t).detected:!1}function pE(t){const l=Sn(t,"playbook_patch");if(!l)return null;try{return Hl(l)}catch{return null}}function gE(t){const l=Sn(t,"reflect_status");if(!l)return null;try{return Hl(l)}catch{return null}}function Qx({run:t,artifacts:l,busy:i,act:r}){if(!t.playbookId)return null;const s=pE(l),c=gE(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((c==null?void 0:c.status)==="pending"&&!s)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(!s)return(c==null?void 0:c.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:c.error??"Reflect step failed"})]}):(c==null?void 0:c.status)==="completed"&&c.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:c.error})]}):null;const h=s.status==="proposed",p=s.status==="applied",m=s.status==="dismissed";return g.jsxs("section",{className:"space-y-3",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),s.playbookTitle&&g.jsxs("p",{className:"text-sm text-white/45",children:[s.playbookTitle," ",g.jsxs("span",{className:"text-white/30",children:["(",s.playbookId,")"]})]}),g.jsx("p",{className:"text-sm text-white/55",children:s.rationale}),g.jsxs("div",{className:"grid gap-3 sm:grid-cols-2",children:[g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-xs text-white/40 uppercase tracking-wide",children:"Current"}),g.jsx("textarea",{className:"field-mono min-h-[120px] resize-y text-sm",value:s.previousBody,readOnly:!0})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("div",{className:"text-xs text-white/40 uppercase tracking-wide",children:"Proposed"}),g.jsx("textarea",{className:"field-mono min-h-[120px] resize-y text-sm",value:s.proposedBody,readOnly:!0})]})]}),h&&g.jsxs("div",{className:"flex gap-2 flex-wrap",children:[g.jsx("button",{type:"button",disabled:i,onClick:()=>r(()=>Vb(t.id)),className:"btn-gold px-4 py-2 disabled:opacity-40",children:"Apply to playbook"}),g.jsx("button",{type:"button",disabled:i,onClick:()=>r(()=>Yb(t.id)),className:"btn-ghost px-4 py-2 disabled:opacity-40",children:"Dismiss"})]}),p&&g.jsxs("p",{className:"text-sm text-[#92E4DD]/80",children:["Applied to playbook",s.appliedAt?` · ${new Date(s.appliedAt).toLocaleString()}`:""]}),m&&g.jsx("p",{className:"text-sm text-white/40",children:"Dismissed — playbook unchanged"})]})}function yE({run:t}){const[l,i]=Y.useState([]),[r,s]=Y.useState(null),[c,f]=Y.useState(null),[h,p]=Y.useState(!1),m=Y.useCallback(async()=>{const M=await ai(t.id);i(M.artifacts),s(M.usageSummary??null),f(M.traceSummary??null)},[t.id]),b=async M=>{p(!0);try{await M(),await m()}catch(U){alert(String(U))}finally{p(!1)}},y=Cy(l,"execution_result","execute"),v=Sn(l,"document"),k=v?Hl(v):null,_=l.find(M=>M.kind==="approved_plan");return Y.useEffect(()=>{m().catch(console.error)},[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:fs(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--short",children:g.jsx(bs,{source:Ku(_)})})]}),k&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Document"}),g.jsx("textarea",{className:"field-mono min-h-[160px] resize-y",value:k.markdown,readOnly:!0})]}),y&&g.jsx(Fx,{execResult:y}),g.jsx(Qx,{run:t,artifacts:l,busy:h,act:b}),r&&g.jsx(hs,{summary:r}),c&&g.jsx(ds,{trace:c})]})}function di(){return{maxTurns:"",maxBudgetUsd:""}}function Gx(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 mr(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 xE(t,l){const i=Sr(t,l);return!!(i.maxTurns||i.maxBudgetUsd)}function li(t,l,i){if(!(!t.maxTurns.trim()&&!t.maxBudgetUsd.trim()&&!xE(l,i)))return mr(t)}function Sr(t,l){const i=_v(t);return Gx(i[l])}function xy(t){return Gx(wv(t))}function bE({run:t,agents:l,onRefresh:i}){const[r,s]=Y.useState([]),[c,f]=Y.useState(null),[h,p]=Y.useState(null),[m,b]=Y.useState(""),[y,v]=Y.useState(""),[k,_]=Y.useState(di()),[M,U]=Y.useState(!1),j=l.find(J=>J.id===t.agentId),Z=t.runtime??(j==null?void 0:j.runtime)??"claude_code",H=Y.useCallback(async()=>{const J=await ai(t.id);s(J.artifacts),f(J.usageSummary??null),p(J.traceSummary??null)},[t.id]),le=t.status==="running",W=t.status==="plan_approved";Y.useEffect(()=>{H().catch(console.error)},[H]),Y.useEffect(()=>{v(t.executeModel??""),_(Sr(t.budgetJson,"execute"))},[t.id,t.executeModel,t.budgetJson]),Y.useEffect(()=>{if(!le&&!W)return;const J=setInterval(()=>H().catch(console.error),3e3);return()=>clearInterval(J)},[le,W,H]),Y.useEffect(()=>{le&&Xb(t.id,"stream_trace").then(b).catch(()=>b(""))},[le,t.id,r.length]);const O=async J=>{U(!0);try{await J(),await H(),i()}catch(oe){alert(String(oe))}finally{U(!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:fs(t)}),W&&g.jsx("p",{className:"text-sm text-[#92E4DD]",children:"Approved — waiting for execution slot…"}),le&&g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:"Executing…"})]}),(()=>{const J=Sn(r,"approved_plan"),oe=(J==null?void 0:J.author)==="system"?Hl(J):null;return oe?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:oe.rationale??"Self-triage marked this plan trivial."})]}):null})(),W&&g.jsxs(g.Fragment,{children:[g.jsx(oi,{phase:"Execution",runtime:Z,model:y,onModelChange:v,budget:k,onBudgetChange:_,defaultModelId:j==null?void 0:j.defaultExecuteModel,disabled:M}),g.jsx("button",{type:"button",disabled:M,onClick:()=>O(()=>Bb(t.id,y||null,li(k,t.budgetJson,"execute"))),className:"btn-ghost px-3 py-2 w-full",children:"Run now (skip queue wait)"})]}),h&&g.jsx(ds,{trace:h}),c&&g.jsx(hs,{summary:c}),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})]}),(le||W)&&g.jsx("button",{type:"button",disabled:M,onClick:()=>O(()=>zf(t.id)),className:"btn-ghost-danger w-full py-2",children:"Cancel run"})]})}function vE({questions:t,drafts:l,onDraftsChange:i,busy:r}){const s=(c,f)=>{i({...l,[c]: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(c=>{const f=l[c.id]??{};return g.jsxs("div",{className:"space-y-1.5",children:[g.jsx("p",{className:"text-sm text-white/85",children:c.question}),g.jsx("div",{className:"flex flex-wrap gap-1.5",children:c.options.map(h=>g.jsx("button",{type:"button",disabled:r,title:h.description,onClick:()=>s(c.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(c.id,h.target.value?{freeText:h.target.value}:{})})]},c.id)})]})}function kE(t,l){return t.map(i=>({questionId:i.id,...l[i.id]}))}function SE(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 wE(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 Tf({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 Xx({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 _E(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))??"Plan draft ready"}function EE({run:t,agents:l,onRefresh:i,onApproved:r,onApprovedAndNext:s}){const[c,f]=Y.useState([]),[h,p]=Y.useState(null),[m,b]=Y.useState(null),[y,v]=Y.useState(""),[k,_]=Y.useState(""),[M,U]=Y.useState(""),[j,Z]=Y.useState(di()),[H,le]=Y.useState(di()),[W,O]=Y.useState({}),[J,oe]=Y.useState(!1),[fe,z]=Y.useState(!1),[I,$]=Y.useState(!1),[me,ae]=Y.useState(!1),[ee,N]=Y.useState(!1),[K,ue]=Y.useState(!1),se=l.find(et=>et.id===t.agentId),E=t.runtime??(se==null?void 0:se.runtime)??"claude_code",A=Y.useCallback(async()=>{const et=await ai(t.id);f(et.artifacts),p(et.usageSummary??null),b(et.traceSummary??null);const Dt=Sn(et.artifacts,"approved_plan"),on=Sn(et.artifacts,"draft_plan"),fn=Dt??on;fn&&v(Ku(fn))},[t.id]),Q=c.some(et=>et.kind==="draft_plan"),re=t.status==="plan_pending"&&!Q||ee,be=Sn(c,"plan_triage"),ye=Sn(c,"plan_answers"),je=be?Hl(be):null,Ve=t.status==="plan_pending"&&je&&!je.consumed&&je.questions.length>0&&(!ye||ye.createdAt<=be.createdAt)?je.questions:[],Qe=SE(Ve,W),Nt=wE(Ve,W);Y.useEffect(()=>{A().catch(console.error)},[A]),Y.useEffect(()=>{_(t.planModel??""),U(t.executeModel??""),Z(Sr(t.budgetJson,"plan")),le(Sr(t.budgetJson,"execute")),O({}),oe(!1),z(!1),$(!1),N(!1),ue(!1)},[t.id,t.planModel,t.executeModel,t.budgetJson]),Y.useEffect(()=>{if(!re)return;const et=setInterval(()=>{A().catch(console.error),i()},3e3);return()=>clearInterval(et)},[re,A,i]);const En=async()=>{var Dt;const et=(Dt=Sn(c,"draft_plan"))==null?void 0:Dt.createdAt;N(!0),ae(!0);try{await Lb(t.id,k||null,li(j,t.budgetJson,"plan"));const on=Date.now()+12e4;for(;Date.now()<on;){const fn=await ai(t.id);f(fn.artifacts);const ol=Sn(fn.artifacts,"draft_plan");if(ol&&ol.createdAt!==et){v(Ku(ol)),oe(!0);break}await new Promise(ha=>setTimeout(ha,2e3))}i()}catch(on){alert(String(on))}finally{N(!1),ae(!1)}},Dn=async et=>{ae(!0);try{await et(),await A(),i()}catch(Dt){alert(String(Dt))}finally{ae(!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:fs(t)}),re?g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:ee?"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:[!J&&g.jsxs("button",{type:"button",onClick:()=>oe(!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:_E(y)}),g.jsx("p",{className:"text-xs text-[#92E4DD] mt-2",children:"Show full plan →"})]}),J&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"markdown-body-panel markdown-body-panel--short",children:g.jsx(bs,{source:y})}),g.jsx("button",{type:"button",onClick:()=>oe(!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."})]}),Ve.length>0&&!re&&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(vE,{questions:Ve,drafts:W,onDraftsChange:O,busy:me})]}),Q&&!re&&g.jsxs("section",{className:"space-y-3",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),!Nt&&g.jsx(oi,{phase:"Execution",runtime:E,model:M,onModelChange:U,budget:H,onBudgetChange:le,defaultModelId:se==null?void 0:se.defaultExecuteModel,disabled:me}),Ve.length>0&&g.jsx("button",{type:"button",disabled:me||!Qe,className:"btn-gold px-5 py-2 disabled:opacity-40 w-full sm:w-auto",onClick:()=>Dn(async()=>{(await Ub(t.id,kE(Ve,W),Nt?void 0:{executeModel:M||null,executeBudget:li(H,t.budgetJson,"execute")})).outcome==="approved"?(r==null||r(),s==null||s()):N(!0)}),children:Nt?"Submit & replan":"Submit & start execution"}),Ve.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 approve as-is",g.jsx("span",{className:"h-px flex-1 bg-white/10"})]}),g.jsx("button",{type:"button",disabled:me||!y.trim(),onClick:()=>Dn(async()=>{await dg(t.id,y,!0,{planModel:k||null,executeModel:M||null,planBudget:li(j,t.budgetJson,"plan"),executeBudget:li(H,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:"Approve & next →"})]}),Q&&!re&&g.jsx(Tf,{title:"Replan",open:fe,onToggle:()=>z(et=>!et),children:g.jsxs("div",{className:"space-y-3 pl-0.5",children:[g.jsx("p",{className:"text-sm text-white/45",children:"Change plan model/budget or ask the agent to rewrite the plan."}),g.jsx(oi,{phase:"Plan",runtime:E,model:k,onModelChange:_,budget:j,onBudgetChange:Z,defaultModelId:se==null?void 0:se.defaultPlanModel,disabled:me}),K?g.jsxs(g.Fragment,{children:[g.jsx("textarea",{className:"field-mono min-h-[min(280px,35vh)] resize-y leading-relaxed w-full",value:y,onChange:et=>v(et.target.value),placeholder:"Edit plan markdown"}),g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",disabled:me||!y.trim(),onClick:()=>Dn(()=>dg(t.id,y,!1)),className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:"Save edits"}),g.jsx("button",{type:"button",disabled:me,onClick:()=>ue(!1),className:"btn-ghost text-xs px-2 py-1",children:"Cancel edit"})]})]}):g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",disabled:me,onClick:()=>ue(!0),className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:"Edit markdown"}),g.jsx("button",{type:"button",disabled:me,onClick:()=>En(),className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:"Ask agent to replan"})]})]})}),h&&g.jsx("section",{className:"border-t border-white/10 pt-3",children:g.jsx(hs,{summary:h})}),m&&g.jsx(Tf,{title:"Trace",open:I,onToggle:()=>$(et=>!et),children:g.jsx(ds,{trace:m,showHeading:!1})}),g.jsx(Xx,{busy:me,onRemoved:()=>Dn(async()=>{await zf(t.id),s==null||s()})})]})}function CE({run:t,agents:l,onRefresh:i,onRetry:r,onDoneAndNext:s}){var ue;const[c,f]=Y.useState([]),[h,p]=Y.useState(null),[m,b]=Y.useState(null),[y,v]=Y.useState(""),[k,_]=Y.useState(""),[M,U]=Y.useState(di()),[j,Z]=Y.useState(!1),[H,le]=Y.useState(!1),[W,O]=Y.useState(!1),J=l.find(se=>se.id===t.agentId),oe=t.runtime??(J==null?void 0:J.runtime)??"claude_code",fe=Y.useCallback(async()=>{const se=await ai(t.id);f(se.artifacts),p(se.usageSummary??null),b(se.traceSummary??null)},[t.id]),z=Cy(c,"execution_result","execute"),I=Sn(c,"document"),$=I?Hl(I):null,me=c.find(se=>se.kind==="approved_plan"),ae=mE(z),ee=!!y.trim();Y.useEffect(()=>{fe().catch(console.error)},[fe]);const N=c.some(se=>{if(se.kind!=="reflect_status"||!se.contentJson)return!1;try{return JSON.parse(se.contentJson).status==="pending"}catch{return!1}});Y.useEffect(()=>{if(!N)return;const se=setInterval(()=>{fe().catch(console.error)},3e3);return()=>clearInterval(se)},[N,fe]),Y.useEffect(()=>{le(!1),v(""),O(!1),_(t.executeModel??""),U(Sr(t.budgetJson,"execute"))},[t.id,t.executeModel,t.budgetJson]),Y.useEffect(()=>{var E;if(H||!ae)return;const se=(E=z==null?void 0:z.blocker)==null?void 0:E.summary;se&&(v(`Please resolve: ${se}`),le(!0))},[H,ae,(ue=z==null?void 0:z.blocker)==null?void 0:ue.summary]);const K=async se=>{Z(!0);try{await se(),await fe(),i()}catch(E){alert(String(E))}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:fs(t)}),ae&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Blocked — resolve the issue below, then retry"}),t.status==="failed"&&!ae&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Execution failed — retry with new instructions"})]}),$&&!ae&&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:$.path}),g.jsx("textarea",{className:"field-mono min-h-[160px] resize-y",value:$.markdown,readOnly:!0})]}),z&&g.jsx(Fx,{execResult:z}),me&&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--short",children:g.jsx(bs,{source:Ku(me)})})]}),g.jsx(Qx,{run:t,artifacts:c,busy:j,act:K}),g.jsxs("section",{className:"space-y-4 border-t border-white/10 pt-3",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),t.status==="review"&&!ae&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("p",{className:"text-sm text-white/45",children:"Looks good? Accept and move on."}),g.jsx("button",{type:"button",disabled:j||!!y.trim(),title:y.trim()?"Clear retry instructions below to mark done":void 0,onClick:()=>K(async()=>{await Hb(t.id),s==null||s()}),className:"btn-gold w-full py-2 disabled:opacity-40",children:"Mark done & next →"}),y.trim()&&g.jsx("p",{className:"text-xs text-white/40",children:"Clear the retry field below to accept this result."})]}),t.status==="review"&&!ae&&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:[(ae||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"}),g.jsx("textarea",{id:`retry-${t.id}`,className:"field-mono min-h-[min(140px,22vh)] resize-y leading-relaxed",placeholder:ae?"What to change after fixing the blocker":"What should the agent do differently?",value:y,onChange:se=>v(se.target.value)}),g.jsx(oi,{phase:"Execution",runtime:oe,model:k,onModelChange:_,budget:M,onBudgetChange:U,defaultModelId:J==null?void 0:J.defaultExecuteModel,disabled:j}),g.jsx("button",{type:"button",disabled:j||!ee,onClick:()=>K(async()=>{const se=li(M,t.budgetJson,"execute"),E=await qb(t.id,y,k||null,se);v(""),r==null||r(E)}),className:`w-full py-2 ${ee?"btn-retry-ready":"btn-retry"}`,children:"Retry with new instructions"})]})]}),h&&g.jsx("section",{className:"border-t border-white/10 pt-3",children:g.jsx(hs,{summary:h})}),m&&g.jsx(Tf,{title:"Trace",open:W,onToggle:()=>O(se=>!se),children:g.jsx(ds,{trace:m,showHeading:!1})}),g.jsx(Xx,{busy:j,onRemoved:()=>K(async()=>{await zf(t.id),s==null||s()})})]})}function nd({onClose:t,header:l,children:i,onKeyDown:r}){return Y.useEffect(()=>{const s=c=>{if(c.key==="Escape"){c.preventDefault(),t();return}r==null||r(c)};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 AE({run:t,agents:l,onClose:i,onRefresh:r,onApproved:s,onApprovedAndNext:c,onDoneAndNext:f,onRetry:h,queueNav:p}){const[m,b]=Y.useState(null),y=Ty(t.status),v=Mf(t);Y.useEffect(()=>{if(t.source!=="linear"){b(null);return}ai(t.id).then(_=>b(Kb(_.artifacts))).catch(()=>b(null))},[t.id,t.source]);const k=Y.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(nd,{onClose:i,onKeyDown:k,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(ot,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 hover:bg-[#5E6AD2]/25 transition-colors",children:[$u(t)," ↗"]})}):g.jsx(ot,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35",children:$u(t)}),g.jsx(ot,{className:"bg-white/5 text-white/45 border-white/10 normal-case",children:Of(t.taskCategory)}),g.jsx(ot,{className:cs(t.runtime),children:ca(t.runtime)}),v&&g.jsxs(ot,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case truncate max-w-[160px]",title:v,children:["◆ ",v]})]}),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(ot,{className:y.tone,children:y.label}),g.jsxs("span",{title:new Date(t.updatedAt).toLocaleString(),children:["Updated ",Ju(t.updatedAt)]})]})]}),g.jsxs("div",{className:"flex items-start gap-2 shrink-0",children:[p&&g.jsx(jy,{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(EE,{run:t,agents:l,onRefresh:r,onApproved:s,onApprovedAndNext:c}),(t.status==="plan_approved"||t.status==="running")&&g.jsx(bE,{run:t,agents:l,onRefresh:r}),(t.status==="review"||t.status==="failed")&&g.jsx(CE,{run:t,agents:l,onRefresh:r,onRetry:h,onDoneAndNext:f}),t.status==="done"&&g.jsx(yE,{run:t}),t.status==="cancelled"&&g.jsx("p",{className:"text-sm text-white/50",children:"This task was removed from Operations."})]})}function by(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 sf({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 TE({agents:t,agentDeckOnline:l}){const[i,r]=Y.useState(null);Y.useEffect(()=>{Zb().then(h=>r(h.mcpUrl)).catch(()=>r(null))},[l]);const s=by(t,"claude_code"),c=by(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(sf,{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:c.detail,children:[g.jsx(sf,{ok:c.ok}),g.jsx("span",{className:c.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(sf,{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 Kx="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",Jx="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 $x({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 jE({className:t="h-8 w-8"}){return g.jsx($x,{src:Kx,className:t})}function NE({className:t="h-8 w-8"}){return g.jsx($x,{src:Jx,className:t})}function DE({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 Px({runtime:t,className:l="h-3.5 w-3.5 shrink-0"}){return t==="claude_code"?g.jsx("img",{src:Kx,alt:"",className:`object-contain ${l}`,draggable:!1}):t==="cursor_local"?g.jsx("img",{src:Jx,alt:"",className:`object-contain ${l}`,draggable:!1}):null}function Wx({runtime:t,className:l="h-8 w-8 shrink-0"}){return t==="claude_code"?g.jsx(jE,{className:l}):t==="cursor_local"?g.jsx(NE,{className:l}):g.jsx(DE,{className:l})}const Qu=()=>({runtime:"claude_code",deckId:"",playbookId:"",defaultPlanModel:"",defaultExecuteModel:"",defaultPlanBudget:di(),defaultExecuteBudget:di()});function zE({agents:t,agentDeckOnline:l,onRefresh:i}){const[r,s]=Y.useState(!1),[c,f]=Y.useState(""),[h,p]=Y.useState(""),[m,b]=Y.useState(Qu()),[y,v]=Y.useState(!1),[k,_]=Y.useState(null),[M,U]=Y.useState(""),[j,Z]=Y.useState(""),[H,le]=Y.useState(Qu()),W=async I=>{if(I.preventDefault(),!(!c.trim()||!h.trim())){v(!0);try{const $={name:c.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:mr(m.defaultPlanBudget),defaultExecuteBudget:mr(m.defaultExecuteBudget)};await zb($),f(""),p(""),b(Qu()),s(!1),i()}catch($){alert(String($))}finally{v(!1)}}},O=I=>{_(I.id),U(I.name),Z(I.workspaceRoot??""),le({runtime:I.runtime,deckId:I.deckId??"",playbookId:I.playbookId??"",defaultPlanModel:I.defaultPlanModel??"",defaultExecuteModel:I.defaultExecuteModel??"",defaultPlanBudget:xy(I.defaultPlanBudgetJson),defaultExecuteBudget:xy(I.defaultExecuteBudgetJson)})},J=()=>{_(null),le(Qu())},oe=async I=>{v(!0);try{const $={name:M.trim(),workspaceRoot:j.trim()||null,runtime:H.runtime,deckId:H.deckId||null,playbookId:H.playbookId||null,defaultPlanModel:H.defaultPlanModel||null,defaultExecuteModel:H.defaultExecuteModel||null,defaultPlanBudget:mr(H.defaultPlanBudget),defaultExecuteBudget:mr(H.defaultExecuteBudget)};await Ob(I.id,$),J(),i()}catch($){alert(String($))}finally{v(!1)}},fe=async I=>{if(confirm(`Delete agent "${I.name}"?`)){v(!0);try{await Mb(I.id),i()}catch($){alert(String($))}finally{v(!1)}}},z=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",z>0&&g.jsxs("span",{className:"text-red-400 ml-2",children:["· ",z," need",z===1?"s":""," attention"]})]})]}),g.jsx(TE,{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(Wx,{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(ot,{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(ot,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:ca(I.runtime)}),I.deckName?g.jsxs(ot,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",I.deckName]}):g.jsx(ot,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),I.defaultPlanModel&&g.jsxs(ot,{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(ot,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:I.defaultExecuteModel,children:["exec: ",I.defaultExecuteModel]})]}),k===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:M,onChange:$=>U($.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:j,onChange:$=>Z($.target.value)})]}),g.jsx(Tg,{value:H,onChange:le,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2 pt-1",children:[g.jsx("button",{type:"button",disabled:y||!M.trim()||!j.trim(),onClick:()=>oe(I),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),g.jsx("button",{type:"button",onClick:J,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(($,me)=>g.jsxs("li",{children:["· ",$.message]},me))})]})]}),g.jsxs("div",{className:"flex gap-2 shrink-0",children:[k!==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:()=>fe(I),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},I.id))}),r?g.jsxs("form",{onSubmit:W,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:c,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(Tg,{value:m,onChange:b,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{type:"submit",disabled:y||!c.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 OE({run:t,selected:l,onSelect:i}){const r=Mf(t),s=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(ot,{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:$u(t)}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums md:hidden ml-auto shrink-0",title:new Date(s).toLocaleString(),children:Ju(s)})]}),g.jsxs("div",{className:"min-w-0 md:col-start-2",children:[g.jsx("p",{className:"font-semibold text-[#E8F6F4] leading-snug truncate",title:t.title,children:t.title}),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(ot,{className:`${cs(t.runtime)} normal-case truncate max-w-full`,title:t.agentName??ca(t.runtime),children:[t.runtime&&g.jsx(Px,{runtime:t.runtime,className:"h-3 w-3"}),g.jsx("span",{className:"truncate",children:t.agentName??ca(t.runtime)})]})}),g.jsx("span",{className:"hidden md:block text-xs text-white/45 uppercase tracking-wide",children:Of(t.taskCategory)}),g.jsx("span",{className:"hidden md:block text-xs text-[#92E4DD]/80 truncate",title:r??void 0,children:r?`◆ ${r}`:"—"}),g.jsx("time",{className:"hidden md:block text-xs text-white/40 tabular-nums text-right",title:new Date(s).toLocaleString(),children:Ju(s)})]})})}function ME({runs:t,selectedRunId:l,onSelectRun:i}){const[r,s]=Y.useState(""),c=Y.useMemo(()=>t.filter(h=>h.status==="done").sort((h,p)=>p.updatedAt.localeCompare(h.updatedAt)),[t]),f=Y.useMemo(()=>{const h=r.trim().toLowerCase();return h?c.filter(p=>{var m,b,y,v;return p.title.toLowerCase().includes(h)||((m=p.externalLabel)==null?void 0:m.toLowerCase().includes(h))||((b=p.externalId)==null?void 0:b.toLowerCase().includes(h))||p.source.toLowerCase().includes(h)||p.taskCategory.toLowerCase().includes(h)||((y=p.deckName)==null?void 0:y.toLowerCase().includes(h))||((v=p.agentName)==null?void 0:v.toLowerCase().includes(h))}):c},[c,r]);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:r,onChange:h=>s(h.target.value)}),g.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[f.length," of ",c.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:[f.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"})]}),f.length===0?g.jsx("p",{className:"text-sm text-white/45 py-8 text-center",children:c.length===0?"No completed runs yet":"No matches for your search"}):f.map(h=>g.jsx(OE,{run:h,selected:l===h.id,onSelect:()=>i(h)},h.id))]})})]})}function RE({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(ot,{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 vy({title:t,subtitle:l,onClose:i,children:r}){return g.jsx(nd,{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 e0({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 t0({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(c=>{var p;const f=c.id===l,h=s&&!c.healthy;return g.jsx("button",{type:"button",disabled:h,onClick:()=>i(c.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(Wx,{runtime:c.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:c.name}),!c.healthy&&g.jsx("span",{title:c.issues.map(m=>m.message).join("; "),children:g.jsx(e0,{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(ot,{className:cs(c.runtime),children:ca(c.runtime)}),c.deckName&&g.jsxs(ot,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",c.deckName]})]}),!c.healthy&&g.jsx("p",{className:"text-xs text-red-300/90 mt-2 leading-snug",children:(p=c.issues[0])==null?void 0:p.message})]})]})},c.id)})})]})}function LE({issue:t,agents:l,onPromoted:i,onManageAgents:r}){const[s,c]=Y.useState(""),[f,h]=Y.useState(""),[p,m]=Y.useState(!1);Y.useEffect(()=>{Df().then(v=>{v.defaultAgentId&&c(v.defaultAgentId)}).catch(()=>{})},[]),Y.useEffect(()=>{l.length>0&&s&&!l.some(v=>v.id===s)&&c(l[0].id),l.length>0&&!s&&c(l[0].id)},[l,s]),Y.useEffect(()=>{h("")},[t.id,s]);const b=l.find(v=>v.id===s),y=async()=>{if(s){m(!0);try{await Db(t.id,{agentId:s,planModel:f||null}),i()}catch(v){alert(String(v))}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(t0,{agents:l,selectedId:s,onSelect:c,onManage:r,requireHealthy:!0}),b&&g.jsx(Bf,{runtime:b.runtime,label:"Planning model",value:f,onChange:h,defaultModelId:b.defaultPlanModel,disabled:p}),g.jsx("button",{type:"button",disabled:p||!s||!((b==null?void 0:b.healthy)??!1),onClick:y,className:"btn-gold w-full py-2",children:p?"Starting…":"Kick plan & next →"})]})}function BE({issue:t,agents:l,onClose:i,onPromoted:r,onManageAgents:s,queueNav:c}){const f=Y.useCallback(h=>{c&&(h.key==="ArrowLeft"&&c.index>0&&(h.preventDefault(),c.onPrev()),h.key==="ArrowRight"&&c.index<c.total-1&&(h.preventDefault(),c.onNext()))},[c]);return g.jsx(nd,{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:[c&&g.jsx(jy,{index:c.index,total:c.total,onPrev:c.onPrev,onNext:c.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(LE,{issue:t,agents:l,onPromoted:r,onManageAgents:s})})}function UE({agents:t,onSaved:l}){const[i,r]=Y.useState(!1),[s,c]=Y.useState(null),[f,h]=Y.useState(null),[p,m]=Y.useState(null),[b,y]=Y.useState(null),[v,k]=Y.useState("Todo"),[_,M]=Y.useState(""),[U,j]=Y.useState(!0),[Z,H]=Y.useState(""),[le,W]=Y.useState(!0),[O,J]=Y.useState(!1),[oe,fe]=Y.useState(null),z=s==null?void 0:s.envOverrides,I=!!(z!=null&&z.stateFilter||z!=null&&z.teamId),$=async()=>{var N;try{const[K,ue]=await Promise.all([Xu(),Df()]);h(K.connected),m(((N=K.viewer)==null?void 0:N.name)??null),y(K.error??null),c(ue),k(ue.persisted.stateFilter.join(", ")),M(ue.persisted.teamId??""),j(ue.persisted.assigneeMe),H(ue.persisted.defaultAgentId??""),W(ue.persisted.syncEnabled)}catch(K){y(String(K))}};Y.useEffect(()=>{i&&$()},[i]);const me=async()=>{var N;J(!0),fe(null);try{const K=await Xu();h(K.connected),m(((N=K.viewer)==null?void 0:N.name)??null),y(K.error??null),fe(K.connected?"Connected":"Not connected")}catch(K){y(String(K))}finally{J(!1)}},ae=async()=>{J(!0),fe(null);try{const N=v.split(",").map(ue=>ue.trim()).filter(Boolean),K=await Nb({stateFilter:N.length>0?N:["Todo"],teamId:_.trim()||null,assigneeMe:U,defaultAgentId:Z||null,syncEnabled:le});c(K),fe(I?"Saved locally — env still overrides filters (see note below)":"Saved"),l==null||l()}catch(N){fe(String(N))}finally{J(!1)}},ee=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(N=>!N),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:[ee,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:[b&&f===!1&&g.jsx("p",{className:"text-red-400/90 text-xs",children:b}),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:v,onChange:N=>k(N.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:N=>M(N.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:U,onChange:N=>j(N.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:le,onChange:N=>W(N.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:N=>H(N.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(N=>g.jsxs("option",{value:N.id,children:[N.name,N.healthy?"":" (needs setup)"]},N.id))]})]}),g.jsxs("div",{className:"flex gap-2 pt-1",children:[g.jsx("button",{type:"button",onClick:ae,disabled:O,className:"btn-gold px-3 py-1.5 flex-1",children:O?"Saving…":"Save"}),g.jsx("button",{type:"button",onClick:me,disabled:O,className:"btn-ghost px-3 py-1.5",children:"Test"})]}),oe&&g.jsx("p",{className:"text-xs text-white/50",children:oe})]})]})}function HE({agents:t,loading:l,candidateCount:i,onRefresh:r,onConfigSaved:s}){var h;const[c,f]=Y.useState(null);return Y.useEffect(()=>{Xu().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"}),c!=null&&c.connected?g.jsxs("span",{className:"text-xs text-emerald-300/90",children:["Connected · ",(h=c.viewer)==null?void 0:h.name]}):g.jsx("span",{className:"text-xs text-amber-200/90",children:(c==null?void 0:c.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(UE,{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 qE({agents:t,onCreated:l,onManageAgents:i,embedded:r}){const[s,c]=Y.useState(""),[f,h]=Y.useState(""),[p,m]=Y.useState("other"),[b,y]=Y.useState(""),[v,k]=Y.useState(Ev),[_,M]=Y.useState(""),[U,j]=Y.useState(!1);Y.useEffect(()=>{t.length>0&&!t.some(W=>W.id===v)&&k(t[0].id)},[t,v]),Y.useEffect(()=>{const W=t.find(O=>O.id===v);if(!W){M("");return}M(W.defaultPlanModel??(W.runtime==="cursor_local"?as:""))},[v,t]);const Z=t.find(W=>W.id===v),H=!!v&&!!s.trim()&&(!!b.trim()||((Z==null?void 0:Z.healthy)??!1)),le=async W=>{if(W.preventDefault(),!(!s.trim()||!v)){j(!0);try{await Rb({title:s.trim(),description:f.trim()||void 0,taskCategory:p,repo:b.trim()||void 0,agentId:v,planModel:_||null}),c(""),h(""),l()}catch(O){alert(String(O))}finally{j(!1)}}};return g.jsxs("form",{onSubmit:le,className:r?"space-y-3":"panel space-y-3",children:[!r&&g.jsx("h2",{className:"heading-panel",children:"Manual Task"}),g.jsx(t0,{agents:t,selectedId:v,onSelect:k,onManage:i}),Z&&g.jsx(Bf,{runtime:Z.runtime,label:"Planning model",value:_,onChange:M,defaultModelId:Z.defaultPlanModel,disabled:U}),g.jsx("input",{className:"field",placeholder:"Title",value:s,onChange:W=>c(W.target.value)}),g.jsx("textarea",{className:"field-mono h-16 resize-y",placeholder:"Description",value:f,onChange:W=>h(W.target.value)}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("select",{className:"field flex-1",value:p,onChange:W=>m(W.target.value),children:["code","communication","email","research","content","other"].map(W=>g.jsx("option",{value:W,children:W},W))}),g.jsx("input",{className:"field flex-1",placeholder:"Repo override (optional)",value:b,onChange:W=>y(W.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:U||!H,className:"btn-gold w-full py-2",children:U?"Starting…":"Kick plan"})]})}const VE=["plan_pending","queued"],YE=["review","failed"];function ky(t,l,i){return VE.includes(t.status)?l.awaitingPlanReview:YE.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 ld(t,l){return t.findIndex(i=>i.id===l)}function jf(t,l){const i=ld(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 IE({agents:t,onRefresh:l,onGoOperations:i,onManageAgents:r}){const[s,c]=Y.useState([]),[f,h]=Y.useState(!1),[p,m]=Y.useState(null),[b,y]=Y.useState(null),[v,k]=Y.useState(null),[_,M]=Y.useState(null),[U,j]=Y.useState(!1),Z=Y.useCallback(()=>(h(!0),m(null),Promise.all([jb(),Df(),Xu()]).then(([$,me,ae])=>(c($),M(me),j(ae.connected),$)).catch($=>(m(String($)),c([]),[])).finally(()=>h(!1))),[]);Y.useEffect(()=>{Z()},[Z]);const H=s.find($=>$.id===b)??null,le=b?ld(s,b):-1,W=Y.useCallback($=>{const me=s[$];me&&(y(me.id),k("issue"))},[s]),O=Y.useCallback(async $=>{const me=jf(s,$);l();const ae=await Z();if(!me){k(null),y(null);return}const ee=ae.find(K=>K.id===me.id);if(ee){y(ee.id),k("issue");return}const N=jf(ae,$);N?(y(N.id),k("issue")):(k(null),y(null))},[s,l,Z]),J=()=>{l(),k(null),y(null),Z(),i()},oe=()=>{k("import"),Z()},fe=()=>{y(null),k("manual")},z=$=>{y($),k("issue")},I=()=>{k(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:oe,className:"btn-ghost px-4 py-2 text-sm",children:"Linear Import"}),g.jsx("button",{type:"button",onClick:fe,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"}),U&&_&&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:oe,className:"btn-ghost px-3 py-1.5 text-sm",children:"Linear settings"}),g.jsx("button",{type:"button",onClick:fe,className:"btn-gold px-3 py-1.5 text-sm",children:"+ Manual Task"})]})]}):s.map($=>g.jsx(RE,{candidate:$,selected:b===$.id&&v==="issue",onSelect:()=>z($.id)},$.id))})]}),v==="import"&&g.jsx(vy,{title:"Linear Import",subtitle:"Fetch issues assigned to you",onClose:I,children:g.jsx(HE,{agents:t,loading:f,candidateCount:s.length,onRefresh:Z,onConfigSaved:Z})}),v==="manual"&&g.jsx(vy,{title:"Manual Task",subtitle:"Add work that isn't in Linear yet",onClose:I,children:g.jsx(qE,{agents:t,onCreated:J,onManageAgents:r,embedded:!0})}),v==="issue"&&H&&g.jsx(BE,{issue:H,agents:t,onClose:I,onPromoted:()=>O(H.id),onManageAgents:r,queueNav:s.length>1?{index:le,total:s.length,onPrev:()=>W(le-1),onNext:()=>W(le+1)}:void 0})]})}const ZE=3;function FE(t){const l=Number.isFinite(t)?t:0;return String(Math.min(999,Math.max(0,l))).padStart(ZE,"0")}function QE({value:t,label:l}){const i=FE(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 Sy({title:t,total:l,open:i,onToggle:r,accent:s,titleAccent:c,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 ${c}`,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(QE,{value:l})})})]})})}function ad({run:t,selected:l,onSelect:i,statusOverride:r,timeField:s="updated",compact:c=!1,queueBadge:f,queueActiveLabel:h="Running",queueQueuedLabel:p="In queue",hideStatusBadge:m=!1,extraBadge:b}){const y=r??t.status,v=Ty(y),k=s==="created"?t.createdAt:t.updatedAt,_=Mf(t),M=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,U=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 ${v.accent} ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:`${c?"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(ot,{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:$u(t)}),g.jsx(ot,{className:"bg-white/5 text-white/45 border-white/10 shrink-0 normal-case",children:Of(t.taskCategory)})]}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums shrink-0",title:new Date(k).toLocaleString(),children:Ju(k)})]}),g.jsx("h3",{className:`font-semibold text-[#E8F6F4] leading-snug ${c?"text-base line-clamp-2":"text-lg line-clamp-2"}`,children:t.title}),!c&&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(ot,{className:`${cs(t.runtime)} normal-case`,title:t.runtime?ca(t.runtime):void 0,children:[t.runtime&&g.jsx(Px,{runtime:t.runtime}),t.agentName??ca(t.runtime)]}),_&&g.jsxs(ot,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case max-w-[140px] truncate",title:_,children:["◆ ",_]}),b&&g.jsx(ot,{className:`${b.className} normal-case`,children:b.label}),f?g.jsxs(ot,{className:`${M} ml-auto`,children:[U&&g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-[#92E4DD] animate-pulse mr-0.5"}),U?h:p]}):m?null:g.jsx(ot,{className:`${v.tone} ml-auto`,title:v.hint,children:v.label})]})]})})}function wy({title:t,items:l,activeBadgeLabel:i,selectedId:r,onSelect:s,onClose:c,accent:f,titleAccent:h,empty:p,autoApprovedRunIds:m=[]}){return g.jsxs("section",{className:`absolute inset-0 z-10 flex flex-col min-h-0 glass-column rounded-xl overflow-hidden border-t-2 ${f} bg-[#0A0A07]/95`,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:c,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:b,queueBadge:y})=>g.jsx(ad,{run:b,selected:r===b.id,onSelect:()=>s(b),queueBadge:y,queueActiveLabel:i,queueQueuedLabel:"In queue",hideStatusBadge:!0,extraBadge:m.includes(b.id)?{label:"Auto-approved",className:"bg-emerald-400/15 text-emerald-200 border-emerald-400/35"}:void 0},b.id))})]})}function n0({title:t,count:l,children:i,empty:r,isEmpty:s,accent:c,titleAccent:f}){return g.jsxs("section",{className:`flex flex-col min-w-0 h-full glass-column rounded-xl overflow-hidden ${c?`border-t-2 ${c}`:"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 GE({runs:t,openQuestionCounts:l,selectedId:i,onSelect:r}){const s=t.filter(c=>l[c.id]).length;return g.jsx(n0,{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(c=>{const f=l[c.id];return g.jsx(ad,{run:c,selected:i===c.id,onSelect:()=>r(c),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},c.id)})})}function XE({snapshot:t,selectedRunId:l,onSelectRun:i}){const[r,s]=Y.useState(null),c=(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)??[],b=(t==null?void 0:t.resultReviewRuns)??[],y=[...f.map(_=>({run:_,queueBadge:"active"})),...h.map(_=>({run:_,queueBadge:"queued"}))],v=[...p.map(_=>({run:_,queueBadge:"active"})),...m.map(_=>({run:_,queueBadge:"queued"}))],k=_=>{s(M=>M===_?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(Sy,{title:"In Planning",total:y.length,open:r==="planning",onToggle:()=>k("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(GE,{runs:c,openQuestionCounts:(t==null?void 0:t.openQuestionCounts)??{},selectedId:l,onSelect:i}),r==="planning"&&g.jsx(wy,{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(Sy,{title:"In Progress",total:v.length,open:r==="progress",onToggle:()=>k("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(n0,{title:"Review Result",count:b.length,accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",isEmpty:b.length===0,empty:g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:"Nothing awaiting sign-off"}),children:b.map(_=>g.jsx(ad,{run:_,selected:l===_.id,onSelect:()=>i(_),hideStatusBadge:_.status==="review"},_.id))}),r==="progress"&&g.jsx(wy,{title:"In Progress",items:v,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 KE(){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 JE({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 $E="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 PE({className:t="",size:l=36}){return g.jsx("img",{src:$E,alt:"",width:l,height:l,className:`shrink-0 object-contain ${t}`,"aria-hidden":!0,draggable:!1})}function WE(){var H,le,W;const[t,l]=Y.useState("ops"),[i,r]=Y.useState(null),[s,c]=Y.useState(null),f=Y.useCallback(()=>{fg().then(r).catch(console.error)},[]);Y.useEffect(()=>{f();const O=Gb(r),J=setInterval(f,5e3);return()=>{O(),clearInterval(J)}},[f]),Y.useEffect(()=>{if(!s||!i)return;const O=i.runs.find(J=>J.id===s.id);O&&c(O)},[i,s==null?void 0:s.id]);const h=((H=i==null?void 0:i.resultReviewRuns)==null?void 0:H.length)??0,p=((le=i==null?void 0:i.awaitingPlanReview)==null?void 0:le.length)??0,m=(i==null?void 0:i.runs.filter(O=>O.status==="done").length)??0,b=((W=i==null?void 0:i.agents)==null?void 0:W.length)??0,y=(i==null?void 0:i.agentIssueCount)??0,v=p+h,k=Y.useMemo(()=>!s||!i?[]:ky(s,i,t),[s,i,t]),_=s?ld(k,s.id):-1,M=Y.useCallback(O=>{const J=k[O];J&&c(J)},[k]),U=Y.useCallback(async O=>{if(!i)return;const J=ky(i.runs.find(z=>z.id===O)??s,i,t),oe=jf(J,O),fe=await fg();if(r(fe),!oe){c(null);return}c(fe.runs.find(z=>z.id===oe.id)??null)},[i,s,t]),j=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(KE,{}),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"),c(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(PE,{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:j("ops"),children:["Operations",v>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:j("intake"),children:"Inbox"}),g.jsxs("button",{type:"button",onClick:()=>l("done"),className:j("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:`${j("agents")} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[g.jsx(JE,{className:"w-6 h-6 shrink-0"}),b>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:`${b} configured agent${b===1?"":"s"}`,children:b}),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(e0,{className:"w-3 h-3 shrink-0"}),y]})]})]}),g.jsxs("main",{className:"flex-1 flex overflow-hidden",children:[t==="ops"&&g.jsx(XE,{snapshot:i,selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:c}),t==="intake"&&g.jsx(IE,{agents:(i==null?void 0:i.agents)??[],onRefresh:f,onGoOperations:()=>l("ops"),onManageAgents:Z}),t==="agents"&&g.jsx(zE,{agents:(i==null?void 0:i.agents)??[],agentDeckOnline:(i==null?void 0:i.agentDeckOnline)??!1,onRefresh:f}),t==="done"&&g.jsx(ME,{runs:(i==null?void 0:i.runs)??[],selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:c})]}),s&&g.jsx(AE,{run:s,agents:(i==null?void 0:i.agents)??[],onClose:()=>c(null),onRefresh:f,onApproved:f,onApprovedAndNext:()=>U(s.id),onDoneAndNext:()=>U(s.id),queueNav:k.length>1?{runs:k,index:_,onPrev:()=>M(_-1),onNext:()=>M(_+1)}:void 0,onRetry:O=>{c(O),l("ops"),f()}})]})]})}function eC(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}eC();Cb.createRoot(document.getElementById("root")).render(g.jsx(Y.StrictMode,{children:g.jsx(WE,{})}));
|