@aws/agentcore 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-inspector/index.js +36 -36
- package/dist/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +20 -24
- package/dist/assets/python/a2a/googleadk/base/pyproject.toml +1 -1
- package/dist/assets/python/agui/googleadk/base/pyproject.toml +1 -1
- package/dist/assets/python/http/googleadk/base/pyproject.toml +1 -1
- package/dist/assets/typescript/http/strands/base/main.ts +15 -20
- package/dist/assets/typescript/http/strands/base/package.json +2 -1
- package/dist/cli/index.mjs +584 -537
- package/dist/lib/errors/index.d.ts +0 -1
- package/dist/lib/errors/index.d.ts.map +1 -1
- package/dist/lib/errors/index.js +0 -1
- package/dist/lib/errors/index.js.map +1 -1
- package/dist/lib/errors/types.d.ts +146 -26
- package/dist/lib/errors/types.d.ts.map +1 -1
- package/dist/lib/errors/types.js +224 -49
- package/dist/lib/errors/types.js.map +1 -1
- package/dist/lib/errors/zod.d.ts +8 -0
- package/dist/lib/errors/zod.d.ts.map +1 -0
- package/dist/lib/errors/{config.js → zod.js} +7 -80
- package/dist/lib/errors/zod.js.map +1 -0
- package/dist/lib/packaging/container.js +5 -5
- package/dist/lib/packaging/container.js.map +1 -1
- package/dist/lib/packaging/helpers.js +11 -11
- package/dist/lib/packaging/helpers.js.map +1 -1
- package/dist/lib/packaging/index.d.ts +0 -1
- package/dist/lib/packaging/index.d.ts.map +1 -1
- package/dist/lib/packaging/index.js +4 -19
- package/dist/lib/packaging/index.js.map +1 -1
- package/dist/lib/packaging/node.js +6 -6
- package/dist/lib/packaging/node.js.map +1 -1
- package/dist/lib/packaging/python.js +12 -12
- package/dist/lib/packaging/python.js.map +1 -1
- package/dist/lib/schemas/io/config-io.js +2 -3
- package/dist/lib/schemas/io/config-io.js.map +1 -1
- package/dist/lib/utils/index.d.ts +1 -1
- package/dist/lib/utils/index.d.ts.map +1 -1
- package/dist/lib/utils/index.js +1 -3
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/lib/utils/polling.d.ts +0 -10
- package/dist/lib/utils/polling.d.ts.map +1 -1
- package/dist/lib/utils/polling.js +5 -22
- package/dist/lib/utils/polling.js.map +1 -1
- package/package.json +4 -3
- package/scripts/bump-version.ts +3 -3
- package/scripts/run-e2e-dev.sh +56 -0
- package/scripts/run-e2e-local.sh +1 -1
- package/dist/lib/errors/config.d.ts +0 -49
- package/dist/lib/errors/config.d.ts.map +0 -1
- package/dist/lib/errors/config.js.map +0 -1
- package/dist/lib/packaging/errors.d.ts +0 -16
- package/dist/lib/packaging/errors.d.ts.map +0 -1
- package/dist/lib/packaging/errors.js +0 -36
- package/dist/lib/packaging/errors.js.map +0 -1
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Rg;function U0(){if(Rg)return ze;Rg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),
|
|
17
|
+
*/var Rg;function U0(){if(Rg)return ze;Rg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),c=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function b(A){return A===null||typeof A!="object"?null:(A=x&&A[x]||A["@@iterator"],typeof A=="function"?A:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,B={};function S(A,G,T){this.props=A,this.context=G,this.refs=B,this.updater=T||N}S.prototype.isReactComponent={},S.prototype.setState=function(A,G){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,G,"setState")},S.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function M(){}M.prototype=S.prototype;function z(A,G,T){this.props=A,this.context=G,this.refs=B,this.updater=T||N}var F=z.prototype=new M;F.constructor=z,j(F,S.prototype),F.isPureReactComponent=!0;var ae=Array.isArray;function U(){}var ee={H:null,A:null,T:null,S:null},he=Object.prototype.hasOwnProperty;function ge(A,G,T){var te=T.ref;return{$$typeof:t,type:A,key:G,ref:te!==void 0?te:null,props:T}}function R(A,G){return ge(A.type,G,A.props)}function W(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function $(A){var G={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(T){return G[T]})}var de=/\/+/g;function J(A,G){return typeof A=="object"&&A!==null&&A.key!=null?$(""+A.key):G.toString(36)}function ne(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(U,U):(A.status="pending",A.then(function(G){A.status==="pending"&&(A.status="fulfilled",A.value=G)},function(G){A.status==="pending"&&(A.status="rejected",A.reason=G)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function L(A,G,T,te,fe){var Y=typeof A;(Y==="undefined"||Y==="boolean")&&(A=null);var xe=!1;if(A===null)xe=!0;else switch(Y){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(A.$$typeof){case t:case a:xe=!0;break;case _:return xe=A._init,L(xe(A._payload),G,T,te,fe)}}if(xe)return fe=fe(A),xe=te===""?"."+J(A,0):te,ae(fe)?(T="",xe!=null&&(T=xe.replace(de,"$&/")+"/"),L(fe,G,T,"",function(Ct){return Ct})):fe!=null&&(W(fe)&&(fe=R(fe,T+(fe.key==null||A&&A.key===fe.key?"":(""+fe.key).replace(de,"$&/")+"/")+xe)),G.push(fe)),1;xe=0;var Fe=te===""?".":te+":";if(ae(A))for(var Ge=0;Ge<A.length;Ge++)te=A[Ge],Y=Fe+J(te,Ge),xe+=L(te,G,T,Y,fe);else if(Ge=b(A),typeof Ge=="function")for(A=Ge.call(A),Ge=0;!(te=A.next()).done;)te=te.value,Y=Fe+J(te,Ge++),xe+=L(te,G,T,Y,fe);else if(Y==="object"){if(typeof A.then=="function")return L(ne(A),G,T,te,fe);throw G=String(A),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return xe}function K(A,G,T){if(A==null)return A;var te=[],fe=0;return L(A,te,"","",function(Y){return G.call(T,Y,fe++)}),te}function se(A){if(A._status===-1){var G=A._result;G=G(),G.then(function(T){(A._status===0||A._status===-1)&&(A._status=1,A._result=T)},function(T){(A._status===0||A._status===-1)&&(A._status=2,A._result=T)}),A._status===-1&&(A._status=0,A._result=G)}if(A._status===1)return A._result.default;throw A._result}var ke=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=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(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},E={map:K,forEach:function(A,G,T){K(A,function(){G.apply(this,arguments)},T)},count:function(A){var G=0;return K(A,function(){G++}),G},toArray:function(A){return K(A,function(G){return G})||[]},only:function(A){if(!W(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return ze.Activity=y,ze.Children=E,ze.Component=S,ze.Fragment=i,ze.Profiler=o,ze.PureComponent=z,ze.StrictMode=r,ze.Suspense=m,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ee,ze.__COMPILER_RUNTIME={__proto__:null,c:function(A){return ee.H.useMemoCache(A)}},ze.cache=function(A){return function(){return A.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(A,G,T){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var te=j({},A.props),fe=A.key;if(G!=null)for(Y in G.key!==void 0&&(fe=""+G.key),G)!he.call(G,Y)||Y==="key"||Y==="__self"||Y==="__source"||Y==="ref"&&G.ref===void 0||(te[Y]=G[Y]);var Y=arguments.length-2;if(Y===1)te.children=T;else if(1<Y){for(var xe=Array(Y),Fe=0;Fe<Y;Fe++)xe[Fe]=arguments[Fe+2];te.children=xe}return ge(A.type,fe,te)},ze.createContext=function(A){return A={$$typeof:c,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:u,_context:A},A},ze.createElement=function(A,G,T){var te,fe={},Y=null;if(G!=null)for(te in G.key!==void 0&&(Y=""+G.key),G)he.call(G,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(fe[te]=G[te]);var xe=arguments.length-2;if(xe===1)fe.children=T;else if(1<xe){for(var Fe=Array(xe),Ge=0;Ge<xe;Ge++)Fe[Ge]=arguments[Ge+2];fe.children=Fe}if(A&&A.defaultProps)for(te in xe=A.defaultProps,xe)fe[te]===void 0&&(fe[te]=xe[te]);return ge(A,Y,fe)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(A){return{$$typeof:h,render:A}},ze.isValidElement=W,ze.lazy=function(A){return{$$typeof:_,_payload:{_status:-1,_result:A},_init:se}},ze.memo=function(A,G){return{$$typeof:p,type:A,compare:G===void 0?null:G}},ze.startTransition=function(A){var G=ee.T,T={};ee.T=T;try{var te=A(),fe=ee.S;fe!==null&&fe(T,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(U,ke)}catch(Y){ke(Y)}finally{G!==null&&T.types!==null&&(G.types=T.types),ee.T=G}},ze.unstable_useCacheRefresh=function(){return ee.H.useCacheRefresh()},ze.use=function(A){return ee.H.use(A)},ze.useActionState=function(A,G,T){return ee.H.useActionState(A,G,T)},ze.useCallback=function(A,G){return ee.H.useCallback(A,G)},ze.useContext=function(A){return ee.H.useContext(A)},ze.useDebugValue=function(){},ze.useDeferredValue=function(A,G){return ee.H.useDeferredValue(A,G)},ze.useEffect=function(A,G){return ee.H.useEffect(A,G)},ze.useEffectEvent=function(A){return ee.H.useEffectEvent(A)},ze.useId=function(){return ee.H.useId()},ze.useImperativeHandle=function(A,G,T){return ee.H.useImperativeHandle(A,G,T)},ze.useInsertionEffect=function(A,G){return ee.H.useInsertionEffect(A,G)},ze.useLayoutEffect=function(A,G){return ee.H.useLayoutEffect(A,G)},ze.useMemo=function(A,G){return ee.H.useMemo(A,G)},ze.useOptimistic=function(A,G){return ee.H.useOptimistic(A,G)},ze.useReducer=function(A,G,T){return ee.H.useReducer(A,G,T)},ze.useRef=function(A){return ee.H.useRef(A)},ze.useState=function(A){return ee.H.useState(A)},ze.useSyncExternalStore=function(A,G,T){return ee.H.useSyncExternalStore(A,G,T)},ze.useTransition=function(){return ee.H.useTransition()},ze.version="19.2.4",ze}var Og;function od(){return Og||(Og=1,mf.exports=U0()),mf.exports}var D=od();const H0=Ho(D);var pf={exports:{}},Cr={},gf={exports:{}},yf={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Dg;function I0(){return Dg||(Dg=1,(function(t){function a(
|
|
25
|
+
*/var Dg;function I0(){return Dg||(Dg=1,(function(t){function a(L,K){var se=L.length;L.push(K);e:for(;0<se;){var ke=se-1>>>1,E=L[ke];if(0<o(E,K))L[ke]=K,L[se]=E,se=ke;else break e}}function i(L){return L.length===0?null:L[0]}function r(L){if(L.length===0)return null;var K=L[0],se=L.pop();if(se!==K){L[0]=se;e:for(var ke=0,E=L.length,A=E>>>1;ke<A;){var G=2*(ke+1)-1,T=L[G],te=G+1,fe=L[te];if(0>o(T,se))te<E&&0>o(fe,T)?(L[ke]=fe,L[te]=se,ke=te):(L[ke]=T,L[G]=se,ke=G);else if(te<E&&0>o(fe,se))L[ke]=fe,L[te]=se,ke=te;else break e}}return K}function o(L,K){var se=L.sortIndex-K.sortIndex;return se!==0?se:L.id-K.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;t.unstable_now=function(){return u.now()}}else{var c=Date,h=c.now();t.unstable_now=function(){return c.now()-h}}var m=[],p=[],_=1,y=null,x=3,b=!1,N=!1,j=!1,B=!1,S=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,z=typeof setImmediate<"u"?setImmediate:null;function F(L){for(var K=i(p);K!==null;){if(K.callback===null)r(p);else if(K.startTime<=L)r(p),K.sortIndex=K.expirationTime,a(m,K);else break;K=i(p)}}function ae(L){if(j=!1,F(L),!N)if(i(m)!==null)N=!0,U||(U=!0,$());else{var K=i(p);K!==null&&ne(ae,K.startTime-L)}}var U=!1,ee=-1,he=5,ge=-1;function R(){return B?!0:!(t.unstable_now()-ge<he)}function W(){if(B=!1,U){var L=t.unstable_now();ge=L;var K=!0;try{e:{N=!1,j&&(j=!1,M(ee),ee=-1),b=!0;var se=x;try{t:{for(F(L),y=i(m);y!==null&&!(y.expirationTime>L&&R());){var ke=y.callback;if(typeof ke=="function"){y.callback=null,x=y.priorityLevel;var E=ke(y.expirationTime<=L);if(L=t.unstable_now(),typeof E=="function"){y.callback=E,F(L),K=!0;break t}y===i(m)&&r(m),F(L)}else r(m);y=i(m)}if(y!==null)K=!0;else{var A=i(p);A!==null&&ne(ae,A.startTime-L),K=!1}}break e}finally{y=null,x=se,b=!1}K=void 0}}finally{K?$():U=!1}}}var $;if(typeof z=="function")$=function(){z(W)};else if(typeof MessageChannel<"u"){var de=new MessageChannel,J=de.port2;de.port1.onmessage=W,$=function(){J.postMessage(null)}}else $=function(){S(W,0)};function ne(L,K){ee=S(function(){L(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(L){L.callback=null},t.unstable_forceFrameRate=function(L){0>L||125<L?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):he=0<L?Math.floor(1e3/L):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(L){switch(x){case 1:case 2:case 3:var K=3;break;default:K=x}var se=x;x=K;try{return L()}finally{x=se}},t.unstable_requestPaint=function(){B=!0},t.unstable_runWithPriority=function(L,K){switch(L){case 1:case 2:case 3:case 4:case 5:break;default:L=3}var se=x;x=L;try{return K()}finally{x=se}},t.unstable_scheduleCallback=function(L,K,se){var ke=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?ke+se:ke):se=ke,L){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=se+E,L={id:_++,callback:K,priorityLevel:L,startTime:se,expirationTime:E,sortIndex:-1},se>ke?(L.sortIndex=se,a(p,L),i(m)===null&&L===i(p)&&(j?(M(ee),ee=-1):j=!0,ne(ae,se-ke))):(L.sortIndex=E,a(m,L),N||b||(N=!0,U||(U=!0,$()))),L},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(L){var K=x;return function(){var se=x;x=K;try{return L.apply(this,arguments)}finally{x=se}}}})(yf)),yf}var Lg;function q0(){return Lg||(Lg=1,gf.exports=I0()),gf.exports}var _f={exports:{}},Xt={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Bg;function V0(){if(Bg)return Xt;Bg=1;var t=od();function a(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var
|
|
33
|
+
*/var Bg;function V0(){if(Bg)return Xt;Bg=1;var t=od();function a(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)p+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+m+"; visit "+p+" 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(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(m,p,_){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:m,containerInfo:p,implementation:_}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return Xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Xt.createPortal=function(m,p){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return u(m,p,null,_)},Xt.flushSync=function(m){var p=c.T,_=r.p;try{if(c.T=null,r.p=2,m)return m()}finally{c.T=p,r.p=_,r.d.f()}},Xt.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(m,p))},Xt.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},Xt.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var _=p.as,y=h(_,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,b=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;_==="style"?r.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:b}):_==="script"&&r.d.X(m,{crossOrigin:y,integrity:x,fetchPriority:b,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},Xt.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var _=h(p.as,p.crossOrigin);r.d.M(m,{crossOrigin:_,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(m)},Xt.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var _=p.as,y=h(_,p.crossOrigin);r.d.L(m,_,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},Xt.preloadModule=function(m,p){if(typeof m=="string")if(p){var _=h(p.as,p.crossOrigin);r.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:_,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(m)},Xt.requestFormReset=function(m){r.d.r(m)},Xt.unstable_batchedUpdates=function(m,p){return m(p)},Xt.useFormState=function(m,p,_){return c.H.useFormState(m,p,_)},Xt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Xt.version="19.2.4",Xt}var Ug;function G0(){if(Ug)return _f.exports;Ug=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(a){console.error(a)}}return t(),_f.exports=V0(),_f.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var Hg;function Z0(){if(Hg)return Cr;Hg=1;var t=q0(),a=od(),i=G0();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function c(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 m(e){if(u(e)!==e)throw Error(r(188))}function p(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(r(188));return n!==e?null:e}for(var l=e,s=n;;){var f=l.return;if(f===null)break;var d=f.alternate;if(d===null){if(s=f.return,s!==null){l=s;continue}break}if(f.child===d.child){for(d=f.child;d;){if(d===l)return m(f),e;if(d===s)return m(f),n;d=d.sibling}throw Error(r(188))}if(l.return!==s.return)l=f,s=d;else{for(var v=!1,k=f.child;k;){if(k===l){v=!0,l=f,s=d;break}if(k===s){v=!0,s=f,l=d;break}k=k.sibling}if(!v){for(k=d.child;k;){if(k===l){v=!0,l=d,s=f;break}if(k===s){v=!0,s=d,l=f;break}k=k.sibling}if(!v)throw Error(r(189))}}if(l.alternate!==s)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:n}function
|
|
41
|
+
*/var Hg;function Z0(){if(Hg)return Cr;Hg=1;var t=q0(),a=od(),i=G0();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}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 o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function u(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function c(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 m(e){if(u(e)!==e)throw Error(r(188))}function p(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(r(188));return n!==e?null:e}for(var l=e,s=n;;){var f=l.return;if(f===null)break;var d=f.alternate;if(d===null){if(s=f.return,s!==null){l=s;continue}break}if(f.child===d.child){for(d=f.child;d;){if(d===l)return m(f),e;if(d===s)return m(f),n;d=d.sibling}throw Error(r(188))}if(l.return!==s.return)l=f,s=d;else{for(var v=!1,k=f.child;k;){if(k===l){v=!0,l=f,s=d;break}if(k===s){v=!0,s=f,l=d;break}k=k.sibling}if(!v){for(k=d.child;k;){if(k===l){v=!0,l=d,s=f;break}if(k===s){v=!0,s=d,l=f;break}k=k.sibling}if(!v)throw Error(r(189))}}if(l.alternate!==s)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:n}function _(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=_(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,x=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),z=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),ae=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),ge=Symbol.for("react.activity"),R=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=W&&e[W]||e["@@iterator"],typeof e=="function"?e:null)}var de=Symbol.for("react.client.reference");function J(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case S:return"Profiler";case B:return"StrictMode";case ae:return"Suspense";case U:return"SuspenseList";case ge:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case z:return e.displayName||"Context";case M:return(e._context.displayName||"Context")+".Consumer";case F:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return n=e.displayName||null,n!==null?n:J(e.type)||"Memo";case he:n=e._payload,e=e._init;try{return J(e(n))}catch{}}return null}var ne=Array.isArray,L=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ke=[],E=-1;function A(e){return{current:e}}function G(e){0>E||(e.current=ke[E],ke[E]=null,E--)}function T(e,n){E++,ke[E]=e.current,e.current=n}var te=A(null),fe=A(null),Y=A(null),xe=A(null);function Fe(e,n){switch(T(Y,n),T(fe,e),T(te,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?eg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=eg(n),e=tg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G(te),T(te,e)}function Ge(){G(te),G(fe),G(Y)}function Ct(e){e.memoizedState!==null&&T(xe,e);var n=te.current,l=tg(n,e.type);n!==l&&(T(fe,e),T(te,l))}function Jt(e){fe.current===e&&(G(te),G(fe)),xe.current===e&&(G(xe),Sr._currentValue=se)}var Gn,oa;function ce(e){if(Gn===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);Gn=n&&n[1]||"",oa=-1<l.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
43
|
`+Gn+e+oa}var gt=!1;function xt(e,n){if(!e||gt)return"";gt=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={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 q=V}Reflect.construct(e,[],P)}else{try{P.call()}catch(V){q=V}e.call(P.prototype)}}else{try{throw Error()}catch(V){q=V}(P=e())&&typeof P.catch=="function"&&P.catch(function(){})}}catch(V){if(V&&q&&typeof V.stack=="string")return[V.stack,q.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=s.DetermineComponentFrameRoot(),v=d[0],k=d[1];if(v&&k){var C=v.split(`
|
|
44
44
|
`),I=k.split(`
|
|
45
|
-
`);for(f=s=0;s<C.length&&!C[s].includes("DetermineComponentFrameRoot");)s++;for(;f<I.length&&!I[f].includes("DetermineComponentFrameRoot");)f++;if(s===C.length||f===I.length)for(s=C.length-1,f=I.length-1;1<=s&&0<=f&&C[s]!==I[f];)f--;for(;1<=s&&0<=f;s--,f--)if(C[s]!==I[f]){if(s!==1||f!==1)do if(s--,f--,0>f||C[s]!==I[f]){var
|
|
46
|
-
`+C[s].replace(" at new "," at ");return e.displayName&&
|
|
45
|
+
`);for(f=s=0;s<C.length&&!C[s].includes("DetermineComponentFrameRoot");)s++;for(;f<I.length&&!I[f].includes("DetermineComponentFrameRoot");)f++;if(s===C.length||f===I.length)for(s=C.length-1,f=I.length-1;1<=s&&0<=f&&C[s]!==I[f];)f--;for(;1<=s&&0<=f;s--,f--)if(C[s]!==I[f]){if(s!==1||f!==1)do if(s--,f--,0>f||C[s]!==I[f]){var Z=`
|
|
46
|
+
`+C[s].replace(" at new "," at ");return e.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",e.displayName)),Z}while(1<=s&&0<=f);break}}}finally{gt=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?ce(l):""}function Cn(e,n){switch(e.tag){case 26:case 27:case 5:return ce(e.type);case 16:return ce("Lazy");case 13:return e.child!==n&&n!==null?ce("Suspense Fallback"):ce("Suspense");case 19:return ce("SuspenseList");case 0:case 15:return xt(e.type,!1);case 11:return xt(e.type.render,!1);case 1:return xt(e.type,!0);case 31:return ce("Activity");default:return""}}function hl(e){try{var n="",l=null;do n+=Cn(e,l),l=e,e=e.return;while(e);return n}catch(s){return`
|
|
47
47
|
Error generating stack: `+s.message+`
|
|
48
|
-
`+s.stack}}var Fe=Object.prototype.hasOwnProperty,qt=t.unstable_scheduleCallback,Zn=t.unstable_cancelCallback,Jo=t.unstable_shouldYield,Po=t.unstable_requestPaint,Pt=t.unstable_now,Wo=t.unstable_getCurrentPriorityLevel,X=t.unstable_ImmediatePriority,ce=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,Ue=t.unstable_LowPriority,it=t.unstable_IdlePriority,mn=t.log,ua=t.unstable_setDisableYieldValue,Wt=null,Ot=null;function an(e){if(typeof mn=="function"&&ua(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(Wt,e)}catch{}}var ht=Math.clz32?Math.clz32:S_,Da=Math.log,$n=Math.LN2;function S_(e){return e>>>=0,e===0?32:31-(Da(e)/$n|0)|0}var Fr=256,Qr=262144,Kr=4194304;function ml(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,l){var s=e.pendingLanes;if(s===0)return 0;var f=0,d=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var k=s&134217727;return k!==0?(s=k&~d,s!==0?f=ml(s):(v&=k,v!==0?f=ml(v):l||(l=k&~e,l!==0&&(f=ml(l))))):(k=s&~d,k!==0?f=ml(k):v!==0?f=ml(v):l||(l=s&~e,l!==0&&(f=ml(l)))),f===0?0:n!==0&&n!==f&&(n&d)===0&&(d=f&-f,l=n&-n,d>=l||d===32&&(l&4194048)!==0)?n:f}function Di(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function k_(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 Dd(){var e=Kr;return Kr<<=1,(Kr&62914560)===0&&(Kr=4194304),e}function eu(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function Li(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function T_(e,n,l,s,f,d){var v=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var k=e.entanglements,C=e.expirationTimes,I=e.hiddenUpdates;for(l=v&~l;0<l;){var Y=31-ht(l),P=1<<Y;k[Y]=0,C[Y]=-1;var q=I[Y];if(q!==null)for(I[Y]=null,Y=0;Y<q.length;Y++){var V=q[Y];V!==null&&(V.lane&=-536870913)}l&=~P}s!==0&&Ld(e,s,0),d!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=d&~(v&~n))}function Ld(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var s=31-ht(n);e.entangledLanes|=n,e.entanglements[s]=e.entanglements[s]|1073741824|l&261930}function Bd(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var s=31-ht(l),f=1<<s;f&n|e[s]&n&&(e[s]|=n),l&=~f}}function Ud(e,n){var l=n&-n;return l=(l&42)!==0?1:tu(l),(l&(e.suspendedLanes|n))!==0?0:l}function tu(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 nu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hd(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Tg(e.type))}function Id(e,n){var l=J.p;try{return J.p=e,n()}finally{J.p=l}}var La=Math.random().toString(36).slice(2),Vt="__reactFiber$"+La,ln="__reactProps$"+La,Il="__reactContainer$"+La,au="__reactEvents$"+La,N_="__reactListeners$"+La,E_="__reactHandles$"+La,qd="__reactResources$"+La,Bi="__reactMarker$"+La;function lu(e){delete e[Vt],delete e[ln],delete e[au],delete e[N_],delete e[E_]}function ql(e){var n=e[Vt];if(n)return n;for(var l=e.parentNode;l;){if(n=l[Il]||l[Vt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=og(e);e!==null;){if(l=e[Vt])return l;e=og(e)}return n}e=l,l=e.parentNode}return null}function Vl(e){if(e=e[Vt]||e[Il]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ui(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function Gl(e){var n=e[qd];return n||(n=e[qd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Bt(e){e[Bi]=!0}var Vd=new Set,Gd={};function pl(e,n){Zl(e,n),Zl(e+"Capture",n)}function Zl(e,n){for(Gd[e]=n,e=0;e<n.length;e++)Vd.add(n[e])}var C_=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]*$"),Zd={},$d={};function A_(e){return Fe.call($d,e)?!0:Fe.call(Zd,e)?!1:C_.test(e)?$d[e]=!0:(Zd[e]=!0,!1)}function Pr(e,n,l){if(A_(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+l)}}function Wr(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function ca(e,n,l,s){if(s===null)e.removeAttribute(l);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+s)}}function An(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function w_(e,n,l){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,d=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(v){l=""+v,d.call(this,v)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(v){l=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function iu(e){if(!e._valueTracker){var n=Yd(e)?"checked":"value";e._valueTracker=w_(e,n,""+e[n])}}function Xd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),s="";return e&&(s=Yd(e)?e.checked?"true":"false":e.value),e=s,e!==l?(n.setValue(e),!0):!1}function es(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 j_=/[\n"\\]/g;function wn(e){return e.replace(j_,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ru(e,n,l,s,f,d,v,k){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+An(n)):e.value!==""+An(n)&&(e.value=""+An(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?su(e,v,An(n)):l!=null?su(e,v,An(l)):s!=null&&e.removeAttribute("value"),f==null&&d!=null&&(e.defaultChecked=!!d),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+An(k):e.removeAttribute("name")}function Fd(e,n,l,s,f,d,v,k){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){iu(e);return}l=l!=null?""+An(l):"",n=n!=null?""+An(n):l,k||n===e.value||(e.value=n),e.defaultValue=n}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=k?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),iu(e)}function su(e,n,l){n==="number"&&es(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function $l(e,n,l,s){if(e=e.options,n){n={};for(var f=0;f<l.length;f++)n["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=n.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&s&&(e[l].defaultSelected=!0)}else{for(l=""+An(l),n=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,s&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function Qd(e,n,l){if(n!=null&&(n=""+An(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+An(l):""}function Kd(e,n,l,s){if(n==null){if(s!=null){if(l!=null)throw Error(r(92));if(ae(s)){if(1<s.length)throw Error(r(93));s=s[0]}l=s}l==null&&(l=""),n=l}l=An(n),e.defaultValue=l,s=e.textContent,s===l&&s!==""&&s!==null&&(e.value=s),iu(e)}function Yl(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var M_=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 Jd(e,n,l){var s=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?s?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":s?e.setProperty(n,l):typeof l!="number"||l===0||M_.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function Pd(e,n,l){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,l!=null){for(var s in l)!l.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var f in n)s=n[f],n.hasOwnProperty(f)&&l[f]!==s&&Jd(e,f,s)}else for(var d in n)n.hasOwnProperty(d)&&Jd(e,d,n[d])}function ou(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 z_=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"]]),R_=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ts(e){return R_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function fa(){}var uu=null;function cu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xl=null,Fl=null;function Wd(e){var n=Vl(e);if(n&&(e=n.stateNode)){var l=e[ln]||null;e:switch(e=n.stateNode,n.type){case"input":if(ru(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+wn(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var s=l[n];if(s!==e&&s.form===e.form){var f=s[ln]||null;if(!f)throw Error(r(90));ru(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<l.length;n++)s=l[n],s.form===e.form&&Xd(s)}break e;case"textarea":Qd(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&$l(e,!!l.multiple,n,!1)}}}var fu=!1;function eh(e,n,l){if(fu)return e(n,l);fu=!0;try{var s=e(n);return s}finally{if(fu=!1,(Xl!==null||Fl!==null)&&(Vs(),Xl&&(n=Xl,e=Fl,Fl=Xl=null,Wd(n),e)))for(n=0;n<e.length;n++)Wd(e[n])}}function Hi(e,n){var l=e.stateNode;if(l===null)return null;var s=l[ln]||null;if(s===null)return null;l=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,n,typeof l));return l}var da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),du=!1;if(da)try{var Ii={};Object.defineProperty(Ii,"passive",{get:function(){du=!0}}),window.addEventListener("test",Ii,Ii),window.removeEventListener("test",Ii,Ii)}catch{du=!1}var Ba=null,hu=null,ns=null;function th(){if(ns)return ns;var e,n=hu,l=n.length,s,f="value"in Ba?Ba.value:Ba.textContent,d=f.length;for(e=0;e<l&&n[e]===f[e];e++);var v=l-e;for(s=1;s<=v&&n[l-s]===f[d-s];s++);return ns=f.slice(e,1<s?1-s:void 0)}function as(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 ls(){return!0}function nh(){return!1}function rn(e){function n(l,s,f,d,v){this._reactName=l,this._targetInst=f,this.type=s,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(l=e[k],this[k]=l?l(d):d[k]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?ls:nh,this.isPropagationStopped=nh,this}return _(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ls)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ls)},persist:function(){},isPersistent:ls}),n}var gl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},is=rn(gl),qi=_({},gl,{view:0,detail:0}),O_=rn(qi),mu,pu,Vi,rs=_({},qi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yu,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!==Vi&&(Vi&&e.type==="mousemove"?(mu=e.screenX-Vi.screenX,pu=e.screenY-Vi.screenY):pu=mu=0,Vi=e),mu)},movementY:function(e){return"movementY"in e?e.movementY:pu}}),ah=rn(rs),D_=_({},rs,{dataTransfer:0}),L_=rn(D_),B_=_({},qi,{relatedTarget:0}),gu=rn(B_),U_=_({},gl,{animationName:0,elapsedTime:0,pseudoElement:0}),H_=rn(U_),I_=_({},gl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),q_=rn(I_),V_=_({},gl,{data:0}),lh=rn(V_),G_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z_={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"},$_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y_(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=$_[e])?!!n[e]:!1}function yu(){return Y_}var X_=_({},qi,{key:function(e){if(e.key){var n=G_[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=as(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Z_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yu,charCode:function(e){return e.type==="keypress"?as(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?as(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),F_=rn(X_),Q_=_({},rs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ih=rn(Q_),K_=_({},qi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yu}),J_=rn(K_),P_=_({},gl,{propertyName:0,elapsedTime:0,pseudoElement:0}),W_=rn(P_),ev=_({},rs,{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}),tv=rn(ev),nv=_({},gl,{newState:0,oldState:0}),av=rn(nv),lv=[9,13,27,32],_u=da&&"CompositionEvent"in window,Gi=null;da&&"documentMode"in document&&(Gi=document.documentMode);var iv=da&&"TextEvent"in window&&!Gi,rh=da&&(!_u||Gi&&8<Gi&&11>=Gi),sh=" ",oh=!1;function uh(e,n){switch(e){case"keyup":return lv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ch(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ql=!1;function rv(e,n){switch(e){case"compositionend":return ch(n);case"keypress":return n.which!==32?null:(oh=!0,sh);case"textInput":return e=n.data,e===sh&&oh?null:e;default:return null}}function sv(e,n){if(Ql)return e==="compositionend"||!_u&&uh(e,n)?(e=th(),ns=hu=Ba=null,Ql=!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 rh&&n.locale!=="ko"?null:n.data;default:return null}}var ov={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 fh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!ov[e.type]:n==="textarea"}function dh(e,n,l,s){Xl?Fl?Fl.push(s):Fl=[s]:Xl=s,n=Qs(n,"onChange"),0<n.length&&(l=new is("onChange","change",null,l,s),e.push({event:l,listeners:n}))}var Zi=null,$i=null;function uv(e){Fp(e,0)}function ss(e){var n=Ui(e);if(Xd(n))return e}function hh(e,n){if(e==="change")return n}var mh=!1;if(da){var vu;if(da){var xu="oninput"in document;if(!xu){var ph=document.createElement("div");ph.setAttribute("oninput","return;"),xu=typeof ph.oninput=="function"}vu=xu}else vu=!1;mh=vu&&(!document.documentMode||9<document.documentMode)}function gh(){Zi&&(Zi.detachEvent("onpropertychange",yh),$i=Zi=null)}function yh(e){if(e.propertyName==="value"&&ss($i)){var n=[];dh(n,$i,e,cu(e)),eh(uv,n)}}function cv(e,n,l){e==="focusin"?(gh(),Zi=n,$i=l,Zi.attachEvent("onpropertychange",yh)):e==="focusout"&&gh()}function fv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ss($i)}function dv(e,n){if(e==="click")return ss(n)}function hv(e,n){if(e==="input"||e==="change")return ss(n)}function mv(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var pn=typeof Object.is=="function"?Object.is:mv;function Yi(e,n){if(pn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),s=Object.keys(n);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var f=l[s];if(!Fe.call(n,f)||!pn(e[f],n[f]))return!1}return!0}function _h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vh(e,n){var l=_h(e);e=0;for(var s;l;){if(l.nodeType===3){if(s=e+l.textContent.length,e<=n&&s>=n)return{node:l,offset:n-e};e=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=_h(l)}}function xh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?xh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function bh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=es(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=es(e.document)}return n}function bu(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 pv=da&&"documentMode"in document&&11>=document.documentMode,Kl=null,Su=null,Xi=null,ku=!1;function Sh(e,n,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ku||Kl==null||Kl!==es(s)||(s=Kl,"selectionStart"in s&&bu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Xi&&Yi(Xi,s)||(Xi=s,s=Qs(Su,"onSelect"),0<s.length&&(n=new is("onSelect","select",null,n,l),e.push({event:n,listeners:s}),n.target=Kl)))}function yl(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var Jl={animationend:yl("Animation","AnimationEnd"),animationiteration:yl("Animation","AnimationIteration"),animationstart:yl("Animation","AnimationStart"),transitionrun:yl("Transition","TransitionRun"),transitionstart:yl("Transition","TransitionStart"),transitioncancel:yl("Transition","TransitionCancel"),transitionend:yl("Transition","TransitionEnd")},Tu={},kh={};da&&(kh=document.createElement("div").style,"AnimationEvent"in window||(delete Jl.animationend.animation,delete Jl.animationiteration.animation,delete Jl.animationstart.animation),"TransitionEvent"in window||delete Jl.transitionend.transition);function _l(e){if(Tu[e])return Tu[e];if(!Jl[e])return e;var n=Jl[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in kh)return Tu[e]=n[l];return e}var Th=_l("animationend"),Nh=_l("animationiteration"),Eh=_l("animationstart"),gv=_l("transitionrun"),yv=_l("transitionstart"),_v=_l("transitioncancel"),Ch=_l("transitionend"),Ah=new Map,Nu="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(" ");Nu.push("scrollEnd");function Yn(e,n){Ah.set(e,n),pl(n,[e])}var os=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)},jn=[],Pl=0,Eu=0;function us(){for(var e=Pl,n=Eu=Pl=0;n<e;){var l=jn[n];jn[n++]=null;var s=jn[n];jn[n++]=null;var f=jn[n];jn[n++]=null;var d=jn[n];if(jn[n++]=null,s!==null&&f!==null){var v=s.pending;v===null?f.next=f:(f.next=v.next,v.next=f),s.pending=f}d!==0&&wh(l,f,d)}}function cs(e,n,l,s){jn[Pl++]=e,jn[Pl++]=n,jn[Pl++]=l,jn[Pl++]=s,Eu|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Cu(e,n,l,s){return cs(e,n,l,s),fs(e)}function vl(e,n){return cs(e,null,null,n),fs(e)}function wh(e,n,l){e.lanes|=l;var s=e.alternate;s!==null&&(s.lanes|=l);for(var f=!1,d=e.return;d!==null;)d.childLanes|=l,s=d.alternate,s!==null&&(s.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(f=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,f&&n!==null&&(f=31-ht(l),e=d.hiddenUpdates,s=e[f],s===null?e[f]=[n]:s.push(n),n.lane=l|536870912),d):null}function fs(e){if(50<pr)throw pr=0,Lc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Wl={};function vv(e,n,l,s){this.tag=e,this.key=l,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(e,n,l,s){return new vv(e,n,l,s)}function Au(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ha(e,n){var l=e.alternate;return l===null?(l=gn(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function jh(e,n){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function ds(e,n,l,s,f,d){var v=0;if(s=e,typeof e=="function")Au(e)&&(v=1);else if(typeof e=="string")v=T0(e,l,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case pe:return e=gn(31,l,n,f),e.elementType=pe,e.lanes=d,e;case j:return xl(l.children,f,d,n);case B:v=8,f|=24;break;case S:return e=gn(12,l,n,f|2),e.elementType=S,e.lanes=d,e;case ne:return e=gn(13,l,n,f),e.elementType=ne,e.lanes=d,e;case U:return e=gn(19,l,n,f),e.elementType=U,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:v=10;break e;case M:v=9;break e;case F:v=11;break e;case te:v=14;break e;case de:v=16,s=null;break e}v=29,l=Error(r(130,e===null?"null":typeof e,"")),s=null}return n=gn(v,l,n,f),n.elementType=e,n.type=s,n.lanes=d,n}function xl(e,n,l,s){return e=gn(7,e,s,n),e.lanes=l,e}function wu(e,n,l){return e=gn(6,e,null,n),e.lanes=l,e}function Mh(e){var n=gn(18,null,null,0);return n.stateNode=e,n}function ju(e,n,l){return n=gn(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var zh=new WeakMap;function Mn(e,n){if(typeof e=="object"&&e!==null){var l=zh.get(e);return l!==void 0?l:(n={value:e,source:n,stack:hl(n)},zh.set(e,n),n)}return{value:e,source:n,stack:hl(n)}}var ei=[],ti=0,hs=null,Fi=0,zn=[],Rn=0,Ua=null,Pn=1,Wn="";function ma(e,n){ei[ti++]=Fi,ei[ti++]=hs,hs=e,Fi=n}function Rh(e,n,l){zn[Rn++]=Pn,zn[Rn++]=Wn,zn[Rn++]=Ua,Ua=e;var s=Pn;e=Wn;var f=32-ht(s)-1;s&=~(1<<f),l+=1;var d=32-ht(n)+f;if(30<d){var v=f-f%5;d=(s&(1<<v)-1).toString(32),s>>=v,f-=v,Pn=1<<32-ht(n)+f|l<<f|s,Wn=d+e}else Pn=1<<d|l<<f|s,Wn=e}function Mu(e){e.return!==null&&(ma(e,1),Rh(e,1,0))}function zu(e){for(;e===hs;)hs=ei[--ti],ei[ti]=null,Fi=ei[--ti],ei[ti]=null;for(;e===Ua;)Ua=zn[--Rn],zn[Rn]=null,Wn=zn[--Rn],zn[Rn]=null,Pn=zn[--Rn],zn[Rn]=null}function Oh(e,n){zn[Rn++]=Pn,zn[Rn++]=Wn,zn[Rn++]=Ua,Pn=n.id,Wn=n.overflow,Ua=e}var Gt=null,_t=null,Xe=!1,Ha=null,On=!1,Ru=Error(r(519));function Ia(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qi(Mn(n,e)),Ru}function Dh(e){var n=e.stateNode,l=e.type,s=e.memoizedProps;switch(n[Vt]=e,n[ln]=s,l){case"dialog":Ie("cancel",n),Ie("close",n);break;case"iframe":case"object":case"embed":Ie("load",n);break;case"video":case"audio":for(l=0;l<yr.length;l++)Ie(yr[l],n);break;case"source":Ie("error",n);break;case"img":case"image":case"link":Ie("error",n),Ie("load",n);break;case"details":Ie("toggle",n);break;case"input":Ie("invalid",n),Fd(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ie("invalid",n);break;case"textarea":Ie("invalid",n),Kd(n,s.value,s.defaultValue,s.children)}l=s.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||s.suppressHydrationWarning===!0||Pp(n.textContent,l)?(s.popover!=null&&(Ie("beforetoggle",n),Ie("toggle",n)),s.onScroll!=null&&Ie("scroll",n),s.onScrollEnd!=null&&Ie("scrollend",n),s.onClick!=null&&(n.onclick=fa),n=!0):n=!1,n||Ia(e,!0)}function Lh(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:On=!1;return;case 27:case 3:On=!0;return;default:Gt=Gt.return}}function ni(e){if(e!==Gt)return!1;if(!Xe)return Lh(e),Xe=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Jc(e.type,e.memoizedProps)),l=!l),l&&_t&&Ia(e),Lh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));_t=sg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));_t=sg(e)}else n===27?(n=_t,el(e.type)?(e=nf,nf=null,_t=e):_t=n):_t=Gt?Ln(e.stateNode.nextSibling):null;return!0}function bl(){_t=Gt=null,Xe=!1}function Ou(){var e=Ha;return e!==null&&(cn===null?cn=e:cn.push.apply(cn,e),Ha=null),e}function Qi(e){Ha===null?Ha=[e]:Ha.push(e)}var Du=A(null),Sl=null,pa=null;function qa(e,n,l){T(Du,n._currentValue),n._currentValue=l}function ga(e){e._currentValue=Du.current,Z(Du)}function Lu(e,n,l){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===l)break;e=e.return}}function Bu(e,n,l,s){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var d=f.dependencies;if(d!==null){var v=f.child;d=d.firstContext;e:for(;d!==null;){var k=d;d=f;for(var C=0;C<n.length;C++)if(k.context===n[C]){d.lanes|=l,k=d.alternate,k!==null&&(k.lanes|=l),Lu(d.return,l,e),s||(v=null);break e}d=k.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(r(341));v.lanes|=l,d=v.alternate,d!==null&&(d.lanes|=l),Lu(v,l,e),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===e){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function ai(e,n,l,s){e=null;for(var f=n,d=!1;f!==null;){if(!d){if((f.flags&524288)!==0)d=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var k=f.type;pn(f.pendingProps.value,v.value)||(e!==null?e.push(k):e=[k])}}else if(f===Ee.current){if(v=f.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Sr):e=[Sr])}f=f.return}e!==null&&Bu(n,e,l,s),n.flags|=262144}function ms(e){for(e=e.firstContext;e!==null;){if(!pn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function kl(e){Sl=e,pa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Zt(e){return Bh(Sl,e)}function ps(e,n){return Sl===null&&kl(e),Bh(e,n)}function Bh(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},pa===null){if(e===null)throw Error(r(308));pa=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else pa=pa.next=n;return l}var xv=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,s){e.push(s)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},bv=t.unstable_scheduleCallback,Sv=t.unstable_NormalPriority,At={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Uu(){return{controller:new xv,data:new Map,refCount:0}}function Ki(e){e.refCount--,e.refCount===0&&bv(Sv,function(){e.controller.abort()})}var Ji=null,Hu=0,li=0,ii=null;function kv(e,n){if(Ji===null){var l=Ji=[];Hu=0,li=Vc(),ii={status:"pending",value:void 0,then:function(s){l.push(s)}}}return Hu++,n.then(Uh,Uh),n}function Uh(){if(--Hu===0&&Ji!==null){ii!==null&&(ii.status="fulfilled");var e=Ji;Ji=null,li=0,ii=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Tv(e,n){var l=[],s={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return e.then(function(){s.status="fulfilled",s.value=n;for(var f=0;f<l.length;f++)(0,l[f])(n)},function(f){for(s.status="rejected",s.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),s}var Hh=D.S;D.S=function(e,n){Sp=Pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&kv(e,n),Hh!==null&&Hh(e,n)};var Tl=A(null);function Iu(){var e=Tl.current;return e!==null?e:mt.pooledCache}function gs(e,n){n===null?T(Tl,Tl.current):T(Tl,n.pool)}function Ih(){var e=Iu();return e===null?null:{parent:At._currentValue,pool:e}}var ri=Error(r(460)),qu=Error(r(474)),ys=Error(r(542)),_s={then:function(){}};function qh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Vh(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(fa,fa),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Zh(e),e;default:if(typeof n.status=="string")n.then(fa,fa);else{if(e=mt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(s){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=s}},function(s){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Zh(e),e}throw El=n,ri}}function Nl(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(El=l,ri):l}}var El=null;function Gh(){if(El===null)throw Error(r(459));var e=El;return El=null,e}function Zh(e){if(e===ri||e===ys)throw Error(r(483))}var si=null,Pi=0;function vs(e){var n=Pi;return Pi+=1,si===null&&(si=[]),Vh(si,e,n)}function Wi(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function xs(e,n){throw n.$$typeof===x?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function $h(e){function n(O,w){if(e){var H=O.deletions;H===null?(O.deletions=[w],O.flags|=16):H.push(w)}}function l(O,w){if(!e)return null;for(;w!==null;)n(O,w),w=w.sibling;return null}function s(O){for(var w=new Map;O!==null;)O.key!==null?w.set(O.key,O):w.set(O.index,O),O=O.sibling;return w}function f(O,w){return O=ha(O,w),O.index=0,O.sibling=null,O}function d(O,w,H){return O.index=H,e?(H=O.alternate,H!==null?(H=H.index,H<w?(O.flags|=67108866,w):H):(O.flags|=67108866,w)):(O.flags|=1048576,w)}function v(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function k(O,w,H,Q){return w===null||w.tag!==6?(w=wu(H,O.mode,Q),w.return=O,w):(w=f(w,H),w.return=O,w)}function C(O,w,H,Q){var ke=H.type;return ke===j?Y(O,w,H.props.children,Q,H.key):w!==null&&(w.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===de&&Nl(ke)===w.type)?(w=f(w,H.props),Wi(w,H),w.return=O,w):(w=ds(H.type,H.key,H.props,null,O.mode,Q),Wi(w,H),w.return=O,w)}function I(O,w,H,Q){return w===null||w.tag!==4||w.stateNode.containerInfo!==H.containerInfo||w.stateNode.implementation!==H.implementation?(w=ju(H,O.mode,Q),w.return=O,w):(w=f(w,H.children||[]),w.return=O,w)}function Y(O,w,H,Q,ke){return w===null||w.tag!==7?(w=xl(H,O.mode,Q,ke),w.return=O,w):(w=f(w,H),w.return=O,w)}function P(O,w,H){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=wu(""+w,O.mode,H),w.return=O,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case b:return H=ds(w.type,w.key,w.props,null,O.mode,H),Wi(H,w),H.return=O,H;case N:return w=ju(w,O.mode,H),w.return=O,w;case de:return w=Nl(w),P(O,w,H)}if(ae(w)||G(w))return w=xl(w,O.mode,H,null),w.return=O,w;if(typeof w.then=="function")return P(O,vs(w),H);if(w.$$typeof===z)return P(O,ps(O,w),H);xs(O,w)}return null}function q(O,w,H,Q){var ke=w!==null?w.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return ke!==null?null:k(O,w,""+H,Q);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return H.key===ke?C(O,w,H,Q):null;case N:return H.key===ke?I(O,w,H,Q):null;case de:return H=Nl(H),q(O,w,H,Q)}if(ae(H)||G(H))return ke!==null?null:Y(O,w,H,Q,null);if(typeof H.then=="function")return q(O,w,vs(H),Q);if(H.$$typeof===z)return q(O,w,ps(O,H),Q);xs(O,H)}return null}function V(O,w,H,Q,ke){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return O=O.get(H)||null,k(w,O,""+Q,ke);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:return O=O.get(Q.key===null?H:Q.key)||null,C(w,O,Q,ke);case N:return O=O.get(Q.key===null?H:Q.key)||null,I(w,O,Q,ke);case de:return Q=Nl(Q),V(O,w,H,Q,ke)}if(ae(Q)||G(Q))return O=O.get(H)||null,Y(w,O,Q,ke,null);if(typeof Q.then=="function")return V(O,w,H,vs(Q),ke);if(Q.$$typeof===z)return V(O,w,H,ps(w,Q),ke);xs(w,Q)}return null}function ye(O,w,H,Q){for(var ke=null,et=null,xe=w,De=w=0,Ze=null;xe!==null&&De<H.length;De++){xe.index>De?(Ze=xe,xe=null):Ze=xe.sibling;var tt=q(O,xe,H[De],Q);if(tt===null){xe===null&&(xe=Ze);break}e&&xe&&tt.alternate===null&&n(O,xe),w=d(tt,w,De),et===null?ke=tt:et.sibling=tt,et=tt,xe=Ze}if(De===H.length)return l(O,xe),Xe&&ma(O,De),ke;if(xe===null){for(;De<H.length;De++)xe=P(O,H[De],Q),xe!==null&&(w=d(xe,w,De),et===null?ke=xe:et.sibling=xe,et=xe);return Xe&&ma(O,De),ke}for(xe=s(xe);De<H.length;De++)Ze=V(xe,O,De,H[De],Q),Ze!==null&&(e&&Ze.alternate!==null&&xe.delete(Ze.key===null?De:Ze.key),w=d(Ze,w,De),et===null?ke=Ze:et.sibling=Ze,et=Ze);return e&&xe.forEach(function(il){return n(O,il)}),Xe&&ma(O,De),ke}function Ne(O,w,H,Q){if(H==null)throw Error(r(151));for(var ke=null,et=null,xe=w,De=w=0,Ze=null,tt=H.next();xe!==null&&!tt.done;De++,tt=H.next()){xe.index>De?(Ze=xe,xe=null):Ze=xe.sibling;var il=q(O,xe,tt.value,Q);if(il===null){xe===null&&(xe=Ze);break}e&&xe&&il.alternate===null&&n(O,xe),w=d(il,w,De),et===null?ke=il:et.sibling=il,et=il,xe=Ze}if(tt.done)return l(O,xe),Xe&&ma(O,De),ke;if(xe===null){for(;!tt.done;De++,tt=H.next())tt=P(O,tt.value,Q),tt!==null&&(w=d(tt,w,De),et===null?ke=tt:et.sibling=tt,et=tt);return Xe&&ma(O,De),ke}for(xe=s(xe);!tt.done;De++,tt=H.next())tt=V(xe,O,De,tt.value,Q),tt!==null&&(e&&tt.alternate!==null&&xe.delete(tt.key===null?De:tt.key),w=d(tt,w,De),et===null?ke=tt:et.sibling=tt,et=tt);return e&&xe.forEach(function(D0){return n(O,D0)}),Xe&&ma(O,De),ke}function dt(O,w,H,Q){if(typeof H=="object"&&H!==null&&H.type===j&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case b:e:{for(var ke=H.key;w!==null;){if(w.key===ke){if(ke=H.type,ke===j){if(w.tag===7){l(O,w.sibling),Q=f(w,H.props.children),Q.return=O,O=Q;break e}}else if(w.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===de&&Nl(ke)===w.type){l(O,w.sibling),Q=f(w,H.props),Wi(Q,H),Q.return=O,O=Q;break e}l(O,w);break}else n(O,w);w=w.sibling}H.type===j?(Q=xl(H.props.children,O.mode,Q,H.key),Q.return=O,O=Q):(Q=ds(H.type,H.key,H.props,null,O.mode,Q),Wi(Q,H),Q.return=O,O=Q)}return v(O);case N:e:{for(ke=H.key;w!==null;){if(w.key===ke)if(w.tag===4&&w.stateNode.containerInfo===H.containerInfo&&w.stateNode.implementation===H.implementation){l(O,w.sibling),Q=f(w,H.children||[]),Q.return=O,O=Q;break e}else{l(O,w);break}else n(O,w);w=w.sibling}Q=ju(H,O.mode,Q),Q.return=O,O=Q}return v(O);case de:return H=Nl(H),dt(O,w,H,Q)}if(ae(H))return ye(O,w,H,Q);if(G(H)){if(ke=G(H),typeof ke!="function")throw Error(r(150));return H=ke.call(H),Ne(O,w,H,Q)}if(typeof H.then=="function")return dt(O,w,vs(H),Q);if(H.$$typeof===z)return dt(O,w,ps(O,H),Q);xs(O,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,w!==null&&w.tag===6?(l(O,w.sibling),Q=f(w,H),Q.return=O,O=Q):(l(O,w),Q=wu(H,O.mode,Q),Q.return=O,O=Q),v(O)):l(O,w)}return function(O,w,H,Q){try{Pi=0;var ke=dt(O,w,H,Q);return si=null,ke}catch(xe){if(xe===ri||xe===ys)throw xe;var et=gn(29,xe,null,O.mode);return et.lanes=Q,et.return=O,et}finally{}}}var Cl=$h(!0),Yh=$h(!1),Va=!1;function Vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gu(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 Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Za(e,n,l){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(lt&2)!==0){var f=s.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),s.pending=n,n=fs(e),wh(e,null,l),n}return cs(e,s,n,l),fs(e)}function er(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var s=n.lanes;s&=e.pendingLanes,l|=s,n.lanes=l,Bd(e,l)}}function Zu(e,n){var l=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var f=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var v={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?f=d=v:d=d.next=v,l=l.next}while(l!==null);d===null?f=d=n:d=d.next=n}else f=d=n;l={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:d,shared:s.shared,callbacks:s.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var $u=!1;function tr(){if($u){var e=ii;if(e!==null)throw e}}function nr(e,n,l,s){$u=!1;var f=e.updateQueue;Va=!1;var d=f.firstBaseUpdate,v=f.lastBaseUpdate,k=f.shared.pending;if(k!==null){f.shared.pending=null;var C=k,I=C.next;C.next=null,v===null?d=I:v.next=I,v=C;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,k=Y.lastBaseUpdate,k!==v&&(k===null?Y.firstBaseUpdate=I:k.next=I,Y.lastBaseUpdate=C))}if(d!==null){var P=f.baseState;v=0,Y=I=C=null,k=d;do{var q=k.lane&-536870913,V=q!==k.lane;if(V?(Ge&q)===q:(s&q)===q){q!==0&&q===li&&($u=!0),Y!==null&&(Y=Y.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var ye=e,Ne=k;q=n;var dt=l;switch(Ne.tag){case 1:if(ye=Ne.payload,typeof ye=="function"){P=ye.call(dt,P,q);break e}P=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ne.payload,q=typeof ye=="function"?ye.call(dt,P,q):ye,q==null)break e;P=_({},P,q);break e;case 2:Va=!0}}q=k.callback,q!==null&&(e.flags|=64,V&&(e.flags|=8192),V=f.callbacks,V===null?f.callbacks=[q]:V.push(q))}else V={lane:q,tag:k.tag,payload:k.payload,callback:k.callback,next:null},Y===null?(I=Y=V,C=P):Y=Y.next=V,v|=q;if(k=k.next,k===null){if(k=f.shared.pending,k===null)break;V=k,k=V.next,V.next=null,f.lastBaseUpdate=V,f.shared.pending=null}}while(!0);Y===null&&(C=P),f.baseState=C,f.firstBaseUpdate=I,f.lastBaseUpdate=Y,d===null&&(f.shared.lanes=0),Qa|=v,e.lanes=v,e.memoizedState=P}}function Xh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Fh(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Xh(l[e],n)}var oi=A(null),bs=A(0);function Qh(e,n){e=Na,T(bs,e),T(oi,n),Na=e|n.baseLanes}function Yu(){T(bs,Na),T(oi,oi.current)}function Xu(){Na=bs.current,Z(oi),Z(bs)}var yn=A(null),Dn=null;function $a(e){var n=e.alternate;T(Tt,Tt.current&1),T(yn,e),Dn===null&&(n===null||oi.current!==null||n.memoizedState!==null)&&(Dn=e)}function Fu(e){T(Tt,Tt.current),T(yn,e),Dn===null&&(Dn=e)}function Kh(e){e.tag===22?(T(Tt,Tt.current),T(yn,e),Dn===null&&(Dn=e)):Ya()}function Ya(){T(Tt,Tt.current),T(yn,yn.current)}function _n(e){Z(yn),Dn===e&&(Dn=null),Z(Tt)}var Tt=A(0);function Ss(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ef(l)||tf(l)))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 ya=0,Re=null,ct=null,wt=null,ks=!1,ui=!1,Al=!1,Ts=0,ar=0,ci=null,Nv=0;function St(){throw Error(r(321))}function Qu(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!pn(e[l],n[l]))return!1;return!0}function Ku(e,n,l,s,f,d){return ya=d,Re=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,D.H=e===null||e.memoizedState===null?Rm:fc,Al=!1,d=l(s,f),Al=!1,ui&&(d=Ph(n,l,s,f)),Jh(e),d}function Jh(e){D.H=rr;var n=ct!==null&&ct.next!==null;if(ya=0,wt=ct=Re=null,ks=!1,ar=0,ci=null,n)throw Error(r(300));e===null||jt||(e=e.dependencies,e!==null&&ms(e)&&(jt=!0))}function Ph(e,n,l,s){Re=e;var f=0;do{if(ui&&(ci=null),ar=0,ui=!1,25<=f)throw Error(r(301));if(f+=1,wt=ct=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}D.H=Om,d=n(l,s)}while(ui);return d}function Ev(){var e=D.H,n=e.useState()[0];return n=typeof n.then=="function"?lr(n):n,e=e.useState()[0],(ct!==null?ct.memoizedState:null)!==e&&(Re.flags|=1024),n}function Ju(){var e=Ts!==0;return Ts=0,e}function Pu(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function Wu(e){if(ks){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}ks=!1}ya=0,wt=ct=Re=null,ui=!1,ar=Ts=0,ci=null}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Re.memoizedState=wt=e:wt=wt.next=e,wt}function Nt(){if(ct===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var n=wt===null?Re.memoizedState:wt.next;if(n!==null)wt=n,ct=e;else{if(e===null)throw Re.alternate===null?Error(r(467)):Error(r(310));ct=e,e={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},wt===null?Re.memoizedState=wt=e:wt=wt.next=e}return wt}function Ns(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function lr(e){var n=ar;return ar+=1,ci===null&&(ci=[]),e=Vh(ci,e,n),n=Re,(wt===null?n.memoizedState:wt.next)===null&&(n=n.alternate,D.H=n===null||n.memoizedState===null?Rm:fc),e}function Es(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return lr(e);if(e.$$typeof===z)return Zt(e)}throw Error(r(438,String(e)))}function ec(e){var n=null,l=Re.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var s=Re.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=Ns(),Re.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),s=0;s<e;s++)l[s]=R;return n.index++,l}function _a(e,n){return typeof n=="function"?n(e):n}function Cs(e){var n=Nt();return tc(n,ct,e)}function tc(e,n,l){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=l;var f=e.baseQueue,d=s.pending;if(d!==null){if(f!==null){var v=f.next;f.next=d.next,d.next=v}n.baseQueue=f=d,s.pending=null}if(d=e.baseState,f===null)e.memoizedState=d;else{n=f.next;var k=v=null,C=null,I=n,Y=!1;do{var P=I.lane&-536870913;if(P!==I.lane?(Ge&P)===P:(ya&P)===P){var q=I.revertLane;if(q===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),P===li&&(Y=!0);else if((ya&q)===q){I=I.next,q===li&&(Y=!0);continue}else P={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},C===null?(k=C=P,v=d):C=C.next=P,Re.lanes|=q,Qa|=q;P=I.action,Al&&l(d,P),d=I.hasEagerState?I.eagerState:l(d,P)}else q={lane:P,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},C===null?(k=C=q,v=d):C=C.next=q,Re.lanes|=P,Qa|=P;I=I.next}while(I!==null&&I!==n);if(C===null?v=d:C.next=k,!pn(d,e.memoizedState)&&(jt=!0,Y&&(l=ii,l!==null)))throw l;e.memoizedState=d,e.baseState=v,e.baseQueue=C,s.lastRenderedState=d}return f===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function nc(e){var n=Nt(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var s=l.dispatch,f=l.pending,d=n.memoizedState;if(f!==null){l.pending=null;var v=f=f.next;do d=e(d,v.action),v=v.next;while(v!==f);pn(d,n.memoizedState)||(jt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),l.lastRenderedState=d}return[d,s]}function Wh(e,n,l){var s=Re,f=Nt(),d=Xe;if(d){if(l===void 0)throw Error(r(407));l=l()}else l=n();var v=!pn((ct||f).memoizedState,l);if(v&&(f.memoizedState=l,jt=!0),f=f.queue,ic(nm.bind(null,s,f,e),[e]),f.getSnapshot!==n||v||wt!==null&&wt.memoizedState.tag&1){if(s.flags|=2048,fi(9,{destroy:void 0},tm.bind(null,s,f,l,n),null),mt===null)throw Error(r(349));d||(ya&127)!==0||em(s,n,l)}return l}function em(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Re.updateQueue,n===null?(n=Ns(),Re.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function tm(e,n,l,s){n.value=l,n.getSnapshot=s,am(n)&&lm(e)}function nm(e,n,l){return l(function(){am(n)&&lm(e)})}function am(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!pn(e,l)}catch{return!0}}function lm(e){var n=vl(e,2);n!==null&&fn(n,e,2)}function ac(e){var n=en();if(typeof e=="function"){var l=e;if(e=l(),Al){an(!0);try{l()}finally{an(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:e},n}function im(e,n,l,s){return e.baseState=l,tc(e,ct,typeof s=="function"?s:_a)}function Cv(e,n,l,s,f){if(js(e))throw Error(r(485));if(e=n.action,e!==null){var d={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};D.T!==null?l(!0):d.isTransition=!1,s(d),l=n.pending,l===null?(d.next=n.pending=d,rm(n,d)):(d.next=l.next,n.pending=l.next=d)}}function rm(e,n){var l=n.action,s=n.payload,f=e.state;if(n.isTransition){var d=D.T,v={};D.T=v;try{var k=l(f,s),C=D.S;C!==null&&C(v,k),sm(e,n,k)}catch(I){lc(e,n,I)}finally{d!==null&&v.types!==null&&(d.types=v.types),D.T=d}}else try{d=l(f,s),sm(e,n,d)}catch(I){lc(e,n,I)}}function sm(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){om(e,n,s)},function(s){return lc(e,n,s)}):om(e,n,l)}function om(e,n,l){n.status="fulfilled",n.value=l,um(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,rm(e,l)))}function lc(e,n,l){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=l,um(n),n=n.next;while(n!==s)}e.action=null}function um(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function cm(e,n){return n}function fm(e,n){if(Xe){var l=mt.formState;if(l!==null){e:{var s=Re;if(Xe){if(_t){t:{for(var f=_t,d=On;f.nodeType!==8;){if(!d){f=null;break t}if(f=Ln(f.nextSibling),f===null){f=null;break t}}d=f.data,f=d==="F!"||d==="F"?f:null}if(f){_t=Ln(f.nextSibling),s=f.data==="F!";break e}}Ia(s)}s=!1}s&&(n=l[0])}}return l=en(),l.memoizedState=l.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cm,lastRenderedState:n},l.queue=s,l=jm.bind(null,Re,s),s.dispatch=l,s=ac(!1),d=cc.bind(null,Re,!1,s.queue),s=en(),f={state:n,dispatch:null,action:e,pending:null},s.queue=f,l=Cv.bind(null,Re,f,d,l),f.dispatch=l,s.memoizedState=e,[n,l,!1]}function dm(e){var n=Nt();return hm(n,ct,e)}function hm(e,n,l){if(n=tc(e,n,cm)[0],e=Cs(_a)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=lr(n)}catch(v){throw v===ri?ys:v}else s=n;n=Nt();var f=n.queue,d=f.dispatch;return l!==n.memoizedState&&(Re.flags|=2048,fi(9,{destroy:void 0},Av.bind(null,f,l),null)),[s,d,e]}function Av(e,n){e.action=n}function mm(e){var n=Nt(),l=ct;if(l!==null)return hm(n,l,e);Nt(),n=n.memoizedState,l=Nt();var s=l.queue.dispatch;return l.memoizedState=e,[n,s,!1]}function fi(e,n,l,s){return e={tag:e,create:l,deps:s,inst:n,next:null},n=Re.updateQueue,n===null&&(n=Ns(),Re.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(s=l.next,l.next=e,e.next=s,n.lastEffect=e),e}function pm(){return Nt().memoizedState}function As(e,n,l,s){var f=en();Re.flags|=e,f.memoizedState=fi(1|n,{destroy:void 0},l,s===void 0?null:s)}function ws(e,n,l,s){var f=Nt();s=s===void 0?null:s;var d=f.memoizedState.inst;ct!==null&&s!==null&&Qu(s,ct.memoizedState.deps)?f.memoizedState=fi(n,d,l,s):(Re.flags|=e,f.memoizedState=fi(1|n,d,l,s))}function gm(e,n){As(8390656,8,e,n)}function ic(e,n){ws(2048,8,e,n)}function wv(e){Re.flags|=4;var n=Re.updateQueue;if(n===null)n=Ns(),Re.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function ym(e){var n=Nt().memoizedState;return wv({ref:n,nextImpl:e}),function(){if((lt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function _m(e,n){return ws(4,2,e,n)}function vm(e,n){return ws(4,4,e,n)}function xm(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function bm(e,n,l){l=l!=null?l.concat([e]):null,ws(4,4,xm.bind(null,n,e),l)}function rc(){}function Sm(e,n){var l=Nt();n=n===void 0?null:n;var s=l.memoizedState;return n!==null&&Qu(n,s[1])?s[0]:(l.memoizedState=[e,n],e)}function km(e,n){var l=Nt();n=n===void 0?null:n;var s=l.memoizedState;if(n!==null&&Qu(n,s[1]))return s[0];if(s=e(),Al){an(!0);try{e()}finally{an(!1)}}return l.memoizedState=[s,n],s}function sc(e,n,l){return l===void 0||(ya&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=Tp(),Re.lanes|=e,Qa|=e,l)}function Tm(e,n,l,s){return pn(l,n)?l:oi.current!==null?(e=sc(e,l,s),pn(e,n)||(jt=!0),e):(ya&42)===0||(ya&1073741824)!==0&&(Ge&261930)===0?(jt=!0,e.memoizedState=l):(e=Tp(),Re.lanes|=e,Qa|=e,n)}function Nm(e,n,l,s,f){var d=J.p;J.p=d!==0&&8>d?d:8;var v=D.T,k={};D.T=k,cc(e,!1,n,l);try{var C=f(),I=D.S;if(I!==null&&I(k,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var Y=Tv(C,s);ir(e,n,Y,bn(e))}else ir(e,n,s,bn(e))}catch(P){ir(e,n,{then:function(){},status:"rejected",reason:P},bn())}finally{J.p=d,v!==null&&k.types!==null&&(v.types=k.types),D.T=v}}function jv(){}function oc(e,n,l,s){if(e.tag!==5)throw Error(r(476));var f=Em(e).queue;Nm(e,f,n,se,l===null?jv:function(){return Cm(e),l(s)})}function Em(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:se},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Cm(e){var n=Em(e);n.next===null&&(n=e.alternate.memoizedState),ir(e,n.next.queue,{},bn())}function uc(){return Zt(Sr)}function Am(){return Nt().memoizedState}function wm(){return Nt().memoizedState}function Mv(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=bn();e=Ga(l);var s=Za(n,e,l);s!==null&&(fn(s,n,l),er(s,n,l)),n={cache:Uu()},e.payload=n;return}n=n.return}}function zv(e,n,l){var s=bn();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},js(e)?Mm(n,l):(l=Cu(e,n,l,s),l!==null&&(fn(l,e,s),zm(l,n,s)))}function jm(e,n,l){var s=bn();ir(e,n,l,s)}function ir(e,n,l,s){var f={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(js(e))Mm(n,f);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var v=n.lastRenderedState,k=d(v,l);if(f.hasEagerState=!0,f.eagerState=k,pn(k,v))return cs(e,n,f,0),mt===null&&us(),!1}catch{}finally{}if(l=Cu(e,n,f,s),l!==null)return fn(l,e,s),zm(l,n,s),!0}return!1}function cc(e,n,l,s){if(s={lane:2,revertLane:Vc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},js(e)){if(n)throw Error(r(479))}else n=Cu(e,l,s,2),n!==null&&fn(n,e,2)}function js(e){var n=e.alternate;return e===Re||n!==null&&n===Re}function Mm(e,n){ui=ks=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function zm(e,n,l){if((l&4194048)!==0){var s=n.lanes;s&=e.pendingLanes,l|=s,n.lanes=l,Bd(e,l)}}var rr={readContext:Zt,use:Es,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St};rr.useEffectEvent=St;var Rm={readContext:Zt,use:Es,useCallback:function(e,n){return en().memoizedState=[e,n===void 0?null:n],e},useContext:Zt,useEffect:gm,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,As(4194308,4,xm.bind(null,n,e),l)},useLayoutEffect:function(e,n){return As(4194308,4,e,n)},useInsertionEffect:function(e,n){As(4,2,e,n)},useMemo:function(e,n){var l=en();n=n===void 0?null:n;var s=e();if(Al){an(!0);try{e()}finally{an(!1)}}return l.memoizedState=[s,n],s},useReducer:function(e,n,l){var s=en();if(l!==void 0){var f=l(n);if(Al){an(!0);try{l(n)}finally{an(!1)}}}else f=n;return s.memoizedState=s.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},s.queue=e,e=e.dispatch=zv.bind(null,Re,e),[s.memoizedState,e]},useRef:function(e){var n=en();return e={current:e},n.memoizedState=e},useState:function(e){e=ac(e);var n=e.queue,l=jm.bind(null,Re,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:rc,useDeferredValue:function(e,n){var l=en();return sc(l,e,n)},useTransition:function(){var e=ac(!1);return e=Nm.bind(null,Re,e.queue,!0,!1),en().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var s=Re,f=en();if(Xe){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),mt===null)throw Error(r(349));(Ge&127)!==0||em(s,n,l)}f.memoizedState=l;var d={value:l,getSnapshot:n};return f.queue=d,gm(nm.bind(null,s,d,e),[e]),s.flags|=2048,fi(9,{destroy:void 0},tm.bind(null,s,d,l,n),null),l},useId:function(){var e=en(),n=mt.identifierPrefix;if(Xe){var l=Wn,s=Pn;l=(s&~(1<<32-ht(s)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Ts++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=Nv++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:uc,useFormState:fm,useActionState:fm,useOptimistic:function(e){var n=en();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=cc.bind(null,Re,!0,l),l.dispatch=n,[e,n]},useMemoCache:ec,useCacheRefresh:function(){return en().memoizedState=Mv.bind(null,Re)},useEffectEvent:function(e){var n=en(),l={impl:e};return n.memoizedState=l,function(){if((lt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},fc={readContext:Zt,use:Es,useCallback:Sm,useContext:Zt,useEffect:ic,useImperativeHandle:bm,useInsertionEffect:_m,useLayoutEffect:vm,useMemo:km,useReducer:Cs,useRef:pm,useState:function(){return Cs(_a)},useDebugValue:rc,useDeferredValue:function(e,n){var l=Nt();return Tm(l,ct.memoizedState,e,n)},useTransition:function(){var e=Cs(_a)[0],n=Nt().memoizedState;return[typeof e=="boolean"?e:lr(e),n]},useSyncExternalStore:Wh,useId:Am,useHostTransitionStatus:uc,useFormState:dm,useActionState:dm,useOptimistic:function(e,n){var l=Nt();return im(l,ct,e,n)},useMemoCache:ec,useCacheRefresh:wm};fc.useEffectEvent=ym;var Om={readContext:Zt,use:Es,useCallback:Sm,useContext:Zt,useEffect:ic,useImperativeHandle:bm,useInsertionEffect:_m,useLayoutEffect:vm,useMemo:km,useReducer:nc,useRef:pm,useState:function(){return nc(_a)},useDebugValue:rc,useDeferredValue:function(e,n){var l=Nt();return ct===null?sc(l,e,n):Tm(l,ct.memoizedState,e,n)},useTransition:function(){var e=nc(_a)[0],n=Nt().memoizedState;return[typeof e=="boolean"?e:lr(e),n]},useSyncExternalStore:Wh,useId:Am,useHostTransitionStatus:uc,useFormState:mm,useActionState:mm,useOptimistic:function(e,n){var l=Nt();return ct!==null?im(l,ct,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:ec,useCacheRefresh:wm};Om.useEffectEvent=ym;function dc(e,n,l,s){n=e.memoizedState,l=l(s,n),l=l==null?n:_({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var hc={enqueueSetState:function(e,n,l){e=e._reactInternals;var s=bn(),f=Ga(s);f.payload=n,l!=null&&(f.callback=l),n=Za(e,f,s),n!==null&&(fn(n,e,s),er(n,e,s))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var s=bn(),f=Ga(s);f.tag=1,f.payload=n,l!=null&&(f.callback=l),n=Za(e,f,s),n!==null&&(fn(n,e,s),er(n,e,s))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=bn(),s=Ga(l);s.tag=2,n!=null&&(s.callback=n),n=Za(e,s,l),n!==null&&(fn(n,e,l),er(n,e,l))}};function Dm(e,n,l,s,f,d,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,d,v):n.prototype&&n.prototype.isPureReactComponent?!Yi(l,s)||!Yi(f,d):!0}function Lm(e,n,l,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,s),n.state!==e&&hc.enqueueReplaceState(n,n.state,null)}function wl(e,n){var l=n;if("ref"in n){l={};for(var s in n)s!=="ref"&&(l[s]=n[s])}if(e=e.defaultProps){l===n&&(l=_({},l));for(var f in e)l[f]===void 0&&(l[f]=e[f])}return l}function Bm(e){os(e)}function Um(e){console.error(e)}function Hm(e){os(e)}function Ms(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function Im(e,n,l){try{var s=e.onCaughtError;s(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function mc(e,n,l){return l=Ga(l),l.tag=3,l.payload={element:null},l.callback=function(){Ms(e,n)},l}function qm(e){return e=Ga(e),e.tag=3,e}function Vm(e,n,l,s){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var d=s.value;e.payload=function(){return f(d)},e.callback=function(){Im(n,l,s)}}var v=l.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){Im(n,l,s),typeof f!="function"&&(Ka===null?Ka=new Set([this]):Ka.add(this));var k=s.stack;this.componentDidCatch(s.value,{componentStack:k!==null?k:""})})}function Rv(e,n,l,s,f){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=l.alternate,n!==null&&ai(n,l,f,!0),l=yn.current,l!==null){switch(l.tag){case 31:case 13:return Dn===null?Gs():l.alternate===null&&kt===0&&(kt=3),l.flags&=-257,l.flags|=65536,l.lanes=f,s===_s?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([s]):n.add(s),Hc(e,s,f)),!1;case 22:return l.flags|=65536,s===_s?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([s]):l.add(s)),Hc(e,s,f)),!1}throw Error(r(435,l.tag))}return Hc(e,s,f),Gs(),!1}if(Xe)return n=yn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,s!==Ru&&(e=Error(r(422),{cause:s}),Qi(Mn(e,l)))):(s!==Ru&&(n=Error(r(423),{cause:s}),Qi(Mn(n,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,s=Mn(s,l),f=mc(e.stateNode,s,f),Zu(e,f),kt!==4&&(kt=2)),!1;var d=Error(r(520),{cause:s});if(d=Mn(d,l),mr===null?mr=[d]:mr.push(d),kt!==4&&(kt=2),n===null)return!0;s=Mn(s,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=mc(l.stateNode,s,e),Zu(l,e),!1;case 1:if(n=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Ka===null||!Ka.has(d))))return l.flags|=65536,f&=-f,l.lanes|=f,f=qm(f),Vm(f,e,l,s),Zu(l,f),!1}l=l.return}while(l!==null);return!1}var pc=Error(r(461)),jt=!1;function $t(e,n,l,s){n.child=e===null?Yh(n,null,l,s):Cl(n,e.child,l,s)}function Gm(e,n,l,s,f){l=l.render;var d=n.ref;if("ref"in s){var v={};for(var k in s)k!=="ref"&&(v[k]=s[k])}else v=s;return kl(n),s=Ku(e,n,l,v,d,f),k=Ju(),e!==null&&!jt?(Pu(e,n,f),va(e,n,f)):(Xe&&k&&Mu(n),n.flags|=1,$t(e,n,s,f),n.child)}function Zm(e,n,l,s,f){if(e===null){var d=l.type;return typeof d=="function"&&!Au(d)&&d.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=d,$m(e,n,d,s,f)):(e=ds(l.type,null,s,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!kc(e,f)){var v=d.memoizedProps;if(l=l.compare,l=l!==null?l:Yi,l(v,s)&&e.ref===n.ref)return va(e,n,f)}return n.flags|=1,e=ha(d,s),e.ref=n.ref,e.return=n,n.child=e}function $m(e,n,l,s,f){if(e!==null){var d=e.memoizedProps;if(Yi(d,s)&&e.ref===n.ref)if(jt=!1,n.pendingProps=s=d,kc(e,f))(e.flags&131072)!==0&&(jt=!0);else return n.lanes=e.lanes,va(e,n,f)}return gc(e,n,l,s,f)}function Ym(e,n,l,s){var f=s.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,e!==null){for(s=n.child=e.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~d}else s=0,n.child=null;return Xm(e,n,d,l,s)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&gs(n,d!==null?d.cachePool:null),d!==null?Qh(n,d):Yu(),Kh(n);else return s=n.lanes=536870912,Xm(e,n,d!==null?d.baseLanes|l:l,l,s)}else d!==null?(gs(n,d.cachePool),Qh(n,d),Ya(),n.memoizedState=null):(e!==null&&gs(n,null),Yu(),Ya());return $t(e,n,f,l),n.child}function sr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Xm(e,n,l,s,f){var d=Iu();return d=d===null?null:{parent:At._currentValue,pool:d},n.memoizedState={baseLanes:l,cachePool:d},e!==null&&gs(n,null),Yu(),Kh(n),e!==null&&ai(e,n,s,!0),n.childLanes=f,null}function zs(e,n){return n=Os({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Fm(e,n,l){return Cl(n,e.child,null,l),e=zs(n,n.pendingProps),e.flags|=2,_n(n),n.memoizedState=null,e}function Ov(e,n,l){var s=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Xe){if(s.mode==="hidden")return e=zs(n,s),n.lanes=536870912,sr(null,e);if(Fu(n),(e=_t)?(e=rg(e,On),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ua!==null?{id:Pn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},l=Mh(e),l.return=n,n.child=l,Gt=n,_t=null)):e=null,e===null)throw Ia(n);return n.lanes=536870912,null}return zs(n,s)}var d=e.memoizedState;if(d!==null){var v=d.dehydrated;if(Fu(n),f)if(n.flags&256)n.flags&=-257,n=Fm(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(jt||ai(e,n,l,!1),f=(l&e.childLanes)!==0,jt||f){if(s=mt,s!==null&&(v=Ud(s,l),v!==0&&v!==d.retryLane))throw d.retryLane=v,vl(e,v),fn(s,e,v),pc;Gs(),n=Fm(e,n,l)}else e=d.treeContext,_t=Ln(v.nextSibling),Gt=n,Xe=!0,Ha=null,On=!1,e!==null&&Oh(n,e),n=zs(n,s),n.flags|=4096;return n}return e=ha(e.child,{mode:s.mode,children:s.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Rs(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function gc(e,n,l,s,f){return kl(n),l=Ku(e,n,l,s,void 0,f),s=Ju(),e!==null&&!jt?(Pu(e,n,f),va(e,n,f)):(Xe&&s&&Mu(n),n.flags|=1,$t(e,n,l,f),n.child)}function Qm(e,n,l,s,f,d){return kl(n),n.updateQueue=null,l=Ph(n,s,l,f),Jh(e),s=Ju(),e!==null&&!jt?(Pu(e,n,d),va(e,n,d)):(Xe&&s&&Mu(n),n.flags|=1,$t(e,n,l,d),n.child)}function Km(e,n,l,s,f){if(kl(n),n.stateNode===null){var d=Wl,v=l.contextType;typeof v=="object"&&v!==null&&(d=Zt(v)),d=new l(s,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=hc,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=s,d.state=n.memoizedState,d.refs={},Vu(n),v=l.contextType,d.context=typeof v=="object"&&v!==null?Zt(v):Wl,d.state=n.memoizedState,v=l.getDerivedStateFromProps,typeof v=="function"&&(dc(n,l,v,s),d.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&hc.enqueueReplaceState(d,d.state,null),nr(n,s,d,f),tr(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(e===null){d=n.stateNode;var k=n.memoizedProps,C=wl(l,k);d.props=C;var I=d.context,Y=l.contextType;v=Wl,typeof Y=="object"&&Y!==null&&(v=Zt(Y));var P=l.getDerivedStateFromProps;Y=typeof P=="function"||typeof d.getSnapshotBeforeUpdate=="function",k=n.pendingProps!==k,Y||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(k||I!==v)&&Lm(n,d,s,v),Va=!1;var q=n.memoizedState;d.state=q,nr(n,s,d,f),tr(),I=n.memoizedState,k||q!==I||Va?(typeof P=="function"&&(dc(n,l,P,s),I=n.memoizedState),(C=Va||Dm(n,l,C,s,q,I,v))?(Y||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=s,n.memoizedState=I),d.props=s,d.state=I,d.context=v,s=C):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{d=n.stateNode,Gu(e,n),v=n.memoizedProps,Y=wl(l,v),d.props=Y,P=n.pendingProps,q=d.context,I=l.contextType,C=Wl,typeof I=="object"&&I!==null&&(C=Zt(I)),k=l.getDerivedStateFromProps,(I=typeof k=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==P||q!==C)&&Lm(n,d,s,C),Va=!1,q=n.memoizedState,d.state=q,nr(n,s,d,f),tr();var V=n.memoizedState;v!==P||q!==V||Va||e!==null&&e.dependencies!==null&&ms(e.dependencies)?(typeof k=="function"&&(dc(n,l,k,s),V=n.memoizedState),(Y=Va||Dm(n,l,Y,s,q,V,C)||e!==null&&e.dependencies!==null&&ms(e.dependencies))?(I||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,V,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,V,C)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=V),d.props=s,d.state=V,d.context=C,s=Y):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),s=!1)}return d=s,Rs(e,n),s=(n.flags&128)!==0,d||s?(d=n.stateNode,l=s&&typeof l.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&s?(n.child=Cl(n,e.child,null,f),n.child=Cl(n,null,l,f)):$t(e,n,l,f),n.memoizedState=d.state,e=n.child):e=va(e,n,f),e}function Jm(e,n,l,s){return bl(),n.flags|=256,$t(e,n,l,s),n.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _c(e){return{baseLanes:e,cachePool:Ih()}}function vc(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=xn),e}function Pm(e,n,l){var s=n.pendingProps,f=!1,d=(n.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(Tt.current&2)!==0),v&&(f=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if(Xe){if(f?$a(n):Ya(),(e=_t)?(e=rg(e,On),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ua!==null?{id:Pn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},l=Mh(e),l.return=n,n.child=l,Gt=n,_t=null)):e=null,e===null)throw Ia(n);return tf(e)?n.lanes=32:n.lanes=536870912,null}var k=s.children;return s=s.fallback,f?(Ya(),f=n.mode,k=Os({mode:"hidden",children:k},f),s=xl(s,f,l,null),k.return=n,s.return=n,k.sibling=s,n.child=k,s=n.child,s.memoizedState=_c(l),s.childLanes=vc(e,v,l),n.memoizedState=yc,sr(null,s)):($a(n),xc(n,k))}var C=e.memoizedState;if(C!==null&&(k=C.dehydrated,k!==null)){if(d)n.flags&256?($a(n),n.flags&=-257,n=bc(e,n,l)):n.memoizedState!==null?(Ya(),n.child=e.child,n.flags|=128,n=null):(Ya(),k=s.fallback,f=n.mode,s=Os({mode:"visible",children:s.children},f),k=xl(k,f,l,null),k.flags|=2,s.return=n,k.return=n,s.sibling=k,n.child=s,Cl(n,e.child,null,l),s=n.child,s.memoizedState=_c(l),s.childLanes=vc(e,v,l),n.memoizedState=yc,n=sr(null,s));else if($a(n),tf(k)){if(v=k.nextSibling&&k.nextSibling.dataset,v)var I=v.dgst;v=I,s=Error(r(419)),s.stack="",s.digest=v,Qi({value:s,source:null,stack:null}),n=bc(e,n,l)}else if(jt||ai(e,n,l,!1),v=(l&e.childLanes)!==0,jt||v){if(v=mt,v!==null&&(s=Ud(v,l),s!==0&&s!==C.retryLane))throw C.retryLane=s,vl(e,s),fn(v,e,s),pc;ef(k)||Gs(),n=bc(e,n,l)}else ef(k)?(n.flags|=192,n.child=e.child,n=null):(e=C.treeContext,_t=Ln(k.nextSibling),Gt=n,Xe=!0,Ha=null,On=!1,e!==null&&Oh(n,e),n=xc(n,s.children),n.flags|=4096);return n}return f?(Ya(),k=s.fallback,f=n.mode,C=e.child,I=C.sibling,s=ha(C,{mode:"hidden",children:s.children}),s.subtreeFlags=C.subtreeFlags&65011712,I!==null?k=ha(I,k):(k=xl(k,f,l,null),k.flags|=2),k.return=n,s.return=n,s.sibling=k,n.child=s,sr(null,s),s=n.child,k=e.child.memoizedState,k===null?k=_c(l):(f=k.cachePool,f!==null?(C=At._currentValue,f=f.parent!==C?{parent:C,pool:C}:f):f=Ih(),k={baseLanes:k.baseLanes|l,cachePool:f}),s.memoizedState=k,s.childLanes=vc(e,v,l),n.memoizedState=yc,sr(e.child,s)):($a(n),l=e.child,e=l.sibling,l=ha(l,{mode:"visible",children:s.children}),l.return=n,l.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=l,n.memoizedState=null,l)}function xc(e,n){return n=Os({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Os(e,n){return e=gn(22,e,null,n),e.lanes=0,e}function bc(e,n,l){return Cl(n,e.child,null,l),e=xc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Wm(e,n,l){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),Lu(e.return,n,l)}function Sc(e,n,l,s,f,d){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:f,treeForkCount:d}:(v.isBackwards=n,v.rendering=null,v.renderingStartTime=0,v.last=s,v.tail=l,v.tailMode=f,v.treeForkCount=d)}function ep(e,n,l){var s=n.pendingProps,f=s.revealOrder,d=s.tail;s=s.children;var v=Tt.current,k=(v&2)!==0;if(k?(v=v&1|2,n.flags|=128):v&=1,T(Tt,v),$t(e,n,s,l),s=Xe?Fi:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wm(e,l,n);else if(e.tag===19)Wm(e,l,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(f){case"forwards":for(l=n.child,f=null;l!==null;)e=l.alternate,e!==null&&Ss(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=n.child,n.child=null):(f=l.sibling,l.sibling=null),Sc(n,!1,f,l,d,s);break;case"backwards":case"unstable_legacy-backwards":for(l=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Ss(e)===null){n.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}Sc(n,!0,l,null,d,s);break;case"together":Sc(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function va(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),Qa|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(ai(e,n,l,!1),(l&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,l=ha(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=ha(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function kc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&ms(e)))}function Dv(e,n,l){switch(n.tag){case 3:We(n,n.stateNode.containerInfo),qa(n,At,e.memoizedState.cache),bl();break;case 27:case 5:Ct(n);break;case 4:We(n,n.stateNode.containerInfo);break;case 10:qa(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Fu(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?($a(n),n.flags|=128,null):(l&n.child.childLanes)!==0?Pm(e,n,l):($a(n),e=va(e,n,l),e!==null?e.sibling:null);$a(n);break;case 19:var f=(e.flags&128)!==0;if(s=(l&n.childLanes)!==0,s||(ai(e,n,l,!1),s=(l&n.childLanes)!==0),f){if(s)return ep(e,n,l);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),T(Tt,Tt.current),s)break;return null;case 22:return n.lanes=0,Ym(e,n,l,n.pendingProps);case 24:qa(n,At,e.memoizedState.cache)}return va(e,n,l)}function tp(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)jt=!0;else{if(!kc(e,l)&&(n.flags&128)===0)return jt=!1,Dv(e,n,l);jt=(e.flags&131072)!==0}else jt=!1,Xe&&(n.flags&1048576)!==0&&Rh(n,Fi,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(e=Nl(n.elementType),n.type=e,typeof e=="function")Au(e)?(s=wl(e,s),n.tag=1,n=Km(null,n,e,s,l)):(n.tag=0,n=gc(null,n,e,s,l));else{if(e!=null){var f=e.$$typeof;if(f===F){n.tag=11,n=Gm(null,n,e,s,l);break e}else if(f===te){n.tag=14,n=Zm(null,n,e,s,l);break e}}throw n=K(e)||e,Error(r(306,n,""))}}return n;case 0:return gc(e,n,n.type,n.pendingProps,l);case 1:return s=n.type,f=wl(s,n.pendingProps),Km(e,n,s,f,l);case 3:e:{if(We(n,n.stateNode.containerInfo),e===null)throw Error(r(387));s=n.pendingProps;var d=n.memoizedState;f=d.element,Gu(e,n),nr(n,s,null,l);var v=n.memoizedState;if(s=v.cache,qa(n,At,s),s!==d.cache&&Bu(n,[At],l,!0),tr(),s=v.element,d.isDehydrated)if(d={element:s,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=Jm(e,n,s,l);break e}else if(s!==f){f=Mn(Error(r(424)),n),Qi(f),n=Jm(e,n,s,l);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(_t=Ln(e.firstChild),Gt=n,Xe=!0,Ha=null,On=!0,l=Yh(n,null,s,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(bl(),s===f){n=va(e,n,l);break e}$t(e,n,s,l)}n=n.child}return n;case 26:return Rs(e,n),e===null?(l=dg(n.type,null,n.pendingProps,null))?n.memoizedState=l:Xe||(l=n.type,e=n.pendingProps,s=Ks(ue.current).createElement(l),s[Vt]=n,s[ln]=e,Yt(s,l,e),Bt(s),n.stateNode=s):n.memoizedState=dg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Ct(n),e===null&&Xe&&(s=n.stateNode=ug(n.type,n.pendingProps,ue.current),Gt=n,On=!0,f=_t,el(n.type)?(nf=f,_t=Ln(s.firstChild)):_t=f),$t(e,n,n.pendingProps.children,l),Rs(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Xe&&((f=s=_t)&&(s=f0(s,n.type,n.pendingProps,On),s!==null?(n.stateNode=s,Gt=n,_t=Ln(s.firstChild),On=!1,f=!0):f=!1),f||Ia(n)),Ct(n),f=n.type,d=n.pendingProps,v=e!==null?e.memoizedProps:null,s=d.children,Jc(f,d)?s=null:v!==null&&Jc(f,v)&&(n.flags|=32),n.memoizedState!==null&&(f=Ku(e,n,Ev,null,null,l),Sr._currentValue=f),Rs(e,n),$t(e,n,s,l),n.child;case 6:return e===null&&Xe&&((e=l=_t)&&(l=d0(l,n.pendingProps,On),l!==null?(n.stateNode=l,Gt=n,_t=null,e=!0):e=!1),e||Ia(n)),null;case 13:return Pm(e,n,l);case 4:return We(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=Cl(n,null,s,l):$t(e,n,s,l),n.child;case 11:return Gm(e,n,n.type,n.pendingProps,l);case 7:return $t(e,n,n.pendingProps,l),n.child;case 8:return $t(e,n,n.pendingProps.children,l),n.child;case 12:return $t(e,n,n.pendingProps.children,l),n.child;case 10:return s=n.pendingProps,qa(n,n.type,s.value),$t(e,n,s.children,l),n.child;case 9:return f=n.type._context,s=n.pendingProps.children,kl(n),f=Zt(f),s=s(f),n.flags|=1,$t(e,n,s,l),n.child;case 14:return Zm(e,n,n.type,n.pendingProps,l);case 15:return $m(e,n,n.type,n.pendingProps,l);case 19:return ep(e,n,l);case 31:return Ov(e,n,l);case 22:return Ym(e,n,l,n.pendingProps);case 24:return kl(n),s=Zt(At),e===null?(f=Iu(),f===null&&(f=mt,d=Uu(),f.pooledCache=d,d.refCount++,d!==null&&(f.pooledCacheLanes|=l),f=d),n.memoizedState={parent:s,cache:f},Vu(n),qa(n,At,f)):((e.lanes&l)!==0&&(Gu(e,n),nr(n,null,null,l),tr()),f=e.memoizedState,d=n.memoizedState,f.parent!==s?(f={parent:s,cache:s},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),qa(n,At,s)):(s=d.cache,qa(n,At,s),s!==f.cache&&Bu(n,[At],l,!0))),$t(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function xa(e){e.flags|=4}function Tc(e,n,l,s,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Ap())e.flags|=8192;else throw El=_s,qu}else e.flags&=-16777217}function np(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!yg(n))if(Ap())e.flags|=8192;else throw El=_s,qu}function Ds(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Dd():536870912,e.lanes|=n,pi|=n)}function or(e,n){if(!Xe)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function vt(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,s=0;if(n)for(var f=e.child;f!==null;)l|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)l|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=s,e.childLanes=l,n}function Lv(e,n,l){var s=n.pendingProps;switch(zu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(n),null;case 1:return vt(n),null;case 3:return l=n.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),ga(At),Ke(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ni(n)?xa(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Ou())),vt(n),null;case 26:var f=n.type,d=n.memoizedState;return e===null?(xa(n),d!==null?(vt(n),np(n,d)):(vt(n),Tc(n,f,null,s,l))):d?d!==e.memoizedState?(xa(n),vt(n),np(n,d)):(vt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==s&&xa(n),vt(n),Tc(n,f,e,s,l)),null;case 27:if(Jt(n),l=ue.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&xa(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return vt(n),null}e=ee.current,ni(n)?Dh(n):(e=ug(f,s,l),n.stateNode=e,xa(n))}return vt(n),null;case 5:if(Jt(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&xa(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return vt(n),null}if(d=ee.current,ni(n))Dh(n);else{var v=Ks(ue.current);switch(d){case 1:d=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:d=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":d=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":d=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":d=v.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?d.multiple=!0:s.size&&(d.size=s.size);break;default:d=typeof s.is=="string"?v.createElement(f,{is:s.is}):v.createElement(f)}}d[Vt]=n,d[ln]=s;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)d.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===n)break e;for(;v.sibling===null;){if(v.return===null||v.return===n)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}n.stateNode=d;e:switch(Yt(d,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&xa(n)}}return vt(n),Tc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==s&&xa(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(r(166));if(e=ue.current,ni(n)){if(e=n.stateNode,l=n.memoizedProps,s=null,f=Gt,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}e[Vt]=n,e=!!(e.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||Pp(e.nodeValue,l)),e||Ia(n,!0)}else e=Ks(e).createTextNode(s),e[Vt]=n,n.stateNode=e}return vt(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(s=ni(n),l!==null){if(e===null){if(!s)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Vt]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;vt(n),e=!1}else l=Ou(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(_n(n),n):(_n(n),null);if((n.flags&128)!==0)throw Error(r(558))}return vt(n),null;case 13:if(s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=ni(n),s!==null&&s.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Vt]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;vt(n),f=!1}else f=Ou(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(_n(n),n):(_n(n),null)}return _n(n),(n.flags&128)!==0?(n.lanes=l,n):(l=s!==null,e=e!==null&&e.memoizedState!==null,l&&(s=n.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==f&&(s.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),Ds(n,n.updateQueue),vt(n),null);case 4:return Ke(),e===null&&Yc(n.stateNode.containerInfo),vt(n),null;case 10:return ga(n.type),vt(n),null;case 19:if(Z(Tt),s=n.memoizedState,s===null)return vt(n),null;if(f=(n.flags&128)!==0,d=s.rendering,d===null)if(f)or(s,!1);else{if(kt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=Ss(e),d!==null){for(n.flags|=128,or(s,!1),e=d.updateQueue,n.updateQueue=e,Ds(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)jh(l,e),l=l.sibling;return T(Tt,Tt.current&1|2),Xe&&ma(n,s.treeForkCount),n.child}e=e.sibling}s.tail!==null&&Pt()>Is&&(n.flags|=128,f=!0,or(s,!1),n.lanes=4194304)}else{if(!f)if(e=Ss(d),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Ds(n,e),or(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!Xe)return vt(n),null}else 2*Pt()-s.renderingStartTime>Is&&l!==536870912&&(n.flags|=128,f=!0,or(s,!1),n.lanes=4194304);s.isBackwards?(d.sibling=n.child,n.child=d):(e=s.last,e!==null?e.sibling=d:n.child=d,s.last=d)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Pt(),e.sibling=null,l=Tt.current,T(Tt,f?l&1|2:l&1),Xe&&ma(n,s.treeForkCount),e):(vt(n),null);case 22:case 23:return _n(n),Xu(),s=n.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(l&536870912)!==0&&(n.flags&128)===0&&(vt(n),n.subtreeFlags&6&&(n.flags|=8192)):vt(n),l=n.updateQueue,l!==null&&Ds(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==l&&(n.flags|=2048),e!==null&&Z(Tl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),ga(At),vt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Bv(e,n){switch(zu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ga(At),Ke(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Jt(n),null;case 31:if(n.memoizedState!==null){if(_n(n),n.alternate===null)throw Error(r(340));bl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(_n(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));bl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Z(Tt),null;case 4:return Ke(),null;case 10:return ga(n.type),null;case 22:case 23:return _n(n),Xu(),e!==null&&Z(Tl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ga(At),null;case 25:return null;default:return null}}function ap(e,n){switch(zu(n),n.tag){case 3:ga(At),Ke();break;case 26:case 27:case 5:Jt(n);break;case 4:Ke();break;case 31:n.memoizedState!==null&&_n(n);break;case 13:_n(n);break;case 19:Z(Tt);break;case 10:ga(n.type);break;case 22:case 23:_n(n),Xu(),e!==null&&Z(Tl);break;case 24:ga(At)}}function ur(e,n){try{var l=n.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var f=s.next;l=f;do{if((l.tag&e)===e){s=void 0;var d=l.create,v=l.inst;s=d(),v.destroy=s}l=l.next}while(l!==f)}}catch(k){ot(n,n.return,k)}}function Xa(e,n,l){try{var s=n.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var d=f.next;s=d;do{if((s.tag&e)===e){var v=s.inst,k=v.destroy;if(k!==void 0){v.destroy=void 0,f=n;var C=l,I=k;try{I()}catch(Y){ot(f,C,Y)}}}s=s.next}while(s!==d)}}catch(Y){ot(n,n.return,Y)}}function lp(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{Fh(n,l)}catch(s){ot(e,e.return,s)}}}function ip(e,n,l){l.props=wl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(s){ot(e,n,s)}}function cr(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof l=="function"?e.refCleanup=l(s):l.current=s}}catch(f){ot(e,n,f)}}function ea(e,n){var l=e.ref,s=e.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(f){ot(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){ot(e,n,f)}else l.current=null}function rp(e){var n=e.type,l=e.memoizedProps,s=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(f){ot(e,e.return,f)}}function Nc(e,n,l){try{var s=e.stateNode;i0(s,e.type,l,n),s[ln]=n}catch(f){ot(e,e.return,f)}}function sp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&el(e.type)||e.tag===4}function Ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&el(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Cc(e,n,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=fa));else if(s!==4&&(s===27&&el(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(Cc(e,n,l),e=e.sibling;e!==null;)Cc(e,n,l),e=e.sibling}function Ls(e,n,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(s!==4&&(s===27&&el(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Ls(e,n,l),e=e.sibling;e!==null;)Ls(e,n,l),e=e.sibling}function op(e){var n=e.stateNode,l=e.memoizedProps;try{for(var s=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Yt(n,s,l),n[Vt]=e,n[ln]=l}catch(d){ot(e,e.return,d)}}var ba=!1,Mt=!1,Ac=!1,up=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function Uv(e,n){if(e=e.containerInfo,Qc=ao,e=bh(e),bu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var s=l.getSelection&&l.getSelection();if(s&&s.rangeCount!==0){l=s.anchorNode;var f=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var v=0,k=-1,C=-1,I=0,Y=0,P=e,q=null;t:for(;;){for(var V;P!==l||f!==0&&P.nodeType!==3||(k=v+f),P!==d||s!==0&&P.nodeType!==3||(C=v+s),P.nodeType===3&&(v+=P.nodeValue.length),(V=P.firstChild)!==null;)q=P,P=V;for(;;){if(P===e)break t;if(q===l&&++I===f&&(k=v),q===d&&++Y===s&&(C=v),(V=P.nextSibling)!==null)break;P=q,q=P.parentNode}P=V}l=k===-1||C===-1?null:{start:k,end:C}}else l=null}l=l||{start:0,end:0}}else l=null;for(Kc={focusedElem:e,selectionRange:l},ao=!1,Ut=n;Ut!==null;)if(n=Ut,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Ut=e;else for(;Ut!==null;){switch(n=Ut,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(l=0;l<e.length;l++)f=e[l],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=n,f=d.memoizedProps,d=d.memoizedState,s=l.stateNode;try{var ye=wl(l.type,f);e=s.getSnapshotBeforeUpdate(ye,d),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ne){ot(l,l.return,Ne)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)Wc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Wc(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,Ut=e;break}Ut=n.return}}function cp(e,n,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:ka(e,l),s&4&&ur(5,l);break;case 1:if(ka(e,l),s&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(v){ot(l,l.return,v)}else{var f=wl(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){ot(l,l.return,v)}}s&64&&lp(l),s&512&&cr(l,l.return);break;case 3:if(ka(e,l),s&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{Fh(e,n)}catch(v){ot(l,l.return,v)}}break;case 27:n===null&&s&4&&op(l);case 26:case 5:ka(e,l),n===null&&s&4&&rp(l),s&512&&cr(l,l.return);break;case 12:ka(e,l);break;case 31:ka(e,l),s&4&&hp(e,l);break;case 13:ka(e,l),s&4&&mp(e,l),s&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Xv.bind(null,l),h0(e,l))));break;case 22:if(s=l.memoizedState!==null||ba,!s){n=n!==null&&n.memoizedState!==null||Mt,f=ba;var d=Mt;ba=s,(Mt=n)&&!d?Ta(e,l,(l.subtreeFlags&8772)!==0):ka(e,l),ba=f,Mt=d}break;case 30:break;default:ka(e,l)}}function fp(e){var n=e.alternate;n!==null&&(e.alternate=null,fp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&lu(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 bt=null,sn=!1;function Sa(e,n,l){for(l=l.child;l!==null;)dp(e,n,l),l=l.sibling}function dp(e,n,l){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Wt,l)}catch{}switch(l.tag){case 26:Mt||ea(l,n),Sa(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Mt||ea(l,n);var s=bt,f=sn;el(l.type)&&(bt=l.stateNode,sn=!1),Sa(e,n,l),vr(l.stateNode),bt=s,sn=f;break;case 5:Mt||ea(l,n);case 6:if(s=bt,f=sn,bt=null,Sa(e,n,l),bt=s,sn=f,bt!==null)if(sn)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(l.stateNode)}catch(d){ot(l,n,d)}else try{bt.removeChild(l.stateNode)}catch(d){ot(l,n,d)}break;case 18:bt!==null&&(sn?(e=bt,lg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ki(e)):lg(bt,l.stateNode));break;case 4:s=bt,f=sn,bt=l.stateNode.containerInfo,sn=!0,Sa(e,n,l),bt=s,sn=f;break;case 0:case 11:case 14:case 15:Xa(2,l,n),Mt||Xa(4,l,n),Sa(e,n,l);break;case 1:Mt||(ea(l,n),s=l.stateNode,typeof s.componentWillUnmount=="function"&&ip(l,n,s)),Sa(e,n,l);break;case 21:Sa(e,n,l);break;case 22:Mt=(s=Mt)||l.memoizedState!==null,Sa(e,n,l),Mt=s;break;default:Sa(e,n,l)}}function hp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ki(e)}catch(l){ot(n,n.return,l)}}}function mp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ki(e)}catch(l){ot(n,n.return,l)}}function Hv(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new up),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new up),n;default:throw Error(r(435,e.tag))}}function Bs(e,n){var l=Hv(e);n.forEach(function(s){if(!l.has(s)){l.add(s);var f=Fv.bind(null,e,s);s.then(f,f)}})}function on(e,n){var l=n.deletions;if(l!==null)for(var s=0;s<l.length;s++){var f=l[s],d=e,v=n,k=v;e:for(;k!==null;){switch(k.tag){case 27:if(el(k.type)){bt=k.stateNode,sn=!1;break e}break;case 5:bt=k.stateNode,sn=!1;break e;case 3:case 4:bt=k.stateNode.containerInfo,sn=!0;break e}k=k.return}if(bt===null)throw Error(r(160));dp(d,v,f),bt=null,sn=!1,d=f.alternate,d!==null&&(d.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)pp(n,e),n=n.sibling}var Xn=null;function pp(e,n){var l=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:on(n,e),un(e),s&4&&(Xa(3,e,e.return),ur(3,e),Xa(5,e,e.return));break;case 1:on(n,e),un(e),s&512&&(Mt||l===null||ea(l,l.return)),s&64&&ba&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?s:l.concat(s))));break;case 26:var f=Xn;if(on(n,e),un(e),s&512&&(Mt||l===null||ea(l,l.return)),s&4){var d=l!==null?l.memoizedState:null;if(s=e.memoizedState,l===null)if(s===null)if(e.stateNode===null){e:{s=e.type,l=e.memoizedProps,f=f.ownerDocument||f;t:switch(s){case"title":d=f.getElementsByTagName("title")[0],(!d||d[Bi]||d[Vt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=f.createElement(s),f.head.insertBefore(d,f.querySelector("head > title"))),Yt(d,s,l),d[Vt]=e,Bt(d),s=d;break e;case"link":var v=pg("link","href",f).get(s+(l.href||""));if(v){for(var k=0;k<v.length;k++)if(d=v[k],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){v.splice(k,1);break t}}d=f.createElement(s),Yt(d,s,l),f.head.appendChild(d);break;case"meta":if(v=pg("meta","content",f).get(s+(l.content||""))){for(k=0;k<v.length;k++)if(d=v[k],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){v.splice(k,1);break t}}d=f.createElement(s),Yt(d,s,l),f.head.appendChild(d);break;default:throw Error(r(468,s))}d[Vt]=e,Bt(d),s=d}e.stateNode=s}else gg(f,e.type,e.stateNode);else e.stateNode=mg(f,s,e.memoizedProps);else d!==s?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,s===null?gg(f,e.type,e.stateNode):mg(f,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Nc(e,e.memoizedProps,l.memoizedProps)}break;case 27:on(n,e),un(e),s&512&&(Mt||l===null||ea(l,l.return)),l!==null&&s&4&&Nc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(on(n,e),un(e),s&512&&(Mt||l===null||ea(l,l.return)),e.flags&32){f=e.stateNode;try{Yl(f,"")}catch(ye){ot(e,e.return,ye)}}s&4&&e.stateNode!=null&&(f=e.memoizedProps,Nc(e,f,l!==null?l.memoizedProps:f)),s&1024&&(Ac=!0);break;case 6:if(on(n,e),un(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,l=e.stateNode;try{l.nodeValue=s}catch(ye){ot(e,e.return,ye)}}break;case 3:if(Ws=null,f=Xn,Xn=Js(n.containerInfo),on(n,e),Xn=f,un(e),s&4&&l!==null&&l.memoizedState.isDehydrated)try{ki(n.containerInfo)}catch(ye){ot(e,e.return,ye)}Ac&&(Ac=!1,gp(e));break;case 4:s=Xn,Xn=Js(e.stateNode.containerInfo),on(n,e),un(e),Xn=s;break;case 12:on(n,e),un(e);break;case 31:on(n,e),un(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bs(e,s)));break;case 13:on(n,e),un(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Hs=Pt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bs(e,s)));break;case 22:f=e.memoizedState!==null;var C=l!==null&&l.memoizedState!==null,I=ba,Y=Mt;if(ba=I||f,Mt=Y||C,on(n,e),Mt=Y,ba=I,un(e),s&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(l===null||C||ba||Mt||jl(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){C=l=n;try{if(d=C.stateNode,f)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{k=C.stateNode;var P=C.memoizedProps.style,q=P!=null&&P.hasOwnProperty("display")?P.display:null;k.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(ye){ot(C,C.return,ye)}}}else if(n.tag===6){if(l===null){C=n;try{C.stateNode.nodeValue=f?"":C.memoizedProps}catch(ye){ot(C,C.return,ye)}}}else if(n.tag===18){if(l===null){C=n;try{var V=C.stateNode;f?ig(V,!0):ig(C.stateNode,!1)}catch(ye){ot(C,C.return,ye)}}}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;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=e.updateQueue,s!==null&&(l=s.retryQueue,l!==null&&(s.retryQueue=null,Bs(e,l))));break;case 19:on(n,e),un(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bs(e,s)));break;case 30:break;case 21:break;default:on(n,e),un(e)}}function un(e){var n=e.flags;if(n&2){try{for(var l,s=e.return;s!==null;){if(sp(s)){l=s;break}s=s.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var f=l.stateNode,d=Ec(e);Ls(e,d,f);break;case 5:var v=l.stateNode;l.flags&32&&(Yl(v,""),l.flags&=-33);var k=Ec(e);Ls(e,k,v);break;case 3:case 4:var C=l.stateNode.containerInfo,I=Ec(e);Cc(e,I,C);break;default:throw Error(r(161))}}catch(Y){ot(e,e.return,Y)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function gp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;gp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function ka(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)cp(e,n.alternate,n),n=n.sibling}function jl(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Xa(4,n,n.return),jl(n);break;case 1:ea(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&ip(n,n.return,l),jl(n);break;case 27:vr(n.stateNode);case 26:case 5:ea(n,n.return),jl(n);break;case 22:n.memoizedState===null&&jl(n);break;case 30:jl(n);break;default:jl(n)}e=e.sibling}}function Ta(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,f=e,d=n,v=d.flags;switch(d.tag){case 0:case 11:case 15:Ta(f,d,l),ur(4,d);break;case 1:if(Ta(f,d,l),s=d,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(I){ot(s,s.return,I)}if(s=d,f=s.updateQueue,f!==null){var k=s.stateNode;try{var C=f.shared.hiddenCallbacks;if(C!==null)for(f.shared.hiddenCallbacks=null,f=0;f<C.length;f++)Xh(C[f],k)}catch(I){ot(s,s.return,I)}}l&&v&64&&lp(d),cr(d,d.return);break;case 27:op(d);case 26:case 5:Ta(f,d,l),l&&s===null&&v&4&&rp(d),cr(d,d.return);break;case 12:Ta(f,d,l);break;case 31:Ta(f,d,l),l&&v&4&&hp(f,d);break;case 13:Ta(f,d,l),l&&v&4&&mp(f,d);break;case 22:d.memoizedState===null&&Ta(f,d,l),cr(d,d.return);break;case 30:break;default:Ta(f,d,l)}n=n.sibling}}function wc(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Ki(l))}function jc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ki(e))}function Fn(e,n,l,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)yp(e,n,l,s),n=n.sibling}function yp(e,n,l,s){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Fn(e,n,l,s),f&2048&&ur(9,n);break;case 1:Fn(e,n,l,s);break;case 3:Fn(e,n,l,s),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ki(e)));break;case 12:if(f&2048){Fn(e,n,l,s),e=n.stateNode;try{var d=n.memoizedProps,v=d.id,k=d.onPostCommit;typeof k=="function"&&k(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){ot(n,n.return,C)}}else Fn(e,n,l,s);break;case 31:Fn(e,n,l,s);break;case 13:Fn(e,n,l,s);break;case 23:break;case 22:d=n.stateNode,v=n.alternate,n.memoizedState!==null?d._visibility&2?Fn(e,n,l,s):fr(e,n):d._visibility&2?Fn(e,n,l,s):(d._visibility|=2,di(e,n,l,s,(n.subtreeFlags&10256)!==0||!1)),f&2048&&wc(v,n);break;case 24:Fn(e,n,l,s),f&2048&&jc(n.alternate,n);break;default:Fn(e,n,l,s)}}function di(e,n,l,s,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,v=n,k=l,C=s,I=v.flags;switch(v.tag){case 0:case 11:case 15:di(d,v,k,C,f),ur(8,v);break;case 23:break;case 22:var Y=v.stateNode;v.memoizedState!==null?Y._visibility&2?di(d,v,k,C,f):fr(d,v):(Y._visibility|=2,di(d,v,k,C,f)),f&&I&2048&&wc(v.alternate,v);break;case 24:di(d,v,k,C,f),f&&I&2048&&jc(v.alternate,v);break;default:di(d,v,k,C,f)}n=n.sibling}}function fr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,s=n,f=s.flags;switch(s.tag){case 22:fr(l,s),f&2048&&wc(s.alternate,s);break;case 24:fr(l,s),f&2048&&jc(s.alternate,s);break;default:fr(l,s)}n=n.sibling}}var dr=8192;function hi(e,n,l){if(e.subtreeFlags&dr)for(e=e.child;e!==null;)_p(e,n,l),e=e.sibling}function _p(e,n,l){switch(e.tag){case 26:hi(e,n,l),e.flags&dr&&e.memoizedState!==null&&N0(l,Xn,e.memoizedState,e.memoizedProps);break;case 5:hi(e,n,l);break;case 3:case 4:var s=Xn;Xn=Js(e.stateNode.containerInfo),hi(e,n,l),Xn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=dr,dr=16777216,hi(e,n,l),dr=s):hi(e,n,l));break;default:hi(e,n,l)}}function vp(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 hr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var s=n[l];Ut=s,bp(s,e)}vp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)xp(e),e=e.sibling}function xp(e){switch(e.tag){case 0:case 11:case 15:hr(e),e.flags&2048&&Xa(9,e,e.return);break;case 3:hr(e);break;case 12:hr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Us(e)):hr(e);break;default:hr(e)}}function Us(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var s=n[l];Ut=s,bp(s,e)}vp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Xa(8,n,n.return),Us(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Us(n));break;default:Us(n)}e=e.sibling}}function bp(e,n){for(;Ut!==null;){var l=Ut;switch(l.tag){case 0:case 11:case 15:Xa(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var s=l.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Ki(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,Ut=s;else e:for(l=e;Ut!==null;){s=Ut;var f=s.sibling,d=s.return;if(fp(s),s===l){Ut=null;break e}if(f!==null){f.return=d,Ut=f;break e}Ut=d}}}var Iv={getCacheForType:function(e){var n=Zt(At),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return Zt(At).controller.signal}},qv=typeof WeakMap=="function"?WeakMap:Map,lt=0,mt=null,He=null,Ge=0,st=0,vn=null,Fa=!1,mi=!1,Mc=!1,Na=0,kt=0,Qa=0,Ml=0,zc=0,xn=0,pi=0,mr=null,cn=null,Rc=!1,Hs=0,Sp=0,Is=1/0,qs=null,Ka=null,Dt=0,Ja=null,gi=null,Ea=0,Oc=0,Dc=null,kp=null,pr=0,Lc=null;function bn(){return(lt&2)!==0&&Ge!==0?Ge&-Ge:D.T!==null?Vc():Hd()}function Tp(){if(xn===0)if((Ge&536870912)===0||Xe){var e=Qr;Qr<<=1,(Qr&3932160)===0&&(Qr=262144),xn=e}else xn=536870912;return e=yn.current,e!==null&&(e.flags|=32),xn}function fn(e,n,l){(e===mt&&(st===2||st===9)||e.cancelPendingCommit!==null)&&(yi(e,0),Pa(e,Ge,xn,!1)),Li(e,l),((lt&2)===0||e!==mt)&&(e===mt&&((lt&2)===0&&(Ml|=l),kt===4&&Pa(e,Ge,xn,!1)),ta(e))}function Np(e,n,l){if((lt&6)!==0)throw Error(r(327));var s=!l&&(n&127)===0&&(n&e.expiredLanes)===0||Di(e,n),f=s?Zv(e,n):Uc(e,n,!0),d=s;do{if(f===0){mi&&!s&&Pa(e,n,0,!1);break}else{if(l=e.current.alternate,d&&!Vv(l)){f=Uc(e,n,!1),d=!1;continue}if(f===2){if(d=n,e.errorRecoveryDisabledLanes&d)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var k=e;f=mr;var C=k.current.memoizedState.isDehydrated;if(C&&(yi(k,v).flags|=256),v=Uc(k,v,!1),v!==2){if(Mc&&!C){k.errorRecoveryDisabledLanes|=d,Ml|=d,f=4;break e}d=cn,cn=f,d!==null&&(cn===null?cn=d:cn.push.apply(cn,d))}f=v}if(d=!1,f!==2)continue}}if(f===1){yi(e,0),Pa(e,n,0,!0);break}e:{switch(s=e,d=f,d){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Pa(s,n,xn,!Fa);break e;case 2:cn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=Hs+300-Pt(),10<f)){if(Pa(s,n,xn,!Fa),Jr(s,0,!0)!==0)break e;Ea=n,s.timeoutHandle=ng(Ep.bind(null,s,l,cn,qs,Rc,n,xn,Ml,pi,Fa,d,"Throttled",-0,0),f);break e}Ep(s,l,cn,qs,Rc,n,xn,Ml,pi,Fa,d,null,-0,0)}}break}while(!0);ta(e)}function Ep(e,n,l,s,f,d,v,k,C,I,Y,P,q,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:fa},_p(n,d,P);var ye=(d&62914560)===d?Hs-Pt():(d&4194048)===d?Sp-Pt():0;if(ye=E0(P,ye),ye!==null){Ea=d,e.cancelPendingCommit=ye(Op.bind(null,e,n,d,l,s,f,v,k,C,Y,P,null,q,V)),Pa(e,d,v,!I);return}}Op(e,n,d,l,s,f,v,k,C)}function Vv(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var s=0;s<l.length;s++){var f=l[s],d=f.getSnapshot;f=f.value;try{if(!pn(d(),f))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;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 Pa(e,n,l,s){n&=~zc,n&=~Ml,e.suspendedLanes|=n,e.pingedLanes&=~n,s&&(e.warmLanes|=n),s=e.expirationTimes;for(var f=n;0<f;){var d=31-ht(f),v=1<<d;s[d]=-1,f&=~v}l!==0&&Ld(e,l,n)}function Vs(){return(lt&6)===0?(gr(0),!1):!0}function Bc(){if(He!==null){if(st===0)var e=He.return;else e=He,pa=Sl=null,Wu(e),si=null,Pi=0,e=He;for(;e!==null;)ap(e.alternate,e),e=e.return;He=null}}function yi(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,o0(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Ea=0,Bc(),mt=e,He=l=ha(e.current,null),Ge=n,st=0,vn=null,Fa=!1,mi=Di(e,n),Mc=!1,pi=xn=zc=Ml=Qa=kt=0,cn=mr=null,Rc=!1,(n&8)!==0&&(n|=n&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=n;0<s;){var f=31-ht(s),d=1<<f;n|=e[f],s&=~d}return Na=n,us(),l}function Cp(e,n){Re=null,D.H=rr,n===ri||n===ys?(n=Gh(),st=3):n===qu?(n=Gh(),st=4):st=n===pc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,vn=n,He===null&&(kt=1,Ms(e,Mn(n,e.current)))}function Ap(){var e=yn.current;return e===null?!0:(Ge&4194048)===Ge?Dn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===Dn:!1}function wp(){var e=D.H;return D.H=rr,e===null?rr:e}function jp(){var e=D.A;return D.A=Iv,e}function Gs(){kt=4,Fa||(Ge&4194048)!==Ge&&yn.current!==null||(mi=!0),(Qa&134217727)===0&&(Ml&134217727)===0||mt===null||Pa(mt,Ge,xn,!1)}function Uc(e,n,l){var s=lt;lt|=2;var f=wp(),d=jp();(mt!==e||Ge!==n)&&(qs=null,yi(e,n)),n=!1;var v=kt;e:do try{if(st!==0&&He!==null){var k=He,C=vn;switch(st){case 8:Bc(),v=6;break e;case 3:case 2:case 9:case 6:yn.current===null&&(n=!0);var I=st;if(st=0,vn=null,_i(e,k,C,I),l&&mi){v=0;break e}break;default:I=st,st=0,vn=null,_i(e,k,C,I)}}Gv(),v=kt;break}catch(Y){Cp(e,Y)}while(!0);return n&&e.shellSuspendCounter++,pa=Sl=null,lt=s,D.H=f,D.A=d,He===null&&(mt=null,Ge=0,us()),v}function Gv(){for(;He!==null;)Mp(He)}function Zv(e,n){var l=lt;lt|=2;var s=wp(),f=jp();mt!==e||Ge!==n?(qs=null,Is=Pt()+500,yi(e,n)):mi=Di(e,n);e:do try{if(st!==0&&He!==null){n=He;var d=vn;t:switch(st){case 1:st=0,vn=null,_i(e,n,d,1);break;case 2:case 9:if(qh(d)){st=0,vn=null,zp(n);break}n=function(){st!==2&&st!==9||mt!==e||(st=7),ta(e)},d.then(n,n);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:qh(d)?(st=0,vn=null,zp(n)):(st=0,vn=null,_i(e,n,d,7));break;case 5:var v=null;switch(He.tag){case 26:v=He.memoizedState;case 5:case 27:var k=He;if(v?yg(v):k.stateNode.complete){st=0,vn=null;var C=k.sibling;if(C!==null)He=C;else{var I=k.return;I!==null?(He=I,Zs(I)):He=null}break t}}st=0,vn=null,_i(e,n,d,5);break;case 6:st=0,vn=null,_i(e,n,d,6);break;case 8:Bc(),kt=6;break e;default:throw Error(r(462))}}$v();break}catch(Y){Cp(e,Y)}while(!0);return pa=Sl=null,D.H=s,D.A=f,lt=l,He!==null?0:(mt=null,Ge=0,us(),kt)}function $v(){for(;He!==null&&!Jo();)Mp(He)}function Mp(e){var n=tp(e.alternate,e,Na);e.memoizedProps=e.pendingProps,n===null?Zs(e):He=n}function zp(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=Qm(l,n,n.pendingProps,n.type,void 0,Ge);break;case 11:n=Qm(l,n,n.pendingProps,n.type.render,n.ref,Ge);break;case 5:Wu(n);default:ap(l,n),n=He=jh(n,Na),n=tp(l,n,Na)}e.memoizedProps=e.pendingProps,n===null?Zs(e):He=n}function _i(e,n,l,s){pa=Sl=null,Wu(n),si=null,Pi=0;var f=n.return;try{if(Rv(e,f,n,l,Ge)){kt=1,Ms(e,Mn(l,e.current)),He=null;return}}catch(d){if(f!==null)throw He=f,d;kt=1,Ms(e,Mn(l,e.current)),He=null;return}n.flags&32768?(Xe||s===1?e=!0:mi||(Ge&536870912)!==0?e=!1:(Fa=e=!0,(s===2||s===9||s===3||s===6)&&(s=yn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Rp(n,e)):Zs(n)}function Zs(e){var n=e;do{if((n.flags&32768)!==0){Rp(n,Fa);return}e=n.return;var l=Lv(n.alternate,n,Na);if(l!==null){He=l;return}if(n=n.sibling,n!==null){He=n;return}He=n=e}while(n!==null);kt===0&&(kt=5)}function Rp(e,n){do{var l=Bv(e.alternate,e);if(l!==null){l.flags&=32767,He=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){He=e;return}He=e=l}while(e!==null);kt=6,He=null}function Op(e,n,l,s,f,d,v,k,C){e.cancelPendingCommit=null;do $s();while(Dt!==0);if((lt&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(d=n.lanes|n.childLanes,d|=Eu,T_(e,l,d,v,k,C),e===mt&&(He=mt=null,Ge=0),gi=n,Ja=e,Ea=l,Oc=d,Dc=f,kp=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Qv(Ce,function(){return Hp(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=D.T,D.T=null,f=J.p,J.p=2,v=lt,lt|=4;try{Uv(e,n,l)}finally{lt=v,J.p=f,D.T=s}}Dt=1,Dp(),Lp(),Bp()}}function Dp(){if(Dt===1){Dt=0;var e=Ja,n=gi,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var s=J.p;J.p=2;var f=lt;lt|=4;try{pp(n,e);var d=Kc,v=bh(e.containerInfo),k=d.focusedElem,C=d.selectionRange;if(v!==k&&k&&k.ownerDocument&&xh(k.ownerDocument.documentElement,k)){if(C!==null&&bu(k)){var I=C.start,Y=C.end;if(Y===void 0&&(Y=I),"selectionStart"in k)k.selectionStart=I,k.selectionEnd=Math.min(Y,k.value.length);else{var P=k.ownerDocument||document,q=P&&P.defaultView||window;if(q.getSelection){var V=q.getSelection(),ye=k.textContent.length,Ne=Math.min(C.start,ye),dt=C.end===void 0?Ne:Math.min(C.end,ye);!V.extend&&Ne>dt&&(v=dt,dt=Ne,Ne=v);var O=vh(k,Ne),w=vh(k,dt);if(O&&w&&(V.rangeCount!==1||V.anchorNode!==O.node||V.anchorOffset!==O.offset||V.focusNode!==w.node||V.focusOffset!==w.offset)){var H=P.createRange();H.setStart(O.node,O.offset),V.removeAllRanges(),Ne>dt?(V.addRange(H),V.extend(w.node,w.offset)):(H.setEnd(w.node,w.offset),V.addRange(H))}}}}for(P=[],V=k;V=V.parentNode;)V.nodeType===1&&P.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<P.length;k++){var Q=P[k];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}ao=!!Qc,Kc=Qc=null}finally{lt=f,J.p=s,D.T=l}}e.current=n,Dt=2}}function Lp(){if(Dt===2){Dt=0;var e=Ja,n=gi,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var s=J.p;J.p=2;var f=lt;lt|=4;try{cp(e,n.alternate,n)}finally{lt=f,J.p=s,D.T=l}}Dt=3}}function Bp(){if(Dt===4||Dt===3){Dt=0,Po();var e=Ja,n=gi,l=Ea,s=kp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Dt=5:(Dt=0,gi=Ja=null,Up(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Ka=null),nu(l),n=n.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(Wt,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=D.T,f=J.p,J.p=2,D.T=null;try{for(var d=e.onRecoverableError,v=0;v<s.length;v++){var k=s[v];d(k.value,{componentStack:k.stack})}}finally{D.T=n,J.p=f}}(Ea&3)!==0&&$s(),ta(e),f=e.pendingLanes,(l&261930)!==0&&(f&42)!==0?e===Lc?pr++:(pr=0,Lc=e):pr=0,gr(0)}}function Up(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Ki(n)))}function $s(){return Dp(),Lp(),Bp(),Hp()}function Hp(){if(Dt!==5)return!1;var e=Ja,n=Oc;Oc=0;var l=nu(Ea),s=D.T,f=J.p;try{J.p=32>l?32:l,D.T=null,l=Dc,Dc=null;var d=Ja,v=Ea;if(Dt=0,gi=Ja=null,Ea=0,(lt&6)!==0)throw Error(r(331));var k=lt;if(lt|=4,xp(d.current),yp(d,d.current,v,l),lt=k,gr(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Wt,d)}catch{}return!0}finally{J.p=f,D.T=s,Up(e,n)}}function Ip(e,n,l){n=Mn(l,n),n=mc(e.stateNode,n,2),e=Za(e,n,2),e!==null&&(Li(e,2),ta(e))}function ot(e,n,l){if(e.tag===3)Ip(e,e,l);else for(;n!==null;){if(n.tag===3){Ip(n,e,l);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ka===null||!Ka.has(s))){e=Mn(l,e),l=qm(2),s=Za(n,l,2),s!==null&&(Vm(l,s,n,e),Li(s,2),ta(s));break}}n=n.return}}function Hc(e,n,l){var s=e.pingCache;if(s===null){s=e.pingCache=new qv;var f=new Set;s.set(n,f)}else f=s.get(n),f===void 0&&(f=new Set,s.set(n,f));f.has(l)||(Mc=!0,f.add(l),e=Yv.bind(null,e,n,l),n.then(e,e))}function Yv(e,n,l){var s=e.pingCache;s!==null&&s.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,mt===e&&(Ge&l)===l&&(kt===4||kt===3&&(Ge&62914560)===Ge&&300>Pt()-Hs?(lt&2)===0&&yi(e,0):zc|=l,pi===Ge&&(pi=0)),ta(e)}function qp(e,n){n===0&&(n=Dd()),e=vl(e,n),e!==null&&(Li(e,n),ta(e))}function Xv(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),qp(e,l)}function Fv(e,n){var l=0;switch(e.tag){case 31:case 13:var s=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(n),qp(e,l)}function Qv(e,n){return qt(e,n)}var Ys=null,vi=null,Ic=!1,Xs=!1,qc=!1,Wa=0;function ta(e){e!==vi&&e.next===null&&(vi===null?Ys=vi=e:vi=vi.next=e),Xs=!0,Ic||(Ic=!0,Jv())}function gr(e,n){if(!qc&&Xs){qc=!0;do for(var l=!1,s=Ys;s!==null;){if(e!==0){var f=s.pendingLanes;if(f===0)var d=0;else{var v=s.suspendedLanes,k=s.pingedLanes;d=(1<<31-ht(42|e)+1)-1,d&=f&~(v&~k),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,$p(s,d))}else d=Ge,d=Jr(s,s===mt?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||Di(s,d)||(l=!0,$p(s,d));s=s.next}while(l);qc=!1}}function Kv(){Vp()}function Vp(){Xs=Ic=!1;var e=0;Wa!==0&&s0()&&(e=Wa);for(var n=Pt(),l=null,s=Ys;s!==null;){var f=s.next,d=Gp(s,n);d===0?(s.next=null,l===null?Ys=f:l.next=f,f===null&&(vi=l)):(l=s,(e!==0||(d&3)!==0)&&(Xs=!0)),s=f}Dt!==0&&Dt!==5||gr(e),Wa!==0&&(Wa=0)}function Gp(e,n){for(var l=e.suspendedLanes,s=e.pingedLanes,f=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var v=31-ht(d),k=1<<v,C=f[v];C===-1?((k&l)===0||(k&s)!==0)&&(f[v]=k_(k,n)):C<=n&&(e.expiredLanes|=k),d&=~k}if(n=mt,l=Ge,l=Jr(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,l===0||e===n&&(st===2||st===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Zn(s),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Di(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(s!==null&&Zn(s),nu(l)){case 2:case 8:l=ce;break;case 32:l=Ce;break;case 268435456:l=it;break;default:l=Ce}return s=Zp.bind(null,e),l=qt(l,s),e.callbackPriority=n,e.callbackNode=l,n}return s!==null&&s!==null&&Zn(s),e.callbackPriority=2,e.callbackNode=null,2}function Zp(e,n){if(Dt!==0&&Dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if($s()&&e.callbackNode!==l)return null;var s=Ge;return s=Jr(e,e===mt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Np(e,s,n),Gp(e,Pt()),e.callbackNode!=null&&e.callbackNode===l?Zp.bind(null,e):null)}function $p(e,n){if($s())return null;Np(e,n,!0)}function Jv(){u0(function(){(lt&6)!==0?qt(X,Kv):Vp()})}function Vc(){if(Wa===0){var e=li;e===0&&(e=Fr,Fr<<=1,(Fr&261888)===0&&(Fr=256)),Wa=e}return Wa}function Yp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ts(""+e)}function Xp(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function Pv(e,n,l,s,f){if(n==="submit"&&l&&l.stateNode===f){var d=Yp((f[ln]||null).action),v=s.submitter;v&&(n=(n=v[ln]||null)?Yp(n.formAction):v.getAttribute("formAction"),n!==null&&(d=n,v=null));var k=new is("action","action",null,s,f);e.push({event:k,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Wa!==0){var C=v?Xp(f,v):new FormData(f);oc(l,{pending:!0,data:C,method:f.method,action:d},null,C)}}else typeof d=="function"&&(k.preventDefault(),C=v?Xp(f,v):new FormData(f),oc(l,{pending:!0,data:C,method:f.method,action:d},d,C))},currentTarget:f}]})}}for(var Gc=0;Gc<Nu.length;Gc++){var Zc=Nu[Gc],Wv=Zc.toLowerCase(),e0=Zc[0].toUpperCase()+Zc.slice(1);Yn(Wv,"on"+e0)}Yn(Th,"onAnimationEnd"),Yn(Nh,"onAnimationIteration"),Yn(Eh,"onAnimationStart"),Yn("dblclick","onDoubleClick"),Yn("focusin","onFocus"),Yn("focusout","onBlur"),Yn(gv,"onTransitionRun"),Yn(yv,"onTransitionStart"),Yn(_v,"onTransitionCancel"),Yn(Ch,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),pl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),pl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),pl("onBeforeInput",["compositionend","keypress","textInput","paste"]),pl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),pl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),pl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yr="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(" "),t0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yr));function Fp(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var s=e[l],f=s.event;s=s.listeners;e:{var d=void 0;if(n)for(var v=s.length-1;0<=v;v--){var k=s[v],C=k.instance,I=k.currentTarget;if(k=k.listener,C!==d&&f.isPropagationStopped())break e;d=k,f.currentTarget=I;try{d(f)}catch(Y){os(Y)}f.currentTarget=null,d=C}else for(v=0;v<s.length;v++){if(k=s[v],C=k.instance,I=k.currentTarget,k=k.listener,C!==d&&f.isPropagationStopped())break e;d=k,f.currentTarget=I;try{d(f)}catch(Y){os(Y)}f.currentTarget=null,d=C}}}}function Ie(e,n){var l=n[au];l===void 0&&(l=n[au]=new Set);var s=e+"__bubble";l.has(s)||(Qp(n,e,2,!1),l.add(s))}function $c(e,n,l){var s=0;n&&(s|=4),Qp(l,e,s,n)}var Fs="_reactListening"+Math.random().toString(36).slice(2);function Yc(e){if(!e[Fs]){e[Fs]=!0,Vd.forEach(function(l){l!=="selectionchange"&&(t0.has(l)||$c(l,!1,e),$c(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Fs]||(n[Fs]=!0,$c("selectionchange",!1,n))}}function Qp(e,n,l,s){switch(Tg(n)){case 2:var f=w0;break;case 8:f=j0;break;default:f=of}l=f.bind(null,n,l,e),f=void 0,!du||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),s?f!==void 0?e.addEventListener(n,l,{capture:!0,passive:f}):e.addEventListener(n,l,!0):f!==void 0?e.addEventListener(n,l,{passive:f}):e.addEventListener(n,l,!1)}function Xc(e,n,l,s,f){var d=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var k=s.stateNode.containerInfo;if(k===f)break;if(v===4)for(v=s.return;v!==null;){var C=v.tag;if((C===3||C===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;k!==null;){if(v=ql(k),v===null)return;if(C=v.tag,C===5||C===6||C===26||C===27){s=d=v;continue e}k=k.parentNode}}s=s.return}eh(function(){var I=d,Y=cu(l),P=[];e:{var q=Ah.get(e);if(q!==void 0){var V=is,ye=e;switch(e){case"keypress":if(as(l)===0)break e;case"keydown":case"keyup":V=F_;break;case"focusin":ye="focus",V=gu;break;case"focusout":ye="blur",V=gu;break;case"beforeblur":case"afterblur":V=gu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=ah;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=L_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=J_;break;case Th:case Nh:case Eh:V=H_;break;case Ch:V=W_;break;case"scroll":case"scrollend":V=O_;break;case"wheel":V=tv;break;case"copy":case"cut":case"paste":V=q_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=ih;break;case"toggle":case"beforetoggle":V=av}var Ne=(n&4)!==0,dt=!Ne&&(e==="scroll"||e==="scrollend"),O=Ne?q!==null?q+"Capture":null:q;Ne=[];for(var w=I,H;w!==null;){var Q=w;if(H=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||H===null||O===null||(Q=Hi(w,O),Q!=null&&Ne.push(_r(w,Q,H))),dt)break;w=w.return}0<Ne.length&&(q=new V(q,ye,null,l,Y),P.push({event:q,listeners:Ne}))}}if((n&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",q&&l!==uu&&(ye=l.relatedTarget||l.fromElement)&&(ql(ye)||ye[Il]))break e;if((V||q)&&(q=Y.window===Y?Y:(q=Y.ownerDocument)?q.defaultView||q.parentWindow:window,V?(ye=l.relatedTarget||l.toElement,V=I,ye=ye?ql(ye):null,ye!==null&&(dt=u(ye),Ne=ye.tag,ye!==dt||Ne!==5&&Ne!==27&&Ne!==6)&&(ye=null)):(V=null,ye=I),V!==ye)){if(Ne=ah,Q="onMouseLeave",O="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=ih,Q="onPointerLeave",O="onPointerEnter",w="pointer"),dt=V==null?q:Ui(V),H=ye==null?q:Ui(ye),q=new Ne(Q,w+"leave",V,l,Y),q.target=dt,q.relatedTarget=H,Q=null,ql(Y)===I&&(Ne=new Ne(O,w+"enter",ye,l,Y),Ne.target=H,Ne.relatedTarget=dt,Q=Ne),dt=Q,V&&ye)t:{for(Ne=n0,O=V,w=ye,H=0,Q=O;Q;Q=Ne(Q))H++;Q=0;for(var ke=w;ke;ke=Ne(ke))Q++;for(;0<H-Q;)O=Ne(O),H--;for(;0<Q-H;)w=Ne(w),Q--;for(;H--;){if(O===w||w!==null&&O===w.alternate){Ne=O;break t}O=Ne(O),w=Ne(w)}Ne=null}else Ne=null;V!==null&&Kp(P,q,V,Ne,!1),ye!==null&&dt!==null&&Kp(P,dt,ye,Ne,!0)}}e:{if(q=I?Ui(I):window,V=q.nodeName&&q.nodeName.toLowerCase(),V==="select"||V==="input"&&q.type==="file")var et=hh;else if(fh(q))if(mh)et=hv;else{et=fv;var xe=cv}else V=q.nodeName,!V||V.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?I&&ou(I.elementType)&&(et=hh):et=dv;if(et&&(et=et(e,I))){dh(P,et,l,Y);break e}xe&&xe(e,q,I),e==="focusout"&&I&&q.type==="number"&&I.memoizedProps.value!=null&&su(q,"number",q.value)}switch(xe=I?Ui(I):window,e){case"focusin":(fh(xe)||xe.contentEditable==="true")&&(Kl=xe,Su=I,Xi=null);break;case"focusout":Xi=Su=Kl=null;break;case"mousedown":ku=!0;break;case"contextmenu":case"mouseup":case"dragend":ku=!1,Sh(P,l,Y);break;case"selectionchange":if(pv)break;case"keydown":case"keyup":Sh(P,l,Y)}var De;if(_u)e:{switch(e){case"compositionstart":var Ze="onCompositionStart";break e;case"compositionend":Ze="onCompositionEnd";break e;case"compositionupdate":Ze="onCompositionUpdate";break e}Ze=void 0}else Ql?uh(e,l)&&(Ze="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Ze="onCompositionStart");Ze&&(rh&&l.locale!=="ko"&&(Ql||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&Ql&&(De=th()):(Ba=Y,hu="value"in Ba?Ba.value:Ba.textContent,Ql=!0)),xe=Qs(I,Ze),0<xe.length&&(Ze=new lh(Ze,e,null,l,Y),P.push({event:Ze,listeners:xe}),De?Ze.data=De:(De=ch(l),De!==null&&(Ze.data=De)))),(De=iv?rv(e,l):sv(e,l))&&(Ze=Qs(I,"onBeforeInput"),0<Ze.length&&(xe=new lh("onBeforeInput","beforeinput",null,l,Y),P.push({event:xe,listeners:Ze}),xe.data=De)),Pv(P,e,I,l,Y)}Fp(P,n)})}function _r(e,n,l){return{instance:e,listener:n,currentTarget:l}}function Qs(e,n){for(var l=n+"Capture",s=[];e!==null;){var f=e,d=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||d===null||(f=Hi(e,l),f!=null&&s.unshift(_r(e,f,d)),f=Hi(e,n),f!=null&&s.push(_r(e,f,d))),e.tag===3)return s;e=e.return}return[]}function n0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Kp(e,n,l,s,f){for(var d=n._reactName,v=[];l!==null&&l!==s;){var k=l,C=k.alternate,I=k.stateNode;if(k=k.tag,C!==null&&C===s)break;k!==5&&k!==26&&k!==27||I===null||(C=I,f?(I=Hi(l,d),I!=null&&v.unshift(_r(l,I,C))):f||(I=Hi(l,d),I!=null&&v.push(_r(l,I,C)))),l=l.return}v.length!==0&&e.push({event:n,listeners:v})}var a0=/\r\n?/g,l0=/\u0000|\uFFFD/g;function Jp(e){return(typeof e=="string"?e:""+e).replace(a0,`
|
|
49
|
-
`).replace(l0,"")}function Pp(e,n){return n=Jp(n),Jp(e)===n}function ft(e,n,l,s,f,d){switch(l){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||Yl(e,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&Yl(e,""+s);break;case"className":Wr(e,"class",s);break;case"tabIndex":Wr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Wr(e,l,s);break;case"style":Pd(e,s,d);break;case"data":if(n!=="object"){Wr(e,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=ts(""+s),e.setAttribute(l,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(l,"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"&&(l==="formAction"?(n!=="input"&&ft(e,n,"name",f.name,f,null),ft(e,n,"formEncType",f.formEncType,f,null),ft(e,n,"formMethod",f.formMethod,f,null),ft(e,n,"formTarget",f.formTarget,f,null)):(ft(e,n,"encType",f.encType,f,null),ft(e,n,"method",f.method,f,null),ft(e,n,"target",f.target,f,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=ts(""+s),e.setAttribute(l,s);break;case"onClick":s!=null&&(e.onclick=fa);break;case"onScroll":s!=null&&Ie("scroll",e);break;case"onScrollEnd":s!=null&&Ie("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(l=s.__html,l!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}l=ts(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""+s):e.removeAttribute(l);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":s===!0?e.setAttribute(l,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,s):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(l,s):e.removeAttribute(l);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(l):e.setAttribute(l,s);break;case"popover":Ie("beforetoggle",e),Ie("toggle",e),Pr(e,"popover",s);break;case"xlinkActuate":ca(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ca(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ca(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ca(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ca(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ca(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ca(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ca(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ca(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Pr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=z_.get(l)||l,Pr(e,l,s))}}function Fc(e,n,l,s,f,d){switch(l){case"style":Pd(e,s,d);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(l=s.__html,l!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof s=="string"?Yl(e,s):(typeof s=="number"||typeof s=="bigint")&&Yl(e,""+s);break;case"onScroll":s!=null&&Ie("scroll",e);break;case"onScrollEnd":s!=null&&Ie("scrollend",e);break;case"onClick":s!=null&&(e.onclick=fa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gd.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),n=l.slice(2,f?l.length-7:void 0),d=e[ln]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(n,d,f),typeof s=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,s,f);break e}l in e?e[l]=s:s===!0?e.setAttribute(l,""):Pr(e,l,s)}}}function Yt(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("load",e);var s=!1,f=!1,d;for(d in l)if(l.hasOwnProperty(d)){var v=l[d];if(v!=null)switch(d){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ft(e,n,d,v,l,null)}}f&&ft(e,n,"srcSet",l.srcSet,l,null),s&&ft(e,n,"src",l.src,l,null);return;case"input":Ie("invalid",e);var k=d=v=f=null,C=null,I=null;for(s in l)if(l.hasOwnProperty(s)){var Y=l[s];if(Y!=null)switch(s){case"name":f=Y;break;case"type":v=Y;break;case"checked":C=Y;break;case"defaultChecked":I=Y;break;case"value":d=Y;break;case"defaultValue":k=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(137,n));break;default:ft(e,n,s,Y,l,null)}}Fd(e,d,k,C,I,v,f,!1);return;case"select":Ie("invalid",e),s=v=d=null;for(f in l)if(l.hasOwnProperty(f)&&(k=l[f],k!=null))switch(f){case"value":d=k;break;case"defaultValue":v=k;break;case"multiple":s=k;default:ft(e,n,f,k,l,null)}n=d,l=v,e.multiple=!!s,n!=null?$l(e,!!s,n,!1):l!=null&&$l(e,!!s,l,!0);return;case"textarea":Ie("invalid",e),d=f=s=null;for(v in l)if(l.hasOwnProperty(v)&&(k=l[v],k!=null))switch(v){case"value":s=k;break;case"defaultValue":f=k;break;case"children":d=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:ft(e,n,v,k,l,null)}Kd(e,s,f,d);return;case"option":for(C in l)if(l.hasOwnProperty(C)&&(s=l[C],s!=null))switch(C){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ft(e,n,C,s,l,null)}return;case"dialog":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(s=0;s<yr.length;s++)Ie(yr[s],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("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(I in l)if(l.hasOwnProperty(I)&&(s=l[I],s!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ft(e,n,I,s,l,null)}return;default:if(ou(n)){for(Y in l)l.hasOwnProperty(Y)&&(s=l[Y],s!==void 0&&Fc(e,n,Y,s,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(s=l[k],s!=null&&ft(e,n,k,s,l,null))}function i0(e,n,l,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,d=null,v=null,k=null,C=null,I=null,Y=null;for(V in l){var P=l[V];if(l.hasOwnProperty(V)&&P!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":C=P;default:s.hasOwnProperty(V)||ft(e,n,V,null,s,P)}}for(var q in s){var V=s[q];if(P=l[q],s.hasOwnProperty(q)&&(V!=null||P!=null))switch(q){case"type":d=V;break;case"name":f=V;break;case"checked":I=V;break;case"defaultChecked":Y=V;break;case"value":v=V;break;case"defaultValue":k=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,n));break;default:V!==P&&ft(e,n,q,V,s,P)}}ru(e,v,k,C,I,Y,d,f);return;case"select":V=v=k=q=null;for(d in l)if(C=l[d],l.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":V=C;default:s.hasOwnProperty(d)||ft(e,n,d,null,s,C)}for(f in s)if(d=s[f],C=l[f],s.hasOwnProperty(f)&&(d!=null||C!=null))switch(f){case"value":q=d;break;case"defaultValue":k=d;break;case"multiple":v=d;default:d!==C&&ft(e,n,f,d,s,C)}n=k,l=v,s=V,q!=null?$l(e,!!l,q,!1):!!s!=!!l&&(n!=null?$l(e,!!l,n,!0):$l(e,!!l,l?[]:"",!1));return;case"textarea":V=q=null;for(k in l)if(f=l[k],l.hasOwnProperty(k)&&f!=null&&!s.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:ft(e,n,k,null,s,f)}for(v in s)if(f=s[v],d=l[v],s.hasOwnProperty(v)&&(f!=null||d!=null))switch(v){case"value":q=f;break;case"defaultValue":V=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==d&&ft(e,n,v,f,s,d)}Qd(e,q,V);return;case"option":for(var ye in l)if(q=l[ye],l.hasOwnProperty(ye)&&q!=null&&!s.hasOwnProperty(ye))switch(ye){case"selected":e.selected=!1;break;default:ft(e,n,ye,null,s,q)}for(C in s)if(q=s[C],V=l[C],s.hasOwnProperty(C)&&q!==V&&(q!=null||V!=null))switch(C){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:ft(e,n,C,q,s,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 Ne in l)q=l[Ne],l.hasOwnProperty(Ne)&&q!=null&&!s.hasOwnProperty(Ne)&&ft(e,n,Ne,null,s,q);for(I in s)if(q=s[I],V=l[I],s.hasOwnProperty(I)&&q!==V&&(q!=null||V!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,n));break;default:ft(e,n,I,q,s,V)}return;default:if(ou(n)){for(var dt in l)q=l[dt],l.hasOwnProperty(dt)&&q!==void 0&&!s.hasOwnProperty(dt)&&Fc(e,n,dt,void 0,s,q);for(Y in s)q=s[Y],V=l[Y],!s.hasOwnProperty(Y)||q===V||q===void 0&&V===void 0||Fc(e,n,Y,q,s,V);return}}for(var O in l)q=l[O],l.hasOwnProperty(O)&&q!=null&&!s.hasOwnProperty(O)&&ft(e,n,O,null,s,q);for(P in s)q=s[P],V=l[P],!s.hasOwnProperty(P)||q===V||q==null&&V==null||ft(e,n,P,q,s,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 r0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),s=0;s<l.length;s++){var f=l[s],d=f.transferSize,v=f.initiatorType,k=f.duration;if(d&&k&&Wp(v)){for(v=0,k=f.responseEnd,s+=1;s<l.length;s++){var C=l[s],I=C.startTime;if(I>k)break;var Y=C.transferSize,P=C.initiatorType;Y&&Wp(P)&&(C=C.responseEnd,v+=Y*(C<k?1:(k-I)/(C-I)))}if(--s,n+=8*(d+v)/(f.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 Qc=null,Kc=null;function Ks(e){return e.nodeType===9?e:e.ownerDocument}function eg(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 tg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Jc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Pc=null;function s0(){var e=window.event;return e&&e.type==="popstate"?e===Pc?!1:(Pc=e,!0):(Pc=null,!1)}var ng=typeof setTimeout=="function"?setTimeout:void 0,o0=typeof clearTimeout=="function"?clearTimeout:void 0,ag=typeof Promise=="function"?Promise:void 0,u0=typeof queueMicrotask=="function"?queueMicrotask:typeof ag<"u"?function(e){return ag.resolve(null).then(e).catch(c0)}:ng;function c0(e){setTimeout(function(){throw e})}function el(e){return e==="head"}function lg(e,n){var l=n,s=0;do{var f=l.nextSibling;if(e.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"||l==="/&"){if(s===0){e.removeChild(f),ki(n);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")vr(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,vr(l);for(var d=l.firstChild;d;){var v=d.nextSibling,k=d.nodeName;d[Bi]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=v}}else l==="body"&&vr(e.ownerDocument.body);l=f}while(l);ki(n)}function ig(e,n){var l=e;e=0;do{var s=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),s&&s.nodeType===8)if(l=s.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=s}while(l)}function Wc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Wc(l),lu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function f0(e,n,l,s){for(;e.nodeType===1;){var f=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Bi])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!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Ln(e.nextSibling),e===null)break}return null}function d0(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Ln(e.nextSibling),e===null))return null;return e}function rg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Ln(e.nextSibling),e===null))return null;return e}function ef(e){return e.data==="$?"||e.data==="$~"}function tf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function h0(e,n){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||l.readyState!=="loading")n();else{var s=function(){n(),l.removeEventListener("DOMContentLoaded",s)};l.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ln(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 nf=null;function sg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return Ln(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function og(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return e;n--}else l!=="/$"&&l!=="/&"||n++}e=e.previousSibling}return null}function ug(e,n,l){switch(n=Ks(l),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 vr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);lu(e)}var Bn=new Map,cg=new Set;function Js(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ca=J.d;J.d={f:m0,r:p0,D:g0,C:y0,L:_0,m:v0,X:b0,S:x0,M:S0};function m0(){var e=Ca.f(),n=Vs();return e||n}function p0(e){var n=Vl(e);n!==null&&n.tag===5&&n.type==="form"?Cm(n):Ca.r(e)}var xi=typeof document>"u"?null:document;function fg(e,n,l){var s=xi;if(s&&typeof n=="string"&&n){var f=wn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),cg.has(f)||(cg.add(f),e={rel:e,crossOrigin:l,href:n},s.querySelector(f)===null&&(n=s.createElement("link"),Yt(n,"link",e),Bt(n),s.head.appendChild(n)))}}function g0(e){Ca.D(e),fg("dns-prefetch",e,null)}function y0(e,n){Ca.C(e,n),fg("preconnect",e,n)}function _0(e,n,l){Ca.L(e,n,l);var s=xi;if(s&&e&&n){var f='link[rel="preload"][as="'+wn(n)+'"]';n==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+wn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+wn(l.imageSizes)+'"]')):f+='[href="'+wn(e)+'"]';var d=f;switch(n){case"style":d=bi(e);break;case"script":d=Si(e)}Bn.has(d)||(e=_({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),Bn.set(d,e),s.querySelector(f)!==null||n==="style"&&s.querySelector(xr(d))||n==="script"&&s.querySelector(br(d))||(n=s.createElement("link"),Yt(n,"link",e),Bt(n),s.head.appendChild(n)))}}function v0(e,n){Ca.m(e,n);var l=xi;if(l&&e){var s=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+wn(s)+'"][href="'+wn(e)+'"]',d=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Si(e)}if(!Bn.has(d)&&(e=_({rel:"modulepreload",href:e},n),Bn.set(d,e),l.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(br(d)))return}s=l.createElement("link"),Yt(s,"link",e),Bt(s),l.head.appendChild(s)}}}function x0(e,n,l){Ca.S(e,n,l);var s=xi;if(s&&e){var f=Gl(s).hoistableStyles,d=bi(e);n=n||"default";var v=f.get(d);if(!v){var k={loading:0,preload:null};if(v=s.querySelector(xr(d)))k.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":n},l),(l=Bn.get(d))&&af(e,l);var C=v=s.createElement("link");Bt(C),Yt(C,"link",e),C._p=new Promise(function(I,Y){C.onload=I,C.onerror=Y}),C.addEventListener("load",function(){k.loading|=1}),C.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Ps(v,n,s)}v={type:"stylesheet",instance:v,count:1,state:k},f.set(d,v)}}}function b0(e,n){Ca.X(e,n);var l=xi;if(l&&e){var s=Gl(l).hoistableScripts,f=Si(e),d=s.get(f);d||(d=l.querySelector(br(f)),d||(e=_({src:e,async:!0},n),(n=Bn.get(f))&&lf(e,n),d=l.createElement("script"),Bt(d),Yt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(f,d))}}function S0(e,n){Ca.M(e,n);var l=xi;if(l&&e){var s=Gl(l).hoistableScripts,f=Si(e),d=s.get(f);d||(d=l.querySelector(br(f)),d||(e=_({src:e,async:!0,type:"module"},n),(n=Bn.get(f))&&lf(e,n),d=l.createElement("script"),Bt(d),Yt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(f,d))}}function dg(e,n,l,s){var f=(f=ue.current)?Js(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=bi(l.href),l=Gl(f).hoistableStyles,s=l.get(n),s||(s={type:"style",instance:null,count:0,state:null},l.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=bi(l.href);var d=Gl(f).hoistableStyles,v=d.get(e);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,v),(d=f.querySelector(xr(e)))&&!d._p&&(v.instance=d,v.state.loading=5),Bn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Bn.set(e,l),d||k0(f,e,l,v.state))),n&&s===null)throw Error(r(528,""));return v}if(n&&s!==null)throw Error(r(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Si(l),l=Gl(f).hoistableScripts,s=l.get(n),s||(s={type:"script",instance:null,count:0,state:null},l.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function bi(e){return'href="'+wn(e)+'"'}function xr(e){return'link[rel="stylesheet"]['+e+"]"}function hg(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function k0(e,n,l,s){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=e.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),Yt(n,"link",l),Bt(n),e.head.appendChild(n))}function Si(e){return'[src="'+wn(e)+'"]'}function br(e){return"script[async]"+e}function mg(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var s=e.querySelector('style[data-href~="'+wn(l.href)+'"]');if(s)return n.instance=s,Bt(s),s;var f=_({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Bt(s),Yt(s,"style",f),Ps(s,l.precedence,e),n.instance=s;case"stylesheet":f=bi(l.href);var d=e.querySelector(xr(f));if(d)return n.state.loading|=4,n.instance=d,Bt(d),d;s=hg(l),(f=Bn.get(f))&&af(s,f),d=(e.ownerDocument||e).createElement("link"),Bt(d);var v=d;return v._p=new Promise(function(k,C){v.onload=k,v.onerror=C}),Yt(d,"link",s),n.state.loading|=4,Ps(d,l.precedence,e),n.instance=d;case"script":return d=Si(l.src),(f=e.querySelector(br(d)))?(n.instance=f,Bt(f),f):(s=l,(f=Bn.get(d))&&(s=_({},l),lf(s,f)),e=e.ownerDocument||e,f=e.createElement("script"),Bt(f),Yt(f,"link",s),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,Ps(s,l.precedence,e));return n.instance}function Ps(e,n,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,d=f,v=0;v<s.length;v++){var k=s[v];if(k.dataset.precedence===n)d=k;else if(d!==f)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function af(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function lf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Ws=null;function pg(e,n,l){if(Ws===null){var s=new Map,f=Ws=new Map;f.set(l,s)}else f=Ws,s=f.get(l),s||(s=new Map,f.set(l,s));if(s.has(e))return s;for(s.set(e,null),l=l.getElementsByTagName(e),f=0;f<l.length;f++){var d=l[f];if(!(d[Bi]||d[Vt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(n)||"";v=e+v;var k=s.get(v);k?k.push(d):s.set(v,[d])}}return s}function gg(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function T0(e,n,l){if(l===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 yg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function N0(e,n,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=bi(s.href),d=n.querySelector(xr(f));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=eo.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=d,Bt(d);return}d=n.ownerDocument||n,s=hg(s),(f=Bn.get(f))&&af(s,f),d=d.createElement("link"),Bt(d);var v=d;v._p=new Promise(function(k,C){v.onload=k,v.onerror=C}),Yt(d,"link",s),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=eo.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var rf=0;function E0(e,n){return e.stylesheets&&e.count===0&&no(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var s=setTimeout(function(){if(e.stylesheets&&no(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&rf===0&&(rf=62500*r0());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&no(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>rf?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function eo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)no(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var to=null;function no(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,to=new Map,n.forEach(C0,e),to=null,eo.call(e))}function C0(e,n){if(!(n.state.loading&4)){var l=to.get(e);if(l)var s=l.get(null);else{l=new Map,to.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<f.length;d++){var v=f[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(l.set(v.dataset.precedence,v),s=v)}s&&l.set(null,s)}f=n.instance,v=f.getAttribute("data-precedence"),d=l.get(v)||s,d===s&&l.set(null,f),l.set(v,f),this.count++,s=eo.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),d?d.parentNode.insertBefore(f,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Sr={$$typeof:z,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function A0(e,n,l,s,f,d,v,k,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=eu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eu(0),this.hiddenUpdates=eu(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function _g(e,n,l,s,f,d,v,k,C,I,Y,P){return e=new A0(e,n,l,v,C,I,Y,P,k),n=1,d===!0&&(n|=24),d=gn(3,null,null,n),e.current=d,d.stateNode=e,n=Uu(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:s,isDehydrated:l,cache:n},Vu(d),e}function vg(e){return e?(e=Wl,e):Wl}function xg(e,n,l,s,f,d){f=vg(f),s.context===null?s.context=f:s.pendingContext=f,s=Ga(n),s.payload={element:l},d=d===void 0?null:d,d!==null&&(s.callback=d),l=Za(e,s,n),l!==null&&(fn(l,e,n),er(l,e,n))}function bg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function sf(e,n){bg(e,n),(e=e.alternate)&&bg(e,n)}function Sg(e){if(e.tag===13||e.tag===31){var n=vl(e,67108864);n!==null&&fn(n,e,67108864),sf(e,67108864)}}function kg(e){if(e.tag===13||e.tag===31){var n=bn();n=tu(n);var l=vl(e,n);l!==null&&fn(l,e,n),sf(e,n)}}var ao=!0;function w0(e,n,l,s){var f=D.T;D.T=null;var d=J.p;try{J.p=2,of(e,n,l,s)}finally{J.p=d,D.T=f}}function j0(e,n,l,s){var f=D.T;D.T=null;var d=J.p;try{J.p=8,of(e,n,l,s)}finally{J.p=d,D.T=f}}function of(e,n,l,s){if(ao){var f=uf(s);if(f===null)Xc(e,n,s,lo,l),Ng(e,s);else if(z0(f,e,n,l,s))s.stopPropagation();else if(Ng(e,s),n&4&&-1<M0.indexOf(e)){for(;f!==null;){var d=Vl(f);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=ml(d.pendingLanes);if(v!==0){var k=d;for(k.pendingLanes|=2,k.entangledLanes|=2;v;){var C=1<<31-ht(v);k.entanglements[1]|=C,v&=~C}ta(d),(lt&6)===0&&(Is=Pt()+500,gr(0))}}break;case 31:case 13:k=vl(d,2),k!==null&&fn(k,d,2),Vs(),sf(d,2)}if(d=uf(s),d===null&&Xc(e,n,s,lo,l),d===f)break;f=d}f!==null&&s.stopPropagation()}else Xc(e,n,s,null,l)}}function uf(e){return e=cu(e),cf(e)}var lo=null;function cf(e){if(lo=null,e=ql(e),e!==null){var n=u(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=c(n),e!==null)return e;e=null}else if(l===31){if(e=h(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return lo=e,null}function Tg(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(Wo()){case X:return 2;case ce:return 8;case Ce:case Ue:return 32;case it:return 268435456;default:return 32}default:return 32}}var ff=!1,tl=null,nl=null,al=null,kr=new Map,Tr=new Map,ll=[],M0="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 Ng(e,n){switch(e){case"focusin":case"focusout":tl=null;break;case"dragenter":case"dragleave":nl=null;break;case"mouseover":case"mouseout":al=null;break;case"pointerover":case"pointerout":kr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tr.delete(n.pointerId)}}function Nr(e,n,l,s,f,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:l,eventSystemFlags:s,nativeEvent:d,targetContainers:[f]},n!==null&&(n=Vl(n),n!==null&&Sg(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function z0(e,n,l,s,f){switch(n){case"focusin":return tl=Nr(tl,e,n,l,s,f),!0;case"dragenter":return nl=Nr(nl,e,n,l,s,f),!0;case"mouseover":return al=Nr(al,e,n,l,s,f),!0;case"pointerover":var d=f.pointerId;return kr.set(d,Nr(kr.get(d)||null,e,n,l,s,f)),!0;case"gotpointercapture":return d=f.pointerId,Tr.set(d,Nr(Tr.get(d)||null,e,n,l,s,f)),!0}return!1}function Eg(e){var n=ql(e.target);if(n!==null){var l=u(n);if(l!==null){if(n=l.tag,n===13){if(n=c(l),n!==null){e.blockedOn=n,Id(e.priority,function(){kg(l)});return}}else if(n===31){if(n=h(l),n!==null){e.blockedOn=n,Id(e.priority,function(){kg(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function io(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=uf(e.nativeEvent);if(l===null){l=e.nativeEvent;var s=new l.constructor(l.type,l);uu=s,l.target.dispatchEvent(s),uu=null}else return n=Vl(l),n!==null&&Sg(n),e.blockedOn=l,!1;n.shift()}return!0}function Cg(e,n,l){io(e)&&l.delete(n)}function R0(){ff=!1,tl!==null&&io(tl)&&(tl=null),nl!==null&&io(nl)&&(nl=null),al!==null&&io(al)&&(al=null),kr.forEach(Cg),Tr.forEach(Cg)}function ro(e,n){e.blockedOn===n&&(e.blockedOn=null,ff||(ff=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,R0)))}var so=null;function Ag(e){so!==e&&(so=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){so===e&&(so=null);for(var n=0;n<e.length;n+=3){var l=e[n],s=e[n+1],f=e[n+2];if(typeof s!="function"){if(cf(s||l)===null)continue;break}var d=Vl(l);d!==null&&(e.splice(n,3),n-=3,oc(d,{pending:!0,data:f,method:l.method,action:s},s,f))}}))}function ki(e){function n(C){return ro(C,e)}tl!==null&&ro(tl,e),nl!==null&&ro(nl,e),al!==null&&ro(al,e),kr.forEach(n),Tr.forEach(n);for(var l=0;l<ll.length;l++){var s=ll[l];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ll.length&&(l=ll[0],l.blockedOn===null);)Eg(l),l.blockedOn===null&&ll.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(s=0;s<l.length;s+=3){var f=l[s],d=l[s+1],v=f[ln]||null;if(typeof d=="function")v||Ag(l);else if(v){var k=null;if(d&&d.hasAttribute("formAction")){if(f=d,v=d[ln]||null)k=v.formAction;else if(cf(f)!==null)continue}else k=v.action;typeof k=="function"?l[s+1]=k:(l.splice(s,3),s-=3),Ag(l)}}}function wg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),s||setTimeout(l,20)}function l(){if(!s&&!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 s=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function df(e){this._internalRoot=e}oo.prototype.render=df.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var l=n.current,s=bn();xg(l,s,e,n,null,null)},oo.prototype.unmount=df.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;xg(e.current,2,null,e,null,null),Vs(),n[Il]=null}};function oo(e){this._internalRoot=e}oo.prototype.unstable_scheduleHydration=function(e){if(e){var n=Hd();e={blockedOn:null,target:e,priority:n};for(var l=0;l<ll.length&&n!==0&&n<ll[l].priority;l++);ll.splice(l,0,e),l===0&&Eg(e)}};var jg=a.version;if(jg!=="19.2.4")throw Error(r(527,jg,"19.2.4"));J.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var O0={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var uo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uo.isDisabled&&uo.supportsFiber)try{Wt=uo.inject(O0),Ot=uo}catch{}}return Cr.createRoot=function(e,n){if(!o(e))throw Error(r(299));var l=!1,s="",f=Bm,d=Um,v=Hm;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError)),n=_g(e,1,!1,null,null,l,s,null,f,d,v,wg),e[Il]=n.current,Yc(e),new df(n)},Cr.hydrateRoot=function(e,n,l){if(!o(e))throw Error(r(299));var s=!1,f="",d=Bm,v=Um,k=Hm,C=null;return l!=null&&(l.unstable_strictMode===!0&&(s=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(v=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(C=l.formState)),n=_g(e,1,!0,n,l??null,s,f,C,d,v,k,wg),n.context=vg(null),l=n.current,s=bn(),s=tu(s),f=Ga(s),f.callback=null,Za(l,f,s),l=s,n.current.lanes=l,Li(n,l),ta(n),e[Il]=n.current,Yc(e),new oo(n)},Cr.version="19.2.4",Cr}var Ig;function $0(){if(Ig)return pf.exports;Ig=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(a){console.error(a)}}return t(),pf.exports=Z0(),pf.exports}var Y0=$0();const X0=Ho(Y0);/**
|
|
48
|
+
`+s.stack}}var Ke=Object.prototype.hasOwnProperty,qt=t.unstable_scheduleCallback,Zn=t.unstable_cancelCallback,Jo=t.unstable_shouldYield,Po=t.unstable_requestPaint,Pt=t.unstable_now,Wo=t.unstable_getCurrentPriorityLevel,X=t.unstable_ImmediatePriority,ue=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,Ue=t.unstable_LowPriority,it=t.unstable_IdlePriority,mn=t.log,ua=t.unstable_setDisableYieldValue,Wt=null,Ot=null;function an(e){if(typeof mn=="function"&&ua(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(Wt,e)}catch{}}var ht=Math.clz32?Math.clz32:S_,Da=Math.log,$n=Math.LN2;function S_(e){return e>>>=0,e===0?32:31-(Da(e)/$n|0)|0}var Fr=256,Qr=262144,Kr=4194304;function ml(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,l){var s=e.pendingLanes;if(s===0)return 0;var f=0,d=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var k=s&134217727;return k!==0?(s=k&~d,s!==0?f=ml(s):(v&=k,v!==0?f=ml(v):l||(l=k&~e,l!==0&&(f=ml(l))))):(k=s&~d,k!==0?f=ml(k):v!==0?f=ml(v):l||(l=s&~e,l!==0&&(f=ml(l)))),f===0?0:n!==0&&n!==f&&(n&d)===0&&(d=f&-f,l=n&-n,d>=l||d===32&&(l&4194048)!==0)?n:f}function Di(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function k_(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 Dd(){var e=Kr;return Kr<<=1,(Kr&62914560)===0&&(Kr=4194304),e}function eu(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function Li(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function T_(e,n,l,s,f,d){var v=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var k=e.entanglements,C=e.expirationTimes,I=e.hiddenUpdates;for(l=v&~l;0<l;){var Z=31-ht(l),P=1<<Z;k[Z]=0,C[Z]=-1;var q=I[Z];if(q!==null)for(I[Z]=null,Z=0;Z<q.length;Z++){var V=q[Z];V!==null&&(V.lane&=-536870913)}l&=~P}s!==0&&Ld(e,s,0),d!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=d&~(v&~n))}function Ld(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var s=31-ht(n);e.entangledLanes|=n,e.entanglements[s]=e.entanglements[s]|1073741824|l&261930}function Bd(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var s=31-ht(l),f=1<<s;f&n|e[s]&n&&(e[s]|=n),l&=~f}}function Ud(e,n){var l=n&-n;return l=(l&42)!==0?1:tu(l),(l&(e.suspendedLanes|n))!==0?0:l}function tu(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 nu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hd(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:Tg(e.type))}function Id(e,n){var l=K.p;try{return K.p=e,n()}finally{K.p=l}}var La=Math.random().toString(36).slice(2),Vt="__reactFiber$"+La,ln="__reactProps$"+La,Il="__reactContainer$"+La,au="__reactEvents$"+La,N_="__reactListeners$"+La,E_="__reactHandles$"+La,qd="__reactResources$"+La,Bi="__reactMarker$"+La;function lu(e){delete e[Vt],delete e[ln],delete e[au],delete e[N_],delete e[E_]}function ql(e){var n=e[Vt];if(n)return n;for(var l=e.parentNode;l;){if(n=l[Il]||l[Vt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=og(e);e!==null;){if(l=e[Vt])return l;e=og(e)}return n}e=l,l=e.parentNode}return null}function Vl(e){if(e=e[Vt]||e[Il]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ui(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function Gl(e){var n=e[qd];return n||(n=e[qd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Bt(e){e[Bi]=!0}var Vd=new Set,Gd={};function pl(e,n){Zl(e,n),Zl(e+"Capture",n)}function Zl(e,n){for(Gd[e]=n,e=0;e<n.length;e++)Vd.add(n[e])}var C_=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]*$"),Zd={},$d={};function A_(e){return Ke.call($d,e)?!0:Ke.call(Zd,e)?!1:C_.test(e)?$d[e]=!0:(Zd[e]=!0,!1)}function Pr(e,n,l){if(A_(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var s=n.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+l)}}function Wr(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function ca(e,n,l,s){if(s===null)e.removeAttribute(l);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+s)}}function An(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Yd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function w_(e,n,l){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var f=s.get,d=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(v){l=""+v,d.call(this,v)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return l},setValue:function(v){l=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function iu(e){if(!e._valueTracker){var n=Yd(e)?"checked":"value";e._valueTracker=w_(e,n,""+e[n])}}function Xd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),s="";return e&&(s=Yd(e)?e.checked?"true":"false":e.value),e=s,e!==l?(n.setValue(e),!0):!1}function es(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 j_=/[\n"\\]/g;function wn(e){return e.replace(j_,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ru(e,n,l,s,f,d,v,k){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+An(n)):e.value!==""+An(n)&&(e.value=""+An(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?su(e,v,An(n)):l!=null?su(e,v,An(l)):s!=null&&e.removeAttribute("value"),f==null&&d!=null&&(e.defaultChecked=!!d),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+An(k):e.removeAttribute("name")}function Fd(e,n,l,s,f,d,v,k){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){iu(e);return}l=l!=null?""+An(l):"",n=n!=null?""+An(n):l,k||n===e.value||(e.value=n),e.defaultValue=n}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=k?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),iu(e)}function su(e,n,l){n==="number"&&es(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function $l(e,n,l,s){if(e=e.options,n){n={};for(var f=0;f<l.length;f++)n["$"+l[f]]=!0;for(l=0;l<e.length;l++)f=n.hasOwnProperty("$"+e[l].value),e[l].selected!==f&&(e[l].selected=f),f&&s&&(e[l].defaultSelected=!0)}else{for(l=""+An(l),n=null,f=0;f<e.length;f++){if(e[f].value===l){e[f].selected=!0,s&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function Qd(e,n,l){if(n!=null&&(n=""+An(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+An(l):""}function Kd(e,n,l,s){if(n==null){if(s!=null){if(l!=null)throw Error(r(92));if(ne(s)){if(1<s.length)throw Error(r(93));s=s[0]}l=s}l==null&&(l=""),n=l}l=An(n),e.defaultValue=l,s=e.textContent,s===l&&s!==""&&s!==null&&(e.value=s),iu(e)}function Yl(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var M_=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 Jd(e,n,l){var s=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?s?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":s?e.setProperty(n,l):typeof l!="number"||l===0||M_.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function Pd(e,n,l){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,l!=null){for(var s in l)!l.hasOwnProperty(s)||n!=null&&n.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var f in n)s=n[f],n.hasOwnProperty(f)&&l[f]!==s&&Jd(e,f,s)}else for(var d in n)n.hasOwnProperty(d)&&Jd(e,d,n[d])}function ou(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 z_=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"]]),R_=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ts(e){return R_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function fa(){}var uu=null;function cu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xl=null,Fl=null;function Wd(e){var n=Vl(e);if(n&&(e=n.stateNode)){var l=e[ln]||null;e:switch(e=n.stateNode,n.type){case"input":if(ru(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+wn(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var s=l[n];if(s!==e&&s.form===e.form){var f=s[ln]||null;if(!f)throw Error(r(90));ru(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<l.length;n++)s=l[n],s.form===e.form&&Xd(s)}break e;case"textarea":Qd(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&$l(e,!!l.multiple,n,!1)}}}var fu=!1;function eh(e,n,l){if(fu)return e(n,l);fu=!0;try{var s=e(n);return s}finally{if(fu=!1,(Xl!==null||Fl!==null)&&(Vs(),Xl&&(n=Xl,e=Fl,Fl=Xl=null,Wd(n),e)))for(n=0;n<e.length;n++)Wd(e[n])}}function Hi(e,n){var l=e.stateNode;if(l===null)return null;var s=l[ln]||null;if(s===null)return null;l=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(r(231,n,typeof l));return l}var da=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),du=!1;if(da)try{var Ii={};Object.defineProperty(Ii,"passive",{get:function(){du=!0}}),window.addEventListener("test",Ii,Ii),window.removeEventListener("test",Ii,Ii)}catch{du=!1}var Ba=null,hu=null,ns=null;function th(){if(ns)return ns;var e,n=hu,l=n.length,s,f="value"in Ba?Ba.value:Ba.textContent,d=f.length;for(e=0;e<l&&n[e]===f[e];e++);var v=l-e;for(s=1;s<=v&&n[l-s]===f[d-s];s++);return ns=f.slice(e,1<s?1-s:void 0)}function as(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 ls(){return!0}function nh(){return!1}function rn(e){function n(l,s,f,d,v){this._reactName=l,this._targetInst=f,this.type=s,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(l=e[k],this[k]=l?l(d):d[k]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?ls:nh,this.isPropagationStopped=nh,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=ls)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ls)},persist:function(){},isPersistent:ls}),n}var gl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},is=rn(gl),qi=y({},gl,{view:0,detail:0}),O_=rn(qi),mu,pu,Vi,rs=y({},qi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yu,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!==Vi&&(Vi&&e.type==="mousemove"?(mu=e.screenX-Vi.screenX,pu=e.screenY-Vi.screenY):pu=mu=0,Vi=e),mu)},movementY:function(e){return"movementY"in e?e.movementY:pu}}),ah=rn(rs),D_=y({},rs,{dataTransfer:0}),L_=rn(D_),B_=y({},qi,{relatedTarget:0}),gu=rn(B_),U_=y({},gl,{animationName:0,elapsedTime:0,pseudoElement:0}),H_=rn(U_),I_=y({},gl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),q_=rn(I_),V_=y({},gl,{data:0}),lh=rn(V_),G_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Z_={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"},$_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Y_(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=$_[e])?!!n[e]:!1}function yu(){return Y_}var X_=y({},qi,{key:function(e){if(e.key){var n=G_[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=as(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Z_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yu,charCode:function(e){return e.type==="keypress"?as(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?as(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),F_=rn(X_),Q_=y({},rs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ih=rn(Q_),K_=y({},qi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yu}),J_=rn(K_),P_=y({},gl,{propertyName:0,elapsedTime:0,pseudoElement:0}),W_=rn(P_),ev=y({},rs,{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}),tv=rn(ev),nv=y({},gl,{newState:0,oldState:0}),av=rn(nv),lv=[9,13,27,32],_u=da&&"CompositionEvent"in window,Gi=null;da&&"documentMode"in document&&(Gi=document.documentMode);var iv=da&&"TextEvent"in window&&!Gi,rh=da&&(!_u||Gi&&8<Gi&&11>=Gi),sh=" ",oh=!1;function uh(e,n){switch(e){case"keyup":return lv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ch(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ql=!1;function rv(e,n){switch(e){case"compositionend":return ch(n);case"keypress":return n.which!==32?null:(oh=!0,sh);case"textInput":return e=n.data,e===sh&&oh?null:e;default:return null}}function sv(e,n){if(Ql)return e==="compositionend"||!_u&&uh(e,n)?(e=th(),ns=hu=Ba=null,Ql=!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 rh&&n.locale!=="ko"?null:n.data;default:return null}}var ov={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 fh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!ov[e.type]:n==="textarea"}function dh(e,n,l,s){Xl?Fl?Fl.push(s):Fl=[s]:Xl=s,n=Qs(n,"onChange"),0<n.length&&(l=new is("onChange","change",null,l,s),e.push({event:l,listeners:n}))}var Zi=null,$i=null;function uv(e){Fp(e,0)}function ss(e){var n=Ui(e);if(Xd(n))return e}function hh(e,n){if(e==="change")return n}var mh=!1;if(da){var vu;if(da){var xu="oninput"in document;if(!xu){var ph=document.createElement("div");ph.setAttribute("oninput","return;"),xu=typeof ph.oninput=="function"}vu=xu}else vu=!1;mh=vu&&(!document.documentMode||9<document.documentMode)}function gh(){Zi&&(Zi.detachEvent("onpropertychange",yh),$i=Zi=null)}function yh(e){if(e.propertyName==="value"&&ss($i)){var n=[];dh(n,$i,e,cu(e)),eh(uv,n)}}function cv(e,n,l){e==="focusin"?(gh(),Zi=n,$i=l,Zi.attachEvent("onpropertychange",yh)):e==="focusout"&&gh()}function fv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ss($i)}function dv(e,n){if(e==="click")return ss(n)}function hv(e,n){if(e==="input"||e==="change")return ss(n)}function mv(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var pn=typeof Object.is=="function"?Object.is:mv;function Yi(e,n){if(pn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),s=Object.keys(n);if(l.length!==s.length)return!1;for(s=0;s<l.length;s++){var f=l[s];if(!Ke.call(n,f)||!pn(e[f],n[f]))return!1}return!0}function _h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vh(e,n){var l=_h(e);e=0;for(var s;l;){if(l.nodeType===3){if(s=e+l.textContent.length,e<=n&&s>=n)return{node:l,offset:n-e};e=s}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=_h(l)}}function xh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?xh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function bh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=es(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=es(e.document)}return n}function bu(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 pv=da&&"documentMode"in document&&11>=document.documentMode,Kl=null,Su=null,Xi=null,ku=!1;function Sh(e,n,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ku||Kl==null||Kl!==es(s)||(s=Kl,"selectionStart"in s&&bu(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Xi&&Yi(Xi,s)||(Xi=s,s=Qs(Su,"onSelect"),0<s.length&&(n=new is("onSelect","select",null,n,l),e.push({event:n,listeners:s}),n.target=Kl)))}function yl(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var Jl={animationend:yl("Animation","AnimationEnd"),animationiteration:yl("Animation","AnimationIteration"),animationstart:yl("Animation","AnimationStart"),transitionrun:yl("Transition","TransitionRun"),transitionstart:yl("Transition","TransitionStart"),transitioncancel:yl("Transition","TransitionCancel"),transitionend:yl("Transition","TransitionEnd")},Tu={},kh={};da&&(kh=document.createElement("div").style,"AnimationEvent"in window||(delete Jl.animationend.animation,delete Jl.animationiteration.animation,delete Jl.animationstart.animation),"TransitionEvent"in window||delete Jl.transitionend.transition);function _l(e){if(Tu[e])return Tu[e];if(!Jl[e])return e;var n=Jl[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in kh)return Tu[e]=n[l];return e}var Th=_l("animationend"),Nh=_l("animationiteration"),Eh=_l("animationstart"),gv=_l("transitionrun"),yv=_l("transitionstart"),_v=_l("transitioncancel"),Ch=_l("transitionend"),Ah=new Map,Nu="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(" ");Nu.push("scrollEnd");function Yn(e,n){Ah.set(e,n),pl(n,[e])}var os=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)},jn=[],Pl=0,Eu=0;function us(){for(var e=Pl,n=Eu=Pl=0;n<e;){var l=jn[n];jn[n++]=null;var s=jn[n];jn[n++]=null;var f=jn[n];jn[n++]=null;var d=jn[n];if(jn[n++]=null,s!==null&&f!==null){var v=s.pending;v===null?f.next=f:(f.next=v.next,v.next=f),s.pending=f}d!==0&&wh(l,f,d)}}function cs(e,n,l,s){jn[Pl++]=e,jn[Pl++]=n,jn[Pl++]=l,jn[Pl++]=s,Eu|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Cu(e,n,l,s){return cs(e,n,l,s),fs(e)}function vl(e,n){return cs(e,null,null,n),fs(e)}function wh(e,n,l){e.lanes|=l;var s=e.alternate;s!==null&&(s.lanes|=l);for(var f=!1,d=e.return;d!==null;)d.childLanes|=l,s=d.alternate,s!==null&&(s.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(f=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,f&&n!==null&&(f=31-ht(l),e=d.hiddenUpdates,s=e[f],s===null?e[f]=[n]:s.push(n),n.lane=l|536870912),d):null}function fs(e){if(50<pr)throw pr=0,Lc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Wl={};function vv(e,n,l,s){this.tag=e,this.key=l,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(e,n,l,s){return new vv(e,n,l,s)}function Au(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ha(e,n){var l=e.alternate;return l===null?(l=gn(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function jh(e,n){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function ds(e,n,l,s,f,d){var v=0;if(s=e,typeof e=="function")Au(e)&&(v=1);else if(typeof e=="string")v=T0(e,l,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ge:return e=gn(31,l,n,f),e.elementType=ge,e.lanes=d,e;case j:return xl(l.children,f,d,n);case B:v=8,f|=24;break;case S:return e=gn(12,l,n,f|2),e.elementType=S,e.lanes=d,e;case ae:return e=gn(13,l,n,f),e.elementType=ae,e.lanes=d,e;case U:return e=gn(19,l,n,f),e.elementType=U,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case z:v=10;break e;case M:v=9;break e;case F:v=11;break e;case ee:v=14;break e;case he:v=16,s=null;break e}v=29,l=Error(r(130,e===null?"null":typeof e,"")),s=null}return n=gn(v,l,n,f),n.elementType=e,n.type=s,n.lanes=d,n}function xl(e,n,l,s){return e=gn(7,e,s,n),e.lanes=l,e}function wu(e,n,l){return e=gn(6,e,null,n),e.lanes=l,e}function Mh(e){var n=gn(18,null,null,0);return n.stateNode=e,n}function ju(e,n,l){return n=gn(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var zh=new WeakMap;function Mn(e,n){if(typeof e=="object"&&e!==null){var l=zh.get(e);return l!==void 0?l:(n={value:e,source:n,stack:hl(n)},zh.set(e,n),n)}return{value:e,source:n,stack:hl(n)}}var ei=[],ti=0,hs=null,Fi=0,zn=[],Rn=0,Ua=null,Pn=1,Wn="";function ma(e,n){ei[ti++]=Fi,ei[ti++]=hs,hs=e,Fi=n}function Rh(e,n,l){zn[Rn++]=Pn,zn[Rn++]=Wn,zn[Rn++]=Ua,Ua=e;var s=Pn;e=Wn;var f=32-ht(s)-1;s&=~(1<<f),l+=1;var d=32-ht(n)+f;if(30<d){var v=f-f%5;d=(s&(1<<v)-1).toString(32),s>>=v,f-=v,Pn=1<<32-ht(n)+f|l<<f|s,Wn=d+e}else Pn=1<<d|l<<f|s,Wn=e}function Mu(e){e.return!==null&&(ma(e,1),Rh(e,1,0))}function zu(e){for(;e===hs;)hs=ei[--ti],ei[ti]=null,Fi=ei[--ti],ei[ti]=null;for(;e===Ua;)Ua=zn[--Rn],zn[Rn]=null,Wn=zn[--Rn],zn[Rn]=null,Pn=zn[--Rn],zn[Rn]=null}function Oh(e,n){zn[Rn++]=Pn,zn[Rn++]=Wn,zn[Rn++]=Ua,Pn=n.id,Wn=n.overflow,Ua=e}var Gt=null,_t=null,Qe=!1,Ha=null,On=!1,Ru=Error(r(519));function Ia(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qi(Mn(n,e)),Ru}function Dh(e){var n=e.stateNode,l=e.type,s=e.memoizedProps;switch(n[Vt]=e,n[ln]=s,l){case"dialog":Ie("cancel",n),Ie("close",n);break;case"iframe":case"object":case"embed":Ie("load",n);break;case"video":case"audio":for(l=0;l<yr.length;l++)Ie(yr[l],n);break;case"source":Ie("error",n);break;case"img":case"image":case"link":Ie("error",n),Ie("load",n);break;case"details":Ie("toggle",n);break;case"input":Ie("invalid",n),Fd(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ie("invalid",n);break;case"textarea":Ie("invalid",n),Kd(n,s.value,s.defaultValue,s.children)}l=s.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||s.suppressHydrationWarning===!0||Pp(n.textContent,l)?(s.popover!=null&&(Ie("beforetoggle",n),Ie("toggle",n)),s.onScroll!=null&&Ie("scroll",n),s.onScrollEnd!=null&&Ie("scrollend",n),s.onClick!=null&&(n.onclick=fa),n=!0):n=!1,n||Ia(e,!0)}function Lh(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:On=!1;return;case 27:case 3:On=!0;return;default:Gt=Gt.return}}function ni(e){if(e!==Gt)return!1;if(!Qe)return Lh(e),Qe=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Jc(e.type,e.memoizedProps)),l=!l),l&&_t&&Ia(e),Lh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));_t=sg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));_t=sg(e)}else n===27?(n=_t,el(e.type)?(e=nf,nf=null,_t=e):_t=n):_t=Gt?Ln(e.stateNode.nextSibling):null;return!0}function bl(){_t=Gt=null,Qe=!1}function Ou(){var e=Ha;return e!==null&&(cn===null?cn=e:cn.push.apply(cn,e),Ha=null),e}function Qi(e){Ha===null?Ha=[e]:Ha.push(e)}var Du=A(null),Sl=null,pa=null;function qa(e,n,l){T(Du,n._currentValue),n._currentValue=l}function ga(e){e._currentValue=Du.current,G(Du)}function Lu(e,n,l){for(;e!==null;){var s=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,s!==null&&(s.childLanes|=n)):s!==null&&(s.childLanes&n)!==n&&(s.childLanes|=n),e===l)break;e=e.return}}function Bu(e,n,l,s){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var d=f.dependencies;if(d!==null){var v=f.child;d=d.firstContext;e:for(;d!==null;){var k=d;d=f;for(var C=0;C<n.length;C++)if(k.context===n[C]){d.lanes|=l,k=d.alternate,k!==null&&(k.lanes|=l),Lu(d.return,l,e),s||(v=null);break e}d=k.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(r(341));v.lanes|=l,d=v.alternate,d!==null&&(d.lanes|=l),Lu(v,l,e),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===e){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function ai(e,n,l,s){e=null;for(var f=n,d=!1;f!==null;){if(!d){if((f.flags&524288)!==0)d=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var k=f.type;pn(f.pendingProps.value,v.value)||(e!==null?e.push(k):e=[k])}}else if(f===xe.current){if(v=f.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Sr):e=[Sr])}f=f.return}e!==null&&Bu(n,e,l,s),n.flags|=262144}function ms(e){for(e=e.firstContext;e!==null;){if(!pn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function kl(e){Sl=e,pa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Zt(e){return Bh(Sl,e)}function ps(e,n){return Sl===null&&kl(e),Bh(e,n)}function Bh(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},pa===null){if(e===null)throw Error(r(308));pa=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else pa=pa.next=n;return l}var xv=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,s){e.push(s)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},bv=t.unstable_scheduleCallback,Sv=t.unstable_NormalPriority,At={$$typeof:z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Uu(){return{controller:new xv,data:new Map,refCount:0}}function Ki(e){e.refCount--,e.refCount===0&&bv(Sv,function(){e.controller.abort()})}var Ji=null,Hu=0,li=0,ii=null;function kv(e,n){if(Ji===null){var l=Ji=[];Hu=0,li=Vc(),ii={status:"pending",value:void 0,then:function(s){l.push(s)}}}return Hu++,n.then(Uh,Uh),n}function Uh(){if(--Hu===0&&Ji!==null){ii!==null&&(ii.status="fulfilled");var e=Ji;Ji=null,li=0,ii=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Tv(e,n){var l=[],s={status:"pending",value:null,reason:null,then:function(f){l.push(f)}};return e.then(function(){s.status="fulfilled",s.value=n;for(var f=0;f<l.length;f++)(0,l[f])(n)},function(f){for(s.status="rejected",s.reason=f,f=0;f<l.length;f++)(0,l[f])(void 0)}),s}var Hh=L.S;L.S=function(e,n){Sp=Pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&kv(e,n),Hh!==null&&Hh(e,n)};var Tl=A(null);function Iu(){var e=Tl.current;return e!==null?e:mt.pooledCache}function gs(e,n){n===null?T(Tl,Tl.current):T(Tl,n.pool)}function Ih(){var e=Iu();return e===null?null:{parent:At._currentValue,pool:e}}var ri=Error(r(460)),qu=Error(r(474)),ys=Error(r(542)),_s={then:function(){}};function qh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Vh(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(fa,fa),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Zh(e),e;default:if(typeof n.status=="string")n.then(fa,fa);else{if(e=mt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(s){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=s}},function(s){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=s}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Zh(e),e}throw El=n,ri}}function Nl(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(El=l,ri):l}}var El=null;function Gh(){if(El===null)throw Error(r(459));var e=El;return El=null,e}function Zh(e){if(e===ri||e===ys)throw Error(r(483))}var si=null,Pi=0;function vs(e){var n=Pi;return Pi+=1,si===null&&(si=[]),Vh(si,e,n)}function Wi(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function xs(e,n){throw n.$$typeof===x?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function $h(e){function n(O,w){if(e){var H=O.deletions;H===null?(O.deletions=[w],O.flags|=16):H.push(w)}}function l(O,w){if(!e)return null;for(;w!==null;)n(O,w),w=w.sibling;return null}function s(O){for(var w=new Map;O!==null;)O.key!==null?w.set(O.key,O):w.set(O.index,O),O=O.sibling;return w}function f(O,w){return O=ha(O,w),O.index=0,O.sibling=null,O}function d(O,w,H){return O.index=H,e?(H=O.alternate,H!==null?(H=H.index,H<w?(O.flags|=67108866,w):H):(O.flags|=67108866,w)):(O.flags|=1048576,w)}function v(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function k(O,w,H,Q){return w===null||w.tag!==6?(w=wu(H,O.mode,Q),w.return=O,w):(w=f(w,H),w.return=O,w)}function C(O,w,H,Q){var Te=H.type;return Te===j?Z(O,w,H.props.children,Q,H.key):w!==null&&(w.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===he&&Nl(Te)===w.type)?(w=f(w,H.props),Wi(w,H),w.return=O,w):(w=ds(H.type,H.key,H.props,null,O.mode,Q),Wi(w,H),w.return=O,w)}function I(O,w,H,Q){return w===null||w.tag!==4||w.stateNode.containerInfo!==H.containerInfo||w.stateNode.implementation!==H.implementation?(w=ju(H,O.mode,Q),w.return=O,w):(w=f(w,H.children||[]),w.return=O,w)}function Z(O,w,H,Q,Te){return w===null||w.tag!==7?(w=xl(H,O.mode,Q,Te),w.return=O,w):(w=f(w,H),w.return=O,w)}function P(O,w,H){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=wu(""+w,O.mode,H),w.return=O,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case b:return H=ds(w.type,w.key,w.props,null,O.mode,H),Wi(H,w),H.return=O,H;case N:return w=ju(w,O.mode,H),w.return=O,w;case he:return w=Nl(w),P(O,w,H)}if(ne(w)||$(w))return w=xl(w,O.mode,H,null),w.return=O,w;if(typeof w.then=="function")return P(O,vs(w),H);if(w.$$typeof===z)return P(O,ps(O,w),H);xs(O,w)}return null}function q(O,w,H,Q){var Te=w!==null?w.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return Te!==null?null:k(O,w,""+H,Q);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return H.key===Te?C(O,w,H,Q):null;case N:return H.key===Te?I(O,w,H,Q):null;case he:return H=Nl(H),q(O,w,H,Q)}if(ne(H)||$(H))return Te!==null?null:Z(O,w,H,Q,null);if(typeof H.then=="function")return q(O,w,vs(H),Q);if(H.$$typeof===z)return q(O,w,ps(O,H),Q);xs(O,H)}return null}function V(O,w,H,Q,Te){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return O=O.get(H)||null,k(w,O,""+Q,Te);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case b:return O=O.get(Q.key===null?H:Q.key)||null,C(w,O,Q,Te);case N:return O=O.get(Q.key===null?H:Q.key)||null,I(w,O,Q,Te);case he:return Q=Nl(Q),V(O,w,H,Q,Te)}if(ne(Q)||$(Q))return O=O.get(H)||null,Z(w,O,Q,Te,null);if(typeof Q.then=="function")return V(O,w,H,vs(Q),Te);if(Q.$$typeof===z)return V(O,w,H,ps(w,Q),Te);xs(w,Q)}return null}function ye(O,w,H,Q){for(var Te=null,et=null,be=w,De=w=0,$e=null;be!==null&&De<H.length;De++){be.index>De?($e=be,be=null):$e=be.sibling;var tt=q(O,be,H[De],Q);if(tt===null){be===null&&(be=$e);break}e&&be&&tt.alternate===null&&n(O,be),w=d(tt,w,De),et===null?Te=tt:et.sibling=tt,et=tt,be=$e}if(De===H.length)return l(O,be),Qe&&ma(O,De),Te;if(be===null){for(;De<H.length;De++)be=P(O,H[De],Q),be!==null&&(w=d(be,w,De),et===null?Te=be:et.sibling=be,et=be);return Qe&&ma(O,De),Te}for(be=s(be);De<H.length;De++)$e=V(be,O,De,H[De],Q),$e!==null&&(e&&$e.alternate!==null&&be.delete($e.key===null?De:$e.key),w=d($e,w,De),et===null?Te=$e:et.sibling=$e,et=$e);return e&&be.forEach(function(il){return n(O,il)}),Qe&&ma(O,De),Te}function Ee(O,w,H,Q){if(H==null)throw Error(r(151));for(var Te=null,et=null,be=w,De=w=0,$e=null,tt=H.next();be!==null&&!tt.done;De++,tt=H.next()){be.index>De?($e=be,be=null):$e=be.sibling;var il=q(O,be,tt.value,Q);if(il===null){be===null&&(be=$e);break}e&&be&&il.alternate===null&&n(O,be),w=d(il,w,De),et===null?Te=il:et.sibling=il,et=il,be=$e}if(tt.done)return l(O,be),Qe&&ma(O,De),Te;if(be===null){for(;!tt.done;De++,tt=H.next())tt=P(O,tt.value,Q),tt!==null&&(w=d(tt,w,De),et===null?Te=tt:et.sibling=tt,et=tt);return Qe&&ma(O,De),Te}for(be=s(be);!tt.done;De++,tt=H.next())tt=V(be,O,De,tt.value,Q),tt!==null&&(e&&tt.alternate!==null&&be.delete(tt.key===null?De:tt.key),w=d(tt,w,De),et===null?Te=tt:et.sibling=tt,et=tt);return e&&be.forEach(function(D0){return n(O,D0)}),Qe&&ma(O,De),Te}function dt(O,w,H,Q){if(typeof H=="object"&&H!==null&&H.type===j&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case b:e:{for(var Te=H.key;w!==null;){if(w.key===Te){if(Te=H.type,Te===j){if(w.tag===7){l(O,w.sibling),Q=f(w,H.props.children),Q.return=O,O=Q;break e}}else if(w.elementType===Te||typeof Te=="object"&&Te!==null&&Te.$$typeof===he&&Nl(Te)===w.type){l(O,w.sibling),Q=f(w,H.props),Wi(Q,H),Q.return=O,O=Q;break e}l(O,w);break}else n(O,w);w=w.sibling}H.type===j?(Q=xl(H.props.children,O.mode,Q,H.key),Q.return=O,O=Q):(Q=ds(H.type,H.key,H.props,null,O.mode,Q),Wi(Q,H),Q.return=O,O=Q)}return v(O);case N:e:{for(Te=H.key;w!==null;){if(w.key===Te)if(w.tag===4&&w.stateNode.containerInfo===H.containerInfo&&w.stateNode.implementation===H.implementation){l(O,w.sibling),Q=f(w,H.children||[]),Q.return=O,O=Q;break e}else{l(O,w);break}else n(O,w);w=w.sibling}Q=ju(H,O.mode,Q),Q.return=O,O=Q}return v(O);case he:return H=Nl(H),dt(O,w,H,Q)}if(ne(H))return ye(O,w,H,Q);if($(H)){if(Te=$(H),typeof Te!="function")throw Error(r(150));return H=Te.call(H),Ee(O,w,H,Q)}if(typeof H.then=="function")return dt(O,w,vs(H),Q);if(H.$$typeof===z)return dt(O,w,ps(O,H),Q);xs(O,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,w!==null&&w.tag===6?(l(O,w.sibling),Q=f(w,H),Q.return=O,O=Q):(l(O,w),Q=wu(H,O.mode,Q),Q.return=O,O=Q),v(O)):l(O,w)}return function(O,w,H,Q){try{Pi=0;var Te=dt(O,w,H,Q);return si=null,Te}catch(be){if(be===ri||be===ys)throw be;var et=gn(29,be,null,O.mode);return et.lanes=Q,et.return=O,et}finally{}}}var Cl=$h(!0),Yh=$h(!1),Va=!1;function Vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gu(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 Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Za(e,n,l){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(lt&2)!==0){var f=s.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),s.pending=n,n=fs(e),wh(e,null,l),n}return cs(e,s,n,l),fs(e)}function er(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var s=n.lanes;s&=e.pendingLanes,l|=s,n.lanes=l,Bd(e,l)}}function Zu(e,n){var l=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,l===s)){var f=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var v={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?f=d=v:d=d.next=v,l=l.next}while(l!==null);d===null?f=d=n:d=d.next=n}else f=d=n;l={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:d,shared:s.shared,callbacks:s.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var $u=!1;function tr(){if($u){var e=ii;if(e!==null)throw e}}function nr(e,n,l,s){$u=!1;var f=e.updateQueue;Va=!1;var d=f.firstBaseUpdate,v=f.lastBaseUpdate,k=f.shared.pending;if(k!==null){f.shared.pending=null;var C=k,I=C.next;C.next=null,v===null?d=I:v.next=I,v=C;var Z=e.alternate;Z!==null&&(Z=Z.updateQueue,k=Z.lastBaseUpdate,k!==v&&(k===null?Z.firstBaseUpdate=I:k.next=I,Z.lastBaseUpdate=C))}if(d!==null){var P=f.baseState;v=0,Z=I=C=null,k=d;do{var q=k.lane&-536870913,V=q!==k.lane;if(V?(Ze&q)===q:(s&q)===q){q!==0&&q===li&&($u=!0),Z!==null&&(Z=Z.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var ye=e,Ee=k;q=n;var dt=l;switch(Ee.tag){case 1:if(ye=Ee.payload,typeof ye=="function"){P=ye.call(dt,P,q);break e}P=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=Ee.payload,q=typeof ye=="function"?ye.call(dt,P,q):ye,q==null)break e;P=y({},P,q);break e;case 2:Va=!0}}q=k.callback,q!==null&&(e.flags|=64,V&&(e.flags|=8192),V=f.callbacks,V===null?f.callbacks=[q]:V.push(q))}else V={lane:q,tag:k.tag,payload:k.payload,callback:k.callback,next:null},Z===null?(I=Z=V,C=P):Z=Z.next=V,v|=q;if(k=k.next,k===null){if(k=f.shared.pending,k===null)break;V=k,k=V.next,V.next=null,f.lastBaseUpdate=V,f.shared.pending=null}}while(!0);Z===null&&(C=P),f.baseState=C,f.firstBaseUpdate=I,f.lastBaseUpdate=Z,d===null&&(f.shared.lanes=0),Qa|=v,e.lanes=v,e.memoizedState=P}}function Xh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Fh(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Xh(l[e],n)}var oi=A(null),bs=A(0);function Qh(e,n){e=Na,T(bs,e),T(oi,n),Na=e|n.baseLanes}function Yu(){T(bs,Na),T(oi,oi.current)}function Xu(){Na=bs.current,G(oi),G(bs)}var yn=A(null),Dn=null;function $a(e){var n=e.alternate;T(Tt,Tt.current&1),T(yn,e),Dn===null&&(n===null||oi.current!==null||n.memoizedState!==null)&&(Dn=e)}function Fu(e){T(Tt,Tt.current),T(yn,e),Dn===null&&(Dn=e)}function Kh(e){e.tag===22?(T(Tt,Tt.current),T(yn,e),Dn===null&&(Dn=e)):Ya()}function Ya(){T(Tt,Tt.current),T(yn,yn.current)}function _n(e){G(yn),Dn===e&&(Dn=null),G(Tt)}var Tt=A(0);function Ss(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ef(l)||tf(l)))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 ya=0,Re=null,ct=null,wt=null,ks=!1,ui=!1,Al=!1,Ts=0,ar=0,ci=null,Nv=0;function St(){throw Error(r(321))}function Qu(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!pn(e[l],n[l]))return!1;return!0}function Ku(e,n,l,s,f,d){return ya=d,Re=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,L.H=e===null||e.memoizedState===null?Rm:fc,Al=!1,d=l(s,f),Al=!1,ui&&(d=Ph(n,l,s,f)),Jh(e),d}function Jh(e){L.H=rr;var n=ct!==null&&ct.next!==null;if(ya=0,wt=ct=Re=null,ks=!1,ar=0,ci=null,n)throw Error(r(300));e===null||jt||(e=e.dependencies,e!==null&&ms(e)&&(jt=!0))}function Ph(e,n,l,s){Re=e;var f=0;do{if(ui&&(ci=null),ar=0,ui=!1,25<=f)throw Error(r(301));if(f+=1,wt=ct=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}L.H=Om,d=n(l,s)}while(ui);return d}function Ev(){var e=L.H,n=e.useState()[0];return n=typeof n.then=="function"?lr(n):n,e=e.useState()[0],(ct!==null?ct.memoizedState:null)!==e&&(Re.flags|=1024),n}function Ju(){var e=Ts!==0;return Ts=0,e}function Pu(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function Wu(e){if(ks){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}ks=!1}ya=0,wt=ct=Re=null,ui=!1,ar=Ts=0,ci=null}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wt===null?Re.memoizedState=wt=e:wt=wt.next=e,wt}function Nt(){if(ct===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var n=wt===null?Re.memoizedState:wt.next;if(n!==null)wt=n,ct=e;else{if(e===null)throw Re.alternate===null?Error(r(467)):Error(r(310));ct=e,e={memoizedState:ct.memoizedState,baseState:ct.baseState,baseQueue:ct.baseQueue,queue:ct.queue,next:null},wt===null?Re.memoizedState=wt=e:wt=wt.next=e}return wt}function Ns(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function lr(e){var n=ar;return ar+=1,ci===null&&(ci=[]),e=Vh(ci,e,n),n=Re,(wt===null?n.memoizedState:wt.next)===null&&(n=n.alternate,L.H=n===null||n.memoizedState===null?Rm:fc),e}function Es(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return lr(e);if(e.$$typeof===z)return Zt(e)}throw Error(r(438,String(e)))}function ec(e){var n=null,l=Re.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var s=Re.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(n={data:s.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=Ns(),Re.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),s=0;s<e;s++)l[s]=R;return n.index++,l}function _a(e,n){return typeof n=="function"?n(e):n}function Cs(e){var n=Nt();return tc(n,ct,e)}function tc(e,n,l){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=l;var f=e.baseQueue,d=s.pending;if(d!==null){if(f!==null){var v=f.next;f.next=d.next,d.next=v}n.baseQueue=f=d,s.pending=null}if(d=e.baseState,f===null)e.memoizedState=d;else{n=f.next;var k=v=null,C=null,I=n,Z=!1;do{var P=I.lane&-536870913;if(P!==I.lane?(Ze&P)===P:(ya&P)===P){var q=I.revertLane;if(q===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null}),P===li&&(Z=!0);else if((ya&q)===q){I=I.next,q===li&&(Z=!0);continue}else P={lane:0,revertLane:I.revertLane,gesture:null,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},C===null?(k=C=P,v=d):C=C.next=P,Re.lanes|=q,Qa|=q;P=I.action,Al&&l(d,P),d=I.hasEagerState?I.eagerState:l(d,P)}else q={lane:P,revertLane:I.revertLane,gesture:I.gesture,action:I.action,hasEagerState:I.hasEagerState,eagerState:I.eagerState,next:null},C===null?(k=C=q,v=d):C=C.next=q,Re.lanes|=P,Qa|=P;I=I.next}while(I!==null&&I!==n);if(C===null?v=d:C.next=k,!pn(d,e.memoizedState)&&(jt=!0,Z&&(l=ii,l!==null)))throw l;e.memoizedState=d,e.baseState=v,e.baseQueue=C,s.lastRenderedState=d}return f===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function nc(e){var n=Nt(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var s=l.dispatch,f=l.pending,d=n.memoizedState;if(f!==null){l.pending=null;var v=f=f.next;do d=e(d,v.action),v=v.next;while(v!==f);pn(d,n.memoizedState)||(jt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),l.lastRenderedState=d}return[d,s]}function Wh(e,n,l){var s=Re,f=Nt(),d=Qe;if(d){if(l===void 0)throw Error(r(407));l=l()}else l=n();var v=!pn((ct||f).memoizedState,l);if(v&&(f.memoizedState=l,jt=!0),f=f.queue,ic(nm.bind(null,s,f,e),[e]),f.getSnapshot!==n||v||wt!==null&&wt.memoizedState.tag&1){if(s.flags|=2048,fi(9,{destroy:void 0},tm.bind(null,s,f,l,n),null),mt===null)throw Error(r(349));d||(ya&127)!==0||em(s,n,l)}return l}function em(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Re.updateQueue,n===null?(n=Ns(),Re.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function tm(e,n,l,s){n.value=l,n.getSnapshot=s,am(n)&&lm(e)}function nm(e,n,l){return l(function(){am(n)&&lm(e)})}function am(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!pn(e,l)}catch{return!0}}function lm(e){var n=vl(e,2);n!==null&&fn(n,e,2)}function ac(e){var n=en();if(typeof e=="function"){var l=e;if(e=l(),Al){an(!0);try{l()}finally{an(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:e},n}function im(e,n,l,s){return e.baseState=l,tc(e,ct,typeof s=="function"?s:_a)}function Cv(e,n,l,s,f){if(js(e))throw Error(r(485));if(e=n.action,e!==null){var d={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};L.T!==null?l(!0):d.isTransition=!1,s(d),l=n.pending,l===null?(d.next=n.pending=d,rm(n,d)):(d.next=l.next,n.pending=l.next=d)}}function rm(e,n){var l=n.action,s=n.payload,f=e.state;if(n.isTransition){var d=L.T,v={};L.T=v;try{var k=l(f,s),C=L.S;C!==null&&C(v,k),sm(e,n,k)}catch(I){lc(e,n,I)}finally{d!==null&&v.types!==null&&(d.types=v.types),L.T=d}}else try{d=l(f,s),sm(e,n,d)}catch(I){lc(e,n,I)}}function sm(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){om(e,n,s)},function(s){return lc(e,n,s)}):om(e,n,l)}function om(e,n,l){n.status="fulfilled",n.value=l,um(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,rm(e,l)))}function lc(e,n,l){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=l,um(n),n=n.next;while(n!==s)}e.action=null}function um(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function cm(e,n){return n}function fm(e,n){if(Qe){var l=mt.formState;if(l!==null){e:{var s=Re;if(Qe){if(_t){t:{for(var f=_t,d=On;f.nodeType!==8;){if(!d){f=null;break t}if(f=Ln(f.nextSibling),f===null){f=null;break t}}d=f.data,f=d==="F!"||d==="F"?f:null}if(f){_t=Ln(f.nextSibling),s=f.data==="F!";break e}}Ia(s)}s=!1}s&&(n=l[0])}}return l=en(),l.memoizedState=l.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cm,lastRenderedState:n},l.queue=s,l=jm.bind(null,Re,s),s.dispatch=l,s=ac(!1),d=cc.bind(null,Re,!1,s.queue),s=en(),f={state:n,dispatch:null,action:e,pending:null},s.queue=f,l=Cv.bind(null,Re,f,d,l),f.dispatch=l,s.memoizedState=e,[n,l,!1]}function dm(e){var n=Nt();return hm(n,ct,e)}function hm(e,n,l){if(n=tc(e,n,cm)[0],e=Cs(_a)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=lr(n)}catch(v){throw v===ri?ys:v}else s=n;n=Nt();var f=n.queue,d=f.dispatch;return l!==n.memoizedState&&(Re.flags|=2048,fi(9,{destroy:void 0},Av.bind(null,f,l),null)),[s,d,e]}function Av(e,n){e.action=n}function mm(e){var n=Nt(),l=ct;if(l!==null)return hm(n,l,e);Nt(),n=n.memoizedState,l=Nt();var s=l.queue.dispatch;return l.memoizedState=e,[n,s,!1]}function fi(e,n,l,s){return e={tag:e,create:l,deps:s,inst:n,next:null},n=Re.updateQueue,n===null&&(n=Ns(),Re.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(s=l.next,l.next=e,e.next=s,n.lastEffect=e),e}function pm(){return Nt().memoizedState}function As(e,n,l,s){var f=en();Re.flags|=e,f.memoizedState=fi(1|n,{destroy:void 0},l,s===void 0?null:s)}function ws(e,n,l,s){var f=Nt();s=s===void 0?null:s;var d=f.memoizedState.inst;ct!==null&&s!==null&&Qu(s,ct.memoizedState.deps)?f.memoizedState=fi(n,d,l,s):(Re.flags|=e,f.memoizedState=fi(1|n,d,l,s))}function gm(e,n){As(8390656,8,e,n)}function ic(e,n){ws(2048,8,e,n)}function wv(e){Re.flags|=4;var n=Re.updateQueue;if(n===null)n=Ns(),Re.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function ym(e){var n=Nt().memoizedState;return wv({ref:n,nextImpl:e}),function(){if((lt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function _m(e,n){return ws(4,2,e,n)}function vm(e,n){return ws(4,4,e,n)}function xm(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function bm(e,n,l){l=l!=null?l.concat([e]):null,ws(4,4,xm.bind(null,n,e),l)}function rc(){}function Sm(e,n){var l=Nt();n=n===void 0?null:n;var s=l.memoizedState;return n!==null&&Qu(n,s[1])?s[0]:(l.memoizedState=[e,n],e)}function km(e,n){var l=Nt();n=n===void 0?null:n;var s=l.memoizedState;if(n!==null&&Qu(n,s[1]))return s[0];if(s=e(),Al){an(!0);try{e()}finally{an(!1)}}return l.memoizedState=[s,n],s}function sc(e,n,l){return l===void 0||(ya&1073741824)!==0&&(Ze&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=Tp(),Re.lanes|=e,Qa|=e,l)}function Tm(e,n,l,s){return pn(l,n)?l:oi.current!==null?(e=sc(e,l,s),pn(e,n)||(jt=!0),e):(ya&42)===0||(ya&1073741824)!==0&&(Ze&261930)===0?(jt=!0,e.memoizedState=l):(e=Tp(),Re.lanes|=e,Qa|=e,n)}function Nm(e,n,l,s,f){var d=K.p;K.p=d!==0&&8>d?d:8;var v=L.T,k={};L.T=k,cc(e,!1,n,l);try{var C=f(),I=L.S;if(I!==null&&I(k,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var Z=Tv(C,s);ir(e,n,Z,bn(e))}else ir(e,n,s,bn(e))}catch(P){ir(e,n,{then:function(){},status:"rejected",reason:P},bn())}finally{K.p=d,v!==null&&k.types!==null&&(v.types=k.types),L.T=v}}function jv(){}function oc(e,n,l,s){if(e.tag!==5)throw Error(r(476));var f=Em(e).queue;Nm(e,f,n,se,l===null?jv:function(){return Cm(e),l(s)})}function Em(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:se},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Cm(e){var n=Em(e);n.next===null&&(n=e.alternate.memoizedState),ir(e,n.next.queue,{},bn())}function uc(){return Zt(Sr)}function Am(){return Nt().memoizedState}function wm(){return Nt().memoizedState}function Mv(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=bn();e=Ga(l);var s=Za(n,e,l);s!==null&&(fn(s,n,l),er(s,n,l)),n={cache:Uu()},e.payload=n;return}n=n.return}}function zv(e,n,l){var s=bn();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},js(e)?Mm(n,l):(l=Cu(e,n,l,s),l!==null&&(fn(l,e,s),zm(l,n,s)))}function jm(e,n,l){var s=bn();ir(e,n,l,s)}function ir(e,n,l,s){var f={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(js(e))Mm(n,f);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var v=n.lastRenderedState,k=d(v,l);if(f.hasEagerState=!0,f.eagerState=k,pn(k,v))return cs(e,n,f,0),mt===null&&us(),!1}catch{}finally{}if(l=Cu(e,n,f,s),l!==null)return fn(l,e,s),zm(l,n,s),!0}return!1}function cc(e,n,l,s){if(s={lane:2,revertLane:Vc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},js(e)){if(n)throw Error(r(479))}else n=Cu(e,l,s,2),n!==null&&fn(n,e,2)}function js(e){var n=e.alternate;return e===Re||n!==null&&n===Re}function Mm(e,n){ui=ks=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function zm(e,n,l){if((l&4194048)!==0){var s=n.lanes;s&=e.pendingLanes,l|=s,n.lanes=l,Bd(e,l)}}var rr={readContext:Zt,use:Es,useCallback:St,useContext:St,useEffect:St,useImperativeHandle:St,useLayoutEffect:St,useInsertionEffect:St,useMemo:St,useReducer:St,useRef:St,useState:St,useDebugValue:St,useDeferredValue:St,useTransition:St,useSyncExternalStore:St,useId:St,useHostTransitionStatus:St,useFormState:St,useActionState:St,useOptimistic:St,useMemoCache:St,useCacheRefresh:St};rr.useEffectEvent=St;var Rm={readContext:Zt,use:Es,useCallback:function(e,n){return en().memoizedState=[e,n===void 0?null:n],e},useContext:Zt,useEffect:gm,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,As(4194308,4,xm.bind(null,n,e),l)},useLayoutEffect:function(e,n){return As(4194308,4,e,n)},useInsertionEffect:function(e,n){As(4,2,e,n)},useMemo:function(e,n){var l=en();n=n===void 0?null:n;var s=e();if(Al){an(!0);try{e()}finally{an(!1)}}return l.memoizedState=[s,n],s},useReducer:function(e,n,l){var s=en();if(l!==void 0){var f=l(n);if(Al){an(!0);try{l(n)}finally{an(!1)}}}else f=n;return s.memoizedState=s.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},s.queue=e,e=e.dispatch=zv.bind(null,Re,e),[s.memoizedState,e]},useRef:function(e){var n=en();return e={current:e},n.memoizedState=e},useState:function(e){e=ac(e);var n=e.queue,l=jm.bind(null,Re,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:rc,useDeferredValue:function(e,n){var l=en();return sc(l,e,n)},useTransition:function(){var e=ac(!1);return e=Nm.bind(null,Re,e.queue,!0,!1),en().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var s=Re,f=en();if(Qe){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),mt===null)throw Error(r(349));(Ze&127)!==0||em(s,n,l)}f.memoizedState=l;var d={value:l,getSnapshot:n};return f.queue=d,gm(nm.bind(null,s,d,e),[e]),s.flags|=2048,fi(9,{destroy:void 0},tm.bind(null,s,d,l,n),null),l},useId:function(){var e=en(),n=mt.identifierPrefix;if(Qe){var l=Wn,s=Pn;l=(s&~(1<<32-ht(s)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Ts++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=Nv++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:uc,useFormState:fm,useActionState:fm,useOptimistic:function(e){var n=en();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=cc.bind(null,Re,!0,l),l.dispatch=n,[e,n]},useMemoCache:ec,useCacheRefresh:function(){return en().memoizedState=Mv.bind(null,Re)},useEffectEvent:function(e){var n=en(),l={impl:e};return n.memoizedState=l,function(){if((lt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},fc={readContext:Zt,use:Es,useCallback:Sm,useContext:Zt,useEffect:ic,useImperativeHandle:bm,useInsertionEffect:_m,useLayoutEffect:vm,useMemo:km,useReducer:Cs,useRef:pm,useState:function(){return Cs(_a)},useDebugValue:rc,useDeferredValue:function(e,n){var l=Nt();return Tm(l,ct.memoizedState,e,n)},useTransition:function(){var e=Cs(_a)[0],n=Nt().memoizedState;return[typeof e=="boolean"?e:lr(e),n]},useSyncExternalStore:Wh,useId:Am,useHostTransitionStatus:uc,useFormState:dm,useActionState:dm,useOptimistic:function(e,n){var l=Nt();return im(l,ct,e,n)},useMemoCache:ec,useCacheRefresh:wm};fc.useEffectEvent=ym;var Om={readContext:Zt,use:Es,useCallback:Sm,useContext:Zt,useEffect:ic,useImperativeHandle:bm,useInsertionEffect:_m,useLayoutEffect:vm,useMemo:km,useReducer:nc,useRef:pm,useState:function(){return nc(_a)},useDebugValue:rc,useDeferredValue:function(e,n){var l=Nt();return ct===null?sc(l,e,n):Tm(l,ct.memoizedState,e,n)},useTransition:function(){var e=nc(_a)[0],n=Nt().memoizedState;return[typeof e=="boolean"?e:lr(e),n]},useSyncExternalStore:Wh,useId:Am,useHostTransitionStatus:uc,useFormState:mm,useActionState:mm,useOptimistic:function(e,n){var l=Nt();return ct!==null?im(l,ct,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:ec,useCacheRefresh:wm};Om.useEffectEvent=ym;function dc(e,n,l,s){n=e.memoizedState,l=l(s,n),l=l==null?n:y({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var hc={enqueueSetState:function(e,n,l){e=e._reactInternals;var s=bn(),f=Ga(s);f.payload=n,l!=null&&(f.callback=l),n=Za(e,f,s),n!==null&&(fn(n,e,s),er(n,e,s))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var s=bn(),f=Ga(s);f.tag=1,f.payload=n,l!=null&&(f.callback=l),n=Za(e,f,s),n!==null&&(fn(n,e,s),er(n,e,s))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=bn(),s=Ga(l);s.tag=2,n!=null&&(s.callback=n),n=Za(e,s,l),n!==null&&(fn(n,e,l),er(n,e,l))}};function Dm(e,n,l,s,f,d,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,d,v):n.prototype&&n.prototype.isPureReactComponent?!Yi(l,s)||!Yi(f,d):!0}function Lm(e,n,l,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,s),n.state!==e&&hc.enqueueReplaceState(n,n.state,null)}function wl(e,n){var l=n;if("ref"in n){l={};for(var s in n)s!=="ref"&&(l[s]=n[s])}if(e=e.defaultProps){l===n&&(l=y({},l));for(var f in e)l[f]===void 0&&(l[f]=e[f])}return l}function Bm(e){os(e)}function Um(e){console.error(e)}function Hm(e){os(e)}function Ms(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function Im(e,n,l){try{var s=e.onCaughtError;s(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function mc(e,n,l){return l=Ga(l),l.tag=3,l.payload={element:null},l.callback=function(){Ms(e,n)},l}function qm(e){return e=Ga(e),e.tag=3,e}function Vm(e,n,l,s){var f=l.type.getDerivedStateFromError;if(typeof f=="function"){var d=s.value;e.payload=function(){return f(d)},e.callback=function(){Im(n,l,s)}}var v=l.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){Im(n,l,s),typeof f!="function"&&(Ka===null?Ka=new Set([this]):Ka.add(this));var k=s.stack;this.componentDidCatch(s.value,{componentStack:k!==null?k:""})})}function Rv(e,n,l,s,f){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=l.alternate,n!==null&&ai(n,l,f,!0),l=yn.current,l!==null){switch(l.tag){case 31:case 13:return Dn===null?Gs():l.alternate===null&&kt===0&&(kt=3),l.flags&=-257,l.flags|=65536,l.lanes=f,s===_s?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([s]):n.add(s),Hc(e,s,f)),!1;case 22:return l.flags|=65536,s===_s?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([s]):l.add(s)),Hc(e,s,f)),!1}throw Error(r(435,l.tag))}return Hc(e,s,f),Gs(),!1}if(Qe)return n=yn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,s!==Ru&&(e=Error(r(422),{cause:s}),Qi(Mn(e,l)))):(s!==Ru&&(n=Error(r(423),{cause:s}),Qi(Mn(n,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,s=Mn(s,l),f=mc(e.stateNode,s,f),Zu(e,f),kt!==4&&(kt=2)),!1;var d=Error(r(520),{cause:s});if(d=Mn(d,l),mr===null?mr=[d]:mr.push(d),kt!==4&&(kt=2),n===null)return!0;s=Mn(s,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=mc(l.stateNode,s,e),Zu(l,e),!1;case 1:if(n=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Ka===null||!Ka.has(d))))return l.flags|=65536,f&=-f,l.lanes|=f,f=qm(f),Vm(f,e,l,s),Zu(l,f),!1}l=l.return}while(l!==null);return!1}var pc=Error(r(461)),jt=!1;function $t(e,n,l,s){n.child=e===null?Yh(n,null,l,s):Cl(n,e.child,l,s)}function Gm(e,n,l,s,f){l=l.render;var d=n.ref;if("ref"in s){var v={};for(var k in s)k!=="ref"&&(v[k]=s[k])}else v=s;return kl(n),s=Ku(e,n,l,v,d,f),k=Ju(),e!==null&&!jt?(Pu(e,n,f),va(e,n,f)):(Qe&&k&&Mu(n),n.flags|=1,$t(e,n,s,f),n.child)}function Zm(e,n,l,s,f){if(e===null){var d=l.type;return typeof d=="function"&&!Au(d)&&d.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=d,$m(e,n,d,s,f)):(e=ds(l.type,null,s,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!kc(e,f)){var v=d.memoizedProps;if(l=l.compare,l=l!==null?l:Yi,l(v,s)&&e.ref===n.ref)return va(e,n,f)}return n.flags|=1,e=ha(d,s),e.ref=n.ref,e.return=n,n.child=e}function $m(e,n,l,s,f){if(e!==null){var d=e.memoizedProps;if(Yi(d,s)&&e.ref===n.ref)if(jt=!1,n.pendingProps=s=d,kc(e,f))(e.flags&131072)!==0&&(jt=!0);else return n.lanes=e.lanes,va(e,n,f)}return gc(e,n,l,s,f)}function Ym(e,n,l,s){var f=s.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,e!==null){for(s=n.child=e.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~d}else s=0,n.child=null;return Xm(e,n,d,l,s)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&gs(n,d!==null?d.cachePool:null),d!==null?Qh(n,d):Yu(),Kh(n);else return s=n.lanes=536870912,Xm(e,n,d!==null?d.baseLanes|l:l,l,s)}else d!==null?(gs(n,d.cachePool),Qh(n,d),Ya(),n.memoizedState=null):(e!==null&&gs(n,null),Yu(),Ya());return $t(e,n,f,l),n.child}function sr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Xm(e,n,l,s,f){var d=Iu();return d=d===null?null:{parent:At._currentValue,pool:d},n.memoizedState={baseLanes:l,cachePool:d},e!==null&&gs(n,null),Yu(),Kh(n),e!==null&&ai(e,n,s,!0),n.childLanes=f,null}function zs(e,n){return n=Os({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Fm(e,n,l){return Cl(n,e.child,null,l),e=zs(n,n.pendingProps),e.flags|=2,_n(n),n.memoizedState=null,e}function Ov(e,n,l){var s=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Qe){if(s.mode==="hidden")return e=zs(n,s),n.lanes=536870912,sr(null,e);if(Fu(n),(e=_t)?(e=rg(e,On),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ua!==null?{id:Pn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},l=Mh(e),l.return=n,n.child=l,Gt=n,_t=null)):e=null,e===null)throw Ia(n);return n.lanes=536870912,null}return zs(n,s)}var d=e.memoizedState;if(d!==null){var v=d.dehydrated;if(Fu(n),f)if(n.flags&256)n.flags&=-257,n=Fm(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(jt||ai(e,n,l,!1),f=(l&e.childLanes)!==0,jt||f){if(s=mt,s!==null&&(v=Ud(s,l),v!==0&&v!==d.retryLane))throw d.retryLane=v,vl(e,v),fn(s,e,v),pc;Gs(),n=Fm(e,n,l)}else e=d.treeContext,_t=Ln(v.nextSibling),Gt=n,Qe=!0,Ha=null,On=!1,e!==null&&Oh(n,e),n=zs(n,s),n.flags|=4096;return n}return e=ha(e.child,{mode:s.mode,children:s.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Rs(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function gc(e,n,l,s,f){return kl(n),l=Ku(e,n,l,s,void 0,f),s=Ju(),e!==null&&!jt?(Pu(e,n,f),va(e,n,f)):(Qe&&s&&Mu(n),n.flags|=1,$t(e,n,l,f),n.child)}function Qm(e,n,l,s,f,d){return kl(n),n.updateQueue=null,l=Ph(n,s,l,f),Jh(e),s=Ju(),e!==null&&!jt?(Pu(e,n,d),va(e,n,d)):(Qe&&s&&Mu(n),n.flags|=1,$t(e,n,l,d),n.child)}function Km(e,n,l,s,f){if(kl(n),n.stateNode===null){var d=Wl,v=l.contextType;typeof v=="object"&&v!==null&&(d=Zt(v)),d=new l(s,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=hc,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=s,d.state=n.memoizedState,d.refs={},Vu(n),v=l.contextType,d.context=typeof v=="object"&&v!==null?Zt(v):Wl,d.state=n.memoizedState,v=l.getDerivedStateFromProps,typeof v=="function"&&(dc(n,l,v,s),d.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&hc.enqueueReplaceState(d,d.state,null),nr(n,s,d,f),tr(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(e===null){d=n.stateNode;var k=n.memoizedProps,C=wl(l,k);d.props=C;var I=d.context,Z=l.contextType;v=Wl,typeof Z=="object"&&Z!==null&&(v=Zt(Z));var P=l.getDerivedStateFromProps;Z=typeof P=="function"||typeof d.getSnapshotBeforeUpdate=="function",k=n.pendingProps!==k,Z||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(k||I!==v)&&Lm(n,d,s,v),Va=!1;var q=n.memoizedState;d.state=q,nr(n,s,d,f),tr(),I=n.memoizedState,k||q!==I||Va?(typeof P=="function"&&(dc(n,l,P,s),I=n.memoizedState),(C=Va||Dm(n,l,C,s,q,I,v))?(Z||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=s,n.memoizedState=I),d.props=s,d.state=I,d.context=v,s=C):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{d=n.stateNode,Gu(e,n),v=n.memoizedProps,Z=wl(l,v),d.props=Z,P=n.pendingProps,q=d.context,I=l.contextType,C=Wl,typeof I=="object"&&I!==null&&(C=Zt(I)),k=l.getDerivedStateFromProps,(I=typeof k=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==P||q!==C)&&Lm(n,d,s,C),Va=!1,q=n.memoizedState,d.state=q,nr(n,s,d,f),tr();var V=n.memoizedState;v!==P||q!==V||Va||e!==null&&e.dependencies!==null&&ms(e.dependencies)?(typeof k=="function"&&(dc(n,l,k,s),V=n.memoizedState),(Z=Va||Dm(n,l,Z,s,q,V,C)||e!==null&&e.dependencies!==null&&ms(e.dependencies))?(I||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,V,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,V,C)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=V),d.props=s,d.state=V,d.context=C,s=Z):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&q===e.memoizedState||(n.flags|=1024),s=!1)}return d=s,Rs(e,n),s=(n.flags&128)!==0,d||s?(d=n.stateNode,l=s&&typeof l.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&s?(n.child=Cl(n,e.child,null,f),n.child=Cl(n,null,l,f)):$t(e,n,l,f),n.memoizedState=d.state,e=n.child):e=va(e,n,f),e}function Jm(e,n,l,s){return bl(),n.flags|=256,$t(e,n,l,s),n.child}var yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _c(e){return{baseLanes:e,cachePool:Ih()}}function vc(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=xn),e}function Pm(e,n,l){var s=n.pendingProps,f=!1,d=(n.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(Tt.current&2)!==0),v&&(f=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if(Qe){if(f?$a(n):Ya(),(e=_t)?(e=rg(e,On),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ua!==null?{id:Pn,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},l=Mh(e),l.return=n,n.child=l,Gt=n,_t=null)):e=null,e===null)throw Ia(n);return tf(e)?n.lanes=32:n.lanes=536870912,null}var k=s.children;return s=s.fallback,f?(Ya(),f=n.mode,k=Os({mode:"hidden",children:k},f),s=xl(s,f,l,null),k.return=n,s.return=n,k.sibling=s,n.child=k,s=n.child,s.memoizedState=_c(l),s.childLanes=vc(e,v,l),n.memoizedState=yc,sr(null,s)):($a(n),xc(n,k))}var C=e.memoizedState;if(C!==null&&(k=C.dehydrated,k!==null)){if(d)n.flags&256?($a(n),n.flags&=-257,n=bc(e,n,l)):n.memoizedState!==null?(Ya(),n.child=e.child,n.flags|=128,n=null):(Ya(),k=s.fallback,f=n.mode,s=Os({mode:"visible",children:s.children},f),k=xl(k,f,l,null),k.flags|=2,s.return=n,k.return=n,s.sibling=k,n.child=s,Cl(n,e.child,null,l),s=n.child,s.memoizedState=_c(l),s.childLanes=vc(e,v,l),n.memoizedState=yc,n=sr(null,s));else if($a(n),tf(k)){if(v=k.nextSibling&&k.nextSibling.dataset,v)var I=v.dgst;v=I,s=Error(r(419)),s.stack="",s.digest=v,Qi({value:s,source:null,stack:null}),n=bc(e,n,l)}else if(jt||ai(e,n,l,!1),v=(l&e.childLanes)!==0,jt||v){if(v=mt,v!==null&&(s=Ud(v,l),s!==0&&s!==C.retryLane))throw C.retryLane=s,vl(e,s),fn(v,e,s),pc;ef(k)||Gs(),n=bc(e,n,l)}else ef(k)?(n.flags|=192,n.child=e.child,n=null):(e=C.treeContext,_t=Ln(k.nextSibling),Gt=n,Qe=!0,Ha=null,On=!1,e!==null&&Oh(n,e),n=xc(n,s.children),n.flags|=4096);return n}return f?(Ya(),k=s.fallback,f=n.mode,C=e.child,I=C.sibling,s=ha(C,{mode:"hidden",children:s.children}),s.subtreeFlags=C.subtreeFlags&65011712,I!==null?k=ha(I,k):(k=xl(k,f,l,null),k.flags|=2),k.return=n,s.return=n,s.sibling=k,n.child=s,sr(null,s),s=n.child,k=e.child.memoizedState,k===null?k=_c(l):(f=k.cachePool,f!==null?(C=At._currentValue,f=f.parent!==C?{parent:C,pool:C}:f):f=Ih(),k={baseLanes:k.baseLanes|l,cachePool:f}),s.memoizedState=k,s.childLanes=vc(e,v,l),n.memoizedState=yc,sr(e.child,s)):($a(n),l=e.child,e=l.sibling,l=ha(l,{mode:"visible",children:s.children}),l.return=n,l.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=l,n.memoizedState=null,l)}function xc(e,n){return n=Os({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Os(e,n){return e=gn(22,e,null,n),e.lanes=0,e}function bc(e,n,l){return Cl(n,e.child,null,l),e=xc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Wm(e,n,l){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),Lu(e.return,n,l)}function Sc(e,n,l,s,f,d){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:l,tailMode:f,treeForkCount:d}:(v.isBackwards=n,v.rendering=null,v.renderingStartTime=0,v.last=s,v.tail=l,v.tailMode=f,v.treeForkCount=d)}function ep(e,n,l){var s=n.pendingProps,f=s.revealOrder,d=s.tail;s=s.children;var v=Tt.current,k=(v&2)!==0;if(k?(v=v&1|2,n.flags|=128):v&=1,T(Tt,v),$t(e,n,s,l),s=Qe?Fi:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wm(e,l,n);else if(e.tag===19)Wm(e,l,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(f){case"forwards":for(l=n.child,f=null;l!==null;)e=l.alternate,e!==null&&Ss(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=n.child,n.child=null):(f=l.sibling,l.sibling=null),Sc(n,!1,f,l,d,s);break;case"backwards":case"unstable_legacy-backwards":for(l=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Ss(e)===null){n.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}Sc(n,!0,l,null,d,s);break;case"together":Sc(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function va(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),Qa|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(ai(e,n,l,!1),(l&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,l=ha(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=ha(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function kc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&ms(e)))}function Dv(e,n,l){switch(n.tag){case 3:Fe(n,n.stateNode.containerInfo),qa(n,At,e.memoizedState.cache),bl();break;case 27:case 5:Ct(n);break;case 4:Fe(n,n.stateNode.containerInfo);break;case 10:qa(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Fu(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?($a(n),n.flags|=128,null):(l&n.child.childLanes)!==0?Pm(e,n,l):($a(n),e=va(e,n,l),e!==null?e.sibling:null);$a(n);break;case 19:var f=(e.flags&128)!==0;if(s=(l&n.childLanes)!==0,s||(ai(e,n,l,!1),s=(l&n.childLanes)!==0),f){if(s)return ep(e,n,l);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),T(Tt,Tt.current),s)break;return null;case 22:return n.lanes=0,Ym(e,n,l,n.pendingProps);case 24:qa(n,At,e.memoizedState.cache)}return va(e,n,l)}function tp(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)jt=!0;else{if(!kc(e,l)&&(n.flags&128)===0)return jt=!1,Dv(e,n,l);jt=(e.flags&131072)!==0}else jt=!1,Qe&&(n.flags&1048576)!==0&&Rh(n,Fi,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(e=Nl(n.elementType),n.type=e,typeof e=="function")Au(e)?(s=wl(e,s),n.tag=1,n=Km(null,n,e,s,l)):(n.tag=0,n=gc(null,n,e,s,l));else{if(e!=null){var f=e.$$typeof;if(f===F){n.tag=11,n=Gm(null,n,e,s,l);break e}else if(f===ee){n.tag=14,n=Zm(null,n,e,s,l);break e}}throw n=J(e)||e,Error(r(306,n,""))}}return n;case 0:return gc(e,n,n.type,n.pendingProps,l);case 1:return s=n.type,f=wl(s,n.pendingProps),Km(e,n,s,f,l);case 3:e:{if(Fe(n,n.stateNode.containerInfo),e===null)throw Error(r(387));s=n.pendingProps;var d=n.memoizedState;f=d.element,Gu(e,n),nr(n,s,null,l);var v=n.memoizedState;if(s=v.cache,qa(n,At,s),s!==d.cache&&Bu(n,[At],l,!0),tr(),s=v.element,d.isDehydrated)if(d={element:s,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=Jm(e,n,s,l);break e}else if(s!==f){f=Mn(Error(r(424)),n),Qi(f),n=Jm(e,n,s,l);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(_t=Ln(e.firstChild),Gt=n,Qe=!0,Ha=null,On=!0,l=Yh(n,null,s,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(bl(),s===f){n=va(e,n,l);break e}$t(e,n,s,l)}n=n.child}return n;case 26:return Rs(e,n),e===null?(l=dg(n.type,null,n.pendingProps,null))?n.memoizedState=l:Qe||(l=n.type,e=n.pendingProps,s=Ks(Y.current).createElement(l),s[Vt]=n,s[ln]=e,Yt(s,l,e),Bt(s),n.stateNode=s):n.memoizedState=dg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Ct(n),e===null&&Qe&&(s=n.stateNode=ug(n.type,n.pendingProps,Y.current),Gt=n,On=!0,f=_t,el(n.type)?(nf=f,_t=Ln(s.firstChild)):_t=f),$t(e,n,n.pendingProps.children,l),Rs(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Qe&&((f=s=_t)&&(s=f0(s,n.type,n.pendingProps,On),s!==null?(n.stateNode=s,Gt=n,_t=Ln(s.firstChild),On=!1,f=!0):f=!1),f||Ia(n)),Ct(n),f=n.type,d=n.pendingProps,v=e!==null?e.memoizedProps:null,s=d.children,Jc(f,d)?s=null:v!==null&&Jc(f,v)&&(n.flags|=32),n.memoizedState!==null&&(f=Ku(e,n,Ev,null,null,l),Sr._currentValue=f),Rs(e,n),$t(e,n,s,l),n.child;case 6:return e===null&&Qe&&((e=l=_t)&&(l=d0(l,n.pendingProps,On),l!==null?(n.stateNode=l,Gt=n,_t=null,e=!0):e=!1),e||Ia(n)),null;case 13:return Pm(e,n,l);case 4:return Fe(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=Cl(n,null,s,l):$t(e,n,s,l),n.child;case 11:return Gm(e,n,n.type,n.pendingProps,l);case 7:return $t(e,n,n.pendingProps,l),n.child;case 8:return $t(e,n,n.pendingProps.children,l),n.child;case 12:return $t(e,n,n.pendingProps.children,l),n.child;case 10:return s=n.pendingProps,qa(n,n.type,s.value),$t(e,n,s.children,l),n.child;case 9:return f=n.type._context,s=n.pendingProps.children,kl(n),f=Zt(f),s=s(f),n.flags|=1,$t(e,n,s,l),n.child;case 14:return Zm(e,n,n.type,n.pendingProps,l);case 15:return $m(e,n,n.type,n.pendingProps,l);case 19:return ep(e,n,l);case 31:return Ov(e,n,l);case 22:return Ym(e,n,l,n.pendingProps);case 24:return kl(n),s=Zt(At),e===null?(f=Iu(),f===null&&(f=mt,d=Uu(),f.pooledCache=d,d.refCount++,d!==null&&(f.pooledCacheLanes|=l),f=d),n.memoizedState={parent:s,cache:f},Vu(n),qa(n,At,f)):((e.lanes&l)!==0&&(Gu(e,n),nr(n,null,null,l),tr()),f=e.memoizedState,d=n.memoizedState,f.parent!==s?(f={parent:s,cache:s},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),qa(n,At,s)):(s=d.cache,qa(n,At,s),s!==f.cache&&Bu(n,[At],l,!0))),$t(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function xa(e){e.flags|=4}function Tc(e,n,l,s,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Ap())e.flags|=8192;else throw El=_s,qu}else e.flags&=-16777217}function np(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!yg(n))if(Ap())e.flags|=8192;else throw El=_s,qu}function Ds(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Dd():536870912,e.lanes|=n,pi|=n)}function or(e,n){if(!Qe)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var s=null;l!==null;)l.alternate!==null&&(s=l),l=l.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function vt(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,s=0;if(n)for(var f=e.child;f!==null;)l|=f.lanes|f.childLanes,s|=f.subtreeFlags&65011712,s|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)l|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=s,e.childLanes=l,n}function Lv(e,n,l){var s=n.pendingProps;switch(zu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vt(n),null;case 1:return vt(n),null;case 3:return l=n.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),ga(At),Ge(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ni(n)?xa(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Ou())),vt(n),null;case 26:var f=n.type,d=n.memoizedState;return e===null?(xa(n),d!==null?(vt(n),np(n,d)):(vt(n),Tc(n,f,null,s,l))):d?d!==e.memoizedState?(xa(n),vt(n),np(n,d)):(vt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==s&&xa(n),vt(n),Tc(n,f,e,s,l)),null;case 27:if(Jt(n),l=Y.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&xa(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return vt(n),null}e=te.current,ni(n)?Dh(n):(e=ug(f,s,l),n.stateNode=e,xa(n))}return vt(n),null;case 5:if(Jt(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&xa(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return vt(n),null}if(d=te.current,ni(n))Dh(n);else{var v=Ks(Y.current);switch(d){case 1:d=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:d=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":d=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":d=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":d=v.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?d.multiple=!0:s.size&&(d.size=s.size);break;default:d=typeof s.is=="string"?v.createElement(f,{is:s.is}):v.createElement(f)}}d[Vt]=n,d[ln]=s;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)d.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===n)break e;for(;v.sibling===null;){if(v.return===null||v.return===n)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}n.stateNode=d;e:switch(Yt(d,f,s),f){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&xa(n)}}return vt(n),Tc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==s&&xa(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(r(166));if(e=Y.current,ni(n)){if(e=n.stateNode,l=n.memoizedProps,s=null,f=Gt,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}e[Vt]=n,e=!!(e.nodeValue===l||s!==null&&s.suppressHydrationWarning===!0||Pp(e.nodeValue,l)),e||Ia(n,!0)}else e=Ks(e).createTextNode(s),e[Vt]=n,n.stateNode=e}return vt(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(s=ni(n),l!==null){if(e===null){if(!s)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Vt]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;vt(n),e=!1}else l=Ou(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(_n(n),n):(_n(n),null);if((n.flags&128)!==0)throw Error(r(558))}return vt(n),null;case 13:if(s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=ni(n),s!==null&&s.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[Vt]=n}else bl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;vt(n),f=!1}else f=Ou(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(_n(n),n):(_n(n),null)}return _n(n),(n.flags&128)!==0?(n.lanes=l,n):(l=s!==null,e=e!==null&&e.memoizedState!==null,l&&(s=n.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==f&&(s.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),Ds(n,n.updateQueue),vt(n),null);case 4:return Ge(),e===null&&Yc(n.stateNode.containerInfo),vt(n),null;case 10:return ga(n.type),vt(n),null;case 19:if(G(Tt),s=n.memoizedState,s===null)return vt(n),null;if(f=(n.flags&128)!==0,d=s.rendering,d===null)if(f)or(s,!1);else{if(kt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=Ss(e),d!==null){for(n.flags|=128,or(s,!1),e=d.updateQueue,n.updateQueue=e,Ds(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)jh(l,e),l=l.sibling;return T(Tt,Tt.current&1|2),Qe&&ma(n,s.treeForkCount),n.child}e=e.sibling}s.tail!==null&&Pt()>Is&&(n.flags|=128,f=!0,or(s,!1),n.lanes=4194304)}else{if(!f)if(e=Ss(d),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Ds(n,e),or(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!Qe)return vt(n),null}else 2*Pt()-s.renderingStartTime>Is&&l!==536870912&&(n.flags|=128,f=!0,or(s,!1),n.lanes=4194304);s.isBackwards?(d.sibling=n.child,n.child=d):(e=s.last,e!==null?e.sibling=d:n.child=d,s.last=d)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Pt(),e.sibling=null,l=Tt.current,T(Tt,f?l&1|2:l&1),Qe&&ma(n,s.treeForkCount),e):(vt(n),null);case 22:case 23:return _n(n),Xu(),s=n.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(l&536870912)!==0&&(n.flags&128)===0&&(vt(n),n.subtreeFlags&6&&(n.flags|=8192)):vt(n),l=n.updateQueue,l!==null&&Ds(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==l&&(n.flags|=2048),e!==null&&G(Tl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),ga(At),vt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Bv(e,n){switch(zu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ga(At),Ge(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Jt(n),null;case 31:if(n.memoizedState!==null){if(_n(n),n.alternate===null)throw Error(r(340));bl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(_n(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));bl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return G(Tt),null;case 4:return Ge(),null;case 10:return ga(n.type),null;case 22:case 23:return _n(n),Xu(),e!==null&&G(Tl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ga(At),null;case 25:return null;default:return null}}function ap(e,n){switch(zu(n),n.tag){case 3:ga(At),Ge();break;case 26:case 27:case 5:Jt(n);break;case 4:Ge();break;case 31:n.memoizedState!==null&&_n(n);break;case 13:_n(n);break;case 19:G(Tt);break;case 10:ga(n.type);break;case 22:case 23:_n(n),Xu(),e!==null&&G(Tl);break;case 24:ga(At)}}function ur(e,n){try{var l=n.updateQueue,s=l!==null?l.lastEffect:null;if(s!==null){var f=s.next;l=f;do{if((l.tag&e)===e){s=void 0;var d=l.create,v=l.inst;s=d(),v.destroy=s}l=l.next}while(l!==f)}}catch(k){ot(n,n.return,k)}}function Xa(e,n,l){try{var s=n.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var d=f.next;s=d;do{if((s.tag&e)===e){var v=s.inst,k=v.destroy;if(k!==void 0){v.destroy=void 0,f=n;var C=l,I=k;try{I()}catch(Z){ot(f,C,Z)}}}s=s.next}while(s!==d)}}catch(Z){ot(n,n.return,Z)}}function lp(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{Fh(n,l)}catch(s){ot(e,e.return,s)}}}function ip(e,n,l){l.props=wl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(s){ot(e,n,s)}}function cr(e,n){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof l=="function"?e.refCleanup=l(s):l.current=s}}catch(f){ot(e,n,f)}}function ea(e,n){var l=e.ref,s=e.refCleanup;if(l!==null)if(typeof s=="function")try{s()}catch(f){ot(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(f){ot(e,n,f)}else l.current=null}function rp(e){var n=e.type,l=e.memoizedProps,s=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&s.focus();break e;case"img":l.src?s.src=l.src:l.srcSet&&(s.srcset=l.srcSet)}}catch(f){ot(e,e.return,f)}}function Nc(e,n,l){try{var s=e.stateNode;i0(s,e.type,l,n),s[ln]=n}catch(f){ot(e,e.return,f)}}function sp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&el(e.type)||e.tag===4}function Ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&el(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Cc(e,n,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=fa));else if(s!==4&&(s===27&&el(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(Cc(e,n,l),e=e.sibling;e!==null;)Cc(e,n,l),e=e.sibling}function Ls(e,n,l){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(s!==4&&(s===27&&el(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Ls(e,n,l),e=e.sibling;e!==null;)Ls(e,n,l),e=e.sibling}function op(e){var n=e.stateNode,l=e.memoizedProps;try{for(var s=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Yt(n,s,l),n[Vt]=e,n[ln]=l}catch(d){ot(e,e.return,d)}}var ba=!1,Mt=!1,Ac=!1,up=typeof WeakSet=="function"?WeakSet:Set,Ut=null;function Uv(e,n){if(e=e.containerInfo,Qc=ao,e=bh(e),bu(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var s=l.getSelection&&l.getSelection();if(s&&s.rangeCount!==0){l=s.anchorNode;var f=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var v=0,k=-1,C=-1,I=0,Z=0,P=e,q=null;t:for(;;){for(var V;P!==l||f!==0&&P.nodeType!==3||(k=v+f),P!==d||s!==0&&P.nodeType!==3||(C=v+s),P.nodeType===3&&(v+=P.nodeValue.length),(V=P.firstChild)!==null;)q=P,P=V;for(;;){if(P===e)break t;if(q===l&&++I===f&&(k=v),q===d&&++Z===s&&(C=v),(V=P.nextSibling)!==null)break;P=q,q=P.parentNode}P=V}l=k===-1||C===-1?null:{start:k,end:C}}else l=null}l=l||{start:0,end:0}}else l=null;for(Kc={focusedElem:e,selectionRange:l},ao=!1,Ut=n;Ut!==null;)if(n=Ut,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Ut=e;else for(;Ut!==null;){switch(n=Ut,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(l=0;l<e.length;l++)f=e[l],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=n,f=d.memoizedProps,d=d.memoizedState,s=l.stateNode;try{var ye=wl(l.type,f);e=s.getSnapshotBeforeUpdate(ye,d),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ee){ot(l,l.return,Ee)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)Wc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Wc(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,Ut=e;break}Ut=n.return}}function cp(e,n,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:ka(e,l),s&4&&ur(5,l);break;case 1:if(ka(e,l),s&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(v){ot(l,l.return,v)}else{var f=wl(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){ot(l,l.return,v)}}s&64&&lp(l),s&512&&cr(l,l.return);break;case 3:if(ka(e,l),s&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{Fh(e,n)}catch(v){ot(l,l.return,v)}}break;case 27:n===null&&s&4&&op(l);case 26:case 5:ka(e,l),n===null&&s&4&&rp(l),s&512&&cr(l,l.return);break;case 12:ka(e,l);break;case 31:ka(e,l),s&4&&hp(e,l);break;case 13:ka(e,l),s&4&&mp(e,l),s&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Xv.bind(null,l),h0(e,l))));break;case 22:if(s=l.memoizedState!==null||ba,!s){n=n!==null&&n.memoizedState!==null||Mt,f=ba;var d=Mt;ba=s,(Mt=n)&&!d?Ta(e,l,(l.subtreeFlags&8772)!==0):ka(e,l),ba=f,Mt=d}break;case 30:break;default:ka(e,l)}}function fp(e){var n=e.alternate;n!==null&&(e.alternate=null,fp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&lu(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 bt=null,sn=!1;function Sa(e,n,l){for(l=l.child;l!==null;)dp(e,n,l),l=l.sibling}function dp(e,n,l){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Wt,l)}catch{}switch(l.tag){case 26:Mt||ea(l,n),Sa(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Mt||ea(l,n);var s=bt,f=sn;el(l.type)&&(bt=l.stateNode,sn=!1),Sa(e,n,l),vr(l.stateNode),bt=s,sn=f;break;case 5:Mt||ea(l,n);case 6:if(s=bt,f=sn,bt=null,Sa(e,n,l),bt=s,sn=f,bt!==null)if(sn)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(l.stateNode)}catch(d){ot(l,n,d)}else try{bt.removeChild(l.stateNode)}catch(d){ot(l,n,d)}break;case 18:bt!==null&&(sn?(e=bt,lg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),ki(e)):lg(bt,l.stateNode));break;case 4:s=bt,f=sn,bt=l.stateNode.containerInfo,sn=!0,Sa(e,n,l),bt=s,sn=f;break;case 0:case 11:case 14:case 15:Xa(2,l,n),Mt||Xa(4,l,n),Sa(e,n,l);break;case 1:Mt||(ea(l,n),s=l.stateNode,typeof s.componentWillUnmount=="function"&&ip(l,n,s)),Sa(e,n,l);break;case 21:Sa(e,n,l);break;case 22:Mt=(s=Mt)||l.memoizedState!==null,Sa(e,n,l),Mt=s;break;default:Sa(e,n,l)}}function hp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ki(e)}catch(l){ot(n,n.return,l)}}}function mp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ki(e)}catch(l){ot(n,n.return,l)}}function Hv(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new up),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new up),n;default:throw Error(r(435,e.tag))}}function Bs(e,n){var l=Hv(e);n.forEach(function(s){if(!l.has(s)){l.add(s);var f=Fv.bind(null,e,s);s.then(f,f)}})}function on(e,n){var l=n.deletions;if(l!==null)for(var s=0;s<l.length;s++){var f=l[s],d=e,v=n,k=v;e:for(;k!==null;){switch(k.tag){case 27:if(el(k.type)){bt=k.stateNode,sn=!1;break e}break;case 5:bt=k.stateNode,sn=!1;break e;case 3:case 4:bt=k.stateNode.containerInfo,sn=!0;break e}k=k.return}if(bt===null)throw Error(r(160));dp(d,v,f),bt=null,sn=!1,d=f.alternate,d!==null&&(d.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)pp(n,e),n=n.sibling}var Xn=null;function pp(e,n){var l=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:on(n,e),un(e),s&4&&(Xa(3,e,e.return),ur(3,e),Xa(5,e,e.return));break;case 1:on(n,e),un(e),s&512&&(Mt||l===null||ea(l,l.return)),s&64&&ba&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?s:l.concat(s))));break;case 26:var f=Xn;if(on(n,e),un(e),s&512&&(Mt||l===null||ea(l,l.return)),s&4){var d=l!==null?l.memoizedState:null;if(s=e.memoizedState,l===null)if(s===null)if(e.stateNode===null){e:{s=e.type,l=e.memoizedProps,f=f.ownerDocument||f;t:switch(s){case"title":d=f.getElementsByTagName("title")[0],(!d||d[Bi]||d[Vt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=f.createElement(s),f.head.insertBefore(d,f.querySelector("head > title"))),Yt(d,s,l),d[Vt]=e,Bt(d),s=d;break e;case"link":var v=pg("link","href",f).get(s+(l.href||""));if(v){for(var k=0;k<v.length;k++)if(d=v[k],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){v.splice(k,1);break t}}d=f.createElement(s),Yt(d,s,l),f.head.appendChild(d);break;case"meta":if(v=pg("meta","content",f).get(s+(l.content||""))){for(k=0;k<v.length;k++)if(d=v[k],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){v.splice(k,1);break t}}d=f.createElement(s),Yt(d,s,l),f.head.appendChild(d);break;default:throw Error(r(468,s))}d[Vt]=e,Bt(d),s=d}e.stateNode=s}else gg(f,e.type,e.stateNode);else e.stateNode=mg(f,s,e.memoizedProps);else d!==s?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,s===null?gg(f,e.type,e.stateNode):mg(f,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Nc(e,e.memoizedProps,l.memoizedProps)}break;case 27:on(n,e),un(e),s&512&&(Mt||l===null||ea(l,l.return)),l!==null&&s&4&&Nc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(on(n,e),un(e),s&512&&(Mt||l===null||ea(l,l.return)),e.flags&32){f=e.stateNode;try{Yl(f,"")}catch(ye){ot(e,e.return,ye)}}s&4&&e.stateNode!=null&&(f=e.memoizedProps,Nc(e,f,l!==null?l.memoizedProps:f)),s&1024&&(Ac=!0);break;case 6:if(on(n,e),un(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,l=e.stateNode;try{l.nodeValue=s}catch(ye){ot(e,e.return,ye)}}break;case 3:if(Ws=null,f=Xn,Xn=Js(n.containerInfo),on(n,e),Xn=f,un(e),s&4&&l!==null&&l.memoizedState.isDehydrated)try{ki(n.containerInfo)}catch(ye){ot(e,e.return,ye)}Ac&&(Ac=!1,gp(e));break;case 4:s=Xn,Xn=Js(e.stateNode.containerInfo),on(n,e),un(e),Xn=s;break;case 12:on(n,e),un(e);break;case 31:on(n,e),un(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bs(e,s)));break;case 13:on(n,e),un(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Hs=Pt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bs(e,s)));break;case 22:f=e.memoizedState!==null;var C=l!==null&&l.memoizedState!==null,I=ba,Z=Mt;if(ba=I||f,Mt=Z||C,on(n,e),Mt=Z,ba=I,un(e),s&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(l===null||C||ba||Mt||jl(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){C=l=n;try{if(d=C.stateNode,f)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{k=C.stateNode;var P=C.memoizedProps.style,q=P!=null&&P.hasOwnProperty("display")?P.display:null;k.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(ye){ot(C,C.return,ye)}}}else if(n.tag===6){if(l===null){C=n;try{C.stateNode.nodeValue=f?"":C.memoizedProps}catch(ye){ot(C,C.return,ye)}}}else if(n.tag===18){if(l===null){C=n;try{var V=C.stateNode;f?ig(V,!0):ig(C.stateNode,!1)}catch(ye){ot(C,C.return,ye)}}}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;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=e.updateQueue,s!==null&&(l=s.retryQueue,l!==null&&(s.retryQueue=null,Bs(e,l))));break;case 19:on(n,e),un(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bs(e,s)));break;case 30:break;case 21:break;default:on(n,e),un(e)}}function un(e){var n=e.flags;if(n&2){try{for(var l,s=e.return;s!==null;){if(sp(s)){l=s;break}s=s.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var f=l.stateNode,d=Ec(e);Ls(e,d,f);break;case 5:var v=l.stateNode;l.flags&32&&(Yl(v,""),l.flags&=-33);var k=Ec(e);Ls(e,k,v);break;case 3:case 4:var C=l.stateNode.containerInfo,I=Ec(e);Cc(e,I,C);break;default:throw Error(r(161))}}catch(Z){ot(e,e.return,Z)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function gp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;gp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function ka(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)cp(e,n.alternate,n),n=n.sibling}function jl(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Xa(4,n,n.return),jl(n);break;case 1:ea(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&ip(n,n.return,l),jl(n);break;case 27:vr(n.stateNode);case 26:case 5:ea(n,n.return),jl(n);break;case 22:n.memoizedState===null&&jl(n);break;case 30:jl(n);break;default:jl(n)}e=e.sibling}}function Ta(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,f=e,d=n,v=d.flags;switch(d.tag){case 0:case 11:case 15:Ta(f,d,l),ur(4,d);break;case 1:if(Ta(f,d,l),s=d,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(I){ot(s,s.return,I)}if(s=d,f=s.updateQueue,f!==null){var k=s.stateNode;try{var C=f.shared.hiddenCallbacks;if(C!==null)for(f.shared.hiddenCallbacks=null,f=0;f<C.length;f++)Xh(C[f],k)}catch(I){ot(s,s.return,I)}}l&&v&64&&lp(d),cr(d,d.return);break;case 27:op(d);case 26:case 5:Ta(f,d,l),l&&s===null&&v&4&&rp(d),cr(d,d.return);break;case 12:Ta(f,d,l);break;case 31:Ta(f,d,l),l&&v&4&&hp(f,d);break;case 13:Ta(f,d,l),l&&v&4&&mp(f,d);break;case 22:d.memoizedState===null&&Ta(f,d,l),cr(d,d.return);break;case 30:break;default:Ta(f,d,l)}n=n.sibling}}function wc(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Ki(l))}function jc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ki(e))}function Fn(e,n,l,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)yp(e,n,l,s),n=n.sibling}function yp(e,n,l,s){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Fn(e,n,l,s),f&2048&&ur(9,n);break;case 1:Fn(e,n,l,s);break;case 3:Fn(e,n,l,s),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ki(e)));break;case 12:if(f&2048){Fn(e,n,l,s),e=n.stateNode;try{var d=n.memoizedProps,v=d.id,k=d.onPostCommit;typeof k=="function"&&k(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){ot(n,n.return,C)}}else Fn(e,n,l,s);break;case 31:Fn(e,n,l,s);break;case 13:Fn(e,n,l,s);break;case 23:break;case 22:d=n.stateNode,v=n.alternate,n.memoizedState!==null?d._visibility&2?Fn(e,n,l,s):fr(e,n):d._visibility&2?Fn(e,n,l,s):(d._visibility|=2,di(e,n,l,s,(n.subtreeFlags&10256)!==0||!1)),f&2048&&wc(v,n);break;case 24:Fn(e,n,l,s),f&2048&&jc(n.alternate,n);break;default:Fn(e,n,l,s)}}function di(e,n,l,s,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,v=n,k=l,C=s,I=v.flags;switch(v.tag){case 0:case 11:case 15:di(d,v,k,C,f),ur(8,v);break;case 23:break;case 22:var Z=v.stateNode;v.memoizedState!==null?Z._visibility&2?di(d,v,k,C,f):fr(d,v):(Z._visibility|=2,di(d,v,k,C,f)),f&&I&2048&&wc(v.alternate,v);break;case 24:di(d,v,k,C,f),f&&I&2048&&jc(v.alternate,v);break;default:di(d,v,k,C,f)}n=n.sibling}}function fr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,s=n,f=s.flags;switch(s.tag){case 22:fr(l,s),f&2048&&wc(s.alternate,s);break;case 24:fr(l,s),f&2048&&jc(s.alternate,s);break;default:fr(l,s)}n=n.sibling}}var dr=8192;function hi(e,n,l){if(e.subtreeFlags&dr)for(e=e.child;e!==null;)_p(e,n,l),e=e.sibling}function _p(e,n,l){switch(e.tag){case 26:hi(e,n,l),e.flags&dr&&e.memoizedState!==null&&N0(l,Xn,e.memoizedState,e.memoizedProps);break;case 5:hi(e,n,l);break;case 3:case 4:var s=Xn;Xn=Js(e.stateNode.containerInfo),hi(e,n,l),Xn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=dr,dr=16777216,hi(e,n,l),dr=s):hi(e,n,l));break;default:hi(e,n,l)}}function vp(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 hr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var s=n[l];Ut=s,bp(s,e)}vp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)xp(e),e=e.sibling}function xp(e){switch(e.tag){case 0:case 11:case 15:hr(e),e.flags&2048&&Xa(9,e,e.return);break;case 3:hr(e);break;case 12:hr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Us(e)):hr(e);break;default:hr(e)}}function Us(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var s=n[l];Ut=s,bp(s,e)}vp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Xa(8,n,n.return),Us(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Us(n));break;default:Us(n)}e=e.sibling}}function bp(e,n){for(;Ut!==null;){var l=Ut;switch(l.tag){case 0:case 11:case 15:Xa(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var s=l.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Ki(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,Ut=s;else e:for(l=e;Ut!==null;){s=Ut;var f=s.sibling,d=s.return;if(fp(s),s===l){Ut=null;break e}if(f!==null){f.return=d,Ut=f;break e}Ut=d}}}var Iv={getCacheForType:function(e){var n=Zt(At),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return Zt(At).controller.signal}},qv=typeof WeakMap=="function"?WeakMap:Map,lt=0,mt=null,He=null,Ze=0,st=0,vn=null,Fa=!1,mi=!1,Mc=!1,Na=0,kt=0,Qa=0,Ml=0,zc=0,xn=0,pi=0,mr=null,cn=null,Rc=!1,Hs=0,Sp=0,Is=1/0,qs=null,Ka=null,Dt=0,Ja=null,gi=null,Ea=0,Oc=0,Dc=null,kp=null,pr=0,Lc=null;function bn(){return(lt&2)!==0&&Ze!==0?Ze&-Ze:L.T!==null?Vc():Hd()}function Tp(){if(xn===0)if((Ze&536870912)===0||Qe){var e=Qr;Qr<<=1,(Qr&3932160)===0&&(Qr=262144),xn=e}else xn=536870912;return e=yn.current,e!==null&&(e.flags|=32),xn}function fn(e,n,l){(e===mt&&(st===2||st===9)||e.cancelPendingCommit!==null)&&(yi(e,0),Pa(e,Ze,xn,!1)),Li(e,l),((lt&2)===0||e!==mt)&&(e===mt&&((lt&2)===0&&(Ml|=l),kt===4&&Pa(e,Ze,xn,!1)),ta(e))}function Np(e,n,l){if((lt&6)!==0)throw Error(r(327));var s=!l&&(n&127)===0&&(n&e.expiredLanes)===0||Di(e,n),f=s?Zv(e,n):Uc(e,n,!0),d=s;do{if(f===0){mi&&!s&&Pa(e,n,0,!1);break}else{if(l=e.current.alternate,d&&!Vv(l)){f=Uc(e,n,!1),d=!1;continue}if(f===2){if(d=n,e.errorRecoveryDisabledLanes&d)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var k=e;f=mr;var C=k.current.memoizedState.isDehydrated;if(C&&(yi(k,v).flags|=256),v=Uc(k,v,!1),v!==2){if(Mc&&!C){k.errorRecoveryDisabledLanes|=d,Ml|=d,f=4;break e}d=cn,cn=f,d!==null&&(cn===null?cn=d:cn.push.apply(cn,d))}f=v}if(d=!1,f!==2)continue}}if(f===1){yi(e,0),Pa(e,n,0,!0);break}e:{switch(s=e,d=f,d){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Pa(s,n,xn,!Fa);break e;case 2:cn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=Hs+300-Pt(),10<f)){if(Pa(s,n,xn,!Fa),Jr(s,0,!0)!==0)break e;Ea=n,s.timeoutHandle=ng(Ep.bind(null,s,l,cn,qs,Rc,n,xn,Ml,pi,Fa,d,"Throttled",-0,0),f);break e}Ep(s,l,cn,qs,Rc,n,xn,Ml,pi,Fa,d,null,-0,0)}}break}while(!0);ta(e)}function Ep(e,n,l,s,f,d,v,k,C,I,Z,P,q,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:fa},_p(n,d,P);var ye=(d&62914560)===d?Hs-Pt():(d&4194048)===d?Sp-Pt():0;if(ye=E0(P,ye),ye!==null){Ea=d,e.cancelPendingCommit=ye(Op.bind(null,e,n,d,l,s,f,v,k,C,Z,P,null,q,V)),Pa(e,d,v,!I);return}}Op(e,n,d,l,s,f,v,k,C)}function Vv(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var s=0;s<l.length;s++){var f=l[s],d=f.getSnapshot;f=f.value;try{if(!pn(d(),f))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;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 Pa(e,n,l,s){n&=~zc,n&=~Ml,e.suspendedLanes|=n,e.pingedLanes&=~n,s&&(e.warmLanes|=n),s=e.expirationTimes;for(var f=n;0<f;){var d=31-ht(f),v=1<<d;s[d]=-1,f&=~v}l!==0&&Ld(e,l,n)}function Vs(){return(lt&6)===0?(gr(0),!1):!0}function Bc(){if(He!==null){if(st===0)var e=He.return;else e=He,pa=Sl=null,Wu(e),si=null,Pi=0,e=He;for(;e!==null;)ap(e.alternate,e),e=e.return;He=null}}function yi(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,o0(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Ea=0,Bc(),mt=e,He=l=ha(e.current,null),Ze=n,st=0,vn=null,Fa=!1,mi=Di(e,n),Mc=!1,pi=xn=zc=Ml=Qa=kt=0,cn=mr=null,Rc=!1,(n&8)!==0&&(n|=n&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=n;0<s;){var f=31-ht(s),d=1<<f;n|=e[f],s&=~d}return Na=n,us(),l}function Cp(e,n){Re=null,L.H=rr,n===ri||n===ys?(n=Gh(),st=3):n===qu?(n=Gh(),st=4):st=n===pc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,vn=n,He===null&&(kt=1,Ms(e,Mn(n,e.current)))}function Ap(){var e=yn.current;return e===null?!0:(Ze&4194048)===Ze?Dn===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?e===Dn:!1}function wp(){var e=L.H;return L.H=rr,e===null?rr:e}function jp(){var e=L.A;return L.A=Iv,e}function Gs(){kt=4,Fa||(Ze&4194048)!==Ze&&yn.current!==null||(mi=!0),(Qa&134217727)===0&&(Ml&134217727)===0||mt===null||Pa(mt,Ze,xn,!1)}function Uc(e,n,l){var s=lt;lt|=2;var f=wp(),d=jp();(mt!==e||Ze!==n)&&(qs=null,yi(e,n)),n=!1;var v=kt;e:do try{if(st!==0&&He!==null){var k=He,C=vn;switch(st){case 8:Bc(),v=6;break e;case 3:case 2:case 9:case 6:yn.current===null&&(n=!0);var I=st;if(st=0,vn=null,_i(e,k,C,I),l&&mi){v=0;break e}break;default:I=st,st=0,vn=null,_i(e,k,C,I)}}Gv(),v=kt;break}catch(Z){Cp(e,Z)}while(!0);return n&&e.shellSuspendCounter++,pa=Sl=null,lt=s,L.H=f,L.A=d,He===null&&(mt=null,Ze=0,us()),v}function Gv(){for(;He!==null;)Mp(He)}function Zv(e,n){var l=lt;lt|=2;var s=wp(),f=jp();mt!==e||Ze!==n?(qs=null,Is=Pt()+500,yi(e,n)):mi=Di(e,n);e:do try{if(st!==0&&He!==null){n=He;var d=vn;t:switch(st){case 1:st=0,vn=null,_i(e,n,d,1);break;case 2:case 9:if(qh(d)){st=0,vn=null,zp(n);break}n=function(){st!==2&&st!==9||mt!==e||(st=7),ta(e)},d.then(n,n);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:qh(d)?(st=0,vn=null,zp(n)):(st=0,vn=null,_i(e,n,d,7));break;case 5:var v=null;switch(He.tag){case 26:v=He.memoizedState;case 5:case 27:var k=He;if(v?yg(v):k.stateNode.complete){st=0,vn=null;var C=k.sibling;if(C!==null)He=C;else{var I=k.return;I!==null?(He=I,Zs(I)):He=null}break t}}st=0,vn=null,_i(e,n,d,5);break;case 6:st=0,vn=null,_i(e,n,d,6);break;case 8:Bc(),kt=6;break e;default:throw Error(r(462))}}$v();break}catch(Z){Cp(e,Z)}while(!0);return pa=Sl=null,L.H=s,L.A=f,lt=l,He!==null?0:(mt=null,Ze=0,us(),kt)}function $v(){for(;He!==null&&!Jo();)Mp(He)}function Mp(e){var n=tp(e.alternate,e,Na);e.memoizedProps=e.pendingProps,n===null?Zs(e):He=n}function zp(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=Qm(l,n,n.pendingProps,n.type,void 0,Ze);break;case 11:n=Qm(l,n,n.pendingProps,n.type.render,n.ref,Ze);break;case 5:Wu(n);default:ap(l,n),n=He=jh(n,Na),n=tp(l,n,Na)}e.memoizedProps=e.pendingProps,n===null?Zs(e):He=n}function _i(e,n,l,s){pa=Sl=null,Wu(n),si=null,Pi=0;var f=n.return;try{if(Rv(e,f,n,l,Ze)){kt=1,Ms(e,Mn(l,e.current)),He=null;return}}catch(d){if(f!==null)throw He=f,d;kt=1,Ms(e,Mn(l,e.current)),He=null;return}n.flags&32768?(Qe||s===1?e=!0:mi||(Ze&536870912)!==0?e=!1:(Fa=e=!0,(s===2||s===9||s===3||s===6)&&(s=yn.current,s!==null&&s.tag===13&&(s.flags|=16384))),Rp(n,e)):Zs(n)}function Zs(e){var n=e;do{if((n.flags&32768)!==0){Rp(n,Fa);return}e=n.return;var l=Lv(n.alternate,n,Na);if(l!==null){He=l;return}if(n=n.sibling,n!==null){He=n;return}He=n=e}while(n!==null);kt===0&&(kt=5)}function Rp(e,n){do{var l=Bv(e.alternate,e);if(l!==null){l.flags&=32767,He=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){He=e;return}He=e=l}while(e!==null);kt=6,He=null}function Op(e,n,l,s,f,d,v,k,C){e.cancelPendingCommit=null;do $s();while(Dt!==0);if((lt&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(d=n.lanes|n.childLanes,d|=Eu,T_(e,l,d,v,k,C),e===mt&&(He=mt=null,Ze=0),gi=n,Ja=e,Ea=l,Oc=d,Dc=f,kp=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Qv(Ce,function(){return Hp(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=L.T,L.T=null,f=K.p,K.p=2,v=lt,lt|=4;try{Uv(e,n,l)}finally{lt=v,K.p=f,L.T=s}}Dt=1,Dp(),Lp(),Bp()}}function Dp(){if(Dt===1){Dt=0;var e=Ja,n=gi,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=L.T,L.T=null;var s=K.p;K.p=2;var f=lt;lt|=4;try{pp(n,e);var d=Kc,v=bh(e.containerInfo),k=d.focusedElem,C=d.selectionRange;if(v!==k&&k&&k.ownerDocument&&xh(k.ownerDocument.documentElement,k)){if(C!==null&&bu(k)){var I=C.start,Z=C.end;if(Z===void 0&&(Z=I),"selectionStart"in k)k.selectionStart=I,k.selectionEnd=Math.min(Z,k.value.length);else{var P=k.ownerDocument||document,q=P&&P.defaultView||window;if(q.getSelection){var V=q.getSelection(),ye=k.textContent.length,Ee=Math.min(C.start,ye),dt=C.end===void 0?Ee:Math.min(C.end,ye);!V.extend&&Ee>dt&&(v=dt,dt=Ee,Ee=v);var O=vh(k,Ee),w=vh(k,dt);if(O&&w&&(V.rangeCount!==1||V.anchorNode!==O.node||V.anchorOffset!==O.offset||V.focusNode!==w.node||V.focusOffset!==w.offset)){var H=P.createRange();H.setStart(O.node,O.offset),V.removeAllRanges(),Ee>dt?(V.addRange(H),V.extend(w.node,w.offset)):(H.setEnd(w.node,w.offset),V.addRange(H))}}}}for(P=[],V=k;V=V.parentNode;)V.nodeType===1&&P.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<P.length;k++){var Q=P[k];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}ao=!!Qc,Kc=Qc=null}finally{lt=f,K.p=s,L.T=l}}e.current=n,Dt=2}}function Lp(){if(Dt===2){Dt=0;var e=Ja,n=gi,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=L.T,L.T=null;var s=K.p;K.p=2;var f=lt;lt|=4;try{cp(e,n.alternate,n)}finally{lt=f,K.p=s,L.T=l}}Dt=3}}function Bp(){if(Dt===4||Dt===3){Dt=0,Po();var e=Ja,n=gi,l=Ea,s=kp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Dt=5:(Dt=0,gi=Ja=null,Up(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Ka=null),nu(l),n=n.stateNode,Ot&&typeof Ot.onCommitFiberRoot=="function")try{Ot.onCommitFiberRoot(Wt,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=L.T,f=K.p,K.p=2,L.T=null;try{for(var d=e.onRecoverableError,v=0;v<s.length;v++){var k=s[v];d(k.value,{componentStack:k.stack})}}finally{L.T=n,K.p=f}}(Ea&3)!==0&&$s(),ta(e),f=e.pendingLanes,(l&261930)!==0&&(f&42)!==0?e===Lc?pr++:(pr=0,Lc=e):pr=0,gr(0)}}function Up(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Ki(n)))}function $s(){return Dp(),Lp(),Bp(),Hp()}function Hp(){if(Dt!==5)return!1;var e=Ja,n=Oc;Oc=0;var l=nu(Ea),s=L.T,f=K.p;try{K.p=32>l?32:l,L.T=null,l=Dc,Dc=null;var d=Ja,v=Ea;if(Dt=0,gi=Ja=null,Ea=0,(lt&6)!==0)throw Error(r(331));var k=lt;if(lt|=4,xp(d.current),yp(d,d.current,v,l),lt=k,gr(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Wt,d)}catch{}return!0}finally{K.p=f,L.T=s,Up(e,n)}}function Ip(e,n,l){n=Mn(l,n),n=mc(e.stateNode,n,2),e=Za(e,n,2),e!==null&&(Li(e,2),ta(e))}function ot(e,n,l){if(e.tag===3)Ip(e,e,l);else for(;n!==null;){if(n.tag===3){Ip(n,e,l);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ka===null||!Ka.has(s))){e=Mn(l,e),l=qm(2),s=Za(n,l,2),s!==null&&(Vm(l,s,n,e),Li(s,2),ta(s));break}}n=n.return}}function Hc(e,n,l){var s=e.pingCache;if(s===null){s=e.pingCache=new qv;var f=new Set;s.set(n,f)}else f=s.get(n),f===void 0&&(f=new Set,s.set(n,f));f.has(l)||(Mc=!0,f.add(l),e=Yv.bind(null,e,n,l),n.then(e,e))}function Yv(e,n,l){var s=e.pingCache;s!==null&&s.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,mt===e&&(Ze&l)===l&&(kt===4||kt===3&&(Ze&62914560)===Ze&&300>Pt()-Hs?(lt&2)===0&&yi(e,0):zc|=l,pi===Ze&&(pi=0)),ta(e)}function qp(e,n){n===0&&(n=Dd()),e=vl(e,n),e!==null&&(Li(e,n),ta(e))}function Xv(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),qp(e,l)}function Fv(e,n){var l=0;switch(e.tag){case 31:case 13:var s=e.stateNode,f=e.memoizedState;f!==null&&(l=f.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(r(314))}s!==null&&s.delete(n),qp(e,l)}function Qv(e,n){return qt(e,n)}var Ys=null,vi=null,Ic=!1,Xs=!1,qc=!1,Wa=0;function ta(e){e!==vi&&e.next===null&&(vi===null?Ys=vi=e:vi=vi.next=e),Xs=!0,Ic||(Ic=!0,Jv())}function gr(e,n){if(!qc&&Xs){qc=!0;do for(var l=!1,s=Ys;s!==null;){if(e!==0){var f=s.pendingLanes;if(f===0)var d=0;else{var v=s.suspendedLanes,k=s.pingedLanes;d=(1<<31-ht(42|e)+1)-1,d&=f&~(v&~k),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,$p(s,d))}else d=Ze,d=Jr(s,s===mt?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||Di(s,d)||(l=!0,$p(s,d));s=s.next}while(l);qc=!1}}function Kv(){Vp()}function Vp(){Xs=Ic=!1;var e=0;Wa!==0&&s0()&&(e=Wa);for(var n=Pt(),l=null,s=Ys;s!==null;){var f=s.next,d=Gp(s,n);d===0?(s.next=null,l===null?Ys=f:l.next=f,f===null&&(vi=l)):(l=s,(e!==0||(d&3)!==0)&&(Xs=!0)),s=f}Dt!==0&&Dt!==5||gr(e),Wa!==0&&(Wa=0)}function Gp(e,n){for(var l=e.suspendedLanes,s=e.pingedLanes,f=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var v=31-ht(d),k=1<<v,C=f[v];C===-1?((k&l)===0||(k&s)!==0)&&(f[v]=k_(k,n)):C<=n&&(e.expiredLanes|=k),d&=~k}if(n=mt,l=Ze,l=Jr(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,l===0||e===n&&(st===2||st===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Zn(s),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Di(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(s!==null&&Zn(s),nu(l)){case 2:case 8:l=ue;break;case 32:l=Ce;break;case 268435456:l=it;break;default:l=Ce}return s=Zp.bind(null,e),l=qt(l,s),e.callbackPriority=n,e.callbackNode=l,n}return s!==null&&s!==null&&Zn(s),e.callbackPriority=2,e.callbackNode=null,2}function Zp(e,n){if(Dt!==0&&Dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if($s()&&e.callbackNode!==l)return null;var s=Ze;return s=Jr(e,e===mt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Np(e,s,n),Gp(e,Pt()),e.callbackNode!=null&&e.callbackNode===l?Zp.bind(null,e):null)}function $p(e,n){if($s())return null;Np(e,n,!0)}function Jv(){u0(function(){(lt&6)!==0?qt(X,Kv):Vp()})}function Vc(){if(Wa===0){var e=li;e===0&&(e=Fr,Fr<<=1,(Fr&261888)===0&&(Fr=256)),Wa=e}return Wa}function Yp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ts(""+e)}function Xp(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function Pv(e,n,l,s,f){if(n==="submit"&&l&&l.stateNode===f){var d=Yp((f[ln]||null).action),v=s.submitter;v&&(n=(n=v[ln]||null)?Yp(n.formAction):v.getAttribute("formAction"),n!==null&&(d=n,v=null));var k=new is("action","action",null,s,f);e.push({event:k,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Wa!==0){var C=v?Xp(f,v):new FormData(f);oc(l,{pending:!0,data:C,method:f.method,action:d},null,C)}}else typeof d=="function"&&(k.preventDefault(),C=v?Xp(f,v):new FormData(f),oc(l,{pending:!0,data:C,method:f.method,action:d},d,C))},currentTarget:f}]})}}for(var Gc=0;Gc<Nu.length;Gc++){var Zc=Nu[Gc],Wv=Zc.toLowerCase(),e0=Zc[0].toUpperCase()+Zc.slice(1);Yn(Wv,"on"+e0)}Yn(Th,"onAnimationEnd"),Yn(Nh,"onAnimationIteration"),Yn(Eh,"onAnimationStart"),Yn("dblclick","onDoubleClick"),Yn("focusin","onFocus"),Yn("focusout","onBlur"),Yn(gv,"onTransitionRun"),Yn(yv,"onTransitionStart"),Yn(_v,"onTransitionCancel"),Yn(Ch,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),pl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),pl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),pl("onBeforeInput",["compositionend","keypress","textInput","paste"]),pl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),pl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),pl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yr="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(" "),t0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yr));function Fp(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var s=e[l],f=s.event;s=s.listeners;e:{var d=void 0;if(n)for(var v=s.length-1;0<=v;v--){var k=s[v],C=k.instance,I=k.currentTarget;if(k=k.listener,C!==d&&f.isPropagationStopped())break e;d=k,f.currentTarget=I;try{d(f)}catch(Z){os(Z)}f.currentTarget=null,d=C}else for(v=0;v<s.length;v++){if(k=s[v],C=k.instance,I=k.currentTarget,k=k.listener,C!==d&&f.isPropagationStopped())break e;d=k,f.currentTarget=I;try{d(f)}catch(Z){os(Z)}f.currentTarget=null,d=C}}}}function Ie(e,n){var l=n[au];l===void 0&&(l=n[au]=new Set);var s=e+"__bubble";l.has(s)||(Qp(n,e,2,!1),l.add(s))}function $c(e,n,l){var s=0;n&&(s|=4),Qp(l,e,s,n)}var Fs="_reactListening"+Math.random().toString(36).slice(2);function Yc(e){if(!e[Fs]){e[Fs]=!0,Vd.forEach(function(l){l!=="selectionchange"&&(t0.has(l)||$c(l,!1,e),$c(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Fs]||(n[Fs]=!0,$c("selectionchange",!1,n))}}function Qp(e,n,l,s){switch(Tg(n)){case 2:var f=w0;break;case 8:f=j0;break;default:f=of}l=f.bind(null,n,l,e),f=void 0,!du||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),s?f!==void 0?e.addEventListener(n,l,{capture:!0,passive:f}):e.addEventListener(n,l,!0):f!==void 0?e.addEventListener(n,l,{passive:f}):e.addEventListener(n,l,!1)}function Xc(e,n,l,s,f){var d=s;if((n&1)===0&&(n&2)===0&&s!==null)e:for(;;){if(s===null)return;var v=s.tag;if(v===3||v===4){var k=s.stateNode.containerInfo;if(k===f)break;if(v===4)for(v=s.return;v!==null;){var C=v.tag;if((C===3||C===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;k!==null;){if(v=ql(k),v===null)return;if(C=v.tag,C===5||C===6||C===26||C===27){s=d=v;continue e}k=k.parentNode}}s=s.return}eh(function(){var I=d,Z=cu(l),P=[];e:{var q=Ah.get(e);if(q!==void 0){var V=is,ye=e;switch(e){case"keypress":if(as(l)===0)break e;case"keydown":case"keyup":V=F_;break;case"focusin":ye="focus",V=gu;break;case"focusout":ye="blur",V=gu;break;case"beforeblur":case"afterblur":V=gu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":V=ah;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=L_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=J_;break;case Th:case Nh:case Eh:V=H_;break;case Ch:V=W_;break;case"scroll":case"scrollend":V=O_;break;case"wheel":V=tv;break;case"copy":case"cut":case"paste":V=q_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=ih;break;case"toggle":case"beforetoggle":V=av}var Ee=(n&4)!==0,dt=!Ee&&(e==="scroll"||e==="scrollend"),O=Ee?q!==null?q+"Capture":null:q;Ee=[];for(var w=I,H;w!==null;){var Q=w;if(H=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||H===null||O===null||(Q=Hi(w,O),Q!=null&&Ee.push(_r(w,Q,H))),dt)break;w=w.return}0<Ee.length&&(q=new V(q,ye,null,l,Z),P.push({event:q,listeners:Ee}))}}if((n&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",q&&l!==uu&&(ye=l.relatedTarget||l.fromElement)&&(ql(ye)||ye[Il]))break e;if((V||q)&&(q=Z.window===Z?Z:(q=Z.ownerDocument)?q.defaultView||q.parentWindow:window,V?(ye=l.relatedTarget||l.toElement,V=I,ye=ye?ql(ye):null,ye!==null&&(dt=u(ye),Ee=ye.tag,ye!==dt||Ee!==5&&Ee!==27&&Ee!==6)&&(ye=null)):(V=null,ye=I),V!==ye)){if(Ee=ah,Q="onMouseLeave",O="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(Ee=ih,Q="onPointerLeave",O="onPointerEnter",w="pointer"),dt=V==null?q:Ui(V),H=ye==null?q:Ui(ye),q=new Ee(Q,w+"leave",V,l,Z),q.target=dt,q.relatedTarget=H,Q=null,ql(Z)===I&&(Ee=new Ee(O,w+"enter",ye,l,Z),Ee.target=H,Ee.relatedTarget=dt,Q=Ee),dt=Q,V&&ye)t:{for(Ee=n0,O=V,w=ye,H=0,Q=O;Q;Q=Ee(Q))H++;Q=0;for(var Te=w;Te;Te=Ee(Te))Q++;for(;0<H-Q;)O=Ee(O),H--;for(;0<Q-H;)w=Ee(w),Q--;for(;H--;){if(O===w||w!==null&&O===w.alternate){Ee=O;break t}O=Ee(O),w=Ee(w)}Ee=null}else Ee=null;V!==null&&Kp(P,q,V,Ee,!1),ye!==null&&dt!==null&&Kp(P,dt,ye,Ee,!0)}}e:{if(q=I?Ui(I):window,V=q.nodeName&&q.nodeName.toLowerCase(),V==="select"||V==="input"&&q.type==="file")var et=hh;else if(fh(q))if(mh)et=hv;else{et=fv;var be=cv}else V=q.nodeName,!V||V.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?I&&ou(I.elementType)&&(et=hh):et=dv;if(et&&(et=et(e,I))){dh(P,et,l,Z);break e}be&&be(e,q,I),e==="focusout"&&I&&q.type==="number"&&I.memoizedProps.value!=null&&su(q,"number",q.value)}switch(be=I?Ui(I):window,e){case"focusin":(fh(be)||be.contentEditable==="true")&&(Kl=be,Su=I,Xi=null);break;case"focusout":Xi=Su=Kl=null;break;case"mousedown":ku=!0;break;case"contextmenu":case"mouseup":case"dragend":ku=!1,Sh(P,l,Z);break;case"selectionchange":if(pv)break;case"keydown":case"keyup":Sh(P,l,Z)}var De;if(_u)e:{switch(e){case"compositionstart":var $e="onCompositionStart";break e;case"compositionend":$e="onCompositionEnd";break e;case"compositionupdate":$e="onCompositionUpdate";break e}$e=void 0}else Ql?uh(e,l)&&($e="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&($e="onCompositionStart");$e&&(rh&&l.locale!=="ko"&&(Ql||$e!=="onCompositionStart"?$e==="onCompositionEnd"&&Ql&&(De=th()):(Ba=Z,hu="value"in Ba?Ba.value:Ba.textContent,Ql=!0)),be=Qs(I,$e),0<be.length&&($e=new lh($e,e,null,l,Z),P.push({event:$e,listeners:be}),De?$e.data=De:(De=ch(l),De!==null&&($e.data=De)))),(De=iv?rv(e,l):sv(e,l))&&($e=Qs(I,"onBeforeInput"),0<$e.length&&(be=new lh("onBeforeInput","beforeinput",null,l,Z),P.push({event:be,listeners:$e}),be.data=De)),Pv(P,e,I,l,Z)}Fp(P,n)})}function _r(e,n,l){return{instance:e,listener:n,currentTarget:l}}function Qs(e,n){for(var l=n+"Capture",s=[];e!==null;){var f=e,d=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||d===null||(f=Hi(e,l),f!=null&&s.unshift(_r(e,f,d)),f=Hi(e,n),f!=null&&s.push(_r(e,f,d))),e.tag===3)return s;e=e.return}return[]}function n0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Kp(e,n,l,s,f){for(var d=n._reactName,v=[];l!==null&&l!==s;){var k=l,C=k.alternate,I=k.stateNode;if(k=k.tag,C!==null&&C===s)break;k!==5&&k!==26&&k!==27||I===null||(C=I,f?(I=Hi(l,d),I!=null&&v.unshift(_r(l,I,C))):f||(I=Hi(l,d),I!=null&&v.push(_r(l,I,C)))),l=l.return}v.length!==0&&e.push({event:n,listeners:v})}var a0=/\r\n?/g,l0=/\u0000|\uFFFD/g;function Jp(e){return(typeof e=="string"?e:""+e).replace(a0,`
|
|
49
|
+
`).replace(l0,"")}function Pp(e,n){return n=Jp(n),Jp(e)===n}function ft(e,n,l,s,f,d){switch(l){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||Yl(e,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&Yl(e,""+s);break;case"className":Wr(e,"class",s);break;case"tabIndex":Wr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Wr(e,l,s);break;case"style":Pd(e,s,d);break;case"data":if(n!=="object"){Wr(e,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=ts(""+s),e.setAttribute(l,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(l,"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"&&(l==="formAction"?(n!=="input"&&ft(e,n,"name",f.name,f,null),ft(e,n,"formEncType",f.formEncType,f,null),ft(e,n,"formMethod",f.formMethod,f,null),ft(e,n,"formTarget",f.formTarget,f,null)):(ft(e,n,"encType",f.encType,f,null),ft(e,n,"method",f.method,f,null),ft(e,n,"target",f.target,f,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(l);break}s=ts(""+s),e.setAttribute(l,s);break;case"onClick":s!=null&&(e.onclick=fa);break;case"onScroll":s!=null&&Ie("scroll",e);break;case"onScrollEnd":s!=null&&Ie("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(l=s.__html,l!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}l=ts(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""+s):e.removeAttribute(l);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":s===!0?e.setAttribute(l,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(l,s):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(l,s):e.removeAttribute(l);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(l):e.setAttribute(l,s);break;case"popover":Ie("beforetoggle",e),Ie("toggle",e),Pr(e,"popover",s);break;case"xlinkActuate":ca(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ca(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ca(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ca(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ca(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ca(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ca(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ca(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ca(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Pr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=z_.get(l)||l,Pr(e,l,s))}}function Fc(e,n,l,s,f,d){switch(l){case"style":Pd(e,s,d);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(l=s.__html,l!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof s=="string"?Yl(e,s):(typeof s=="number"||typeof s=="bigint")&&Yl(e,""+s);break;case"onScroll":s!=null&&Ie("scroll",e);break;case"onScrollEnd":s!=null&&Ie("scrollend",e);break;case"onClick":s!=null&&(e.onclick=fa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Gd.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(f=l.endsWith("Capture"),n=l.slice(2,f?l.length-7:void 0),d=e[ln]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(n,d,f),typeof s=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,s,f);break e}l in e?e[l]=s:s===!0?e.setAttribute(l,""):Pr(e,l,s)}}}function Yt(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",e),Ie("load",e);var s=!1,f=!1,d;for(d in l)if(l.hasOwnProperty(d)){var v=l[d];if(v!=null)switch(d){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ft(e,n,d,v,l,null)}}f&&ft(e,n,"srcSet",l.srcSet,l,null),s&&ft(e,n,"src",l.src,l,null);return;case"input":Ie("invalid",e);var k=d=v=f=null,C=null,I=null;for(s in l)if(l.hasOwnProperty(s)){var Z=l[s];if(Z!=null)switch(s){case"name":f=Z;break;case"type":v=Z;break;case"checked":C=Z;break;case"defaultChecked":I=Z;break;case"value":d=Z;break;case"defaultValue":k=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,n));break;default:ft(e,n,s,Z,l,null)}}Fd(e,d,k,C,I,v,f,!1);return;case"select":Ie("invalid",e),s=v=d=null;for(f in l)if(l.hasOwnProperty(f)&&(k=l[f],k!=null))switch(f){case"value":d=k;break;case"defaultValue":v=k;break;case"multiple":s=k;default:ft(e,n,f,k,l,null)}n=d,l=v,e.multiple=!!s,n!=null?$l(e,!!s,n,!1):l!=null&&$l(e,!!s,l,!0);return;case"textarea":Ie("invalid",e),d=f=s=null;for(v in l)if(l.hasOwnProperty(v)&&(k=l[v],k!=null))switch(v){case"value":s=k;break;case"defaultValue":f=k;break;case"children":d=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(91));break;default:ft(e,n,v,k,l,null)}Kd(e,s,f,d);return;case"option":for(C in l)if(l.hasOwnProperty(C)&&(s=l[C],s!=null))switch(C){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ft(e,n,C,s,l,null)}return;case"dialog":Ie("beforetoggle",e),Ie("toggle",e),Ie("cancel",e),Ie("close",e);break;case"iframe":case"object":Ie("load",e);break;case"video":case"audio":for(s=0;s<yr.length;s++)Ie(yr[s],e);break;case"image":Ie("error",e),Ie("load",e);break;case"details":Ie("toggle",e);break;case"embed":case"source":case"link":Ie("error",e),Ie("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(I in l)if(l.hasOwnProperty(I)&&(s=l[I],s!=null))switch(I){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ft(e,n,I,s,l,null)}return;default:if(ou(n)){for(Z in l)l.hasOwnProperty(Z)&&(s=l[Z],s!==void 0&&Fc(e,n,Z,s,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(s=l[k],s!=null&&ft(e,n,k,s,l,null))}function i0(e,n,l,s){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,d=null,v=null,k=null,C=null,I=null,Z=null;for(V in l){var P=l[V];if(l.hasOwnProperty(V)&&P!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":C=P;default:s.hasOwnProperty(V)||ft(e,n,V,null,s,P)}}for(var q in s){var V=s[q];if(P=l[q],s.hasOwnProperty(q)&&(V!=null||P!=null))switch(q){case"type":d=V;break;case"name":f=V;break;case"checked":I=V;break;case"defaultChecked":Z=V;break;case"value":v=V;break;case"defaultValue":k=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,n));break;default:V!==P&&ft(e,n,q,V,s,P)}}ru(e,v,k,C,I,Z,d,f);return;case"select":V=v=k=q=null;for(d in l)if(C=l[d],l.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":V=C;default:s.hasOwnProperty(d)||ft(e,n,d,null,s,C)}for(f in s)if(d=s[f],C=l[f],s.hasOwnProperty(f)&&(d!=null||C!=null))switch(f){case"value":q=d;break;case"defaultValue":k=d;break;case"multiple":v=d;default:d!==C&&ft(e,n,f,d,s,C)}n=k,l=v,s=V,q!=null?$l(e,!!l,q,!1):!!s!=!!l&&(n!=null?$l(e,!!l,n,!0):$l(e,!!l,l?[]:"",!1));return;case"textarea":V=q=null;for(k in l)if(f=l[k],l.hasOwnProperty(k)&&f!=null&&!s.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:ft(e,n,k,null,s,f)}for(v in s)if(f=s[v],d=l[v],s.hasOwnProperty(v)&&(f!=null||d!=null))switch(v){case"value":q=f;break;case"defaultValue":V=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==d&&ft(e,n,v,f,s,d)}Qd(e,q,V);return;case"option":for(var ye in l)if(q=l[ye],l.hasOwnProperty(ye)&&q!=null&&!s.hasOwnProperty(ye))switch(ye){case"selected":e.selected=!1;break;default:ft(e,n,ye,null,s,q)}for(C in s)if(q=s[C],V=l[C],s.hasOwnProperty(C)&&q!==V&&(q!=null||V!=null))switch(C){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:ft(e,n,C,q,s,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 Ee in l)q=l[Ee],l.hasOwnProperty(Ee)&&q!=null&&!s.hasOwnProperty(Ee)&&ft(e,n,Ee,null,s,q);for(I in s)if(q=s[I],V=l[I],s.hasOwnProperty(I)&&q!==V&&(q!=null||V!=null))switch(I){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,n));break;default:ft(e,n,I,q,s,V)}return;default:if(ou(n)){for(var dt in l)q=l[dt],l.hasOwnProperty(dt)&&q!==void 0&&!s.hasOwnProperty(dt)&&Fc(e,n,dt,void 0,s,q);for(Z in s)q=s[Z],V=l[Z],!s.hasOwnProperty(Z)||q===V||q===void 0&&V===void 0||Fc(e,n,Z,q,s,V);return}}for(var O in l)q=l[O],l.hasOwnProperty(O)&&q!=null&&!s.hasOwnProperty(O)&&ft(e,n,O,null,s,q);for(P in s)q=s[P],V=l[P],!s.hasOwnProperty(P)||q===V||q==null&&V==null||ft(e,n,P,q,s,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 r0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),s=0;s<l.length;s++){var f=l[s],d=f.transferSize,v=f.initiatorType,k=f.duration;if(d&&k&&Wp(v)){for(v=0,k=f.responseEnd,s+=1;s<l.length;s++){var C=l[s],I=C.startTime;if(I>k)break;var Z=C.transferSize,P=C.initiatorType;Z&&Wp(P)&&(C=C.responseEnd,v+=Z*(C<k?1:(k-I)/(C-I)))}if(--s,n+=8*(d+v)/(f.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 Qc=null,Kc=null;function Ks(e){return e.nodeType===9?e:e.ownerDocument}function eg(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 tg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Jc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Pc=null;function s0(){var e=window.event;return e&&e.type==="popstate"?e===Pc?!1:(Pc=e,!0):(Pc=null,!1)}var ng=typeof setTimeout=="function"?setTimeout:void 0,o0=typeof clearTimeout=="function"?clearTimeout:void 0,ag=typeof Promise=="function"?Promise:void 0,u0=typeof queueMicrotask=="function"?queueMicrotask:typeof ag<"u"?function(e){return ag.resolve(null).then(e).catch(c0)}:ng;function c0(e){setTimeout(function(){throw e})}function el(e){return e==="head"}function lg(e,n){var l=n,s=0;do{var f=l.nextSibling;if(e.removeChild(l),f&&f.nodeType===8)if(l=f.data,l==="/$"||l==="/&"){if(s===0){e.removeChild(f),ki(n);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")vr(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,vr(l);for(var d=l.firstChild;d;){var v=d.nextSibling,k=d.nodeName;d[Bi]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=v}}else l==="body"&&vr(e.ownerDocument.body);l=f}while(l);ki(n)}function ig(e,n){var l=e;e=0;do{var s=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),s&&s.nodeType===8)if(l=s.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=s}while(l)}function Wc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Wc(l),lu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function f0(e,n,l,s){for(;e.nodeType===1;){var f=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Bi])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!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Ln(e.nextSibling),e===null)break}return null}function d0(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Ln(e.nextSibling),e===null))return null;return e}function rg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Ln(e.nextSibling),e===null))return null;return e}function ef(e){return e.data==="$?"||e.data==="$~"}function tf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function h0(e,n){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||l.readyState!=="loading")n();else{var s=function(){n(),l.removeEventListener("DOMContentLoaded",s)};l.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ln(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 nf=null;function sg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return Ln(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function og(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return e;n--}else l!=="/$"&&l!=="/&"||n++}e=e.previousSibling}return null}function ug(e,n,l){switch(n=Ks(l),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 vr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);lu(e)}var Bn=new Map,cg=new Set;function Js(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ca=K.d;K.d={f:m0,r:p0,D:g0,C:y0,L:_0,m:v0,X:b0,S:x0,M:S0};function m0(){var e=Ca.f(),n=Vs();return e||n}function p0(e){var n=Vl(e);n!==null&&n.tag===5&&n.type==="form"?Cm(n):Ca.r(e)}var xi=typeof document>"u"?null:document;function fg(e,n,l){var s=xi;if(s&&typeof n=="string"&&n){var f=wn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),cg.has(f)||(cg.add(f),e={rel:e,crossOrigin:l,href:n},s.querySelector(f)===null&&(n=s.createElement("link"),Yt(n,"link",e),Bt(n),s.head.appendChild(n)))}}function g0(e){Ca.D(e),fg("dns-prefetch",e,null)}function y0(e,n){Ca.C(e,n),fg("preconnect",e,n)}function _0(e,n,l){Ca.L(e,n,l);var s=xi;if(s&&e&&n){var f='link[rel="preload"][as="'+wn(n)+'"]';n==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+wn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+wn(l.imageSizes)+'"]')):f+='[href="'+wn(e)+'"]';var d=f;switch(n){case"style":d=bi(e);break;case"script":d=Si(e)}Bn.has(d)||(e=y({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),Bn.set(d,e),s.querySelector(f)!==null||n==="style"&&s.querySelector(xr(d))||n==="script"&&s.querySelector(br(d))||(n=s.createElement("link"),Yt(n,"link",e),Bt(n),s.head.appendChild(n)))}}function v0(e,n){Ca.m(e,n);var l=xi;if(l&&e){var s=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+wn(s)+'"][href="'+wn(e)+'"]',d=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Si(e)}if(!Bn.has(d)&&(e=y({rel:"modulepreload",href:e},n),Bn.set(d,e),l.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(br(d)))return}s=l.createElement("link"),Yt(s,"link",e),Bt(s),l.head.appendChild(s)}}}function x0(e,n,l){Ca.S(e,n,l);var s=xi;if(s&&e){var f=Gl(s).hoistableStyles,d=bi(e);n=n||"default";var v=f.get(d);if(!v){var k={loading:0,preload:null};if(v=s.querySelector(xr(d)))k.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},l),(l=Bn.get(d))&&af(e,l);var C=v=s.createElement("link");Bt(C),Yt(C,"link",e),C._p=new Promise(function(I,Z){C.onload=I,C.onerror=Z}),C.addEventListener("load",function(){k.loading|=1}),C.addEventListener("error",function(){k.loading|=2}),k.loading|=4,Ps(v,n,s)}v={type:"stylesheet",instance:v,count:1,state:k},f.set(d,v)}}}function b0(e,n){Ca.X(e,n);var l=xi;if(l&&e){var s=Gl(l).hoistableScripts,f=Si(e),d=s.get(f);d||(d=l.querySelector(br(f)),d||(e=y({src:e,async:!0},n),(n=Bn.get(f))&&lf(e,n),d=l.createElement("script"),Bt(d),Yt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(f,d))}}function S0(e,n){Ca.M(e,n);var l=xi;if(l&&e){var s=Gl(l).hoistableScripts,f=Si(e),d=s.get(f);d||(d=l.querySelector(br(f)),d||(e=y({src:e,async:!0,type:"module"},n),(n=Bn.get(f))&&lf(e,n),d=l.createElement("script"),Bt(d),Yt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(f,d))}}function dg(e,n,l,s){var f=(f=Y.current)?Js(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=bi(l.href),l=Gl(f).hoistableStyles,s=l.get(n),s||(s={type:"style",instance:null,count:0,state:null},l.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=bi(l.href);var d=Gl(f).hoistableStyles,v=d.get(e);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,v),(d=f.querySelector(xr(e)))&&!d._p&&(v.instance=d,v.state.loading=5),Bn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Bn.set(e,l),d||k0(f,e,l,v.state))),n&&s===null)throw Error(r(528,""));return v}if(n&&s!==null)throw Error(r(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Si(l),l=Gl(f).hoistableScripts,s=l.get(n),s||(s={type:"script",instance:null,count:0,state:null},l.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function bi(e){return'href="'+wn(e)+'"'}function xr(e){return'link[rel="stylesheet"]['+e+"]"}function hg(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function k0(e,n,l,s){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?s.loading=1:(n=e.createElement("link"),s.preload=n,n.addEventListener("load",function(){return s.loading|=1}),n.addEventListener("error",function(){return s.loading|=2}),Yt(n,"link",l),Bt(n),e.head.appendChild(n))}function Si(e){return'[src="'+wn(e)+'"]'}function br(e){return"script[async]"+e}function mg(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var s=e.querySelector('style[data-href~="'+wn(l.href)+'"]');if(s)return n.instance=s,Bt(s),s;var f=y({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Bt(s),Yt(s,"style",f),Ps(s,l.precedence,e),n.instance=s;case"stylesheet":f=bi(l.href);var d=e.querySelector(xr(f));if(d)return n.state.loading|=4,n.instance=d,Bt(d),d;s=hg(l),(f=Bn.get(f))&&af(s,f),d=(e.ownerDocument||e).createElement("link"),Bt(d);var v=d;return v._p=new Promise(function(k,C){v.onload=k,v.onerror=C}),Yt(d,"link",s),n.state.loading|=4,Ps(d,l.precedence,e),n.instance=d;case"script":return d=Si(l.src),(f=e.querySelector(br(d)))?(n.instance=f,Bt(f),f):(s=l,(f=Bn.get(d))&&(s=y({},l),lf(s,f)),e=e.ownerDocument||e,f=e.createElement("script"),Bt(f),Yt(f,"link",s),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(s=n.instance,n.state.loading|=4,Ps(s,l.precedence,e));return n.instance}function Ps(e,n,l){for(var s=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,d=f,v=0;v<s.length;v++){var k=s[v];if(k.dataset.precedence===n)d=k;else if(d!==f)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function af(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function lf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Ws=null;function pg(e,n,l){if(Ws===null){var s=new Map,f=Ws=new Map;f.set(l,s)}else f=Ws,s=f.get(l),s||(s=new Map,f.set(l,s));if(s.has(e))return s;for(s.set(e,null),l=l.getElementsByTagName(e),f=0;f<l.length;f++){var d=l[f];if(!(d[Bi]||d[Vt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(n)||"";v=e+v;var k=s.get(v);k?k.push(d):s.set(v,[d])}}return s}function gg(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function T0(e,n,l){if(l===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 yg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function N0(e,n,l,s){if(l.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var f=bi(s.href),d=n.querySelector(xr(f));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=eo.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=d,Bt(d);return}d=n.ownerDocument||n,s=hg(s),(f=Bn.get(f))&&af(s,f),d=d.createElement("link"),Bt(d);var v=d;v._p=new Promise(function(k,C){v.onload=k,v.onerror=C}),Yt(d,"link",s),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=eo.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var rf=0;function E0(e,n){return e.stylesheets&&e.count===0&&no(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var s=setTimeout(function(){if(e.stylesheets&&no(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&rf===0&&(rf=62500*r0());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&no(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>rf?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function eo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)no(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var to=null;function no(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,to=new Map,n.forEach(C0,e),to=null,eo.call(e))}function C0(e,n){if(!(n.state.loading&4)){var l=to.get(e);if(l)var s=l.get(null);else{l=new Map,to.set(e,l);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<f.length;d++){var v=f[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(l.set(v.dataset.precedence,v),s=v)}s&&l.set(null,s)}f=n.instance,v=f.getAttribute("data-precedence"),d=l.get(v)||s,d===s&&l.set(null,f),l.set(v,f),this.count++,s=eo.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),d?d.parentNode.insertBefore(f,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Sr={$$typeof:z,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function A0(e,n,l,s,f,d,v,k,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=eu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=eu(0),this.hiddenUpdates=eu(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function _g(e,n,l,s,f,d,v,k,C,I,Z,P){return e=new A0(e,n,l,v,C,I,Z,P,k),n=1,d===!0&&(n|=24),d=gn(3,null,null,n),e.current=d,d.stateNode=e,n=Uu(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:s,isDehydrated:l,cache:n},Vu(d),e}function vg(e){return e?(e=Wl,e):Wl}function xg(e,n,l,s,f,d){f=vg(f),s.context===null?s.context=f:s.pendingContext=f,s=Ga(n),s.payload={element:l},d=d===void 0?null:d,d!==null&&(s.callback=d),l=Za(e,s,n),l!==null&&(fn(l,e,n),er(l,e,n))}function bg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function sf(e,n){bg(e,n),(e=e.alternate)&&bg(e,n)}function Sg(e){if(e.tag===13||e.tag===31){var n=vl(e,67108864);n!==null&&fn(n,e,67108864),sf(e,67108864)}}function kg(e){if(e.tag===13||e.tag===31){var n=bn();n=tu(n);var l=vl(e,n);l!==null&&fn(l,e,n),sf(e,n)}}var ao=!0;function w0(e,n,l,s){var f=L.T;L.T=null;var d=K.p;try{K.p=2,of(e,n,l,s)}finally{K.p=d,L.T=f}}function j0(e,n,l,s){var f=L.T;L.T=null;var d=K.p;try{K.p=8,of(e,n,l,s)}finally{K.p=d,L.T=f}}function of(e,n,l,s){if(ao){var f=uf(s);if(f===null)Xc(e,n,s,lo,l),Ng(e,s);else if(z0(f,e,n,l,s))s.stopPropagation();else if(Ng(e,s),n&4&&-1<M0.indexOf(e)){for(;f!==null;){var d=Vl(f);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=ml(d.pendingLanes);if(v!==0){var k=d;for(k.pendingLanes|=2,k.entangledLanes|=2;v;){var C=1<<31-ht(v);k.entanglements[1]|=C,v&=~C}ta(d),(lt&6)===0&&(Is=Pt()+500,gr(0))}}break;case 31:case 13:k=vl(d,2),k!==null&&fn(k,d,2),Vs(),sf(d,2)}if(d=uf(s),d===null&&Xc(e,n,s,lo,l),d===f)break;f=d}f!==null&&s.stopPropagation()}else Xc(e,n,s,null,l)}}function uf(e){return e=cu(e),cf(e)}var lo=null;function cf(e){if(lo=null,e=ql(e),e!==null){var n=u(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=c(n),e!==null)return e;e=null}else if(l===31){if(e=h(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return lo=e,null}function Tg(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(Wo()){case X:return 2;case ue:return 8;case Ce:case Ue:return 32;case it:return 268435456;default:return 32}default:return 32}}var ff=!1,tl=null,nl=null,al=null,kr=new Map,Tr=new Map,ll=[],M0="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 Ng(e,n){switch(e){case"focusin":case"focusout":tl=null;break;case"dragenter":case"dragleave":nl=null;break;case"mouseover":case"mouseout":al=null;break;case"pointerover":case"pointerout":kr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tr.delete(n.pointerId)}}function Nr(e,n,l,s,f,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:l,eventSystemFlags:s,nativeEvent:d,targetContainers:[f]},n!==null&&(n=Vl(n),n!==null&&Sg(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function z0(e,n,l,s,f){switch(n){case"focusin":return tl=Nr(tl,e,n,l,s,f),!0;case"dragenter":return nl=Nr(nl,e,n,l,s,f),!0;case"mouseover":return al=Nr(al,e,n,l,s,f),!0;case"pointerover":var d=f.pointerId;return kr.set(d,Nr(kr.get(d)||null,e,n,l,s,f)),!0;case"gotpointercapture":return d=f.pointerId,Tr.set(d,Nr(Tr.get(d)||null,e,n,l,s,f)),!0}return!1}function Eg(e){var n=ql(e.target);if(n!==null){var l=u(n);if(l!==null){if(n=l.tag,n===13){if(n=c(l),n!==null){e.blockedOn=n,Id(e.priority,function(){kg(l)});return}}else if(n===31){if(n=h(l),n!==null){e.blockedOn=n,Id(e.priority,function(){kg(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function io(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=uf(e.nativeEvent);if(l===null){l=e.nativeEvent;var s=new l.constructor(l.type,l);uu=s,l.target.dispatchEvent(s),uu=null}else return n=Vl(l),n!==null&&Sg(n),e.blockedOn=l,!1;n.shift()}return!0}function Cg(e,n,l){io(e)&&l.delete(n)}function R0(){ff=!1,tl!==null&&io(tl)&&(tl=null),nl!==null&&io(nl)&&(nl=null),al!==null&&io(al)&&(al=null),kr.forEach(Cg),Tr.forEach(Cg)}function ro(e,n){e.blockedOn===n&&(e.blockedOn=null,ff||(ff=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,R0)))}var so=null;function Ag(e){so!==e&&(so=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){so===e&&(so=null);for(var n=0;n<e.length;n+=3){var l=e[n],s=e[n+1],f=e[n+2];if(typeof s!="function"){if(cf(s||l)===null)continue;break}var d=Vl(l);d!==null&&(e.splice(n,3),n-=3,oc(d,{pending:!0,data:f,method:l.method,action:s},s,f))}}))}function ki(e){function n(C){return ro(C,e)}tl!==null&&ro(tl,e),nl!==null&&ro(nl,e),al!==null&&ro(al,e),kr.forEach(n),Tr.forEach(n);for(var l=0;l<ll.length;l++){var s=ll[l];s.blockedOn===e&&(s.blockedOn=null)}for(;0<ll.length&&(l=ll[0],l.blockedOn===null);)Eg(l),l.blockedOn===null&&ll.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(s=0;s<l.length;s+=3){var f=l[s],d=l[s+1],v=f[ln]||null;if(typeof d=="function")v||Ag(l);else if(v){var k=null;if(d&&d.hasAttribute("formAction")){if(f=d,v=d[ln]||null)k=v.formAction;else if(cf(f)!==null)continue}else k=v.action;typeof k=="function"?l[s+1]=k:(l.splice(s,3),s-=3),Ag(l)}}}function wg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),s||setTimeout(l,20)}function l(){if(!s&&!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 s=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function df(e){this._internalRoot=e}oo.prototype.render=df.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var l=n.current,s=bn();xg(l,s,e,n,null,null)},oo.prototype.unmount=df.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;xg(e.current,2,null,e,null,null),Vs(),n[Il]=null}};function oo(e){this._internalRoot=e}oo.prototype.unstable_scheduleHydration=function(e){if(e){var n=Hd();e={blockedOn:null,target:e,priority:n};for(var l=0;l<ll.length&&n!==0&&n<ll[l].priority;l++);ll.splice(l,0,e),l===0&&Eg(e)}};var jg=a.version;if(jg!=="19.2.4")throw Error(r(527,jg,"19.2.4"));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=p(n),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var O0={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:L,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var uo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!uo.isDisabled&&uo.supportsFiber)try{Wt=uo.inject(O0),Ot=uo}catch{}}return Cr.createRoot=function(e,n){if(!o(e))throw Error(r(299));var l=!1,s="",f=Bm,d=Um,v=Hm;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError)),n=_g(e,1,!1,null,null,l,s,null,f,d,v,wg),e[Il]=n.current,Yc(e),new df(n)},Cr.hydrateRoot=function(e,n,l){if(!o(e))throw Error(r(299));var s=!1,f="",d=Bm,v=Um,k=Hm,C=null;return l!=null&&(l.unstable_strictMode===!0&&(s=!0),l.identifierPrefix!==void 0&&(f=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(v=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(C=l.formState)),n=_g(e,1,!0,n,l??null,s,f,C,d,v,k,wg),n.context=vg(null),l=n.current,s=bn(),s=tu(s),f=Ga(s),f.callback=null,Za(l,f,s),l=s,n.current.lanes=l,Li(n,l),ta(n),e[Il]=n.current,Yc(e),new oo(n)},Cr.version="19.2.4",Cr}var Ig;function $0(){if(Ig)return pf.exports;Ig=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(a){console.error(a)}}return t(),pf.exports=Z0(),pf.exports}var Y0=$0();const X0=Ho(Y0);/**
|
|
50
50
|
* @license lucide-react v0.575.0 - ISC
|
|
51
51
|
*
|
|
52
52
|
* This source code is licensed under the ISC license.
|
|
@@ -81,12 +81,12 @@ Error generating stack: `+s.message+`
|
|
|
81
81
|
*
|
|
82
82
|
* This source code is licensed under the ISC license.
|
|
83
83
|
* See the LICENSE file in the root directory of this source tree.
|
|
84
|
-
*/const P0=
|
|
84
|
+
*/const P0=D.forwardRef(({color:t="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:r,className:o="",children:u,iconNode:c,...h},m)=>D.createElement("svg",{ref:m,...K0,width:a,height:a,stroke:t,strokeWidth:r?Number(i)*24/Number(a):i,className:Wy("lucide",o),...!u&&!J0(h)&&{"aria-hidden":"true"},...h},[...c.map(([p,_])=>D.createElement(p,_)),...Array.isArray(u)?u:[u]]));/**
|
|
85
85
|
* @license lucide-react v0.575.0 - ISC
|
|
86
86
|
*
|
|
87
87
|
* This source code is licensed under the ISC license.
|
|
88
88
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
|
-
*/const rt=(t,a)=>{const i=
|
|
89
|
+
*/const rt=(t,a)=>{const i=D.forwardRef(({className:r,...o},u)=>D.createElement(P0,{ref:u,iconNode:a,className:Wy(`lucide-${F0(qg(t))}`,`lucide-${t}`,r),...o}));return i.displayName=qg(t),i};/**
|
|
90
90
|
* @license lucide-react v0.575.0 - ISC
|
|
91
91
|
*
|
|
92
92
|
* This source code is licensed under the ISC license.
|
|
@@ -236,44 +236,44 @@ Error generating stack: `+s.message+`
|
|
|
236
236
|
*
|
|
237
237
|
* This source code is licensed under the ISC license.
|
|
238
238
|
* See the LICENSE file in the root directory of this source tree.
|
|
239
|
-
*/const Yx=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],fd=rt("zap",Yx),Xx="_panel_1gqyj_1",Fx="_resizeHandle_1gqyj_11",Qx="_header_1gqyj_22",Kx="_headerLeft_1gqyj_32",Jx="_headerTitle_1gqyj_38",Px="_headerActions_1gqyj_44",Wx="_collapseToggle_1gqyj_50",eb="_iconBtn_1gqyj_66",tb="_spinning_1gqyj_86",nb="_status_1gqyj_98",ab="_body_1gqyj_103",Qn={panel:Xx,resizeHandle:Fx,header:Qx,headerLeft:Kx,headerTitle:Jx,headerActions:Px,collapseToggle:Wx,iconBtn:eb,spinning:tb,status:nb,body:ab},lb=300,ib=150;function Io({title:t,status:a,onRefresh:i,isRefreshing:r,titleExtra:o,defaultCollapsed:u=!1,defaultHeight:c=lb,children:h}){const[m,p]=L.useState(u),[y,_]=L.useState(c),x=L.useRef(u);L.useEffect(()=>{u!==x.current&&(x.current=u,p(u))},[u]);const b=L.useRef(null),N=L.useCallback(j=>{j.preventDefault();const B=j.clientY,S=y,M=F=>{const ne=B-F.clientY;_(Math.max(ib,S+ne))},z=()=>{b.current=null,document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",z),document.body.style.cursor="",document.body.style.userSelect=""};b.current={move:M,up:z},document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",M),document.addEventListener("mouseup",z)},[y]);return L.useEffect(()=>()=>{b.current&&(document.removeEventListener("mousemove",b.current.move),document.removeEventListener("mouseup",b.current.up),document.body.style.cursor="",document.body.style.userSelect="")},[]),g.jsxs("div",{className:Qn.panel,style:{height:m?"auto":y},children:[!m&&g.jsx("div",{className:Qn.resizeHandle,onMouseDown:N,role:"separator","aria-label":"Resize panel"}),g.jsxs("div",{className:Qn.header,children:[g.jsxs("div",{className:Qn.headerLeft,children:[g.jsxs("button",{className:Qn.collapseToggle,onClick:()=>p(j=>!j),"aria-label":"Toggle panel",children:[m?g.jsx(cl,{size:14}):g.jsx(Ma,{size:14}),g.jsx("span",{className:Qn.headerTitle,children:t}),o]}),a&&g.jsx("span",{className:Qn.status,children:a})]}),g.jsx("div",{className:Qn.headerActions,children:i&&g.jsx("button",{className:Qn.iconBtn,onClick:i,disabled:r,title:"Refresh","aria-label":`Refresh ${t}`,children:g.jsx(ud,{size:12,className:r?Qn.spinning:""})})})]}),!m&&g.jsx("div",{className:Qn.body,children:h})]})}const rb="_error_1di92_1",sb="_version_1di92_7",ob="_body_1di92_13",ub="_cardName_1di92_17",cb="_cardDesc_1di92_24",fb="_section_1di92_30",db="_sectionLabel_1di92_34",hb="_tags_1di92_43",mb="_tag_1di92_43",pb="_skillList_1di92_58",gb="_skillItem_1di92_64",yb="_skillName_1di92_73",_b="_skillDesc_1di92_80",vb="_skillTags_1di92_85",Lt={error:rb,version:sb,body:ob,cardName:ub,cardDesc:cb,section:fb,sectionLabel:db,tags:hb,tag:mb,skillList:pb,skillItem:gb,skillName:yb,skillDesc:_b,skillTags:vb};function xb({card:t,isLoading:a,error:i,onRefresh:r}){var o,u,c;return!t&&!i&&!a?null:g.jsxs(Io,{title:"A2A Agent Card",titleExtra:t!=null&&t.version?g.jsxs("span",{className:Lt.version,children:["v",t.version]}):void 0,onRefresh:r,isRefreshing:a,children:[i&&g.jsx("div",{className:Lt.error,children:i}),t&&g.jsxs("div",{className:Lt.body,children:[t.name&&g.jsx("div",{className:Lt.cardName,children:t.name}),t.description&&g.jsx("div",{className:Lt.cardDesc,children:t.description}),g.jsxs("div",{className:Lt.section,children:[g.jsx("div",{className:Lt.sectionLabel,children:"Capabilities"}),g.jsxs("div",{className:Lt.tags,children:[((o=t.capabilities)==null?void 0:o.streaming)&&g.jsx("span",{className:Lt.tag,children:"streaming"}),(u=t.defaultInputModes)==null?void 0:u.map(h=>g.jsxs("span",{className:Lt.tag,children:["input: ",h]},`in-${h}`)),(c=t.defaultOutputModes)==null?void 0:c.map(h=>g.jsxs("span",{className:Lt.tag,children:["output: ",h]},`out-${h}`))]})]}),t.skills&&t.skills.length>0&&g.jsxs("div",{className:Lt.section,children:[g.jsxs("div",{className:Lt.sectionLabel,children:["Skills (",t.skills.length,")"]}),g.jsx("div",{className:Lt.skillList,children:t.skills.map((h,m)=>g.jsxs("div",{className:Lt.skillItem,children:[g.jsx("span",{className:Lt.skillName,children:h.name??h.id??`Skill ${m+1}`}),h.description&&g.jsx("span",{className:Lt.skillDesc,children:h.description}),h.tags&&h.tags.length>0&&g.jsx("div",{className:Lt.skillTags,children:h.tags.map(p=>g.jsx("span",{className:Lt.tag,children:p},p))})]},h.id??m))})]})]})]})}const bb="_area_1u9gx_1",Sb="_row_1u9gx_8",kb="_textarea_1u9gx_16",Tb="_sendBtn_1u9gx_45",co={area:bb,row:Sb,textarea:kb,sendBtn:Tb};function Nb({isStreaming:t,isStarting:a,onSend:i}){const[r,o]=L.useState(""),u=L.useRef(null),c=!t&&!!r.trim(),h=y=>{o(y.target.value);const _=y.target;_.style.height="auto",_.style.height=Math.min(_.scrollHeight,160)+"px"},m=()=>{if(!c)return;const y=r.trim();o(""),u.current&&(u.current.style.height="auto"),i(y)},p=y=>{y.key==="Enter"&&!y.shiftKey&&(y.preventDefault(),m())};return g.jsx("div",{className:co.area,children:g.jsxs("div",{className:co.row,children:[g.jsx("textarea",{className:co.textarea,ref:u,value:r,onChange:h,onKeyDown:p,placeholder:a?"Agent is starting...":"Enter a test prompt...",disabled:a,rows:1,autoFocus:!0,"aria-label":"Chat input","data-testid":"chat-input"}),g.jsx("button",{className:co.sendBtn,onClick:m,disabled:!c,"aria-label":"Send message",children:g.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),g.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})})}const Eb="_toolbar_1v9hb_1",Cb="_agentSection_1v9hb_11",Ab="_agentPicker_1v9hb_18",wb="_clickable_1v9hb_30",jb="_agentLabel_1v9hb_44",Mb="_agentName_1v9hb_49",zb="_starting_1v9hb_53",Rb="_chevron_1v9hb_59",Ob="_dropdown_1v9hb_64",Db="_dropdownItem_1v9hb_77",Lb="_active_1v9hb_101",Bb="_hasError_1v9hb_105",Ub="_dropdownName_1v9hb_110",Hb="_statusBadge_1v9hb_115",Ib="_status_running_1v9hb_125",qb="_status_starting_1v9hb_130",Vb="_status_error_1v9hb_135",Gb="_status_idle_1v9hb_140",Zb="_dropdownMeta_1v9hb_145",$b="_rightSection_1v9hb_150",Yb="_errorText_1v9hb_157",Xb="_sessionBadge_1v9hb_162",Fb="_newSessionBtn_1v9hb_183",Qb="_confirmOverlay_1v9hb_201",Kb="_confirmModal_1v9hb_211",Jb="_confirmTitle_1v9hb_220",Pb="_confirmMessage_1v9hb_227",Wb="_confirmActions_1v9hb_234",eS="_confirmBtn_1v9hb_240",tS="_confirmBtnPrimary_1v9hb_255",nS="_dropdownSeparator_1v9hb_265",aS="_status_deployed_1v9hb_271",$e={toolbar:Eb,agentSection:Cb,agentPicker:Ab,clickable:wb,agentLabel:jb,agentName:Mb,starting:zb,chevron:Rb,dropdown:Ob,dropdownItem:Db,active:Lb,hasError:Bb,dropdownName:Ub,statusBadge:Hb,status_running:Ib,status_starting:qb,status_error:Vb,status_idle:Gb,dropdownMeta:Zb,rightSection:$b,errorText:Yb,sessionBadge:Xb,newSessionBtn:Fb,confirmOverlay:Qb,confirmModal:Kb,confirmTitle:Jb,confirmMessage:Pb,confirmActions:Wb,confirmBtn:eS,confirmBtnPrimary:tS,dropdownSeparator:nS,status_deployed:aS};function lS(t,a,i,r,o){return o.has(t)?"error":t===a&&i?"starting":t===a&&r?"running":"idle"}const iS={running:"Running",starting:"Starting",error:"Error",idle:"Idle"};function rS({agents:t,harnesses:a,errors:i,selectedAgentName:r,selectedHarnessName:o,isStarting:u,isReady:c,startError:h,sessionId:m,onSelectAgent:p,onSelectHarness:y,onResetChat:_}){const[x,b]=L.useState(!1),[N,j]=L.useState(null),[B,S]=L.useState(null),[M,z]=L.useState(!1),F=L.useRef(null),ne=new Map(i.map(K=>[K.name,K.message]));L.useEffect(()=>{if(!x)return;const K=ae=>{F.current&&!F.current.contains(ae.target)&&b(!1)};return document.addEventListener("mousedown",K),()=>document.removeEventListener("mousedown",K)},[x]);const U=K=>{b(!1),(K!==r||o)&&(j(K),S(null))},te=K=>{b(!1),K!==o&&(S(K),j(null))},de=N??B,pe=()=>{N?(p(N),j(null)):B&&(y(B),S(null))},R=()=>{j(null),S(null)},W=()=>{m&&navigator.clipboard.writeText(m).then(()=>{z(!0),setTimeout(()=>z(!1),1500)}).catch(()=>{})},G=o??r??(t.length===0&&a.length===0?"No agents":"Starting…"),ge=t.length+a.length>1;return g.jsxs("div",{className:$e.toolbar,children:[g.jsxs("div",{className:$e.agentSection,ref:F,children:[g.jsxs("button",{className:`${$e.agentPicker} ${ge?$e.clickable:""}`,onClick:ge?()=>b(K=>!K):void 0,disabled:!ge,title:ge?"Switch agent":void 0,"data-testid":"agent-selector",children:[g.jsx("span",{className:$e.agentLabel,children:"Chat with"}),g.jsx("span",{className:$e.agentName,"data-testid":"agent-status",children:G}),u&&g.jsx("span",{className:$e.starting,children:"starting…"}),ge&&g.jsx(Ma,{size:14,className:$e.chevron})]}),x&&g.jsxs("div",{className:$e.dropdown,"data-testid":"agent-dropdown",children:[t.map(K=>{const ae=ne.get(K.name),D=K.name===r&&!o,J=lS(K.name,r,u,c,ne);return g.jsxs("button",{className:`${$e.dropdownItem} ${D?$e.active:""} ${ae?$e.hasError:""}`,onClick:()=>U(K.name),disabled:!!ae||u,title:ae??void 0,"data-testid":`agent-option-${K.name}`,children:[g.jsx("span",{className:$e.dropdownName,children:K.name}),g.jsx("span",{className:`${$e.statusBadge} ${$e[`status_${J}`]}`,children:iS[J]}),g.jsx("span",{className:$e.dropdownMeta,children:K.buildType}),K.protocol&&g.jsx("span",{className:$e.dropdownMeta,children:K.protocol})]},K.name)}),a.length>0&&t.length>0&&g.jsx("div",{className:$e.dropdownSeparator}),a.map(K=>{const ae=K.name===o;return g.jsxs("button",{className:`${$e.dropdownItem} ${ae?$e.active:""}`,onClick:()=>te(K.name),disabled:u,children:[g.jsx("span",{className:$e.dropdownName,children:K.name}),g.jsx("span",{className:`${$e.statusBadge} ${$e.status_deployed}`,children:"Deployed"}),g.jsx("span",{className:$e.dropdownMeta,children:"Harness"})]},`harness-${K.name}`)})]})]}),g.jsxs("div",{className:$e.rightSection,children:[h&&g.jsx("span",{className:$e.errorText,children:h}),m&&g.jsxs("button",{className:$e.sessionBadge,onClick:W,title:`Session: ${m} (click to copy)`,children:["session: ",m.length>12?m.slice(0,12)+"…":m,M?g.jsx(e1,{size:10}):g.jsx(t1,{size:10})]}),m&&g.jsx("button",{className:$e.newSessionBtn,onClick:_,title:"New session","aria-label":"Start new session",children:g.jsx(Hx,{size:12})})]}),de&&g.jsx("div",{className:$e.confirmOverlay,onClick:R,children:g.jsxs("div",{className:$e.confirmModal,onClick:K=>K.stopPropagation(),children:[g.jsx("div",{className:$e.confirmTitle,children:"Switch agent?"}),g.jsxs("div",{className:$e.confirmMessage,children:["Switching to ",g.jsx("strong",{children:de})," will clear your current conversation history."]}),g.jsxs("div",{className:$e.confirmActions,children:[g.jsx("button",{className:$e.confirmBtn,onClick:R,children:"Cancel"}),g.jsx("button",{className:`${$e.confirmBtn} ${$e.confirmBtnPrimary}`,onClick:pe,children:"Switch"})]})]})})]})}const sS="_field_lhobl_1",oS="_label_lhobl_8",uS="_description_lhobl_14",cS="_hint_lhobl_20",fS="_optional_lhobl_25",Ar={field:sS,label:oS,description:uS,hint:cS,optional:fS};function zl({label:t,description:a,hint:i,optional:r,children:o}){return g.jsxs("div",{className:Ar.field,children:[g.jsxs("label",{className:Ar.label,children:[t,r&&g.jsx("span",{className:Ar.optional,children:" - optional"})]}),a&&g.jsx("span",{className:Ar.description,children:a}),i&&g.jsx("span",{className:Ar.hint,children:i}),o]})}function dS(t){return t!=null&&t.openAiModelConfig?{provider:"openai",id:t.openAiModelConfig.modelId,credentialArn:t.openAiModelConfig.apiKeyArn??""}:t!=null&&t.geminiModelConfig?{provider:"gemini",id:t.geminiModelConfig.modelId,credentialArn:t.geminiModelConfig.apiKeyArn??""}:t!=null&&t.bedrockModelConfig?{provider:"bedrock",id:t.bedrockModelConfig.modelId,credentialArn:""}:{provider:"bedrock",id:"",credentialArn:""}}const hS="_fields_7g8cg_1",mS="_sectionLabel_7g8cg_8",pS="_modelRow_7g8cg_17",gS="_input_7g8cg_22",yS="_select_7g8cg_23",_S="_textarea_7g8cg_45",vS="_toolList_7g8cg_60",xS="_toolItem_7g8cg_66",bS="_toolName_7g8cg_75",SS="_emptyTools_7g8cg_79",Ht={fields:hS,sectionLabel:mS,modelRow:pS,input:gS,select:yS,textarea:_S,toolList:vS,toolItem:xS,toolName:bS,emptyTools:SS},kS=t=>t==="openai"||t==="gemini";function TS({overrides:t,onChange:a,tools:i=[]}){const{provider:r,id:o,credentialArn:u}=dS(t.model),c=y=>!t.allowedTools||t.allowedTools.includes(y),h=y=>{const _=t.allowedTools??i,x=c(y)?_.filter(b=>b!==y):[..._,y];a({...t,allowedTools:x.length===i.length?void 0:x})},m=(y,_,x)=>{const b={};y==="bedrock"?b.bedrockModelConfig={modelId:_}:y==="openai"?b.openAiModelConfig={modelId:_,apiKeyArn:x||void 0}:y==="gemini"&&(b.geminiModelConfig={modelId:_,apiKeyArn:x||void 0}),a({...t,model:b})},p=(t.skills??[]).join(", ");return g.jsx(Io,{title:"Harness Settings",defaultCollapsed:!0,children:g.jsxs("div",{className:Ht.fields,children:[g.jsxs(zl,{label:"Model Provider",children:[g.jsxs("div",{className:Ht.modelRow,children:[g.jsxs("select",{className:Ht.select,value:r,onChange:y=>m(y.target.value,"",""),children:[g.jsx("option",{value:"bedrock",children:"Bedrock"}),g.jsx("option",{value:"openai",children:"OpenAI"}),g.jsx("option",{value:"gemini",children:"Gemini"})]}),g.jsx("input",{className:Ht.input,placeholder:"Optional — leave empty to use harness default",value:o,onChange:y=>m(r,y.target.value,u)})]}),kS(r)&&g.jsx("input",{className:Ht.input,placeholder:"Credential Provider ARN (API key)",value:u,onChange:y=>m(r,o,y.target.value)})]}),g.jsx(zl,{label:"System Prompt",children:g.jsx("textarea",{className:Ht.textarea,placeholder:"You are a helpful assistant.",value:t.systemPrompt??"",onChange:y=>a({...t,systemPrompt:y.target.value||void 0}),rows:3})}),g.jsx(zl,{label:"Skills",description:"Comma-separated skill paths",children:g.jsx("input",{className:Ht.input,placeholder:"E.g. .agent/skills/my-skill.md",value:p,onChange:y=>{const _=y.target.value,x=_?_.split(",").map(b=>b.trim()).filter(Boolean):[];a({...t,skills:x.length>0?x:void 0})}})}),g.jsx("div",{className:Ht.sectionLabel,children:"Tools"}),i.length>0?g.jsx("div",{className:Ht.toolList,children:i.map(y=>g.jsxs("label",{className:Ht.toolItem,children:[g.jsx("input",{type:"checkbox",checked:c(y),onChange:()=>h(y)}),g.jsx("span",{className:Ht.toolName,children:y})]},y))}):g.jsxs("p",{className:Ht.emptyTools,children:["No tools configured. Use ",g.jsx("code",{children:"agentcore add tool"})," to add tools."," ",g.jsx("a",{href:"https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-tools.html",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})]}),g.jsx("div",{className:Ht.sectionLabel,children:"Memory"}),g.jsx(zl,{label:"Actor ID",description:"Override the actor ID used for memory retrieval in this session",children:g.jsx("input",{className:Ht.input,placeholder:"E.g. user-123",value:t.actorId??"",onChange:y=>a({...t,actorId:y.target.value||void 0})})}),g.jsx("div",{className:Ht.sectionLabel,children:"Invocation limits"}),g.jsx(zl,{label:"Max iterations",description:"Maximum number of iterations the harness can perform",children:g.jsx("input",{className:Ht.input,type:"number",placeholder:"Default: 75",value:t.maxIterations??"",onChange:y=>a({...t,maxIterations:y.target.value?Number(y.target.value):void 0})})}),g.jsx(zl,{label:"Timeout duration (seconds)",description:"Maximum time allowed for the harness to complete an invocation",hint:"Maximum: 86400 seconds",children:g.jsx("input",{className:Ht.input,type:"number",placeholder:"Default: 3600",value:t.timeoutSeconds??"",onChange:y=>a({...t,timeoutSeconds:y.target.value?Number(y.target.value):void 0})})}),g.jsx(zl,{label:"Max tokens",description:"Maximum number of output tokens per invocation",children:g.jsx("input",{className:Ht.input,type:"number",placeholder:"E.g. 16384",value:t.maxTokens??"",onChange:y=>a({...t,maxTokens:y.target.value?Number(y.target.value):void 0})})})]})})}const NS="_header_lggp3_1",ES="_title_lggp3_11",CS="_badge_lggp3_16",AS="_ready_lggp3_24",wS="_error_lggp3_29",jS="_rightGroup_lggp3_34",MS="_iconBtn_lggp3_41",zS="_iconBtnActive_lggp3_61",na={header:NS,title:ES,badge:CS,ready:AS,error:wS,rightGroup:jS,iconBtn:MS,iconBtnActive:zS};function RS({isConnected:t,hasConnected:a,hasError:i,onToggleResources:r,isResourcesOpen:o}){return g.jsxs("header",{className:na.header,children:[g.jsx("div",{className:na.title,children:"AgentCore agent inspector"}),g.jsx("div",{className:`${na.badge} ${i?na.error:t?na.ready:a?na.error:""}`,children:i?"Error":t?"Connected":a?"Disconnected":"Connecting"}),g.jsxs("div",{className:na.rightGroup,children:[g.jsx("a",{className:na.iconBtn,href:"https://github.com/aws/agentcore-cli/issues/new?template=bug_report.yml",target:"_blank",rel:"noopener noreferrer",title:"Report an issue","aria-label":"Report an issue",children:g.jsx(ix,{size:14})}),r&&g.jsx("button",{className:`${na.iconBtn} ${o?na.iconBtnActive:""}`,onClick:r,title:"Toggle resources","aria-label":"Toggle resource panel",children:g.jsx(wx,{size:14})})]})]})}const OS="_errorMessage_1up60_1",DS="_truncated_1up60_7",LS="_full_1up60_12",BS="_toggle_1up60_17",fo={errorMessage:OS,truncated:DS,full:LS,toggle:BS},Vg=300;function qf({content:t}){const[a,i]=L.useState(!1),r=t.length>Vg;return g.jsxs("div",{className:fo.errorMessage,children:[g.jsx("span",{className:a||!r?fo.full:fo.truncated,children:a||!r?t:t.slice(0,Vg)+"…"}),r&&g.jsx("button",{className:fo.toggle,onClick:()=>i(o=>!o),children:a?"Show less":"Show more"})]})}const US="_root_1x2ve_1",HS="_pill_1x2ve_5",IS="_cards_1x2ve_18",qS="_card_1x2ve_18",VS="_cardError_1x2ve_33",GS="_cardHeader_1x2ve_37",ZS="_toolIcon_1x2ve_43",$S="_errorIcon_1x2ve_48",YS="_toolName_1x2ve_53",XS="_preview_1x2ve_60",FS="_spinner_1x2ve_70",QS="_toggle_1x2ve_84",KS="_json_1x2ve_100",JS="_jsonError_1x2ve_115",Ft={root:US,pill:HS,cards:IS,card:qS,cardError:VS,cardHeader:GS,toolIcon:ZS,errorIcon:$S,toolName:YS,preview:XS,spinner:FS,toggle:QS,json:KS,jsonError:JS};function Gg(t){if(!t)return null;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function PS(t,a=60){if(!t)return null;try{const i=JSON.parse(t),r=Object.values(i)[0];if(typeof r=="string")return r.length>a?r.slice(0,a)+"...":r}catch{}return t.length>a?t.slice(0,a)+"...":t}function WS({tool:t}){const[a,i]=L.useState(!1),[r,o]=L.useState(!1),u=t.resultStatus==="error",c=t.serverName?`${t.serverName}/${t.toolName}`:t.toolName,h=PS(t.input),m=Gg(t.input),p=Gg(t.result);return g.jsxs("div",{className:`${Ft.card} ${u?Ft.cardError:""}`,children:[g.jsxs("div",{className:Ft.cardHeader,children:[u?g.jsx(dx,{size:12,className:Ft.errorIcon}):g.jsx(Ra,{size:12,className:Ft.toolIcon}),g.jsx("span",{className:Ft.toolName,children:c}),h&&g.jsx("span",{className:Ft.preview,children:h}),!t.result&&g.jsx(n1,{size:12,className:Ft.spinner})]}),m&&g.jsxs(g.Fragment,{children:[g.jsxs("button",{className:Ft.toggle,onClick:()=>i(y=>!y),children:[a?g.jsx(Ma,{size:12}):g.jsx(cl,{size:12}),"Input"]}),a&&g.jsx("pre",{className:Ft.json,children:m})]}),p&&g.jsxs(g.Fragment,{children:[g.jsxs("button",{className:Ft.toggle,onClick:()=>o(y=>!y),children:[r?g.jsx(Ma,{size:12}):g.jsx(cl,{size:12}),"Result"]}),r&&g.jsx("pre",{className:`${Ft.json} ${u?Ft.jsonError:""}`,children:p})]})]})}function ek({toolExecutions:t}){const a=Object.entries(t);return a.length===0?null:g.jsxs("div",{className:Ft.root,children:[g.jsxs("div",{className:Ft.pill,children:[g.jsx(Ra,{size:12}),a.length," tool",a.length===1?"":"s"," used"]}),g.jsx("div",{className:Ft.cards,children:a.map(([i,r])=>g.jsx(WS,{tool:r},i))})]})}function tk(t,a){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const nk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ak=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lk={};function Zg(t,a){return(lk.jsx?ak:nk).test(t)}const ik=/[ \t\n\f\r]/g;function rk(t){return typeof t=="object"?t.type==="text"?$g(t.value):!1:$g(t)}function $g(t){return t.replace(ik,"")===""}class Zr{constructor(a,i,r){this.normal=i,this.property=a,r&&(this.space=r)}}Zr.prototype.normal={};Zr.prototype.property={};Zr.prototype.space=void 0;function l1(t,a){const i={},r={};for(const o of t)Object.assign(i,o.property),Object.assign(r,o.normal);return new Zr(i,r,a)}function Vf(t){return t.toLowerCase()}class hn{constructor(a,i){this.attribute=i,this.property=a}}hn.prototype.attribute="";hn.prototype.booleanish=!1;hn.prototype.boolean=!1;hn.prototype.commaOrSpaceSeparated=!1;hn.prototype.commaSeparated=!1;hn.prototype.defined=!1;hn.prototype.mustUseProperty=!1;hn.prototype.number=!1;hn.prototype.overloadedBoolean=!1;hn.prototype.property="";hn.prototype.spaceSeparated=!1;hn.prototype.space=void 0;let sk=0;const Le=Hl(),zt=Hl(),Gf=Hl(),re=Hl(),yt=Hl(),Ai=Hl(),Sn=Hl();function Hl(){return 2**++sk}const Zf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:zt,commaOrSpaceSeparated:Sn,commaSeparated:Ai,number:re,overloadedBoolean:Gf,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),vf=Object.keys(Zf);class dd extends hn{constructor(a,i,r,o){let u=-1;if(super(a,i),Yg(this,"space",o),typeof r=="number")for(;++u<vf.length;){const c=vf[u];Yg(this,vf[u],(r&Zf[c])===Zf[c])}}}dd.prototype.defined=!0;function Yg(t,a,i){i&&(t[a]=i)}function zi(t){const a={},i={};for(const[r,o]of Object.entries(t.properties)){const u=new dd(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),a[r]=u,i[Vf(r)]=r,i[Vf(u.attribute)]=r}return new Zr(a,i,t.space)}const i1=zi({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:yt,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:re,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:yt,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:zt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(t,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()}});function r1(t,a){return a in t?t[a]:a}function s1(t,a){return r1(t,a.toLowerCase())}const ok=zi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ai,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:yt,autoFocus:Le,autoPlay:Le,blocking:yt,capture:null,charSet:null,checked:Le,cite:null,className:yt,cols:re,colSpan:null,content:null,contentEditable:zt,controls:Le,controlsList:yt,coords:re|Ai,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:Gf,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:yt,height:re,hidden:Gf,high:re,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:yt,itemRef:yt,itemScope:Le,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,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:Le,optimum:re,pattern:null,ping:yt,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:yt,required:Le,reversed:Le,rows:re,rowSpan:re,sandbox:yt,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:zt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:s1}),uk=zi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Sn,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:yt,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:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,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:Ai,g2:Ai,glyphName:Ai,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:Sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,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:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,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:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:Sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sn,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,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:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:r1}),o1=zi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,a){return"xlink:"+a.slice(5).toLowerCase()}}),u1=zi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:s1}),c1=zi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,a){return"xml:"+a.slice(3).toLowerCase()}}),ck={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"},fk=/[A-Z]/g,Xg=/-[a-z]/g,dk=/^data[-\w.:]+$/i;function hk(t,a){const i=Vf(a);let r=a,o=hn;if(i in t.normal)return t.property[t.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&dk.test(a)){if(a.charAt(4)==="-"){const u=a.slice(5).replace(Xg,pk);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=a.slice(4);if(!Xg.test(u)){let c=u.replace(fk,mk);c.charAt(0)!=="-"&&(c="-"+c),a="data"+c}}o=dd}return new o(r,a)}function mk(t){return"-"+t.toLowerCase()}function pk(t){return t.charAt(1).toUpperCase()}const gk=l1([i1,ok,o1,u1,c1],"html"),hd=l1([i1,uk,o1,u1,c1],"svg");function yk(t){return t.join(" ").trim()}var Ti={},xf,Fg;function _k(){if(Fg)return xf;Fg=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,h=/^\s+|\s+$/g,m=`
|
|
240
|
-
`,p="/",y="*",_="",x="comment",b="declaration";function N(B,S){if(typeof B!="string")throw new TypeError("First argument must be a string");if(!B)return[];S=S||{};var M=1,z=1;function F(K){var ae=K.match(a);ae&&(M+=ae.length);var D=K.lastIndexOf(m);z=~D?K.length-D:z+K.length}function ne(){var K={line:M,column:z};return function(ae){return ae.position=new U(K),pe(),ae}}function U(K){this.start=K,this.end={line:M,column:z},this.source=S.source}U.prototype.content=B;function te(K){var ae=new Error(S.source+":"+M+":"+z+": "+K);if(ae.reason=K,ae.filename=S.source,ae.line=M,ae.column=z,ae.source=B,!S.silent)throw ae}function de(K){var ae=K.exec(B);if(ae){var D=ae[0];return F(D),B=B.slice(D.length),ae}}function pe(){de(i)}function R(K){var ae;for(K=K||[];ae=W();)ae!==!1&&K.push(ae);return K}function W(){var K=ne();if(!(p!=B.charAt(0)||y!=B.charAt(1))){for(var ae=2;_!=B.charAt(ae)&&(y!=B.charAt(ae)||p!=B.charAt(ae+1));)++ae;if(ae+=2,_===B.charAt(ae-1))return te("End of comment missing");var D=B.slice(2,ae-2);return z+=2,F(D),B=B.slice(ae),z+=2,K({type:x,comment:D})}}function G(){var K=ne(),ae=de(r);if(ae){if(W(),!de(o))return te("property missing ':'");var D=de(u),J=K({type:b,property:j(ae[0].replace(t,_)),value:D?j(D[0].replace(t,_)):_});return de(c),J}}function ge(){var K=[];R(K);for(var ae;ae=G();)ae!==!1&&(K.push(ae),R(K));return K}return pe(),ge()}function j(B){return B?B.replace(h,_):_}return xf=N,xf}var Qg;function vk(){if(Qg)return Ti;Qg=1;var t=Ti&&Ti.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.default=i;const a=t(_k());function i(r,o){let u=null;if(!r||typeof r!="string")return u;const c=(0,a.default)(r),h=typeof o=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:p,value:y}=m;h?o(p,y,m):y&&(u=u||{},u[p]=y)}),u}return Ti}var wr={},Kg;function xk(){if(Kg)return wr;Kg=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(p){return!p||i.test(p)||t.test(p)},c=function(p,y){return y.toUpperCase()},h=function(p,y){return"".concat(y,"-")},m=function(p,y){return y===void 0&&(y={}),u(p)?p:(p=p.toLowerCase(),y.reactCompat?p=p.replace(o,h):p=p.replace(r,h),p.replace(a,c))};return wr.camelCase=m,wr}var jr,Jg;function bk(){if(Jg)return jr;Jg=1;var t=jr&&jr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},a=t(vk()),i=xk();function r(o,u){var c={};return!o||typeof o!="string"||(0,a.default)(o,function(h,m){h&&m&&(c[(0,i.camelCase)(h,u)]=m)}),c}return r.default=r,jr=r,jr}var Sk=bk();const kk=Ho(Sk),f1=d1("end"),md=d1("start");function d1(t){return a;function a(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 Tk(t){const a=md(t),i=f1(t);if(a&&i)return{start:a,end:i}}function Dr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Pg(t.position):"start"in t||"end"in t?Pg(t):"line"in t||"column"in t?$f(t):""}function $f(t){return Wg(t&&t.line)+":"+Wg(t&&t.column)}function Pg(t){return $f(t&&t.start)+"-"+$f(t&&t.end)}function Wg(t){return t&&typeof t=="number"?t:1}class Kt extends Error{constructor(a,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let o="",u={},c=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof a=="string"?o=a:!u.cause&&a&&(c=!0,o=a.message,u.cause=a),!u.ruleId&&!u.source&&typeof r=="string"){const m=r.indexOf(":");m===-1?u.ruleId=r:(u.source=r.slice(0,m),u.ruleId=r.slice(m+1))}if(!u.place&&u.ancestors&&u.ancestors){const m=u.ancestors[u.ancestors.length-1];m&&(u.place=m.position)}const h=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=h?h.line:void 0,this.name=Dr(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Kt.prototype.file="";Kt.prototype.name="";Kt.prototype.reason="";Kt.prototype.message="";Kt.prototype.stack="";Kt.prototype.column=void 0;Kt.prototype.line=void 0;Kt.prototype.ancestors=void 0;Kt.prototype.cause=void 0;Kt.prototype.fatal=void 0;Kt.prototype.place=void 0;Kt.prototype.ruleId=void 0;Kt.prototype.source=void 0;const pd={}.hasOwnProperty,Nk=new Map,Ek=/[A-Z]/g,Ck=new Set(["table","tbody","thead","tfoot","tr"]),Ak=new Set(["td","th"]),h1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wk(t,a){if(!a||a.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=a.filePath||void 0;let r;if(a.development){if(typeof a.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Bk(i,a.jsxDEV)}else{if(typeof a.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof a.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Lk(i,a.jsx,a.jsxs)}const o={Fragment:a.Fragment,ancestors:[],components:a.components||{},create:r,elementAttributeNameCase:a.elementAttributeNameCase||"react",evaluater:a.createEvaluater?a.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:a.ignoreInvalidStyle||!1,passKeys:a.passKeys!==!1,passNode:a.passNode||!1,schema:a.space==="svg"?hd:gk,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},u=m1(o,t,void 0);return u&&typeof u!="string"?u:o.create(t,o.Fragment,{children:u||void 0},void 0)}function m1(t,a,i){if(a.type==="element")return jk(t,a,i);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return Mk(t,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return Rk(t,a,i);if(a.type==="mdxjsEsm")return zk(t,a);if(a.type==="root")return Ok(t,a,i);if(a.type==="text")return Dk(t,a)}function jk(t,a,i){const r=t.schema;let o=r;a.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=hd,t.schema=o),t.ancestors.push(a);const u=g1(t,a.tagName,!1),c=Uk(t,a);let h=yd(t,a);return Ck.has(a.tagName)&&(h=h.filter(function(m){return typeof m=="string"?!rk(m):!0})),p1(t,c,u,a),gd(c,h),t.ancestors.pop(),t.schema=r,t.create(a,u,c,i)}function Mk(t,a){if(a.data&&a.data.estree&&t.evaluater){const r=a.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}Ur(t,a.position)}function zk(t,a){if(a.data&&a.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(a.data.estree);Ur(t,a.position)}function Rk(t,a,i){const r=t.schema;let o=r;a.name==="svg"&&r.space==="html"&&(o=hd,t.schema=o),t.ancestors.push(a);const u=a.name===null?t.Fragment:g1(t,a.name,!0),c=Hk(t,a),h=yd(t,a);return p1(t,c,u,a),gd(c,h),t.ancestors.pop(),t.schema=r,t.create(a,u,c,i)}function Ok(t,a,i){const r={};return gd(r,yd(t,a)),t.create(a,t.Fragment,r,i)}function Dk(t,a){return a.value}function p1(t,a,i,r){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(a.node=r)}function gd(t,a){if(a.length>0){const i=a.length>1?a:a[0];i&&(t.children=i)}}function Lk(t,a,i){return r;function r(o,u,c,h){const p=Array.isArray(c.children)?i:a;return h?p(u,c,h):p(u,c)}}function Bk(t,a){return i;function i(r,o,u,c){const h=Array.isArray(u.children),m=md(r);return a(o,u,c,h,{columnNumber:m?m.column-1:void 0,fileName:t,lineNumber:m?m.line:void 0},void 0)}}function Uk(t,a){const i={};let r,o;for(o in a.properties)if(o!=="children"&&pd.call(a.properties,o)){const u=Ik(t,o,a.properties[o]);if(u){const[c,h]=u;t.tableCellAlignToStyle&&c==="align"&&typeof h=="string"&&Ak.has(a.tagName)?r=h:i[c]=h}}if(r){const u=i.style||(i.style={});u[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function Hk(t,a){const i={};for(const r of a.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const u=r.data.estree.body[0];u.type;const c=u.expression;c.type;const h=c.properties[0];h.type,Object.assign(i,t.evaluater.evaluateExpression(h.argument))}else Ur(t,a.position);else{const o=r.name;let u;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,u=t.evaluater.evaluateExpression(h.expression)}else Ur(t,a.position);else u=r.value===null?!0:r.value;i[o]=u}return i}function yd(t,a){const i=[];let r=-1;const o=t.passKeys?new Map:Nk;for(;++r<a.children.length;){const u=a.children[r];let c;if(t.passKeys){const m=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(m){const p=o.get(m)||0;c=m+"-"+p,o.set(m,p+1)}}const h=m1(t,u,c);h!==void 0&&i.push(h)}return i}function Ik(t,a,i){const r=hk(t.schema,a);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?tk(i):yk(i)),r.property==="style"){let o=typeof i=="object"?i:qk(t,String(i));return t.stylePropertyNameCase==="css"&&(o=Vk(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&r.space?ck[r.property]||r.property:r.attribute,i]}}function qk(t,a){try{return kk(a,{reactCompat:!0})}catch(i){if(t.ignoreInvalidStyle)return{};const r=i,o=new Kt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=h1+"#cannot-parse-style-attribute",o}}function g1(t,a,i){let r;if(!i)r={type:"Literal",value:a};else if(a.includes(".")){const o=a.split(".");let u=-1,c;for(;++u<o.length;){const h=Zg(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};c=c?{type:"MemberExpression",object:c,property:h,computed:!!(u&&h.type==="Literal"),optional:!1}:h}r=c}else r=Zg(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(r.type==="Literal"){const o=r.value;return pd.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(r);Ur(t)}function Ur(t,a){const i=new Kt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:a,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=h1+"#cannot-handle-mdx-estrees-without-createevaluater",i}function Vk(t){const a={};let i;for(i in t)pd.call(t,i)&&(a[Gk(i)]=t[i]);return a}function Gk(t){let a=t.replace(Ek,Zk);return a.slice(0,3)==="ms-"&&(a="-"+a),a}function Zk(t){return"-"+t.toLowerCase()}const bf={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"]},$k={};function _d(t,a){const i=$k,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return y1(t,r,o)}function y1(t,a,i){if(Yk(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(a&&"alt"in t&&t.alt)return t.alt;if("children"in t)return ey(t.children,a,i)}return Array.isArray(t)?ey(t,a,i):""}function ey(t,a,i){const r=[];let o=-1;for(;++o<t.length;)r[o]=y1(t[o],a,i);return r.join("")}function Yk(t){return!!(t&&typeof t=="object")}const ty=document.createElement("i");function vd(t){const a="&"+t+";";ty.innerHTML=a;const i=ty.textContent;return i.charCodeAt(i.length-1)===59&&t!=="semi"||i===a?!1:i}function Tn(t,a,i,r){const o=t.length;let u=0,c;if(a<0?a=-a>o?0:o+a:a=a>o?o:a,i=i>0?i:0,r.length<1e4)c=Array.from(r),c.unshift(a,i),t.splice(...c);else for(i&&t.splice(a,i);u<r.length;)c=r.slice(u,u+1e4),c.unshift(a,0),t.splice(...c),u+=1e4,a+=1e4}function qn(t,a){return t.length>0?(Tn(t,t.length,0,a),t):a}const ny={}.hasOwnProperty;function _1(t){const a={};let i=-1;for(;++i<t.length;)Xk(a,t[i]);return a}function Xk(t,a){let i;for(i in a){const o=(ny.call(t,i)?t[i]:void 0)||(t[i]={}),u=a[i];let c;if(u)for(c in u){ny.call(o,c)||(o[c]=[]);const h=u[c];Fk(o[c],Array.isArray(h)?h:h?[h]:[])}}}function Fk(t,a){let i=-1;const r=[];for(;++i<a.length;)(a[i].add==="after"?t:r).push(a[i]);Tn(t,0,0,r)}function v1(t,a){const i=Number.parseInt(t,a);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 Kn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const tn=dl(/[A-Za-z]/),Qt=dl(/[\dA-Za-z]/),Qk=dl(/[#-'*+\--9=?A-Z^-~]/);function To(t){return t!==null&&(t<32||t===127)}const Yf=dl(/\d/),Kk=dl(/[\dA-Fa-f]/),Jk=dl(/[!-/:-@[-`{-~]/);function Te(t){return t!==null&&t<-2}function pt(t){return t!==null&&(t<0||t===32)}function qe(t){return t===-2||t===-1||t===32}const qo=dl(new RegExp("\\p{P}|\\p{S}","u")),Ol=dl(/\s/);function dl(t){return a;function a(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Ri(t){const a=[];let i=-1,r=0,o=0;for(;++i<t.length;){const u=t.charCodeAt(i);let c="";if(u===37&&Qt(t.charCodeAt(i+1))&&Qt(t.charCodeAt(i+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const h=t.charCodeAt(i+1);u<56320&&h>56319&&h<57344?(c=String.fromCharCode(u,h),o=1):c="�"}else c=String.fromCharCode(u);c&&(a.push(t.slice(r,i),encodeURIComponent(c)),r=i+o+1,c=""),o&&(i+=o,o=0)}return a.join("")+t.slice(r)}function Qe(t,a,i,r){const o=r?r-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(m){return qe(m)?(t.enter(i),h(m)):a(m)}function h(m){return qe(m)&&u++<o?(t.consume(m),h):(t.exit(i),a(m))}}const Pk={tokenize:Wk};function Wk(t){const a=t.attempt(this.parser.constructs.contentInitial,r,o);let i;return a;function r(h){if(h===null){t.consume(h);return}return t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),Qe(t,a,"linePrefix")}function o(h){return t.enter("paragraph"),u(h)}function u(h){const m=t.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=m),i=m,c(h)}function c(h){if(h===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(h);return}return Te(h)?(t.consume(h),t.exit("chunkText"),u):(t.consume(h),c)}}const e2={tokenize:t2},ay={tokenize:n2};function t2(t){const a=this,i=[];let r=0,o,u,c;return h;function h(z){if(r<i.length){const F=i[r];return a.containerState=F[1],t.attempt(F[0].continuation,m,p)(z)}return p(z)}function m(z){if(r++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,o&&M();const F=a.events.length;let ne=F,U;for(;ne--;)if(a.events[ne][0]==="exit"&&a.events[ne][1].type==="chunkFlow"){U=a.events[ne][1].end;break}S(r);let te=F;for(;te<a.events.length;)a.events[te][1].end={...U},te++;return Tn(a.events,ne+1,0,a.events.slice(F)),a.events.length=te,p(z)}return h(z)}function p(z){if(r===i.length){if(!o)return x(z);if(o.currentConstruct&&o.currentConstruct.concrete)return N(z);a.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return a.containerState={},t.check(ay,y,_)(z)}function y(z){return o&&M(),S(r),x(z)}function _(z){return a.parser.lazy[a.now().line]=r!==i.length,c=a.now().offset,N(z)}function x(z){return a.containerState={},t.attempt(ay,b,N)(z)}function b(z){return r++,i.push([a.currentConstruct,a.containerState]),x(z)}function N(z){if(z===null){o&&M(),S(0),t.consume(z);return}return o=o||a.parser.flow(a.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),j(z)}function j(z){if(z===null){B(t.exit("chunkFlow"),!0),S(0),t.consume(z);return}return Te(z)?(t.consume(z),B(t.exit("chunkFlow")),r=0,a.interrupt=void 0,h):(t.consume(z),j)}function B(z,F){const ne=a.sliceStream(z);if(F&&ne.push(null),z.previous=u,u&&(u.next=z),u=z,o.defineSkip(z.start),o.write(ne),a.parser.lazy[z.start.line]){let U=o.events.length;for(;U--;)if(o.events[U][1].start.offset<c&&(!o.events[U][1].end||o.events[U][1].end.offset>c))return;const te=a.events.length;let de=te,pe,R;for(;de--;)if(a.events[de][0]==="exit"&&a.events[de][1].type==="chunkFlow"){if(pe){R=a.events[de][1].end;break}pe=!0}for(S(r),U=te;U<a.events.length;)a.events[U][1].end={...R},U++;Tn(a.events,de+1,0,a.events.slice(te)),a.events.length=U}}function S(z){let F=i.length;for(;F-- >z;){const ne=i[F];a.containerState=ne[1],ne[0].exit.call(a,t)}i.length=z}function M(){o.write([null]),u=void 0,o=void 0,a.containerState._closeFlow=void 0}}function n2(t,a,i){return Qe(t,t.attempt(this.parser.constructs.document,a,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wi(t){if(t===null||pt(t)||Ol(t))return 1;if(qo(t))return 2}function Vo(t,a,i){const r=[];let o=-1;for(;++o<t.length;){const u=t[o].resolveAll;u&&!r.includes(u)&&(a=u(a,i),r.push(u))}return a}const Xf={name:"attention",resolveAll:a2,tokenize:l2};function a2(t,a){let i=-1,r,o,u,c,h,m,p,y;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&&a.sliceSerialize(t[r][1]).charCodeAt(0)===a.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;m=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 _={...t[r][1].end},x={...t[i][1].start};ly(_,-m),ly(x,m),c={type:m>1?"strongSequence":"emphasisSequence",start:_,end:{...t[r][1].end}},h={type:m>1?"strongSequence":"emphasisSequence",start:{...t[i][1].start},end:x},u={type:m>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[i][1].start}},o={type:m>1?"strong":"emphasis",start:{...c.start},end:{...h.end}},t[r][1].end={...c.start},t[i][1].start={...h.end},p=[],t[r][1].end.offset-t[r][1].start.offset&&(p=qn(p,[["enter",t[r][1],a],["exit",t[r][1],a]])),p=qn(p,[["enter",o,a],["enter",c,a],["exit",c,a],["enter",u,a]]),p=qn(p,Vo(a.parser.constructs.insideSpan.null,t.slice(r+1,i),a)),p=qn(p,[["exit",u,a],["enter",h,a],["exit",h,a],["exit",o,a]]),t[i][1].end.offset-t[i][1].start.offset?(y=2,p=qn(p,[["enter",t[i][1],a],["exit",t[i][1],a]])):y=0,Tn(t,r-1,i-r+3,p),i=r+p.length-y-2;break}}for(i=-1;++i<t.length;)t[i][1].type==="attentionSequence"&&(t[i][1].type="data");return t}function l2(t,a){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,o=wi(r);let u;return c;function c(m){return u=m,t.enter("attentionSequence"),h(m)}function h(m){if(m===u)return t.consume(m),h;const p=t.exit("attentionSequence"),y=wi(m),_=!y||y===2&&o||i.includes(m),x=!o||o===2&&y||i.includes(r);return p._open=!!(u===42?_:_&&(o||!x)),p._close=!!(u===42?x:x&&(y||!_)),a(m)}}function ly(t,a){t.column+=a,t.offset+=a,t._bufferIndex+=a}const i2={name:"autolink",tokenize:r2};function r2(t,a,i){let r=0;return o;function o(b){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(b),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),u}function u(b){return tn(b)?(t.consume(b),c):b===64?i(b):p(b)}function c(b){return b===43||b===45||b===46||Qt(b)?(r=1,h(b)):p(b)}function h(b){return b===58?(t.consume(b),r=0,m):(b===43||b===45||b===46||Qt(b))&&r++<32?(t.consume(b),h):(r=0,p(b))}function m(b){return b===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(b),t.exit("autolinkMarker"),t.exit("autolink"),a):b===null||b===32||b===60||To(b)?i(b):(t.consume(b),m)}function p(b){return b===64?(t.consume(b),y):Qk(b)?(t.consume(b),p):i(b)}function y(b){return Qt(b)?_(b):i(b)}function _(b){return b===46?(t.consume(b),r=0,y):b===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(b),t.exit("autolinkMarker"),t.exit("autolink"),a):x(b)}function x(b){if((b===45||Qt(b))&&r++<63){const N=b===45?x:_;return t.consume(b),N}return i(b)}}const $r={partial:!0,tokenize:s2};function s2(t,a,i){return r;function r(u){return qe(u)?Qe(t,o,"linePrefix")(u):o(u)}function o(u){return u===null||Te(u)?a(u):i(u)}}const x1={continuation:{tokenize:u2},exit:c2,name:"blockQuote",tokenize:o2};function o2(t,a,i){const r=this;return o;function o(c){if(c===62){const h=r.containerState;return h.open||(t.enter("blockQuote",{_container:!0}),h.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),u}return i(c)}function u(c){return qe(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),a):(t.exit("blockQuotePrefix"),a(c))}}function u2(t,a,i){const r=this;return o;function o(c){return qe(c)?Qe(t,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return t.attempt(x1,a,i)(c)}}function c2(t){t.exit("blockQuote")}const b1={name:"characterEscape",tokenize:f2};function f2(t,a,i){return r;function r(u){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(u),t.exit("escapeMarker"),o}function o(u){return Jk(u)?(t.enter("characterEscapeValue"),t.consume(u),t.exit("characterEscapeValue"),t.exit("characterEscape"),a):i(u)}}const S1={name:"characterReference",tokenize:d2};function d2(t,a,i){const r=this;let o=0,u,c;return h;function h(_){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(_),t.exit("characterReferenceMarker"),m}function m(_){return _===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(_),t.exit("characterReferenceMarkerNumeric"),p):(t.enter("characterReferenceValue"),u=31,c=Qt,y(_))}function p(_){return _===88||_===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(_),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),u=6,c=Kk,y):(t.enter("characterReferenceValue"),u=7,c=Yf,y(_))}function y(_){if(_===59&&o){const x=t.exit("characterReferenceValue");return c===Qt&&!vd(r.sliceSerialize(x))?i(_):(t.enter("characterReferenceMarker"),t.consume(_),t.exit("characterReferenceMarker"),t.exit("characterReference"),a)}return c(_)&&o++<u?(t.consume(_),y):i(_)}}const iy={partial:!0,tokenize:m2},ry={concrete:!0,name:"codeFenced",tokenize:h2};function h2(t,a,i){const r=this,o={partial:!0,tokenize:ne};let u=0,c=0,h;return m;function m(U){return p(U)}function p(U){const te=r.events[r.events.length-1];return u=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,h=U,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(U)}function y(U){return U===h?(c++,t.consume(U),y):c<3?i(U):(t.exit("codeFencedFenceSequence"),qe(U)?Qe(t,_,"whitespace")(U):_(U))}function _(U){return U===null||Te(U)?(t.exit("codeFencedFence"),r.interrupt?a(U):t.check(iy,j,F)(U)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),x(U))}function x(U){return U===null||Te(U)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),_(U)):qe(U)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Qe(t,b,"whitespace")(U)):U===96&&U===h?i(U):(t.consume(U),x)}function b(U){return U===null||Te(U)?_(U):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),N(U))}function N(U){return U===null||Te(U)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),_(U)):U===96&&U===h?i(U):(t.consume(U),N)}function j(U){return t.attempt(o,F,B)(U)}function B(U){return t.enter("lineEnding"),t.consume(U),t.exit("lineEnding"),S}function S(U){return u>0&&qe(U)?Qe(t,M,"linePrefix",u+1)(U):M(U)}function M(U){return U===null||Te(U)?t.check(iy,j,F)(U):(t.enter("codeFlowValue"),z(U))}function z(U){return U===null||Te(U)?(t.exit("codeFlowValue"),M(U)):(t.consume(U),z)}function F(U){return t.exit("codeFenced"),a(U)}function ne(U,te,de){let pe=0;return R;function R(ae){return U.enter("lineEnding"),U.consume(ae),U.exit("lineEnding"),W}function W(ae){return U.enter("codeFencedFence"),qe(ae)?Qe(U,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):G(ae)}function G(ae){return ae===h?(U.enter("codeFencedFenceSequence"),ge(ae)):de(ae)}function ge(ae){return ae===h?(pe++,U.consume(ae),ge):pe>=c?(U.exit("codeFencedFenceSequence"),qe(ae)?Qe(U,K,"whitespace")(ae):K(ae)):de(ae)}function K(ae){return ae===null||Te(ae)?(U.exit("codeFencedFence"),te(ae)):de(ae)}}}function m2(t,a,i){const r=this;return o;function o(c){return c===null?i(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u)}function u(c){return r.parser.lazy[r.now().line]?i(c):a(c)}}const Sf={name:"codeIndented",tokenize:g2},p2={partial:!0,tokenize:y2};function g2(t,a,i){const r=this;return o;function o(p){return t.enter("codeIndented"),Qe(t,u,"linePrefix",5)(p)}function u(p){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(p):i(p)}function c(p){return p===null?m(p):Te(p)?t.attempt(p2,c,m)(p):(t.enter("codeFlowValue"),h(p))}function h(p){return p===null||Te(p)?(t.exit("codeFlowValue"),c(p)):(t.consume(p),h)}function m(p){return t.exit("codeIndented"),a(p)}}function y2(t,a,i){const r=this;return o;function o(c){return r.parser.lazy[r.now().line]?i(c):Te(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):Qe(t,u,"linePrefix",5)(c)}function u(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(c):Te(c)?o(c):i(c)}}const _2={name:"codeText",previous:x2,resolve:v2,tokenize:b2};function v2(t){let a=t.length-4,i=3,r,o;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[a][1].type==="lineEnding"||t[a][1].type==="space")){for(r=i;++r<a;)if(t[r][1].type==="codeTextData"){t[i][1].type="codeTextPadding",t[a][1].type="codeTextPadding",i+=2,a-=2;break}}for(r=i-1,a++;++r<=a;)o===void 0?r!==a&&t[r][1].type!=="lineEnding"&&(o=r):(r===a||t[r][1].type==="lineEnding")&&(t[o][1].type="codeTextData",r!==o+2&&(t[o][1].end=t[r-1][1].end,t.splice(o+2,r-o-2),a-=r-o-2,r=o+2),o=void 0);return t}function x2(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function b2(t,a,i){let r=0,o,u;return c;function c(_){return t.enter("codeText"),t.enter("codeTextSequence"),h(_)}function h(_){return _===96?(t.consume(_),r++,h):(t.exit("codeTextSequence"),m(_))}function m(_){return _===null?i(_):_===32?(t.enter("space"),t.consume(_),t.exit("space"),m):_===96?(u=t.enter("codeTextSequence"),o=0,y(_)):Te(_)?(t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),m):(t.enter("codeTextData"),p(_))}function p(_){return _===null||_===32||_===96||Te(_)?(t.exit("codeTextData"),m(_)):(t.consume(_),p)}function y(_){return _===96?(t.consume(_),o++,y):o===r?(t.exit("codeTextSequence"),t.exit("codeText"),a(_)):(u.type="codeTextData",p(_))}}class S2{constructor(a){this.left=a?[...a]:[],this.right=[]}get(a){if(a<0||a>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+a+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return a<this.left.length?this.left[a]:this.right[this.right.length-a+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(a,i){const r=i??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(a,r):a>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-a+this.left.length).reverse():this.left.slice(a).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(a,i,r){const o=i||0;this.setCursor(Math.trunc(a));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Mr(this.left,r),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(a){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(a)}pushMany(a){this.setCursor(Number.POSITIVE_INFINITY),Mr(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),Mr(this.right,a.reverse())}setCursor(a){if(!(a===this.left.length||a>this.left.length&&this.right.length===0||a<0&&this.left.length===0))if(a<this.left.length){const i=this.left.splice(a,Number.POSITIVE_INFINITY);Mr(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-a,Number.POSITIVE_INFINITY);Mr(this.left,i.reverse())}}}function Mr(t,a){let i=0;if(a.length<1e4)t.push(...a);else for(;i<a.length;)t.push(...a.slice(i,i+1e4)),i+=1e4}function k1(t){const a={};let i=-1,r,o,u,c,h,m,p;const y=new S2(t);for(;++i<y.length;){for(;i in a;)i=a[i];if(r=y.get(i),i&&r[1].type==="chunkFlow"&&y.get(i-1)[1].type==="listItemPrefix"&&(m=r[1]._tokenizer.events,u=0,u<m.length&&m[u][1].type==="lineEndingBlank"&&(u+=2),u<m.length&&m[u][1].type==="content"))for(;++u<m.length&&m[u][1].type!=="content";)m[u][1].type==="chunkText"&&(m[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(a,k2(y,i)),i=a[i],p=!0);else if(r[1]._container){for(u=i,o=void 0;u--;)if(c=y.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(r[1].end={...y.get(o)[1].start},h=y.slice(o,i),h.unshift(r),y.splice(o,i-o+1,h))}}return Tn(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!p}function k2(t,a){const i=t.get(a)[1],r=t.get(a)[2];let o=a-1;const u=[];let c=i._tokenizer;c||(c=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const h=c.events,m=[],p={};let y,_,x=-1,b=i,N=0,j=0;const B=[j];for(;b;){for(;t.get(++o)[1]!==b;);u.push(o),b._tokenizer||(y=r.sliceStream(b),b.next||y.push(null),_&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),_=b,b=b.next}for(b=i;++x<h.length;)h[x][0]==="exit"&&h[x-1][0]==="enter"&&h[x][1].type===h[x-1][1].type&&h[x][1].start.line!==h[x][1].end.line&&(j=x+1,B.push(j),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):B.pop(),x=B.length;x--;){const S=h.slice(B[x],B[x+1]),M=u.pop();m.push([M,M+S.length-1]),t.splice(M,2,S)}for(m.reverse(),x=-1;++x<m.length;)p[N+m[x][0]]=N+m[x][1],N+=m[x][1]-m[x][0]-1;return p}const T2={resolve:E2,tokenize:C2},N2={partial:!0,tokenize:A2};function E2(t){return k1(t),t}function C2(t,a){let i;return r;function r(h){return t.enter("content"),i=t.enter("chunkContent",{contentType:"content"}),o(h)}function o(h){return h===null?u(h):Te(h)?t.check(N2,c,u)(h):(t.consume(h),o)}function u(h){return t.exit("chunkContent"),t.exit("content"),a(h)}function c(h){return t.consume(h),t.exit("chunkContent"),i.next=t.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function A2(t,a,i){const r=this;return o;function o(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Qe(t,u,"linePrefix")}function u(c){if(c===null||Te(c))return i(c);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?a(c):t.interrupt(r.parser.constructs.flow,i,a)(c)}}function T1(t,a,i,r,o,u,c,h,m){const p=m||Number.POSITIVE_INFINITY;let y=0;return _;function _(S){return S===60?(t.enter(r),t.enter(o),t.enter(u),t.consume(S),t.exit(u),x):S===null||S===32||S===41||To(S)?i(S):(t.enter(r),t.enter(c),t.enter(h),t.enter("chunkString",{contentType:"string"}),j(S))}function x(S){return S===62?(t.enter(u),t.consume(S),t.exit(u),t.exit(o),t.exit(r),a):(t.enter(h),t.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===62?(t.exit("chunkString"),t.exit(h),x(S)):S===null||S===60||Te(S)?i(S):(t.consume(S),S===92?N:b)}function N(S){return S===60||S===62||S===92?(t.consume(S),b):b(S)}function j(S){return!y&&(S===null||S===41||pt(S))?(t.exit("chunkString"),t.exit(h),t.exit(c),t.exit(r),a(S)):y<p&&S===40?(t.consume(S),y++,j):S===41?(t.consume(S),y--,j):S===null||S===32||S===40||To(S)?i(S):(t.consume(S),S===92?B:j)}function B(S){return S===40||S===41||S===92?(t.consume(S),j):j(S)}}function N1(t,a,i,r,o,u){const c=this;let h=0,m;return p;function p(b){return t.enter(r),t.enter(o),t.consume(b),t.exit(o),t.enter(u),y}function y(b){return h>999||b===null||b===91||b===93&&!m||b===94&&!h&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(t.exit(u),t.enter(o),t.consume(b),t.exit(o),t.exit(r),a):Te(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),_(b))}function _(b){return b===null||b===91||b===93||Te(b)||h++>999?(t.exit("chunkString"),y(b)):(t.consume(b),m||(m=!qe(b)),b===92?x:_)}function x(b){return b===91||b===92||b===93?(t.consume(b),h++,_):_(b)}}function E1(t,a,i,r,o,u){let c;return h;function h(x){return x===34||x===39||x===40?(t.enter(r),t.enter(o),t.consume(x),t.exit(o),c=x===40?41:x,m):i(x)}function m(x){return x===c?(t.enter(o),t.consume(x),t.exit(o),t.exit(r),a):(t.enter(u),p(x))}function p(x){return x===c?(t.exit(u),m(c)):x===null?i(x):Te(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),Qe(t,p,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===c||x===null||Te(x)?(t.exit("chunkString"),p(x)):(t.consume(x),x===92?_:y)}function _(x){return x===c||x===92?(t.consume(x),y):y(x)}}function Lr(t,a){let i;return r;function r(o){return Te(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i=!0,r):qe(o)?Qe(t,r,i?"linePrefix":"lineSuffix")(o):a(o)}}const w2={name:"definition",tokenize:M2},j2={partial:!0,tokenize:z2};function M2(t,a,i){const r=this;let o;return u;function u(b){return t.enter("definition"),c(b)}function c(b){return N1.call(r,t,h,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function h(b){return o=Kn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(t.enter("definitionMarker"),t.consume(b),t.exit("definitionMarker"),m):i(b)}function m(b){return pt(b)?Lr(t,p)(b):p(b)}function p(b){return T1(t,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return t.attempt(j2,_,_)(b)}function _(b){return qe(b)?Qe(t,x,"whitespace")(b):x(b)}function x(b){return b===null||Te(b)?(t.exit("definition"),r.parser.defined.push(o),a(b)):i(b)}}function z2(t,a,i){return r;function r(h){return pt(h)?Lr(t,o)(h):i(h)}function o(h){return E1(t,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function u(h){return qe(h)?Qe(t,c,"whitespace")(h):c(h)}function c(h){return h===null||Te(h)?a(h):i(h)}}const R2={name:"hardBreakEscape",tokenize:O2};function O2(t,a,i){return r;function r(u){return t.enter("hardBreakEscape"),t.consume(u),o}function o(u){return Te(u)?(t.exit("hardBreakEscape"),a(u)):i(u)}}const D2={name:"headingAtx",resolve:L2,tokenize:B2};function L2(t,a){let i=t.length-2,r=3,o,u;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&&(o={type:"atxHeadingText",start:t[r][1].start,end:t[i][1].end},u={type:"chunkText",start:t[r][1].start,end:t[i][1].end,contentType:"text"},Tn(t,r,i-r+1,[["enter",o,a],["enter",u,a],["exit",u,a],["exit",o,a]])),t}function B2(t,a,i){let r=0;return o;function o(y){return t.enter("atxHeading"),u(y)}function u(y){return t.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&r++<6?(t.consume(y),c):y===null||pt(y)?(t.exit("atxHeadingSequence"),h(y)):i(y)}function h(y){return y===35?(t.enter("atxHeadingSequence"),m(y)):y===null||Te(y)?(t.exit("atxHeading"),a(y)):qe(y)?Qe(t,h,"whitespace")(y):(t.enter("atxHeadingText"),p(y))}function m(y){return y===35?(t.consume(y),m):(t.exit("atxHeadingSequence"),h(y))}function p(y){return y===null||y===35||pt(y)?(t.exit("atxHeadingText"),h(y)):(t.consume(y),p)}}const U2=["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"],sy=["pre","script","style","textarea"],H2={concrete:!0,name:"htmlFlow",resolveTo:V2,tokenize:G2},I2={partial:!0,tokenize:$2},q2={partial:!0,tokenize:Z2};function V2(t){let a=t.length;for(;a--&&!(t[a][0]==="enter"&&t[a][1].type==="htmlFlow"););return a>1&&t[a-2][1].type==="linePrefix"&&(t[a][1].start=t[a-2][1].start,t[a+1][1].start=t[a-2][1].start,t.splice(a-2,2)),t}function G2(t,a,i){const r=this;let o,u,c,h,m;return p;function p(T){return y(T)}function y(T){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(T),_}function _(T){return T===33?(t.consume(T),x):T===47?(t.consume(T),u=!0,j):T===63?(t.consume(T),o=3,r.interrupt?a:E):tn(T)?(t.consume(T),c=String.fromCharCode(T),B):i(T)}function x(T){return T===45?(t.consume(T),o=2,b):T===91?(t.consume(T),o=5,h=0,N):tn(T)?(t.consume(T),o=4,r.interrupt?a:E):i(T)}function b(T){return T===45?(t.consume(T),r.interrupt?a:E):i(T)}function N(T){const ee="CDATA[";return T===ee.charCodeAt(h++)?(t.consume(T),h===ee.length?r.interrupt?a:G:N):i(T)}function j(T){return tn(T)?(t.consume(T),c=String.fromCharCode(T),B):i(T)}function B(T){if(T===null||T===47||T===62||pt(T)){const ee=T===47,$=c.toLowerCase();return!ee&&!u&&sy.includes($)?(o=1,r.interrupt?a(T):G(T)):U2.includes(c.toLowerCase())?(o=6,ee?(t.consume(T),S):r.interrupt?a(T):G(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(T):u?M(T):z(T))}return T===45||Qt(T)?(t.consume(T),c+=String.fromCharCode(T),B):i(T)}function S(T){return T===62?(t.consume(T),r.interrupt?a:G):i(T)}function M(T){return qe(T)?(t.consume(T),M):R(T)}function z(T){return T===47?(t.consume(T),R):T===58||T===95||tn(T)?(t.consume(T),F):qe(T)?(t.consume(T),z):R(T)}function F(T){return T===45||T===46||T===58||T===95||Qt(T)?(t.consume(T),F):ne(T)}function ne(T){return T===61?(t.consume(T),U):qe(T)?(t.consume(T),ne):z(T)}function U(T){return T===null||T===60||T===61||T===62||T===96?i(T):T===34||T===39?(t.consume(T),m=T,te):qe(T)?(t.consume(T),U):de(T)}function te(T){return T===m?(t.consume(T),m=null,pe):T===null||Te(T)?i(T):(t.consume(T),te)}function de(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||pt(T)?ne(T):(t.consume(T),de)}function pe(T){return T===47||T===62||qe(T)?z(T):i(T)}function R(T){return T===62?(t.consume(T),W):i(T)}function W(T){return T===null||Te(T)?G(T):qe(T)?(t.consume(T),W):i(T)}function G(T){return T===45&&o===2?(t.consume(T),D):T===60&&o===1?(t.consume(T),J):T===62&&o===4?(t.consume(T),A):T===63&&o===3?(t.consume(T),E):T===93&&o===5?(t.consume(T),be):Te(T)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(I2,Z,ge)(T)):T===null||Te(T)?(t.exit("htmlFlowData"),ge(T)):(t.consume(T),G)}function ge(T){return t.check(q2,K,Z)(T)}function K(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),ae}function ae(T){return T===null||Te(T)?ge(T):(t.enter("htmlFlowData"),G(T))}function D(T){return T===45?(t.consume(T),E):G(T)}function J(T){return T===47?(t.consume(T),c="",se):G(T)}function se(T){if(T===62){const ee=c.toLowerCase();return sy.includes(ee)?(t.consume(T),A):G(T)}return tn(T)&&c.length<8?(t.consume(T),c+=String.fromCharCode(T),se):G(T)}function be(T){return T===93?(t.consume(T),E):G(T)}function E(T){return T===62?(t.consume(T),A):T===45&&o===2?(t.consume(T),E):G(T)}function A(T){return T===null||Te(T)?(t.exit("htmlFlowData"),Z(T)):(t.consume(T),A)}function Z(T){return t.exit("htmlFlow"),a(T)}}function Z2(t,a,i){const r=this;return o;function o(c){return Te(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u):i(c)}function u(c){return r.parser.lazy[r.now().line]?i(c):a(c)}}function $2(t,a,i){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt($r,a,i)}}const Y2={name:"htmlText",tokenize:X2};function X2(t,a,i){const r=this;let o,u,c;return h;function h(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),m}function m(E){return E===33?(t.consume(E),p):E===47?(t.consume(E),ne):E===63?(t.consume(E),z):tn(E)?(t.consume(E),de):i(E)}function p(E){return E===45?(t.consume(E),y):E===91?(t.consume(E),u=0,N):tn(E)?(t.consume(E),M):i(E)}function y(E){return E===45?(t.consume(E),b):i(E)}function _(E){return E===null?i(E):E===45?(t.consume(E),x):Te(E)?(c=_,J(E)):(t.consume(E),_)}function x(E){return E===45?(t.consume(E),b):_(E)}function b(E){return E===62?D(E):E===45?x(E):_(E)}function N(E){const A="CDATA[";return E===A.charCodeAt(u++)?(t.consume(E),u===A.length?j:N):i(E)}function j(E){return E===null?i(E):E===93?(t.consume(E),B):Te(E)?(c=j,J(E)):(t.consume(E),j)}function B(E){return E===93?(t.consume(E),S):j(E)}function S(E){return E===62?D(E):E===93?(t.consume(E),S):j(E)}function M(E){return E===null||E===62?D(E):Te(E)?(c=M,J(E)):(t.consume(E),M)}function z(E){return E===null?i(E):E===63?(t.consume(E),F):Te(E)?(c=z,J(E)):(t.consume(E),z)}function F(E){return E===62?D(E):z(E)}function ne(E){return tn(E)?(t.consume(E),U):i(E)}function U(E){return E===45||Qt(E)?(t.consume(E),U):te(E)}function te(E){return Te(E)?(c=te,J(E)):qe(E)?(t.consume(E),te):D(E)}function de(E){return E===45||Qt(E)?(t.consume(E),de):E===47||E===62||pt(E)?pe(E):i(E)}function pe(E){return E===47?(t.consume(E),D):E===58||E===95||tn(E)?(t.consume(E),R):Te(E)?(c=pe,J(E)):qe(E)?(t.consume(E),pe):D(E)}function R(E){return E===45||E===46||E===58||E===95||Qt(E)?(t.consume(E),R):W(E)}function W(E){return E===61?(t.consume(E),G):Te(E)?(c=W,J(E)):qe(E)?(t.consume(E),W):pe(E)}function G(E){return E===null||E===60||E===61||E===62||E===96?i(E):E===34||E===39?(t.consume(E),o=E,ge):Te(E)?(c=G,J(E)):qe(E)?(t.consume(E),G):(t.consume(E),K)}function ge(E){return E===o?(t.consume(E),o=void 0,ae):E===null?i(E):Te(E)?(c=ge,J(E)):(t.consume(E),ge)}function K(E){return E===null||E===34||E===39||E===60||E===61||E===96?i(E):E===47||E===62||pt(E)?pe(E):(t.consume(E),K)}function ae(E){return E===47||E===62||pt(E)?pe(E):i(E)}function D(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),a):i(E)}function J(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),se}function se(E){return qe(E)?Qe(t,be,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):be(E)}function be(E){return t.enter("htmlTextData"),c(E)}}const xd={name:"labelEnd",resolveAll:J2,resolveTo:P2,tokenize:W2},F2={tokenize:eT},Q2={tokenize:tT},K2={tokenize:nT};function J2(t){let a=-1;const i=[];for(;++a<t.length;){const r=t[a][1];if(i.push(t[a]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",a+=o}}return t.length!==i.length&&Tn(t,0,t.length,i),t}function P2(t,a){let i=t.length,r=0,o,u,c,h;for(;i--;)if(o=t[i][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(t[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=i,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(c=i);const m={type:t[u][1].type==="labelLink"?"link":"image",start:{...t[u][1].start},end:{...t[t.length-1][1].end}},p={type:"label",start:{...t[u][1].start},end:{...t[c][1].end}},y={type:"labelText",start:{...t[u+r+2][1].end},end:{...t[c-2][1].start}};return h=[["enter",m,a],["enter",p,a]],h=qn(h,t.slice(u+1,u+r+3)),h=qn(h,[["enter",y,a]]),h=qn(h,Vo(a.parser.constructs.insideSpan.null,t.slice(u+r+4,c-3),a)),h=qn(h,[["exit",y,a],t[c-2],t[c-1],["exit",p,a]]),h=qn(h,t.slice(c+1)),h=qn(h,[["exit",m,a]]),Tn(t,u,t.length,h),t}function W2(t,a,i){const r=this;let o=r.events.length,u,c;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){u=r.events[o][1];break}return h;function h(x){return u?u._inactive?_(x):(c=r.parser.defined.includes(Kn(r.sliceSerialize({start:u.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(x),t.exit("labelMarker"),t.exit("labelEnd"),m):i(x)}function m(x){return x===40?t.attempt(F2,y,c?y:_)(x):x===91?t.attempt(Q2,y,c?p:_)(x):c?y(x):_(x)}function p(x){return t.attempt(K2,y,_)(x)}function y(x){return a(x)}function _(x){return u._balanced=!0,i(x)}}function eT(t,a,i){return r;function r(_){return t.enter("resource"),t.enter("resourceMarker"),t.consume(_),t.exit("resourceMarker"),o}function o(_){return pt(_)?Lr(t,u)(_):u(_)}function u(_){return _===41?y(_):T1(t,c,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(_)}function c(_){return pt(_)?Lr(t,m)(_):y(_)}function h(_){return i(_)}function m(_){return _===34||_===39||_===40?E1(t,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(_):y(_)}function p(_){return pt(_)?Lr(t,y)(_):y(_)}function y(_){return _===41?(t.enter("resourceMarker"),t.consume(_),t.exit("resourceMarker"),t.exit("resource"),a):i(_)}}function tT(t,a,i){const r=this;return o;function o(h){return N1.call(r,t,u,c,"reference","referenceMarker","referenceString")(h)}function u(h){return r.parser.defined.includes(Kn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?a(h):i(h)}function c(h){return i(h)}}function nT(t,a,i){return r;function r(u){return t.enter("reference"),t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),o}function o(u){return u===93?(t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),t.exit("reference"),a):i(u)}}const aT={name:"labelStartImage",resolveAll:xd.resolveAll,tokenize:lT};function lT(t,a,i){const r=this;return o;function o(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),u}function u(h){return h===91?(t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelImage"),c):i(h)}function c(h){return h===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(h):a(h)}}const iT={name:"labelStartLink",resolveAll:xd.resolveAll,tokenize:rT};function rT(t,a,i){const r=this;return o;function o(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(c):a(c)}}const kf={name:"lineEnding",tokenize:sT};function sT(t,a){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Qe(t,a,"linePrefix")}}const xo={name:"thematicBreak",tokenize:oT};function oT(t,a,i){let r=0,o;return u;function u(p){return t.enter("thematicBreak"),c(p)}function c(p){return o=p,h(p)}function h(p){return p===o?(t.enter("thematicBreakSequence"),m(p)):r>=3&&(p===null||Te(p))?(t.exit("thematicBreak"),a(p)):i(p)}function m(p){return p===o?(t.consume(p),r++,m):(t.exit("thematicBreakSequence"),qe(p)?Qe(t,h,"whitespace")(p):h(p))}}const dn={continuation:{tokenize:dT},exit:mT,name:"list",tokenize:fT},uT={partial:!0,tokenize:pT},cT={partial:!0,tokenize:hT};function fT(t,a,i){const r=this,o=r.events[r.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return h;function h(b){const N=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:Yf(b)){if(r.containerState.type||(r.containerState.type=N,t.enter(N,{_container:!0})),N==="listUnordered")return t.enter("listItemPrefix"),b===42||b===45?t.check(xo,i,p)(b):p(b);if(!r.interrupt||b===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),m(b)}return i(b)}function m(b){return Yf(b)&&++c<10?(t.consume(b),m):(!r.interrupt||c<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(t.exit("listItemValue"),p(b)):i(b)}function p(b){return t.enter("listItemMarker"),t.consume(b),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,t.check($r,r.interrupt?i:y,t.attempt(uT,x,_))}function y(b){return r.containerState.initialBlankLine=!0,u++,x(b)}function _(b){return qe(b)?(t.enter("listItemPrefixWhitespace"),t.consume(b),t.exit("listItemPrefixWhitespace"),x):i(b)}function x(b){return r.containerState.size=u+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,a(b)}}function dT(t,a,i){const r=this;return r.containerState._closeFlow=void 0,t.check($r,o,u);function o(h){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Qe(t,a,"listItemIndent",r.containerState.size+1)(h)}function u(h){return r.containerState.furtherBlankLines||!qe(h)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(h)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(cT,a,c)(h))}function c(h){return r.containerState._closeFlow=!0,r.interrupt=void 0,Qe(t,t.attempt(dn,a,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function hT(t,a,i){const r=this;return Qe(t,o,"listItemIndent",r.containerState.size+1);function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===r.containerState.size?a(u):i(u)}}function mT(t){t.exit(this.containerState.type)}function pT(t,a,i){const r=this;return Qe(t,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const c=r.events[r.events.length-1];return!qe(u)&&c&&c[1].type==="listItemPrefixWhitespace"?a(u):i(u)}}const oy={name:"setextUnderline",resolveTo:gT,tokenize:yT};function gT(t,a){let i=t.length,r,o,u;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){r=i;break}t[i][1].type==="paragraph"&&(o=i)}else t[i][1].type==="content"&&t.splice(i,1),!u&&t[i][1].type==="definition"&&(u=i);const c={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",u?(t.splice(o,0,["enter",c,a]),t.splice(u+1,0,["exit",t[r][1],a]),t[r][1].end={...t[u][1].end}):t[r][1]=c,t.push(["exit",c,a]),t}function yT(t,a,i){const r=this;let o;return u;function u(p){let y=r.events.length,_;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){_=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||_)?(t.enter("setextHeadingLine"),o=p,c(p)):i(p)}function c(p){return t.enter("setextHeadingLineSequence"),h(p)}function h(p){return p===o?(t.consume(p),h):(t.exit("setextHeadingLineSequence"),qe(p)?Qe(t,m,"lineSuffix")(p):m(p))}function m(p){return p===null||Te(p)?(t.exit("setextHeadingLine"),a(p)):i(p)}}const _T={tokenize:vT};function vT(t){const a=this,i=t.attempt($r,r,t.attempt(this.parser.constructs.flowInitial,o,Qe(t,t.attempt(this.parser.constructs.flow,o,t.attempt(T2,o)),"linePrefix")));return i;function r(u){if(u===null){t.consume(u);return}return t.enter("lineEndingBlank"),t.consume(u),t.exit("lineEndingBlank"),a.currentConstruct=void 0,i}function o(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),a.currentConstruct=void 0,i}}const xT={resolveAll:A1()},bT=C1("string"),ST=C1("text");function C1(t){return{resolveAll:A1(t==="text"?kT:void 0),tokenize:a};function a(i){const r=this,o=this.parser.constructs[t],u=i.attempt(o,c,h);return c;function c(y){return p(y)?u(y):h(y)}function h(y){if(y===null){i.consume(y);return}return i.enter("data"),i.consume(y),m}function m(y){return p(y)?(i.exit("data"),u(y)):(i.consume(y),m)}function p(y){if(y===null)return!0;const _=o[y];let x=-1;if(_)for(;++x<_.length;){const b=_[x];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function A1(t){return a;function a(i,r){let o=-1,u;for(;++o<=i.length;)u===void 0?i[o]&&i[o][1].type==="data"&&(u=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==u+2&&(i[u][1].end=i[o-1][1].end,i.splice(u+2,o-u-2),o=u+2),u=void 0);return t?t(i,r):i}}function kT(t,a){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],o=a.sliceStream(r);let u=o.length,c=-1,h=0,m;for(;u--;){const p=o[u];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)h++,c--;if(c)break;c=-1}else if(p===-2)m=!0,h++;else if(p!==-1){u++;break}}if(a._contentTypeTextTrailing&&i===t.length&&(h=0),h){const p={type:i===t.length||m||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:r.start._bufferIndex+c,_index:r.start._index+u,line:r.end.line,column:r.end.column-h,offset:r.end.offset-h},end:{...r.end}};r.end={...p.start},r.start.offset===r.end.offset?Object.assign(r,p):(t.splice(i,0,["enter",p,a],["exit",p,a]),i+=2)}i++}return t}const TT={42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:x1},NT={91:w2},ET={[-2]:Sf,[-1]:Sf,32:Sf},CT={35:D2,42:xo,45:[oy,xo],60:H2,61:oy,95:xo,96:ry,126:ry},AT={38:S1,92:b1},wT={[-5]:kf,[-4]:kf,[-3]:kf,33:aT,38:S1,42:Xf,60:[i2,Y2],91:iT,92:[R2,b1],93:xd,95:Xf,96:_2},jT={null:[Xf,xT]},MT={null:[42,95]},zT={null:[]},RT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:MT,contentInitial:NT,disable:zT,document:TT,flow:CT,flowInitial:ET,insideSpan:jT,string:AT,text:wT},Symbol.toStringTag,{value:"Module"}));function OT(t,a,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},u=[];let c=[],h=[];const m={attempt:te(ne),check:te(U),consume:M,enter:z,exit:F,interrupt:te(U,{interrupt:!0})},p={code:null,containerState:{},defineSkip:j,events:[],now:N,parser:t,previous:null,sliceSerialize:x,sliceStream:b,write:_};let y=a.tokenize.call(p,m);return a.resolveAll&&u.push(a),p;function _(W){return c=qn(c,W),B(),c[c.length-1]!==null?[]:(de(a,0),p.events=Vo(u,p.events,p),p.events)}function x(W,G){return LT(b(W),G)}function b(W){return DT(c,W)}function N(){const{_bufferIndex:W,_index:G,line:ge,column:K,offset:ae}=r;return{_bufferIndex:W,_index:G,line:ge,column:K,offset:ae}}function j(W){o[W.line]=W.column,R()}function B(){let W;for(;r._index<c.length;){const G=c[r._index];if(typeof G=="string")for(W=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===W&&r._bufferIndex<G.length;)S(G.charCodeAt(r._bufferIndex));else S(G)}}function S(W){y=y(W)}function M(W){Te(W)?(r.line++,r.column=1,r.offset+=W===-3?2:1,R()):W!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),p.previous=W}function z(W,G){const ge=G||{};return ge.type=W,ge.start=N(),p.events.push(["enter",ge,p]),h.push(ge),ge}function F(W){const G=h.pop();return G.end=N(),p.events.push(["exit",G,p]),G}function ne(W,G){de(W,G.from)}function U(W,G){G.restore()}function te(W,G){return ge;function ge(K,ae,D){let J,se,be,E;return Array.isArray(K)?Z(K):"tokenize"in K?Z([K]):A(K);function A(ue){return Ee;function Ee(We){const Ke=We!==null&&ue[We],Ct=We!==null&&ue.null,Jt=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(Ct)?Ct:Ct?[Ct]:[]];return Z(Jt)(We)}}function Z(ue){return J=ue,se=0,ue.length===0?D:T(ue[se])}function T(ue){return Ee;function Ee(We){return E=pe(),be=ue,ue.partial||(p.currentConstruct=ue),ue.name&&p.parser.constructs.disable.null.includes(ue.name)?$():ue.tokenize.call(G?Object.assign(Object.create(p),G):p,m,ee,$)(We)}}function ee(ue){return W(be,E),ae}function $(ue){return E.restore(),++se<J.length?T(J[se]):D}}}function de(W,G){W.resolveAll&&!u.includes(W)&&u.push(W),W.resolve&&Tn(p.events,G,p.events.length-G,W.resolve(p.events.slice(G),p)),W.resolveTo&&(p.events=W.resolveTo(p.events,p))}function pe(){const W=N(),G=p.previous,ge=p.currentConstruct,K=p.events.length,ae=Array.from(h);return{from:K,restore:D};function D(){r=W,p.previous=G,p.currentConstruct=ge,p.events.length=K,h=ae,R()}}function R(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function DT(t,a){const i=a.start._index,r=a.start._bufferIndex,o=a.end._index,u=a.end._bufferIndex;let c;if(i===o)c=[t[i].slice(r,u)];else{if(c=t.slice(i,o),r>-1){const h=c[0];typeof h=="string"?c[0]=h.slice(r):c.shift()}u>0&&c.push(t[o].slice(0,u))}return c}function LT(t,a){let i=-1;const r=[];let o;for(;++i<t.length;){const u=t[i];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
239
|
+
*/const Yx=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],fd=rt("zap",Yx),Xx="_panel_1gqyj_1",Fx="_resizeHandle_1gqyj_11",Qx="_header_1gqyj_22",Kx="_headerLeft_1gqyj_32",Jx="_headerTitle_1gqyj_38",Px="_headerActions_1gqyj_44",Wx="_collapseToggle_1gqyj_50",eb="_iconBtn_1gqyj_66",tb="_spinning_1gqyj_86",nb="_status_1gqyj_98",ab="_body_1gqyj_103",Qn={panel:Xx,resizeHandle:Fx,header:Qx,headerLeft:Kx,headerTitle:Jx,headerActions:Px,collapseToggle:Wx,iconBtn:eb,spinning:tb,status:nb,body:ab},lb=300,ib=150;function Io({title:t,status:a,onRefresh:i,isRefreshing:r,titleExtra:o,defaultCollapsed:u=!1,defaultHeight:c=lb,children:h}){const[m,p]=D.useState(u),[_,y]=D.useState(c),x=D.useRef(u);D.useEffect(()=>{u!==x.current&&(x.current=u,p(u))},[u]);const b=D.useRef(null),N=D.useCallback(j=>{j.preventDefault();const B=j.clientY,S=_,M=F=>{const ae=B-F.clientY;y(Math.max(ib,S+ae))},z=()=>{b.current=null,document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",z),document.body.style.cursor="",document.body.style.userSelect=""};b.current={move:M,up:z},document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",M),document.addEventListener("mouseup",z)},[_]);return D.useEffect(()=>()=>{b.current&&(document.removeEventListener("mousemove",b.current.move),document.removeEventListener("mouseup",b.current.up),document.body.style.cursor="",document.body.style.userSelect="")},[]),g.jsxs("div",{className:Qn.panel,style:{height:m?"auto":_},children:[!m&&g.jsx("div",{className:Qn.resizeHandle,onMouseDown:N,role:"separator","aria-label":"Resize panel"}),g.jsxs("div",{className:Qn.header,children:[g.jsxs("div",{className:Qn.headerLeft,children:[g.jsxs("button",{className:Qn.collapseToggle,onClick:()=>p(j=>!j),"aria-label":"Toggle panel",children:[m?g.jsx(cl,{size:14}):g.jsx(Ma,{size:14}),g.jsx("span",{className:Qn.headerTitle,children:t}),o]}),a&&g.jsx("span",{className:Qn.status,children:a})]}),g.jsx("div",{className:Qn.headerActions,children:i&&g.jsx("button",{className:Qn.iconBtn,onClick:i,disabled:r,title:"Refresh","aria-label":`Refresh ${t}`,children:g.jsx(ud,{size:12,className:r?Qn.spinning:""})})})]}),!m&&g.jsx("div",{className:Qn.body,children:h})]})}const rb="_error_1di92_1",sb="_version_1di92_7",ob="_body_1di92_13",ub="_cardName_1di92_17",cb="_cardDesc_1di92_24",fb="_section_1di92_30",db="_sectionLabel_1di92_34",hb="_tags_1di92_43",mb="_tag_1di92_43",pb="_skillList_1di92_58",gb="_skillItem_1di92_64",yb="_skillName_1di92_73",_b="_skillDesc_1di92_80",vb="_skillTags_1di92_85",Lt={error:rb,version:sb,body:ob,cardName:ub,cardDesc:cb,section:fb,sectionLabel:db,tags:hb,tag:mb,skillList:pb,skillItem:gb,skillName:yb,skillDesc:_b,skillTags:vb};function xb({card:t,isLoading:a,error:i,onRefresh:r}){var o,u,c;return!t&&!i&&!a?null:g.jsxs(Io,{title:"A2A Agent Card",titleExtra:t!=null&&t.version?g.jsxs("span",{className:Lt.version,children:["v",t.version]}):void 0,onRefresh:r,isRefreshing:a,children:[i&&g.jsx("div",{className:Lt.error,children:i}),t&&g.jsxs("div",{className:Lt.body,children:[t.name&&g.jsx("div",{className:Lt.cardName,children:t.name}),t.description&&g.jsx("div",{className:Lt.cardDesc,children:t.description}),g.jsxs("div",{className:Lt.section,children:[g.jsx("div",{className:Lt.sectionLabel,children:"Capabilities"}),g.jsxs("div",{className:Lt.tags,children:[((o=t.capabilities)==null?void 0:o.streaming)&&g.jsx("span",{className:Lt.tag,children:"streaming"}),(u=t.defaultInputModes)==null?void 0:u.map(h=>g.jsxs("span",{className:Lt.tag,children:["input: ",h]},`in-${h}`)),(c=t.defaultOutputModes)==null?void 0:c.map(h=>g.jsxs("span",{className:Lt.tag,children:["output: ",h]},`out-${h}`))]})]}),t.skills&&t.skills.length>0&&g.jsxs("div",{className:Lt.section,children:[g.jsxs("div",{className:Lt.sectionLabel,children:["Skills (",t.skills.length,")"]}),g.jsx("div",{className:Lt.skillList,children:t.skills.map((h,m)=>g.jsxs("div",{className:Lt.skillItem,children:[g.jsx("span",{className:Lt.skillName,children:h.name??h.id??`Skill ${m+1}`}),h.description&&g.jsx("span",{className:Lt.skillDesc,children:h.description}),h.tags&&h.tags.length>0&&g.jsx("div",{className:Lt.skillTags,children:h.tags.map(p=>g.jsx("span",{className:Lt.tag,children:p},p))})]},h.id??m))})]})]})]})}const bb="_area_1u9gx_1",Sb="_row_1u9gx_8",kb="_textarea_1u9gx_16",Tb="_sendBtn_1u9gx_45",co={area:bb,row:Sb,textarea:kb,sendBtn:Tb};function Nb({isStreaming:t,isStarting:a,onSend:i}){const[r,o]=D.useState(""),u=D.useRef(null),c=D.useRef(!1),h=!t&&!!r.trim(),m=y=>{o(y.target.value);const x=y.target;x.style.height="auto",x.style.height=Math.min(x.scrollHeight,160)+"px"},p=()=>{if(!h)return;const y=r.trim();o(""),u.current&&(u.current.style.height="auto"),i(y)},_=y=>{y.key==="Enter"&&!y.shiftKey&&!c.current&&(y.preventDefault(),p())};return g.jsx("div",{className:co.area,children:g.jsxs("div",{className:co.row,children:[g.jsx("textarea",{className:co.textarea,ref:u,value:r,onChange:m,onKeyDown:_,onCompositionStart:()=>{c.current=!0},onCompositionEnd:()=>{c.current=!1},placeholder:a?"Agent is starting...":"Enter a test prompt...",disabled:a,rows:1,autoFocus:!0,"aria-label":"Chat input","data-testid":"chat-input"}),g.jsx("button",{className:co.sendBtn,onClick:p,disabled:!h,"aria-label":"Send message",children:g.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[g.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),g.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})})}const Eb="_toolbar_1v9hb_1",Cb="_agentSection_1v9hb_11",Ab="_agentPicker_1v9hb_18",wb="_clickable_1v9hb_30",jb="_agentLabel_1v9hb_44",Mb="_agentName_1v9hb_49",zb="_starting_1v9hb_53",Rb="_chevron_1v9hb_59",Ob="_dropdown_1v9hb_64",Db="_dropdownItem_1v9hb_77",Lb="_active_1v9hb_101",Bb="_hasError_1v9hb_105",Ub="_dropdownName_1v9hb_110",Hb="_statusBadge_1v9hb_115",Ib="_status_running_1v9hb_125",qb="_status_starting_1v9hb_130",Vb="_status_error_1v9hb_135",Gb="_status_idle_1v9hb_140",Zb="_dropdownMeta_1v9hb_145",$b="_rightSection_1v9hb_150",Yb="_errorText_1v9hb_157",Xb="_sessionBadge_1v9hb_162",Fb="_newSessionBtn_1v9hb_183",Qb="_confirmOverlay_1v9hb_201",Kb="_confirmModal_1v9hb_211",Jb="_confirmTitle_1v9hb_220",Pb="_confirmMessage_1v9hb_227",Wb="_confirmActions_1v9hb_234",eS="_confirmBtn_1v9hb_240",tS="_confirmBtnPrimary_1v9hb_255",nS="_dropdownSeparator_1v9hb_265",aS="_status_deployed_1v9hb_271",Ye={toolbar:Eb,agentSection:Cb,agentPicker:Ab,clickable:wb,agentLabel:jb,agentName:Mb,starting:zb,chevron:Rb,dropdown:Ob,dropdownItem:Db,active:Lb,hasError:Bb,dropdownName:Ub,statusBadge:Hb,status_running:Ib,status_starting:qb,status_error:Vb,status_idle:Gb,dropdownMeta:Zb,rightSection:$b,errorText:Yb,sessionBadge:Xb,newSessionBtn:Fb,confirmOverlay:Qb,confirmModal:Kb,confirmTitle:Jb,confirmMessage:Pb,confirmActions:Wb,confirmBtn:eS,confirmBtnPrimary:tS,dropdownSeparator:nS,status_deployed:aS};function lS(t,a,i,r,o){return o.has(t)?"error":t===a&&i?"starting":t===a&&r?"running":"idle"}const iS={running:"Running",starting:"Starting",error:"Error",idle:"Idle"};function rS({agents:t,harnesses:a,errors:i,selectedAgentName:r,selectedHarnessName:o,isStarting:u,isReady:c,startError:h,sessionId:m,onSelectAgent:p,onSelectHarness:_,onResetChat:y}){const[x,b]=D.useState(!1),[N,j]=D.useState(null),[B,S]=D.useState(null),[M,z]=D.useState(!1),F=D.useRef(null),ae=new Map(i.map(J=>[J.name,J.message]));D.useEffect(()=>{if(!x)return;const J=ne=>{F.current&&!F.current.contains(ne.target)&&b(!1)};return document.addEventListener("mousedown",J),()=>document.removeEventListener("mousedown",J)},[x]);const U=J=>{b(!1),(J!==r||o)&&(j(J),S(null))},ee=J=>{b(!1),J!==o&&(S(J),j(null))},he=N??B,ge=()=>{N?(p(N),j(null)):B&&(_(B),S(null))},R=()=>{j(null),S(null)},W=()=>{m&&navigator.clipboard.writeText(m).then(()=>{z(!0),setTimeout(()=>z(!1),1500)}).catch(()=>{})},$=o??r??(t.length===0&&a.length===0?"No agents":"Starting…"),de=t.length+a.length>1;return g.jsxs("div",{className:Ye.toolbar,children:[g.jsxs("div",{className:Ye.agentSection,ref:F,children:[g.jsxs("button",{className:`${Ye.agentPicker} ${de?Ye.clickable:""}`,onClick:de?()=>b(J=>!J):void 0,disabled:!de,title:de?"Switch agent":void 0,"data-testid":"agent-selector",children:[g.jsx("span",{className:Ye.agentLabel,children:"Chat with"}),g.jsx("span",{className:Ye.agentName,"data-testid":"agent-status",children:$}),u&&g.jsx("span",{className:Ye.starting,children:"starting…"}),de&&g.jsx(Ma,{size:14,className:Ye.chevron})]}),x&&g.jsxs("div",{className:Ye.dropdown,"data-testid":"agent-dropdown",children:[t.map(J=>{const ne=ae.get(J.name),L=J.name===r&&!o,K=lS(J.name,r,u,c,ae);return g.jsxs("button",{className:`${Ye.dropdownItem} ${L?Ye.active:""} ${ne?Ye.hasError:""}`,onClick:()=>U(J.name),disabled:!!ne||u,title:ne??void 0,"data-testid":`agent-option-${J.name}`,children:[g.jsx("span",{className:Ye.dropdownName,children:J.name}),g.jsx("span",{className:`${Ye.statusBadge} ${Ye[`status_${K}`]}`,children:iS[K]}),g.jsx("span",{className:Ye.dropdownMeta,children:J.buildType}),J.protocol&&g.jsx("span",{className:Ye.dropdownMeta,children:J.protocol})]},J.name)}),a.length>0&&t.length>0&&g.jsx("div",{className:Ye.dropdownSeparator}),a.map(J=>{const ne=J.name===o;return g.jsxs("button",{className:`${Ye.dropdownItem} ${ne?Ye.active:""}`,onClick:()=>ee(J.name),disabled:u,children:[g.jsx("span",{className:Ye.dropdownName,children:J.name}),g.jsx("span",{className:`${Ye.statusBadge} ${Ye.status_deployed}`,children:"Deployed"}),g.jsx("span",{className:Ye.dropdownMeta,children:"Harness"})]},`harness-${J.name}`)})]})]}),g.jsxs("div",{className:Ye.rightSection,children:[h&&g.jsx("span",{className:Ye.errorText,children:h}),m&&g.jsxs("button",{className:Ye.sessionBadge,onClick:W,title:`Session: ${m} (click to copy)`,children:["session: ",m.length>12?m.slice(0,12)+"…":m,M?g.jsx(e1,{size:10}):g.jsx(t1,{size:10})]}),m&&g.jsx("button",{className:Ye.newSessionBtn,onClick:y,title:"New session","aria-label":"Start new session",children:g.jsx(Hx,{size:12})})]}),he&&g.jsx("div",{className:Ye.confirmOverlay,onClick:R,children:g.jsxs("div",{className:Ye.confirmModal,onClick:J=>J.stopPropagation(),children:[g.jsx("div",{className:Ye.confirmTitle,children:"Switch agent?"}),g.jsxs("div",{className:Ye.confirmMessage,children:["Switching to ",g.jsx("strong",{children:he})," will clear your current conversation history."]}),g.jsxs("div",{className:Ye.confirmActions,children:[g.jsx("button",{className:Ye.confirmBtn,onClick:R,children:"Cancel"}),g.jsx("button",{className:`${Ye.confirmBtn} ${Ye.confirmBtnPrimary}`,onClick:ge,children:"Switch"})]})]})})]})}const sS="_field_lhobl_1",oS="_label_lhobl_8",uS="_description_lhobl_14",cS="_hint_lhobl_20",fS="_optional_lhobl_25",Ar={field:sS,label:oS,description:uS,hint:cS,optional:fS};function zl({label:t,description:a,hint:i,optional:r,children:o}){return g.jsxs("div",{className:Ar.field,children:[g.jsxs("label",{className:Ar.label,children:[t,r&&g.jsx("span",{className:Ar.optional,children:" - optional"})]}),a&&g.jsx("span",{className:Ar.description,children:a}),i&&g.jsx("span",{className:Ar.hint,children:i}),o]})}function dS(t){return t!=null&&t.openAiModelConfig?{provider:"openai",id:t.openAiModelConfig.modelId,credentialArn:t.openAiModelConfig.apiKeyArn??""}:t!=null&&t.geminiModelConfig?{provider:"gemini",id:t.geminiModelConfig.modelId,credentialArn:t.geminiModelConfig.apiKeyArn??""}:t!=null&&t.bedrockModelConfig?{provider:"bedrock",id:t.bedrockModelConfig.modelId,credentialArn:""}:{provider:"bedrock",id:"",credentialArn:""}}const hS="_fields_7g8cg_1",mS="_sectionLabel_7g8cg_8",pS="_modelRow_7g8cg_17",gS="_input_7g8cg_22",yS="_select_7g8cg_23",_S="_textarea_7g8cg_45",vS="_toolList_7g8cg_60",xS="_toolItem_7g8cg_66",bS="_toolName_7g8cg_75",SS="_emptyTools_7g8cg_79",Ht={fields:hS,sectionLabel:mS,modelRow:pS,input:gS,select:yS,textarea:_S,toolList:vS,toolItem:xS,toolName:bS,emptyTools:SS},kS=t=>t==="openai"||t==="gemini";function TS({overrides:t,onChange:a,tools:i=[]}){const{provider:r,id:o,credentialArn:u}=dS(t.model),c=_=>!t.allowedTools||t.allowedTools.includes(_),h=_=>{const y=t.allowedTools??i,x=c(_)?y.filter(b=>b!==_):[...y,_];a({...t,allowedTools:x.length===i.length?void 0:x})},m=(_,y,x)=>{const b={};_==="bedrock"?b.bedrockModelConfig={modelId:y}:_==="openai"?b.openAiModelConfig={modelId:y,apiKeyArn:x||void 0}:_==="gemini"&&(b.geminiModelConfig={modelId:y,apiKeyArn:x||void 0}),a({...t,model:b})},p=(t.skills??[]).join(", ");return g.jsx(Io,{title:"Harness Settings",defaultCollapsed:!0,children:g.jsxs("div",{className:Ht.fields,children:[g.jsxs(zl,{label:"Model Provider",children:[g.jsxs("div",{className:Ht.modelRow,children:[g.jsxs("select",{className:Ht.select,value:r,onChange:_=>m(_.target.value,"",""),children:[g.jsx("option",{value:"bedrock",children:"Bedrock"}),g.jsx("option",{value:"openai",children:"OpenAI"}),g.jsx("option",{value:"gemini",children:"Gemini"})]}),g.jsx("input",{className:Ht.input,placeholder:"Optional — leave empty to use harness default",value:o,onChange:_=>m(r,_.target.value,u)})]}),kS(r)&&g.jsx("input",{className:Ht.input,placeholder:"Credential Provider ARN (API key)",value:u,onChange:_=>m(r,o,_.target.value)})]}),g.jsx(zl,{label:"System Prompt",children:g.jsx("textarea",{className:Ht.textarea,placeholder:"You are a helpful assistant.",value:t.systemPrompt??"",onChange:_=>a({...t,systemPrompt:_.target.value||void 0}),rows:3})}),g.jsx(zl,{label:"Skills",description:"Comma-separated skill paths",children:g.jsx("input",{className:Ht.input,placeholder:"E.g. .agent/skills/my-skill.md",value:p,onChange:_=>{const y=_.target.value,x=y?y.split(",").map(b=>b.trim()).filter(Boolean):[];a({...t,skills:x.length>0?x:void 0})}})}),g.jsx("div",{className:Ht.sectionLabel,children:"Tools"}),i.length>0?g.jsx("div",{className:Ht.toolList,children:i.map(_=>g.jsxs("label",{className:Ht.toolItem,children:[g.jsx("input",{type:"checkbox",checked:c(_),onChange:()=>h(_)}),g.jsx("span",{className:Ht.toolName,children:_})]},_))}):g.jsxs("p",{className:Ht.emptyTools,children:["No tools configured. Use ",g.jsx("code",{children:"agentcore add tool"})," to add tools."," ",g.jsx("a",{href:"https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-tools.html",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})]}),g.jsx("div",{className:Ht.sectionLabel,children:"Memory"}),g.jsx(zl,{label:"Actor ID",description:"Override the actor ID used for memory retrieval in this session",children:g.jsx("input",{className:Ht.input,placeholder:"E.g. user-123",value:t.actorId??"",onChange:_=>a({...t,actorId:_.target.value||void 0})})}),g.jsx("div",{className:Ht.sectionLabel,children:"Invocation limits"}),g.jsx(zl,{label:"Max iterations",description:"Maximum number of iterations the harness can perform",children:g.jsx("input",{className:Ht.input,type:"number",placeholder:"Default: 75",value:t.maxIterations??"",onChange:_=>a({...t,maxIterations:_.target.value?Number(_.target.value):void 0})})}),g.jsx(zl,{label:"Timeout duration (seconds)",description:"Maximum time allowed for the harness to complete an invocation",hint:"Maximum: 86400 seconds",children:g.jsx("input",{className:Ht.input,type:"number",placeholder:"Default: 3600",value:t.timeoutSeconds??"",onChange:_=>a({...t,timeoutSeconds:_.target.value?Number(_.target.value):void 0})})}),g.jsx(zl,{label:"Max tokens",description:"Maximum number of output tokens per invocation",children:g.jsx("input",{className:Ht.input,type:"number",placeholder:"E.g. 16384",value:t.maxTokens??"",onChange:_=>a({...t,maxTokens:_.target.value?Number(_.target.value):void 0})})})]})})}const NS="_header_lggp3_1",ES="_title_lggp3_11",CS="_badge_lggp3_16",AS="_ready_lggp3_24",wS="_error_lggp3_29",jS="_rightGroup_lggp3_34",MS="_iconBtn_lggp3_41",zS="_iconBtnActive_lggp3_61",na={header:NS,title:ES,badge:CS,ready:AS,error:wS,rightGroup:jS,iconBtn:MS,iconBtnActive:zS};function RS({isConnected:t,hasConnected:a,hasError:i,onToggleResources:r,isResourcesOpen:o}){return g.jsxs("header",{className:na.header,children:[g.jsx("div",{className:na.title,children:"AgentCore agent inspector"}),g.jsx("div",{className:`${na.badge} ${i?na.error:t?na.ready:a?na.error:""}`,children:i?"Error":t?"Connected":a?"Disconnected":"Connecting"}),g.jsxs("div",{className:na.rightGroup,children:[g.jsx("a",{className:na.iconBtn,href:"https://github.com/aws/agentcore-cli/issues/new?template=bug_report.yml",target:"_blank",rel:"noopener noreferrer",title:"Report an issue","aria-label":"Report an issue",children:g.jsx(ix,{size:14})}),r&&g.jsx("button",{className:`${na.iconBtn} ${o?na.iconBtnActive:""}`,onClick:r,title:"Toggle resources","aria-label":"Toggle resource panel",children:g.jsx(wx,{size:14})})]})]})}const OS="_errorMessage_1up60_1",DS="_truncated_1up60_7",LS="_full_1up60_12",BS="_toggle_1up60_17",fo={errorMessage:OS,truncated:DS,full:LS,toggle:BS},Vg=300;function qf({content:t}){const[a,i]=D.useState(!1),r=t.length>Vg;return g.jsxs("div",{className:fo.errorMessage,children:[g.jsx("span",{className:a||!r?fo.full:fo.truncated,children:a||!r?t:t.slice(0,Vg)+"…"}),r&&g.jsx("button",{className:fo.toggle,onClick:()=>i(o=>!o),children:a?"Show less":"Show more"})]})}const US="_root_1x2ve_1",HS="_pill_1x2ve_5",IS="_cards_1x2ve_18",qS="_card_1x2ve_18",VS="_cardError_1x2ve_33",GS="_cardHeader_1x2ve_37",ZS="_toolIcon_1x2ve_43",$S="_errorIcon_1x2ve_48",YS="_toolName_1x2ve_53",XS="_preview_1x2ve_60",FS="_spinner_1x2ve_70",QS="_toggle_1x2ve_84",KS="_json_1x2ve_100",JS="_jsonError_1x2ve_115",Ft={root:US,pill:HS,cards:IS,card:qS,cardError:VS,cardHeader:GS,toolIcon:ZS,errorIcon:$S,toolName:YS,preview:XS,spinner:FS,toggle:QS,json:KS,jsonError:JS};function Gg(t){if(!t)return null;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function PS(t,a=60){if(!t)return null;try{const i=JSON.parse(t),r=Object.values(i)[0];if(typeof r=="string")return r.length>a?r.slice(0,a)+"...":r}catch{}return t.length>a?t.slice(0,a)+"...":t}function WS({tool:t}){const[a,i]=D.useState(!1),[r,o]=D.useState(!1),u=t.resultStatus==="error",c=t.serverName?`${t.serverName}/${t.toolName}`:t.toolName,h=PS(t.input),m=Gg(t.input),p=Gg(t.result);return g.jsxs("div",{className:`${Ft.card} ${u?Ft.cardError:""}`,children:[g.jsxs("div",{className:Ft.cardHeader,children:[u?g.jsx(dx,{size:12,className:Ft.errorIcon}):g.jsx(Ra,{size:12,className:Ft.toolIcon}),g.jsx("span",{className:Ft.toolName,children:c}),h&&g.jsx("span",{className:Ft.preview,children:h}),!t.result&&g.jsx(n1,{size:12,className:Ft.spinner})]}),m&&g.jsxs(g.Fragment,{children:[g.jsxs("button",{className:Ft.toggle,onClick:()=>i(_=>!_),children:[a?g.jsx(Ma,{size:12}):g.jsx(cl,{size:12}),"Input"]}),a&&g.jsx("pre",{className:Ft.json,children:m})]}),p&&g.jsxs(g.Fragment,{children:[g.jsxs("button",{className:Ft.toggle,onClick:()=>o(_=>!_),children:[r?g.jsx(Ma,{size:12}):g.jsx(cl,{size:12}),"Result"]}),r&&g.jsx("pre",{className:`${Ft.json} ${u?Ft.jsonError:""}`,children:p})]})]})}function ek({toolExecutions:t}){const a=Object.entries(t);return a.length===0?null:g.jsxs("div",{className:Ft.root,children:[g.jsxs("div",{className:Ft.pill,children:[g.jsx(Ra,{size:12}),a.length," tool",a.length===1?"":"s"," used"]}),g.jsx("div",{className:Ft.cards,children:a.map(([i,r])=>g.jsx(WS,{tool:r},i))})]})}function tk(t,a){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const nk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ak=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,lk={};function Zg(t,a){return(lk.jsx?ak:nk).test(t)}const ik=/[ \t\n\f\r]/g;function rk(t){return typeof t=="object"?t.type==="text"?$g(t.value):!1:$g(t)}function $g(t){return t.replace(ik,"")===""}class Zr{constructor(a,i,r){this.normal=i,this.property=a,r&&(this.space=r)}}Zr.prototype.normal={};Zr.prototype.property={};Zr.prototype.space=void 0;function l1(t,a){const i={},r={};for(const o of t)Object.assign(i,o.property),Object.assign(r,o.normal);return new Zr(i,r,a)}function Vf(t){return t.toLowerCase()}class hn{constructor(a,i){this.attribute=i,this.property=a}}hn.prototype.attribute="";hn.prototype.booleanish=!1;hn.prototype.boolean=!1;hn.prototype.commaOrSpaceSeparated=!1;hn.prototype.commaSeparated=!1;hn.prototype.defined=!1;hn.prototype.mustUseProperty=!1;hn.prototype.number=!1;hn.prototype.overloadedBoolean=!1;hn.prototype.property="";hn.prototype.spaceSeparated=!1;hn.prototype.space=void 0;let sk=0;const Le=Hl(),zt=Hl(),Gf=Hl(),re=Hl(),yt=Hl(),Ai=Hl(),Sn=Hl();function Hl(){return 2**++sk}const Zf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Le,booleanish:zt,commaOrSpaceSeparated:Sn,commaSeparated:Ai,number:re,overloadedBoolean:Gf,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),vf=Object.keys(Zf);class dd extends hn{constructor(a,i,r,o){let u=-1;if(super(a,i),Yg(this,"space",o),typeof r=="number")for(;++u<vf.length;){const c=vf[u];Yg(this,vf[u],(r&Zf[c])===Zf[c])}}}dd.prototype.defined=!0;function Yg(t,a,i){i&&(t[a]=i)}function zi(t){const a={},i={};for(const[r,o]of Object.entries(t.properties)){const u=new dd(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),a[r]=u,i[Vf(r)]=r,i[Vf(u.attribute)]=r}return new Zr(a,i,t.space)}const i1=zi({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:re,ariaColIndex:re,ariaColSpan:re,ariaControls:yt,ariaCurrent:null,ariaDescribedBy:yt,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:yt,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:yt,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:yt,ariaLevel:re,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:re,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:yt,ariaRowCount:re,ariaRowIndex:re,ariaRowSpan:re,ariaSelected:zt,ariaSetSize:re,ariaSort:null,ariaValueMax:re,ariaValueMin:re,ariaValueNow:re,ariaValueText:null,role:null},transform(t,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()}});function r1(t,a){return a in t?t[a]:a}function s1(t,a){return r1(t,a.toLowerCase())}const ok=zi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ai,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Le,allowPaymentRequest:Le,allowUserMedia:Le,alt:null,as:null,async:Le,autoCapitalize:null,autoComplete:yt,autoFocus:Le,autoPlay:Le,blocking:yt,capture:null,charSet:null,checked:Le,cite:null,className:yt,cols:re,colSpan:null,content:null,contentEditable:zt,controls:Le,controlsList:yt,coords:re|Ai,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Le,defer:Le,dir:null,dirName:null,disabled:Le,download:Gf,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Le,formTarget:null,headers:yt,height:re,hidden:Gf,high:re,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Le,inputMode:null,integrity:null,is:null,isMap:Le,itemId:null,itemProp:yt,itemRef:yt,itemScope:Le,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Le,low:re,manifest:null,max:null,maxLength:re,media:null,method:null,min:null,minLength:re,multiple:Le,muted:Le,name:null,nonce:null,noModule:Le,noValidate:Le,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:Le,optimum:re,pattern:null,ping:yt,placeholder:null,playsInline:Le,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Le,referrerPolicy:null,rel:yt,required:Le,reversed:Le,rows:re,rowSpan:re,sandbox:yt,scope:null,scoped:Le,seamless:Le,selected:Le,shadowRootClonable:Le,shadowRootDelegatesFocus:Le,shadowRootMode:null,shape:null,size:re,sizes:null,slot:null,span:re,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:re,step:null,style:null,tabIndex:re,target:null,title:null,translate:null,type:null,typeMustMatch:Le,useMap:null,value:zt,width:re,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:re,borderColor:null,bottomMargin:re,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Le,declare:Le,event:null,face:null,frame:null,frameBorder:null,hSpace:re,leftMargin:re,link:null,longDesc:null,lowSrc:null,marginHeight:re,marginWidth:re,noResize:Le,noHref:Le,noShade:Le,noWrap:Le,object:null,profile:null,prompt:null,rev:null,rightMargin:re,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:re,valueType:null,version:null,vAlign:null,vLink:null,vSpace:re,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Le,disableRemotePlayback:Le,prefix:null,property:null,results:re,security:null,unselectable:null},space:"html",transform:s1}),uk=zi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Sn,accentHeight:re,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:re,amplitude:re,arabicForm:null,ascent:re,attributeName:null,attributeType:null,azimuth:re,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:re,by:null,calcMode:null,capHeight:re,className:yt,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:re,diffuseConstant:re,direction:null,display:null,dur:null,divisor:re,dominantBaseline:null,download:Le,dx:null,dy:null,edgeMode:null,editable:null,elevation:re,enableBackground:null,end:null,event:null,exponent:re,externalResourcesRequired:null,fill:null,fillOpacity:re,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:Ai,g2:Ai,glyphName:Ai,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:re,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:re,horizOriginX:re,horizOriginY:re,id:null,ideographic:re,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:re,k:re,k1:re,k2:re,k3:re,k4:re,kernelMatrix:Sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:re,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:re,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:re,overlineThickness:re,paintOrder:null,panose1:null,path:null,pathLength:re,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:re,pointsAtY:re,pointsAtZ:re,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:re,specularExponent:re,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:re,strikethroughThickness:re,string:null,stroke:null,strokeDashArray:Sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:re,strokeOpacity:re,strokeWidth:null,style:null,surfaceScale:re,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sn,tabIndex:re,tableValues:null,target:null,targetX:re,targetY:re,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:re,underlineThickness:re,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:re,values:null,vAlphabetic:re,vMathematical:re,vectorEffect:null,vHanging:re,vIdeographic:re,version:null,vertAdvY:re,vertOriginX:re,vertOriginY:re,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:re,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:r1}),o1=zi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,a){return"xlink:"+a.slice(5).toLowerCase()}}),u1=zi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:s1}),c1=zi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,a){return"xml:"+a.slice(3).toLowerCase()}}),ck={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"},fk=/[A-Z]/g,Xg=/-[a-z]/g,dk=/^data[-\w.:]+$/i;function hk(t,a){const i=Vf(a);let r=a,o=hn;if(i in t.normal)return t.property[t.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&dk.test(a)){if(a.charAt(4)==="-"){const u=a.slice(5).replace(Xg,pk);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=a.slice(4);if(!Xg.test(u)){let c=u.replace(fk,mk);c.charAt(0)!=="-"&&(c="-"+c),a="data"+c}}o=dd}return new o(r,a)}function mk(t){return"-"+t.toLowerCase()}function pk(t){return t.charAt(1).toUpperCase()}const gk=l1([i1,ok,o1,u1,c1],"html"),hd=l1([i1,uk,o1,u1,c1],"svg");function yk(t){return t.join(" ").trim()}var Ti={},xf,Fg;function _k(){if(Fg)return xf;Fg=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,h=/^\s+|\s+$/g,m=`
|
|
240
|
+
`,p="/",_="*",y="",x="comment",b="declaration";function N(B,S){if(typeof B!="string")throw new TypeError("First argument must be a string");if(!B)return[];S=S||{};var M=1,z=1;function F(J){var ne=J.match(a);ne&&(M+=ne.length);var L=J.lastIndexOf(m);z=~L?J.length-L:z+J.length}function ae(){var J={line:M,column:z};return function(ne){return ne.position=new U(J),ge(),ne}}function U(J){this.start=J,this.end={line:M,column:z},this.source=S.source}U.prototype.content=B;function ee(J){var ne=new Error(S.source+":"+M+":"+z+": "+J);if(ne.reason=J,ne.filename=S.source,ne.line=M,ne.column=z,ne.source=B,!S.silent)throw ne}function he(J){var ne=J.exec(B);if(ne){var L=ne[0];return F(L),B=B.slice(L.length),ne}}function ge(){he(i)}function R(J){var ne;for(J=J||[];ne=W();)ne!==!1&&J.push(ne);return J}function W(){var J=ae();if(!(p!=B.charAt(0)||_!=B.charAt(1))){for(var ne=2;y!=B.charAt(ne)&&(_!=B.charAt(ne)||p!=B.charAt(ne+1));)++ne;if(ne+=2,y===B.charAt(ne-1))return ee("End of comment missing");var L=B.slice(2,ne-2);return z+=2,F(L),B=B.slice(ne),z+=2,J({type:x,comment:L})}}function $(){var J=ae(),ne=he(r);if(ne){if(W(),!he(o))return ee("property missing ':'");var L=he(u),K=J({type:b,property:j(ne[0].replace(t,y)),value:L?j(L[0].replace(t,y)):y});return he(c),K}}function de(){var J=[];R(J);for(var ne;ne=$();)ne!==!1&&(J.push(ne),R(J));return J}return ge(),de()}function j(B){return B?B.replace(h,y):y}return xf=N,xf}var Qg;function vk(){if(Qg)return Ti;Qg=1;var t=Ti&&Ti.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ti,"__esModule",{value:!0}),Ti.default=i;const a=t(_k());function i(r,o){let u=null;if(!r||typeof r!="string")return u;const c=(0,a.default)(r),h=typeof o=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:p,value:_}=m;h?o(p,_,m):_&&(u=u||{},u[p]=_)}),u}return Ti}var wr={},Kg;function xk(){if(Kg)return wr;Kg=1,Object.defineProperty(wr,"__esModule",{value:!0}),wr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(p){return!p||i.test(p)||t.test(p)},c=function(p,_){return _.toUpperCase()},h=function(p,_){return"".concat(_,"-")},m=function(p,_){return _===void 0&&(_={}),u(p)?p:(p=p.toLowerCase(),_.reactCompat?p=p.replace(o,h):p=p.replace(r,h),p.replace(a,c))};return wr.camelCase=m,wr}var jr,Jg;function bk(){if(Jg)return jr;Jg=1;var t=jr&&jr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},a=t(vk()),i=xk();function r(o,u){var c={};return!o||typeof o!="string"||(0,a.default)(o,function(h,m){h&&m&&(c[(0,i.camelCase)(h,u)]=m)}),c}return r.default=r,jr=r,jr}var Sk=bk();const kk=Ho(Sk),f1=d1("end"),md=d1("start");function d1(t){return a;function a(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 Tk(t){const a=md(t),i=f1(t);if(a&&i)return{start:a,end:i}}function Dr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Pg(t.position):"start"in t||"end"in t?Pg(t):"line"in t||"column"in t?$f(t):""}function $f(t){return Wg(t&&t.line)+":"+Wg(t&&t.column)}function Pg(t){return $f(t&&t.start)+"-"+$f(t&&t.end)}function Wg(t){return t&&typeof t=="number"?t:1}class Kt extends Error{constructor(a,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let o="",u={},c=!1;if(i&&("line"in i&&"column"in i?u={place:i}:"start"in i&&"end"in i?u={place:i}:"type"in i?u={ancestors:[i],place:i.position}:u={...i}),typeof a=="string"?o=a:!u.cause&&a&&(c=!0,o=a.message,u.cause=a),!u.ruleId&&!u.source&&typeof r=="string"){const m=r.indexOf(":");m===-1?u.ruleId=r:(u.source=r.slice(0,m),u.ruleId=r.slice(m+1))}if(!u.place&&u.ancestors&&u.ancestors){const m=u.ancestors[u.ancestors.length-1];m&&(u.place=m.position)}const h=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=h?h.line:void 0,this.name=Dr(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=c&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Kt.prototype.file="";Kt.prototype.name="";Kt.prototype.reason="";Kt.prototype.message="";Kt.prototype.stack="";Kt.prototype.column=void 0;Kt.prototype.line=void 0;Kt.prototype.ancestors=void 0;Kt.prototype.cause=void 0;Kt.prototype.fatal=void 0;Kt.prototype.place=void 0;Kt.prototype.ruleId=void 0;Kt.prototype.source=void 0;const pd={}.hasOwnProperty,Nk=new Map,Ek=/[A-Z]/g,Ck=new Set(["table","tbody","thead","tfoot","tr"]),Ak=new Set(["td","th"]),h1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wk(t,a){if(!a||a.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=a.filePath||void 0;let r;if(a.development){if(typeof a.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Bk(i,a.jsxDEV)}else{if(typeof a.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof a.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Lk(i,a.jsx,a.jsxs)}const o={Fragment:a.Fragment,ancestors:[],components:a.components||{},create:r,elementAttributeNameCase:a.elementAttributeNameCase||"react",evaluater:a.createEvaluater?a.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:a.ignoreInvalidStyle||!1,passKeys:a.passKeys!==!1,passNode:a.passNode||!1,schema:a.space==="svg"?hd:gk,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},u=m1(o,t,void 0);return u&&typeof u!="string"?u:o.create(t,o.Fragment,{children:u||void 0},void 0)}function m1(t,a,i){if(a.type==="element")return jk(t,a,i);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return Mk(t,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return Rk(t,a,i);if(a.type==="mdxjsEsm")return zk(t,a);if(a.type==="root")return Ok(t,a,i);if(a.type==="text")return Dk(t,a)}function jk(t,a,i){const r=t.schema;let o=r;a.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=hd,t.schema=o),t.ancestors.push(a);const u=g1(t,a.tagName,!1),c=Uk(t,a);let h=yd(t,a);return Ck.has(a.tagName)&&(h=h.filter(function(m){return typeof m=="string"?!rk(m):!0})),p1(t,c,u,a),gd(c,h),t.ancestors.pop(),t.schema=r,t.create(a,u,c,i)}function Mk(t,a){if(a.data&&a.data.estree&&t.evaluater){const r=a.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}Ur(t,a.position)}function zk(t,a){if(a.data&&a.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(a.data.estree);Ur(t,a.position)}function Rk(t,a,i){const r=t.schema;let o=r;a.name==="svg"&&r.space==="html"&&(o=hd,t.schema=o),t.ancestors.push(a);const u=a.name===null?t.Fragment:g1(t,a.name,!0),c=Hk(t,a),h=yd(t,a);return p1(t,c,u,a),gd(c,h),t.ancestors.pop(),t.schema=r,t.create(a,u,c,i)}function Ok(t,a,i){const r={};return gd(r,yd(t,a)),t.create(a,t.Fragment,r,i)}function Dk(t,a){return a.value}function p1(t,a,i,r){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(a.node=r)}function gd(t,a){if(a.length>0){const i=a.length>1?a:a[0];i&&(t.children=i)}}function Lk(t,a,i){return r;function r(o,u,c,h){const p=Array.isArray(c.children)?i:a;return h?p(u,c,h):p(u,c)}}function Bk(t,a){return i;function i(r,o,u,c){const h=Array.isArray(u.children),m=md(r);return a(o,u,c,h,{columnNumber:m?m.column-1:void 0,fileName:t,lineNumber:m?m.line:void 0},void 0)}}function Uk(t,a){const i={};let r,o;for(o in a.properties)if(o!=="children"&&pd.call(a.properties,o)){const u=Ik(t,o,a.properties[o]);if(u){const[c,h]=u;t.tableCellAlignToStyle&&c==="align"&&typeof h=="string"&&Ak.has(a.tagName)?r=h:i[c]=h}}if(r){const u=i.style||(i.style={});u[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function Hk(t,a){const i={};for(const r of a.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const u=r.data.estree.body[0];u.type;const c=u.expression;c.type;const h=c.properties[0];h.type,Object.assign(i,t.evaluater.evaluateExpression(h.argument))}else Ur(t,a.position);else{const o=r.name;let u;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,u=t.evaluater.evaluateExpression(h.expression)}else Ur(t,a.position);else u=r.value===null?!0:r.value;i[o]=u}return i}function yd(t,a){const i=[];let r=-1;const o=t.passKeys?new Map:Nk;for(;++r<a.children.length;){const u=a.children[r];let c;if(t.passKeys){const m=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(m){const p=o.get(m)||0;c=m+"-"+p,o.set(m,p+1)}}const h=m1(t,u,c);h!==void 0&&i.push(h)}return i}function Ik(t,a,i){const r=hk(t.schema,a);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?tk(i):yk(i)),r.property==="style"){let o=typeof i=="object"?i:qk(t,String(i));return t.stylePropertyNameCase==="css"&&(o=Vk(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&r.space?ck[r.property]||r.property:r.attribute,i]}}function qk(t,a){try{return kk(a,{reactCompat:!0})}catch(i){if(t.ignoreInvalidStyle)return{};const r=i,o=new Kt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=h1+"#cannot-parse-style-attribute",o}}function g1(t,a,i){let r;if(!i)r={type:"Literal",value:a};else if(a.includes(".")){const o=a.split(".");let u=-1,c;for(;++u<o.length;){const h=Zg(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};c=c?{type:"MemberExpression",object:c,property:h,computed:!!(u&&h.type==="Literal"),optional:!1}:h}r=c}else r=Zg(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(r.type==="Literal"){const o=r.value;return pd.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(r);Ur(t)}function Ur(t,a){const i=new Kt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:a,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=h1+"#cannot-handle-mdx-estrees-without-createevaluater",i}function Vk(t){const a={};let i;for(i in t)pd.call(t,i)&&(a[Gk(i)]=t[i]);return a}function Gk(t){let a=t.replace(Ek,Zk);return a.slice(0,3)==="ms-"&&(a="-"+a),a}function Zk(t){return"-"+t.toLowerCase()}const bf={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"]},$k={};function _d(t,a){const i=$k,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return y1(t,r,o)}function y1(t,a,i){if(Yk(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(a&&"alt"in t&&t.alt)return t.alt;if("children"in t)return ey(t.children,a,i)}return Array.isArray(t)?ey(t,a,i):""}function ey(t,a,i){const r=[];let o=-1;for(;++o<t.length;)r[o]=y1(t[o],a,i);return r.join("")}function Yk(t){return!!(t&&typeof t=="object")}const ty=document.createElement("i");function vd(t){const a="&"+t+";";ty.innerHTML=a;const i=ty.textContent;return i.charCodeAt(i.length-1)===59&&t!=="semi"||i===a?!1:i}function Tn(t,a,i,r){const o=t.length;let u=0,c;if(a<0?a=-a>o?0:o+a:a=a>o?o:a,i=i>0?i:0,r.length<1e4)c=Array.from(r),c.unshift(a,i),t.splice(...c);else for(i&&t.splice(a,i);u<r.length;)c=r.slice(u,u+1e4),c.unshift(a,0),t.splice(...c),u+=1e4,a+=1e4}function qn(t,a){return t.length>0?(Tn(t,t.length,0,a),t):a}const ny={}.hasOwnProperty;function _1(t){const a={};let i=-1;for(;++i<t.length;)Xk(a,t[i]);return a}function Xk(t,a){let i;for(i in a){const o=(ny.call(t,i)?t[i]:void 0)||(t[i]={}),u=a[i];let c;if(u)for(c in u){ny.call(o,c)||(o[c]=[]);const h=u[c];Fk(o[c],Array.isArray(h)?h:h?[h]:[])}}}function Fk(t,a){let i=-1;const r=[];for(;++i<a.length;)(a[i].add==="after"?t:r).push(a[i]);Tn(t,0,0,r)}function v1(t,a){const i=Number.parseInt(t,a);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 Kn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const tn=dl(/[A-Za-z]/),Qt=dl(/[\dA-Za-z]/),Qk=dl(/[#-'*+\--9=?A-Z^-~]/);function To(t){return t!==null&&(t<32||t===127)}const Yf=dl(/\d/),Kk=dl(/[\dA-Fa-f]/),Jk=dl(/[!-/:-@[-`{-~]/);function Ne(t){return t!==null&&t<-2}function pt(t){return t!==null&&(t<0||t===32)}function qe(t){return t===-2||t===-1||t===32}const qo=dl(new RegExp("\\p{P}|\\p{S}","u")),Ol=dl(/\s/);function dl(t){return a;function a(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function Ri(t){const a=[];let i=-1,r=0,o=0;for(;++i<t.length;){const u=t.charCodeAt(i);let c="";if(u===37&&Qt(t.charCodeAt(i+1))&&Qt(t.charCodeAt(i+2)))o=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(c=String.fromCharCode(u));else if(u>55295&&u<57344){const h=t.charCodeAt(i+1);u<56320&&h>56319&&h<57344?(c=String.fromCharCode(u,h),o=1):c="�"}else c=String.fromCharCode(u);c&&(a.push(t.slice(r,i),encodeURIComponent(c)),r=i+o+1,c=""),o&&(i+=o,o=0)}return a.join("")+t.slice(r)}function Je(t,a,i,r){const o=r?r-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(m){return qe(m)?(t.enter(i),h(m)):a(m)}function h(m){return qe(m)&&u++<o?(t.consume(m),h):(t.exit(i),a(m))}}const Pk={tokenize:Wk};function Wk(t){const a=t.attempt(this.parser.constructs.contentInitial,r,o);let i;return a;function r(h){if(h===null){t.consume(h);return}return t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),Je(t,a,"linePrefix")}function o(h){return t.enter("paragraph"),u(h)}function u(h){const m=t.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=m),i=m,c(h)}function c(h){if(h===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(h);return}return Ne(h)?(t.consume(h),t.exit("chunkText"),u):(t.consume(h),c)}}const e2={tokenize:t2},ay={tokenize:n2};function t2(t){const a=this,i=[];let r=0,o,u,c;return h;function h(z){if(r<i.length){const F=i[r];return a.containerState=F[1],t.attempt(F[0].continuation,m,p)(z)}return p(z)}function m(z){if(r++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,o&&M();const F=a.events.length;let ae=F,U;for(;ae--;)if(a.events[ae][0]==="exit"&&a.events[ae][1].type==="chunkFlow"){U=a.events[ae][1].end;break}S(r);let ee=F;for(;ee<a.events.length;)a.events[ee][1].end={...U},ee++;return Tn(a.events,ae+1,0,a.events.slice(F)),a.events.length=ee,p(z)}return h(z)}function p(z){if(r===i.length){if(!o)return x(z);if(o.currentConstruct&&o.currentConstruct.concrete)return N(z);a.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return a.containerState={},t.check(ay,_,y)(z)}function _(z){return o&&M(),S(r),x(z)}function y(z){return a.parser.lazy[a.now().line]=r!==i.length,c=a.now().offset,N(z)}function x(z){return a.containerState={},t.attempt(ay,b,N)(z)}function b(z){return r++,i.push([a.currentConstruct,a.containerState]),x(z)}function N(z){if(z===null){o&&M(),S(0),t.consume(z);return}return o=o||a.parser.flow(a.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),j(z)}function j(z){if(z===null){B(t.exit("chunkFlow"),!0),S(0),t.consume(z);return}return Ne(z)?(t.consume(z),B(t.exit("chunkFlow")),r=0,a.interrupt=void 0,h):(t.consume(z),j)}function B(z,F){const ae=a.sliceStream(z);if(F&&ae.push(null),z.previous=u,u&&(u.next=z),u=z,o.defineSkip(z.start),o.write(ae),a.parser.lazy[z.start.line]){let U=o.events.length;for(;U--;)if(o.events[U][1].start.offset<c&&(!o.events[U][1].end||o.events[U][1].end.offset>c))return;const ee=a.events.length;let he=ee,ge,R;for(;he--;)if(a.events[he][0]==="exit"&&a.events[he][1].type==="chunkFlow"){if(ge){R=a.events[he][1].end;break}ge=!0}for(S(r),U=ee;U<a.events.length;)a.events[U][1].end={...R},U++;Tn(a.events,he+1,0,a.events.slice(ee)),a.events.length=U}}function S(z){let F=i.length;for(;F-- >z;){const ae=i[F];a.containerState=ae[1],ae[0].exit.call(a,t)}i.length=z}function M(){o.write([null]),u=void 0,o=void 0,a.containerState._closeFlow=void 0}}function n2(t,a,i){return Je(t,t.attempt(this.parser.constructs.document,a,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wi(t){if(t===null||pt(t)||Ol(t))return 1;if(qo(t))return 2}function Vo(t,a,i){const r=[];let o=-1;for(;++o<t.length;){const u=t[o].resolveAll;u&&!r.includes(u)&&(a=u(a,i),r.push(u))}return a}const Xf={name:"attention",resolveAll:a2,tokenize:l2};function a2(t,a){let i=-1,r,o,u,c,h,m,p,_;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&&a.sliceSerialize(t[r][1]).charCodeAt(0)===a.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;m=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},x={...t[i][1].start};ly(y,-m),ly(x,m),c={type:m>1?"strongSequence":"emphasisSequence",start:y,end:{...t[r][1].end}},h={type:m>1?"strongSequence":"emphasisSequence",start:{...t[i][1].start},end:x},u={type:m>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[i][1].start}},o={type:m>1?"strong":"emphasis",start:{...c.start},end:{...h.end}},t[r][1].end={...c.start},t[i][1].start={...h.end},p=[],t[r][1].end.offset-t[r][1].start.offset&&(p=qn(p,[["enter",t[r][1],a],["exit",t[r][1],a]])),p=qn(p,[["enter",o,a],["enter",c,a],["exit",c,a],["enter",u,a]]),p=qn(p,Vo(a.parser.constructs.insideSpan.null,t.slice(r+1,i),a)),p=qn(p,[["exit",u,a],["enter",h,a],["exit",h,a],["exit",o,a]]),t[i][1].end.offset-t[i][1].start.offset?(_=2,p=qn(p,[["enter",t[i][1],a],["exit",t[i][1],a]])):_=0,Tn(t,r-1,i-r+3,p),i=r+p.length-_-2;break}}for(i=-1;++i<t.length;)t[i][1].type==="attentionSequence"&&(t[i][1].type="data");return t}function l2(t,a){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,o=wi(r);let u;return c;function c(m){return u=m,t.enter("attentionSequence"),h(m)}function h(m){if(m===u)return t.consume(m),h;const p=t.exit("attentionSequence"),_=wi(m),y=!_||_===2&&o||i.includes(m),x=!o||o===2&&_||i.includes(r);return p._open=!!(u===42?y:y&&(o||!x)),p._close=!!(u===42?x:x&&(_||!y)),a(m)}}function ly(t,a){t.column+=a,t.offset+=a,t._bufferIndex+=a}const i2={name:"autolink",tokenize:r2};function r2(t,a,i){let r=0;return o;function o(b){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(b),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),u}function u(b){return tn(b)?(t.consume(b),c):b===64?i(b):p(b)}function c(b){return b===43||b===45||b===46||Qt(b)?(r=1,h(b)):p(b)}function h(b){return b===58?(t.consume(b),r=0,m):(b===43||b===45||b===46||Qt(b))&&r++<32?(t.consume(b),h):(r=0,p(b))}function m(b){return b===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(b),t.exit("autolinkMarker"),t.exit("autolink"),a):b===null||b===32||b===60||To(b)?i(b):(t.consume(b),m)}function p(b){return b===64?(t.consume(b),_):Qk(b)?(t.consume(b),p):i(b)}function _(b){return Qt(b)?y(b):i(b)}function y(b){return b===46?(t.consume(b),r=0,_):b===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(b),t.exit("autolinkMarker"),t.exit("autolink"),a):x(b)}function x(b){if((b===45||Qt(b))&&r++<63){const N=b===45?x:y;return t.consume(b),N}return i(b)}}const $r={partial:!0,tokenize:s2};function s2(t,a,i){return r;function r(u){return qe(u)?Je(t,o,"linePrefix")(u):o(u)}function o(u){return u===null||Ne(u)?a(u):i(u)}}const x1={continuation:{tokenize:u2},exit:c2,name:"blockQuote",tokenize:o2};function o2(t,a,i){const r=this;return o;function o(c){if(c===62){const h=r.containerState;return h.open||(t.enter("blockQuote",{_container:!0}),h.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),u}return i(c)}function u(c){return qe(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),a):(t.exit("blockQuotePrefix"),a(c))}}function u2(t,a,i){const r=this;return o;function o(c){return qe(c)?Je(t,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return t.attempt(x1,a,i)(c)}}function c2(t){t.exit("blockQuote")}const b1={name:"characterEscape",tokenize:f2};function f2(t,a,i){return r;function r(u){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(u),t.exit("escapeMarker"),o}function o(u){return Jk(u)?(t.enter("characterEscapeValue"),t.consume(u),t.exit("characterEscapeValue"),t.exit("characterEscape"),a):i(u)}}const S1={name:"characterReference",tokenize:d2};function d2(t,a,i){const r=this;let o=0,u,c;return h;function h(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),m}function m(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),p):(t.enter("characterReferenceValue"),u=31,c=Qt,_(y))}function p(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),u=6,c=Kk,_):(t.enter("characterReferenceValue"),u=7,c=Yf,_(y))}function _(y){if(y===59&&o){const x=t.exit("characterReferenceValue");return c===Qt&&!vd(r.sliceSerialize(x))?i(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),a)}return c(y)&&o++<u?(t.consume(y),_):i(y)}}const iy={partial:!0,tokenize:m2},ry={concrete:!0,name:"codeFenced",tokenize:h2};function h2(t,a,i){const r=this,o={partial:!0,tokenize:ae};let u=0,c=0,h;return m;function m(U){return p(U)}function p(U){const ee=r.events[r.events.length-1];return u=ee&&ee[1].type==="linePrefix"?ee[2].sliceSerialize(ee[1],!0).length:0,h=U,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),_(U)}function _(U){return U===h?(c++,t.consume(U),_):c<3?i(U):(t.exit("codeFencedFenceSequence"),qe(U)?Je(t,y,"whitespace")(U):y(U))}function y(U){return U===null||Ne(U)?(t.exit("codeFencedFence"),r.interrupt?a(U):t.check(iy,j,F)(U)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),x(U))}function x(U){return U===null||Ne(U)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(U)):qe(U)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Je(t,b,"whitespace")(U)):U===96&&U===h?i(U):(t.consume(U),x)}function b(U){return U===null||Ne(U)?y(U):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),N(U))}function N(U){return U===null||Ne(U)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(U)):U===96&&U===h?i(U):(t.consume(U),N)}function j(U){return t.attempt(o,F,B)(U)}function B(U){return t.enter("lineEnding"),t.consume(U),t.exit("lineEnding"),S}function S(U){return u>0&&qe(U)?Je(t,M,"linePrefix",u+1)(U):M(U)}function M(U){return U===null||Ne(U)?t.check(iy,j,F)(U):(t.enter("codeFlowValue"),z(U))}function z(U){return U===null||Ne(U)?(t.exit("codeFlowValue"),M(U)):(t.consume(U),z)}function F(U){return t.exit("codeFenced"),a(U)}function ae(U,ee,he){let ge=0;return R;function R(ne){return U.enter("lineEnding"),U.consume(ne),U.exit("lineEnding"),W}function W(ne){return U.enter("codeFencedFence"),qe(ne)?Je(U,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):$(ne)}function $(ne){return ne===h?(U.enter("codeFencedFenceSequence"),de(ne)):he(ne)}function de(ne){return ne===h?(ge++,U.consume(ne),de):ge>=c?(U.exit("codeFencedFenceSequence"),qe(ne)?Je(U,J,"whitespace")(ne):J(ne)):he(ne)}function J(ne){return ne===null||Ne(ne)?(U.exit("codeFencedFence"),ee(ne)):he(ne)}}}function m2(t,a,i){const r=this;return o;function o(c){return c===null?i(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u)}function u(c){return r.parser.lazy[r.now().line]?i(c):a(c)}}const Sf={name:"codeIndented",tokenize:g2},p2={partial:!0,tokenize:y2};function g2(t,a,i){const r=this;return o;function o(p){return t.enter("codeIndented"),Je(t,u,"linePrefix",5)(p)}function u(p){const _=r.events[r.events.length-1];return _&&_[1].type==="linePrefix"&&_[2].sliceSerialize(_[1],!0).length>=4?c(p):i(p)}function c(p){return p===null?m(p):Ne(p)?t.attempt(p2,c,m)(p):(t.enter("codeFlowValue"),h(p))}function h(p){return p===null||Ne(p)?(t.exit("codeFlowValue"),c(p)):(t.consume(p),h)}function m(p){return t.exit("codeIndented"),a(p)}}function y2(t,a,i){const r=this;return o;function o(c){return r.parser.lazy[r.now().line]?i(c):Ne(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):Je(t,u,"linePrefix",5)(c)}function u(c){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(c):Ne(c)?o(c):i(c)}}const _2={name:"codeText",previous:x2,resolve:v2,tokenize:b2};function v2(t){let a=t.length-4,i=3,r,o;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[a][1].type==="lineEnding"||t[a][1].type==="space")){for(r=i;++r<a;)if(t[r][1].type==="codeTextData"){t[i][1].type="codeTextPadding",t[a][1].type="codeTextPadding",i+=2,a-=2;break}}for(r=i-1,a++;++r<=a;)o===void 0?r!==a&&t[r][1].type!=="lineEnding"&&(o=r):(r===a||t[r][1].type==="lineEnding")&&(t[o][1].type="codeTextData",r!==o+2&&(t[o][1].end=t[r-1][1].end,t.splice(o+2,r-o-2),a-=r-o-2,r=o+2),o=void 0);return t}function x2(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function b2(t,a,i){let r=0,o,u;return c;function c(y){return t.enter("codeText"),t.enter("codeTextSequence"),h(y)}function h(y){return y===96?(t.consume(y),r++,h):(t.exit("codeTextSequence"),m(y))}function m(y){return y===null?i(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),m):y===96?(u=t.enter("codeTextSequence"),o=0,_(y)):Ne(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),m):(t.enter("codeTextData"),p(y))}function p(y){return y===null||y===32||y===96||Ne(y)?(t.exit("codeTextData"),m(y)):(t.consume(y),p)}function _(y){return y===96?(t.consume(y),o++,_):o===r?(t.exit("codeTextSequence"),t.exit("codeText"),a(y)):(u.type="codeTextData",p(y))}}class S2{constructor(a){this.left=a?[...a]:[],this.right=[]}get(a){if(a<0||a>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+a+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return a<this.left.length?this.left[a]:this.right[this.right.length-a+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(a,i){const r=i??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(a,r):a>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-a+this.left.length).reverse():this.left.slice(a).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(a,i,r){const o=i||0;this.setCursor(Math.trunc(a));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Mr(this.left,r),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(a){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(a)}pushMany(a){this.setCursor(Number.POSITIVE_INFINITY),Mr(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),Mr(this.right,a.reverse())}setCursor(a){if(!(a===this.left.length||a>this.left.length&&this.right.length===0||a<0&&this.left.length===0))if(a<this.left.length){const i=this.left.splice(a,Number.POSITIVE_INFINITY);Mr(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-a,Number.POSITIVE_INFINITY);Mr(this.left,i.reverse())}}}function Mr(t,a){let i=0;if(a.length<1e4)t.push(...a);else for(;i<a.length;)t.push(...a.slice(i,i+1e4)),i+=1e4}function k1(t){const a={};let i=-1,r,o,u,c,h,m,p;const _=new S2(t);for(;++i<_.length;){for(;i in a;)i=a[i];if(r=_.get(i),i&&r[1].type==="chunkFlow"&&_.get(i-1)[1].type==="listItemPrefix"&&(m=r[1]._tokenizer.events,u=0,u<m.length&&m[u][1].type==="lineEndingBlank"&&(u+=2),u<m.length&&m[u][1].type==="content"))for(;++u<m.length&&m[u][1].type!=="content";)m[u][1].type==="chunkText"&&(m[u][1]._isInFirstContentOfListItem=!0,u++);if(r[0]==="enter")r[1].contentType&&(Object.assign(a,k2(_,i)),i=a[i],p=!0);else if(r[1]._container){for(u=i,o=void 0;u--;)if(c=_.get(u),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(_.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=u);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(r[1].end={..._.get(o)[1].start},h=_.slice(o,i),h.unshift(r),_.splice(o,i-o+1,h))}}return Tn(t,0,Number.POSITIVE_INFINITY,_.slice(0)),!p}function k2(t,a){const i=t.get(a)[1],r=t.get(a)[2];let o=a-1;const u=[];let c=i._tokenizer;c||(c=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const h=c.events,m=[],p={};let _,y,x=-1,b=i,N=0,j=0;const B=[j];for(;b;){for(;t.get(++o)[1]!==b;);u.push(o),b._tokenizer||(_=r.sliceStream(b),b.next||_.push(null),y&&c.defineSkip(b.start),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(_),b._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),y=b,b=b.next}for(b=i;++x<h.length;)h[x][0]==="exit"&&h[x-1][0]==="enter"&&h[x][1].type===h[x-1][1].type&&h[x][1].start.line!==h[x][1].end.line&&(j=x+1,B.push(j),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):B.pop(),x=B.length;x--;){const S=h.slice(B[x],B[x+1]),M=u.pop();m.push([M,M+S.length-1]),t.splice(M,2,S)}for(m.reverse(),x=-1;++x<m.length;)p[N+m[x][0]]=N+m[x][1],N+=m[x][1]-m[x][0]-1;return p}const T2={resolve:E2,tokenize:C2},N2={partial:!0,tokenize:A2};function E2(t){return k1(t),t}function C2(t,a){let i;return r;function r(h){return t.enter("content"),i=t.enter("chunkContent",{contentType:"content"}),o(h)}function o(h){return h===null?u(h):Ne(h)?t.check(N2,c,u)(h):(t.consume(h),o)}function u(h){return t.exit("chunkContent"),t.exit("content"),a(h)}function c(h){return t.consume(h),t.exit("chunkContent"),i.next=t.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,o}}function A2(t,a,i){const r=this;return o;function o(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Je(t,u,"linePrefix")}function u(c){if(c===null||Ne(c))return i(c);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?a(c):t.interrupt(r.parser.constructs.flow,i,a)(c)}}function T1(t,a,i,r,o,u,c,h,m){const p=m||Number.POSITIVE_INFINITY;let _=0;return y;function y(S){return S===60?(t.enter(r),t.enter(o),t.enter(u),t.consume(S),t.exit(u),x):S===null||S===32||S===41||To(S)?i(S):(t.enter(r),t.enter(c),t.enter(h),t.enter("chunkString",{contentType:"string"}),j(S))}function x(S){return S===62?(t.enter(u),t.consume(S),t.exit(u),t.exit(o),t.exit(r),a):(t.enter(h),t.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===62?(t.exit("chunkString"),t.exit(h),x(S)):S===null||S===60||Ne(S)?i(S):(t.consume(S),S===92?N:b)}function N(S){return S===60||S===62||S===92?(t.consume(S),b):b(S)}function j(S){return!_&&(S===null||S===41||pt(S))?(t.exit("chunkString"),t.exit(h),t.exit(c),t.exit(r),a(S)):_<p&&S===40?(t.consume(S),_++,j):S===41?(t.consume(S),_--,j):S===null||S===32||S===40||To(S)?i(S):(t.consume(S),S===92?B:j)}function B(S){return S===40||S===41||S===92?(t.consume(S),j):j(S)}}function N1(t,a,i,r,o,u){const c=this;let h=0,m;return p;function p(b){return t.enter(r),t.enter(o),t.consume(b),t.exit(o),t.enter(u),_}function _(b){return h>999||b===null||b===91||b===93&&!m||b===94&&!h&&"_hiddenFootnoteSupport"in c.parser.constructs?i(b):b===93?(t.exit(u),t.enter(o),t.consume(b),t.exit(o),t.exit(r),a):Ne(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),_):(t.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===null||b===91||b===93||Ne(b)||h++>999?(t.exit("chunkString"),_(b)):(t.consume(b),m||(m=!qe(b)),b===92?x:y)}function x(b){return b===91||b===92||b===93?(t.consume(b),h++,y):y(b)}}function E1(t,a,i,r,o,u){let c;return h;function h(x){return x===34||x===39||x===40?(t.enter(r),t.enter(o),t.consume(x),t.exit(o),c=x===40?41:x,m):i(x)}function m(x){return x===c?(t.enter(o),t.consume(x),t.exit(o),t.exit(r),a):(t.enter(u),p(x))}function p(x){return x===c?(t.exit(u),m(c)):x===null?i(x):Ne(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),Je(t,p,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),_(x))}function _(x){return x===c||x===null||Ne(x)?(t.exit("chunkString"),p(x)):(t.consume(x),x===92?y:_)}function y(x){return x===c||x===92?(t.consume(x),_):_(x)}}function Lr(t,a){let i;return r;function r(o){return Ne(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i=!0,r):qe(o)?Je(t,r,i?"linePrefix":"lineSuffix")(o):a(o)}}const w2={name:"definition",tokenize:M2},j2={partial:!0,tokenize:z2};function M2(t,a,i){const r=this;let o;return u;function u(b){return t.enter("definition"),c(b)}function c(b){return N1.call(r,t,h,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function h(b){return o=Kn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(t.enter("definitionMarker"),t.consume(b),t.exit("definitionMarker"),m):i(b)}function m(b){return pt(b)?Lr(t,p)(b):p(b)}function p(b){return T1(t,_,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function _(b){return t.attempt(j2,y,y)(b)}function y(b){return qe(b)?Je(t,x,"whitespace")(b):x(b)}function x(b){return b===null||Ne(b)?(t.exit("definition"),r.parser.defined.push(o),a(b)):i(b)}}function z2(t,a,i){return r;function r(h){return pt(h)?Lr(t,o)(h):i(h)}function o(h){return E1(t,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function u(h){return qe(h)?Je(t,c,"whitespace")(h):c(h)}function c(h){return h===null||Ne(h)?a(h):i(h)}}const R2={name:"hardBreakEscape",tokenize:O2};function O2(t,a,i){return r;function r(u){return t.enter("hardBreakEscape"),t.consume(u),o}function o(u){return Ne(u)?(t.exit("hardBreakEscape"),a(u)):i(u)}}const D2={name:"headingAtx",resolve:L2,tokenize:B2};function L2(t,a){let i=t.length-2,r=3,o,u;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&&(o={type:"atxHeadingText",start:t[r][1].start,end:t[i][1].end},u={type:"chunkText",start:t[r][1].start,end:t[i][1].end,contentType:"text"},Tn(t,r,i-r+1,[["enter",o,a],["enter",u,a],["exit",u,a],["exit",o,a]])),t}function B2(t,a,i){let r=0;return o;function o(_){return t.enter("atxHeading"),u(_)}function u(_){return t.enter("atxHeadingSequence"),c(_)}function c(_){return _===35&&r++<6?(t.consume(_),c):_===null||pt(_)?(t.exit("atxHeadingSequence"),h(_)):i(_)}function h(_){return _===35?(t.enter("atxHeadingSequence"),m(_)):_===null||Ne(_)?(t.exit("atxHeading"),a(_)):qe(_)?Je(t,h,"whitespace")(_):(t.enter("atxHeadingText"),p(_))}function m(_){return _===35?(t.consume(_),m):(t.exit("atxHeadingSequence"),h(_))}function p(_){return _===null||_===35||pt(_)?(t.exit("atxHeadingText"),h(_)):(t.consume(_),p)}}const U2=["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"],sy=["pre","script","style","textarea"],H2={concrete:!0,name:"htmlFlow",resolveTo:V2,tokenize:G2},I2={partial:!0,tokenize:$2},q2={partial:!0,tokenize:Z2};function V2(t){let a=t.length;for(;a--&&!(t[a][0]==="enter"&&t[a][1].type==="htmlFlow"););return a>1&&t[a-2][1].type==="linePrefix"&&(t[a][1].start=t[a-2][1].start,t[a+1][1].start=t[a-2][1].start,t.splice(a-2,2)),t}function G2(t,a,i){const r=this;let o,u,c,h,m;return p;function p(T){return _(T)}function _(T){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(T),y}function y(T){return T===33?(t.consume(T),x):T===47?(t.consume(T),u=!0,j):T===63?(t.consume(T),o=3,r.interrupt?a:E):tn(T)?(t.consume(T),c=String.fromCharCode(T),B):i(T)}function x(T){return T===45?(t.consume(T),o=2,b):T===91?(t.consume(T),o=5,h=0,N):tn(T)?(t.consume(T),o=4,r.interrupt?a:E):i(T)}function b(T){return T===45?(t.consume(T),r.interrupt?a:E):i(T)}function N(T){const te="CDATA[";return T===te.charCodeAt(h++)?(t.consume(T),h===te.length?r.interrupt?a:$:N):i(T)}function j(T){return tn(T)?(t.consume(T),c=String.fromCharCode(T),B):i(T)}function B(T){if(T===null||T===47||T===62||pt(T)){const te=T===47,fe=c.toLowerCase();return!te&&!u&&sy.includes(fe)?(o=1,r.interrupt?a(T):$(T)):U2.includes(c.toLowerCase())?(o=6,te?(t.consume(T),S):r.interrupt?a(T):$(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(T):u?M(T):z(T))}return T===45||Qt(T)?(t.consume(T),c+=String.fromCharCode(T),B):i(T)}function S(T){return T===62?(t.consume(T),r.interrupt?a:$):i(T)}function M(T){return qe(T)?(t.consume(T),M):R(T)}function z(T){return T===47?(t.consume(T),R):T===58||T===95||tn(T)?(t.consume(T),F):qe(T)?(t.consume(T),z):R(T)}function F(T){return T===45||T===46||T===58||T===95||Qt(T)?(t.consume(T),F):ae(T)}function ae(T){return T===61?(t.consume(T),U):qe(T)?(t.consume(T),ae):z(T)}function U(T){return T===null||T===60||T===61||T===62||T===96?i(T):T===34||T===39?(t.consume(T),m=T,ee):qe(T)?(t.consume(T),U):he(T)}function ee(T){return T===m?(t.consume(T),m=null,ge):T===null||Ne(T)?i(T):(t.consume(T),ee)}function he(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||pt(T)?ae(T):(t.consume(T),he)}function ge(T){return T===47||T===62||qe(T)?z(T):i(T)}function R(T){return T===62?(t.consume(T),W):i(T)}function W(T){return T===null||Ne(T)?$(T):qe(T)?(t.consume(T),W):i(T)}function $(T){return T===45&&o===2?(t.consume(T),L):T===60&&o===1?(t.consume(T),K):T===62&&o===4?(t.consume(T),A):T===63&&o===3?(t.consume(T),E):T===93&&o===5?(t.consume(T),ke):Ne(T)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(I2,G,de)(T)):T===null||Ne(T)?(t.exit("htmlFlowData"),de(T)):(t.consume(T),$)}function de(T){return t.check(q2,J,G)(T)}function J(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),ne}function ne(T){return T===null||Ne(T)?de(T):(t.enter("htmlFlowData"),$(T))}function L(T){return T===45?(t.consume(T),E):$(T)}function K(T){return T===47?(t.consume(T),c="",se):$(T)}function se(T){if(T===62){const te=c.toLowerCase();return sy.includes(te)?(t.consume(T),A):$(T)}return tn(T)&&c.length<8?(t.consume(T),c+=String.fromCharCode(T),se):$(T)}function ke(T){return T===93?(t.consume(T),E):$(T)}function E(T){return T===62?(t.consume(T),A):T===45&&o===2?(t.consume(T),E):$(T)}function A(T){return T===null||Ne(T)?(t.exit("htmlFlowData"),G(T)):(t.consume(T),A)}function G(T){return t.exit("htmlFlow"),a(T)}}function Z2(t,a,i){const r=this;return o;function o(c){return Ne(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u):i(c)}function u(c){return r.parser.lazy[r.now().line]?i(c):a(c)}}function $2(t,a,i){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt($r,a,i)}}const Y2={name:"htmlText",tokenize:X2};function X2(t,a,i){const r=this;let o,u,c;return h;function h(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),m}function m(E){return E===33?(t.consume(E),p):E===47?(t.consume(E),ae):E===63?(t.consume(E),z):tn(E)?(t.consume(E),he):i(E)}function p(E){return E===45?(t.consume(E),_):E===91?(t.consume(E),u=0,N):tn(E)?(t.consume(E),M):i(E)}function _(E){return E===45?(t.consume(E),b):i(E)}function y(E){return E===null?i(E):E===45?(t.consume(E),x):Ne(E)?(c=y,K(E)):(t.consume(E),y)}function x(E){return E===45?(t.consume(E),b):y(E)}function b(E){return E===62?L(E):E===45?x(E):y(E)}function N(E){const A="CDATA[";return E===A.charCodeAt(u++)?(t.consume(E),u===A.length?j:N):i(E)}function j(E){return E===null?i(E):E===93?(t.consume(E),B):Ne(E)?(c=j,K(E)):(t.consume(E),j)}function B(E){return E===93?(t.consume(E),S):j(E)}function S(E){return E===62?L(E):E===93?(t.consume(E),S):j(E)}function M(E){return E===null||E===62?L(E):Ne(E)?(c=M,K(E)):(t.consume(E),M)}function z(E){return E===null?i(E):E===63?(t.consume(E),F):Ne(E)?(c=z,K(E)):(t.consume(E),z)}function F(E){return E===62?L(E):z(E)}function ae(E){return tn(E)?(t.consume(E),U):i(E)}function U(E){return E===45||Qt(E)?(t.consume(E),U):ee(E)}function ee(E){return Ne(E)?(c=ee,K(E)):qe(E)?(t.consume(E),ee):L(E)}function he(E){return E===45||Qt(E)?(t.consume(E),he):E===47||E===62||pt(E)?ge(E):i(E)}function ge(E){return E===47?(t.consume(E),L):E===58||E===95||tn(E)?(t.consume(E),R):Ne(E)?(c=ge,K(E)):qe(E)?(t.consume(E),ge):L(E)}function R(E){return E===45||E===46||E===58||E===95||Qt(E)?(t.consume(E),R):W(E)}function W(E){return E===61?(t.consume(E),$):Ne(E)?(c=W,K(E)):qe(E)?(t.consume(E),W):ge(E)}function $(E){return E===null||E===60||E===61||E===62||E===96?i(E):E===34||E===39?(t.consume(E),o=E,de):Ne(E)?(c=$,K(E)):qe(E)?(t.consume(E),$):(t.consume(E),J)}function de(E){return E===o?(t.consume(E),o=void 0,ne):E===null?i(E):Ne(E)?(c=de,K(E)):(t.consume(E),de)}function J(E){return E===null||E===34||E===39||E===60||E===61||E===96?i(E):E===47||E===62||pt(E)?ge(E):(t.consume(E),J)}function ne(E){return E===47||E===62||pt(E)?ge(E):i(E)}function L(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),a):i(E)}function K(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),se}function se(E){return qe(E)?Je(t,ke,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):ke(E)}function ke(E){return t.enter("htmlTextData"),c(E)}}const xd={name:"labelEnd",resolveAll:J2,resolveTo:P2,tokenize:W2},F2={tokenize:eT},Q2={tokenize:tT},K2={tokenize:nT};function J2(t){let a=-1;const i=[];for(;++a<t.length;){const r=t[a][1];if(i.push(t[a]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",a+=o}}return t.length!==i.length&&Tn(t,0,t.length,i),t}function P2(t,a){let i=t.length,r=0,o,u,c,h;for(;i--;)if(o=t[i][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[i][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(t[i][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=i,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(c=i);const m={type:t[u][1].type==="labelLink"?"link":"image",start:{...t[u][1].start},end:{...t[t.length-1][1].end}},p={type:"label",start:{...t[u][1].start},end:{...t[c][1].end}},_={type:"labelText",start:{...t[u+r+2][1].end},end:{...t[c-2][1].start}};return h=[["enter",m,a],["enter",p,a]],h=qn(h,t.slice(u+1,u+r+3)),h=qn(h,[["enter",_,a]]),h=qn(h,Vo(a.parser.constructs.insideSpan.null,t.slice(u+r+4,c-3),a)),h=qn(h,[["exit",_,a],t[c-2],t[c-1],["exit",p,a]]),h=qn(h,t.slice(c+1)),h=qn(h,[["exit",m,a]]),Tn(t,u,t.length,h),t}function W2(t,a,i){const r=this;let o=r.events.length,u,c;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){u=r.events[o][1];break}return h;function h(x){return u?u._inactive?y(x):(c=r.parser.defined.includes(Kn(r.sliceSerialize({start:u.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(x),t.exit("labelMarker"),t.exit("labelEnd"),m):i(x)}function m(x){return x===40?t.attempt(F2,_,c?_:y)(x):x===91?t.attempt(Q2,_,c?p:y)(x):c?_(x):y(x)}function p(x){return t.attempt(K2,_,y)(x)}function _(x){return a(x)}function y(x){return u._balanced=!0,i(x)}}function eT(t,a,i){return r;function r(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),o}function o(y){return pt(y)?Lr(t,u)(y):u(y)}function u(y){return y===41?_(y):T1(t,c,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return pt(y)?Lr(t,m)(y):_(y)}function h(y){return i(y)}function m(y){return y===34||y===39||y===40?E1(t,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):_(y)}function p(y){return pt(y)?Lr(t,_)(y):_(y)}function _(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),a):i(y)}}function tT(t,a,i){const r=this;return o;function o(h){return N1.call(r,t,u,c,"reference","referenceMarker","referenceString")(h)}function u(h){return r.parser.defined.includes(Kn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?a(h):i(h)}function c(h){return i(h)}}function nT(t,a,i){return r;function r(u){return t.enter("reference"),t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),o}function o(u){return u===93?(t.enter("referenceMarker"),t.consume(u),t.exit("referenceMarker"),t.exit("reference"),a):i(u)}}const aT={name:"labelStartImage",resolveAll:xd.resolveAll,tokenize:lT};function lT(t,a,i){const r=this;return o;function o(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),u}function u(h){return h===91?(t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelImage"),c):i(h)}function c(h){return h===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(h):a(h)}}const iT={name:"labelStartLink",resolveAll:xd.resolveAll,tokenize:rT};function rT(t,a,i){const r=this;return o;function o(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),u}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(c):a(c)}}const kf={name:"lineEnding",tokenize:sT};function sT(t,a){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Je(t,a,"linePrefix")}}const xo={name:"thematicBreak",tokenize:oT};function oT(t,a,i){let r=0,o;return u;function u(p){return t.enter("thematicBreak"),c(p)}function c(p){return o=p,h(p)}function h(p){return p===o?(t.enter("thematicBreakSequence"),m(p)):r>=3&&(p===null||Ne(p))?(t.exit("thematicBreak"),a(p)):i(p)}function m(p){return p===o?(t.consume(p),r++,m):(t.exit("thematicBreakSequence"),qe(p)?Je(t,h,"whitespace")(p):h(p))}}const dn={continuation:{tokenize:dT},exit:mT,name:"list",tokenize:fT},uT={partial:!0,tokenize:pT},cT={partial:!0,tokenize:hT};function fT(t,a,i){const r=this,o=r.events[r.events.length-1];let u=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return h;function h(b){const N=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:Yf(b)){if(r.containerState.type||(r.containerState.type=N,t.enter(N,{_container:!0})),N==="listUnordered")return t.enter("listItemPrefix"),b===42||b===45?t.check(xo,i,p)(b):p(b);if(!r.interrupt||b===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),m(b)}return i(b)}function m(b){return Yf(b)&&++c<10?(t.consume(b),m):(!r.interrupt||c<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(t.exit("listItemValue"),p(b)):i(b)}function p(b){return t.enter("listItemMarker"),t.consume(b),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,t.check($r,r.interrupt?i:_,t.attempt(uT,x,y))}function _(b){return r.containerState.initialBlankLine=!0,u++,x(b)}function y(b){return qe(b)?(t.enter("listItemPrefixWhitespace"),t.consume(b),t.exit("listItemPrefixWhitespace"),x):i(b)}function x(b){return r.containerState.size=u+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,a(b)}}function dT(t,a,i){const r=this;return r.containerState._closeFlow=void 0,t.check($r,o,u);function o(h){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(t,a,"listItemIndent",r.containerState.size+1)(h)}function u(h){return r.containerState.furtherBlankLines||!qe(h)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(h)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(cT,a,c)(h))}function c(h){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(t,t.attempt(dn,a,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function hT(t,a,i){const r=this;return Je(t,o,"listItemIndent",r.containerState.size+1);function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===r.containerState.size?a(u):i(u)}}function mT(t){t.exit(this.containerState.type)}function pT(t,a,i){const r=this;return Je(t,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(u){const c=r.events[r.events.length-1];return!qe(u)&&c&&c[1].type==="listItemPrefixWhitespace"?a(u):i(u)}}const oy={name:"setextUnderline",resolveTo:gT,tokenize:yT};function gT(t,a){let i=t.length,r,o,u;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){r=i;break}t[i][1].type==="paragraph"&&(o=i)}else t[i][1].type==="content"&&t.splice(i,1),!u&&t[i][1].type==="definition"&&(u=i);const c={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",u?(t.splice(o,0,["enter",c,a]),t.splice(u+1,0,["exit",t[r][1],a]),t[r][1].end={...t[u][1].end}):t[r][1]=c,t.push(["exit",c,a]),t}function yT(t,a,i){const r=this;let o;return u;function u(p){let _=r.events.length,y;for(;_--;)if(r.events[_][1].type!=="lineEnding"&&r.events[_][1].type!=="linePrefix"&&r.events[_][1].type!=="content"){y=r.events[_][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||y)?(t.enter("setextHeadingLine"),o=p,c(p)):i(p)}function c(p){return t.enter("setextHeadingLineSequence"),h(p)}function h(p){return p===o?(t.consume(p),h):(t.exit("setextHeadingLineSequence"),qe(p)?Je(t,m,"lineSuffix")(p):m(p))}function m(p){return p===null||Ne(p)?(t.exit("setextHeadingLine"),a(p)):i(p)}}const _T={tokenize:vT};function vT(t){const a=this,i=t.attempt($r,r,t.attempt(this.parser.constructs.flowInitial,o,Je(t,t.attempt(this.parser.constructs.flow,o,t.attempt(T2,o)),"linePrefix")));return i;function r(u){if(u===null){t.consume(u);return}return t.enter("lineEndingBlank"),t.consume(u),t.exit("lineEndingBlank"),a.currentConstruct=void 0,i}function o(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),a.currentConstruct=void 0,i}}const xT={resolveAll:A1()},bT=C1("string"),ST=C1("text");function C1(t){return{resolveAll:A1(t==="text"?kT:void 0),tokenize:a};function a(i){const r=this,o=this.parser.constructs[t],u=i.attempt(o,c,h);return c;function c(_){return p(_)?u(_):h(_)}function h(_){if(_===null){i.consume(_);return}return i.enter("data"),i.consume(_),m}function m(_){return p(_)?(i.exit("data"),u(_)):(i.consume(_),m)}function p(_){if(_===null)return!0;const y=o[_];let x=-1;if(y)for(;++x<y.length;){const b=y[x];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function A1(t){return a;function a(i,r){let o=-1,u;for(;++o<=i.length;)u===void 0?i[o]&&i[o][1].type==="data"&&(u=o,o++):(!i[o]||i[o][1].type!=="data")&&(o!==u+2&&(i[u][1].end=i[o-1][1].end,i.splice(u+2,o-u-2),o=u+2),u=void 0);return t?t(i,r):i}}function kT(t,a){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],o=a.sliceStream(r);let u=o.length,c=-1,h=0,m;for(;u--;){const p=o[u];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)h++,c--;if(c)break;c=-1}else if(p===-2)m=!0,h++;else if(p!==-1){u++;break}}if(a._contentTypeTextTrailing&&i===t.length&&(h=0),h){const p={type:i===t.length||m||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:r.start._bufferIndex+c,_index:r.start._index+u,line:r.end.line,column:r.end.column-h,offset:r.end.offset-h},end:{...r.end}};r.end={...p.start},r.start.offset===r.end.offset?Object.assign(r,p):(t.splice(i,0,["enter",p,a],["exit",p,a]),i+=2)}i++}return t}const TT={42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:x1},NT={91:w2},ET={[-2]:Sf,[-1]:Sf,32:Sf},CT={35:D2,42:xo,45:[oy,xo],60:H2,61:oy,95:xo,96:ry,126:ry},AT={38:S1,92:b1},wT={[-5]:kf,[-4]:kf,[-3]:kf,33:aT,38:S1,42:Xf,60:[i2,Y2],91:iT,92:[R2,b1],93:xd,95:Xf,96:_2},jT={null:[Xf,xT]},MT={null:[42,95]},zT={null:[]},RT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:MT,contentInitial:NT,disable:zT,document:TT,flow:CT,flowInitial:ET,insideSpan:jT,string:AT,text:wT},Symbol.toStringTag,{value:"Module"}));function OT(t,a,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const o={},u=[];let c=[],h=[];const m={attempt:ee(ae),check:ee(U),consume:M,enter:z,exit:F,interrupt:ee(U,{interrupt:!0})},p={code:null,containerState:{},defineSkip:j,events:[],now:N,parser:t,previous:null,sliceSerialize:x,sliceStream:b,write:y};let _=a.tokenize.call(p,m);return a.resolveAll&&u.push(a),p;function y(W){return c=qn(c,W),B(),c[c.length-1]!==null?[]:(he(a,0),p.events=Vo(u,p.events,p),p.events)}function x(W,$){return LT(b(W),$)}function b(W){return DT(c,W)}function N(){const{_bufferIndex:W,_index:$,line:de,column:J,offset:ne}=r;return{_bufferIndex:W,_index:$,line:de,column:J,offset:ne}}function j(W){o[W.line]=W.column,R()}function B(){let W;for(;r._index<c.length;){const $=c[r._index];if(typeof $=="string")for(W=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===W&&r._bufferIndex<$.length;)S($.charCodeAt(r._bufferIndex));else S($)}}function S(W){_=_(W)}function M(W){Ne(W)?(r.line++,r.column=1,r.offset+=W===-3?2:1,R()):W!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),p.previous=W}function z(W,$){const de=$||{};return de.type=W,de.start=N(),p.events.push(["enter",de,p]),h.push(de),de}function F(W){const $=h.pop();return $.end=N(),p.events.push(["exit",$,p]),$}function ae(W,$){he(W,$.from)}function U(W,$){$.restore()}function ee(W,$){return de;function de(J,ne,L){let K,se,ke,E;return Array.isArray(J)?G(J):"tokenize"in J?G([J]):A(J);function A(Y){return xe;function xe(Fe){const Ge=Fe!==null&&Y[Fe],Ct=Fe!==null&&Y.null,Jt=[...Array.isArray(Ge)?Ge:Ge?[Ge]:[],...Array.isArray(Ct)?Ct:Ct?[Ct]:[]];return G(Jt)(Fe)}}function G(Y){return K=Y,se=0,Y.length===0?L:T(Y[se])}function T(Y){return xe;function xe(Fe){return E=ge(),ke=Y,Y.partial||(p.currentConstruct=Y),Y.name&&p.parser.constructs.disable.null.includes(Y.name)?fe():Y.tokenize.call($?Object.assign(Object.create(p),$):p,m,te,fe)(Fe)}}function te(Y){return W(ke,E),ne}function fe(Y){return E.restore(),++se<K.length?T(K[se]):L}}}function he(W,$){W.resolveAll&&!u.includes(W)&&u.push(W),W.resolve&&Tn(p.events,$,p.events.length-$,W.resolve(p.events.slice($),p)),W.resolveTo&&(p.events=W.resolveTo(p.events,p))}function ge(){const W=N(),$=p.previous,de=p.currentConstruct,J=p.events.length,ne=Array.from(h);return{from:J,restore:L};function L(){r=W,p.previous=$,p.currentConstruct=de,p.events.length=J,h=ne,R()}}function R(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function DT(t,a){const i=a.start._index,r=a.start._bufferIndex,o=a.end._index,u=a.end._bufferIndex;let c;if(i===o)c=[t[i].slice(r,u)];else{if(c=t.slice(i,o),r>-1){const h=c[0];typeof h=="string"?c[0]=h.slice(r):c.shift()}u>0&&c.push(t[o].slice(0,u))}return c}function LT(t,a){let i=-1;const r=[];let o;for(;++i<t.length;){const u=t[i];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
241
241
|
`;break}case-3:{c=`\r
|
|
242
|
-
`;break}case-2:{c=a?" ":" ";break}case-1:{if(!a&&o)continue;c=" ";break}default:c=String.fromCharCode(u)}o=u===-2,r.push(c)}return r.join("")}function BT(t){const r={constructs:_1([RT,...(t||{}).extensions||[]]),content:o(Pk),defined:[],document:o(e2),flow:o(_T),lazy:{},string:o(bT),text:o(ST)};return r;function o(u){return c;function c(h){return OT(r,u,h)}}}function UT(t){for(;!k1(t););return t}const uy=/[\0\t\n\r]/g;function HT(){let t=1,a="",i=!0,r;return o;function o(u,c,h){const m=[];let p,y,_,x,b;for(u=a+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),_=0,a="",i&&(u.charCodeAt(0)===65279&&_++,i=void 0);_<u.length;){if(uy.lastIndex=_,p=uy.exec(u),x=p&&p.index!==void 0?p.index:u.length,b=u.charCodeAt(x),!p){a=u.slice(_);break}if(b===10&&_===x&&r)m.push(-3),r=void 0;else switch(r&&(m.push(-5),r=void 0),_<x&&(m.push(u.slice(_,x)),t+=x-_),b){case 0:{m.push(65533),t++;break}case 9:{for(y=Math.ceil(t/4)*4,m.push(-2);t++<y;)m.push(-1);break}case 10:{m.push(-4),t=1;break}default:r=!0,t=1}_=x+1}return h&&(r&&m.push(-5),a&&m.push(a),m.push(null)),m}}const IT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qT(t){return t.replace(IT,VT)}function VT(t,a,i){if(a)return a;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),u=o===120||o===88;return v1(i.slice(u?2:1),u?16:10)}return vd(i)||t}const w1={}.hasOwnProperty;function GT(t,a,i){return a&&typeof a=="object"&&(i=a,a=void 0),ZT(i)(UT(BT(i).document().write(HT()(t,a,!0))))}function ZT(t){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Fe),autolinkProtocol:pe,autolinkEmail:pe,atxHeading:u(gt),blockQuote:u(Ct),characterEscape:pe,characterReference:pe,codeFenced:u(Jt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Jt,c),codeText:u(Gn,c),codeTextData:pe,data:pe,codeFlowValue:pe,definition:u(oa),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(fe),hardBreakEscape:u(xt),hardBreakTrailing:u(xt),htmlFlow:u(Cn,c),htmlFlowData:pe,htmlText:u(Cn,c),htmlTextData:pe,image:u(hl),label:c,link:u(Fe),listItem:u(Zn),listItemValue:x,listOrdered:u(qt,_),listUnordered:u(qt),paragraph:u(Jo),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(gt),strong:u(Po),thematicBreak:u(Wo)},exit:{atxHeading:m(),atxHeadingSequence:ne,autolink:m(),autolinkEmail:Ke,autolinkProtocol:We,blockQuote:m(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:$,characterReferenceMarkerNumeric:$,characterReferenceValue:ue,characterReference:Ee,codeFenced:m(B),codeFencedFence:j,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:R,codeIndented:m(S),codeText:m(ae),codeTextData:R,data:R,definition:m(),definitionDestinationString:F,definitionLabelString:M,definitionTitleString:z,emphasis:m(),hardBreakEscape:m(G),hardBreakTrailing:m(G),htmlFlow:m(ge),htmlFlowData:R,htmlText:m(K),htmlTextData:R,image:m(J),label:be,labelText:se,lineEnding:W,link:m(D),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:ee,resourceDestinationString:E,resourceTitleString:A,resource:Z,setextHeading:m(de),setextHeadingLineSequence:te,setextHeadingText:U,strong:m(),thematicBreak:m()}};j1(a,(t||{}).mdastExtensions||[]);const i={};return r;function r(X){let ce={type:"root",children:[]};const Ce={stack:[ce],tokenStack:[],config:a,enter:h,exit:p,buffer:c,resume:y,data:i},Ue=[];let it=-1;for(;++it<X.length;)if(X[it][1].type==="listOrdered"||X[it][1].type==="listUnordered")if(X[it][0]==="enter")Ue.push(it);else{const mn=Ue.pop();it=o(X,mn,it)}for(it=-1;++it<X.length;){const mn=a[X[it][0]];w1.call(mn,X[it][1].type)&&mn[X[it][1].type].call(Object.assign({sliceSerialize:X[it][2].sliceSerialize},Ce),X[it][1])}if(Ce.tokenStack.length>0){const mn=Ce.tokenStack[Ce.tokenStack.length-1];(mn[1]||cy).call(Ce,void 0,mn[0])}for(ce.position={start:rl(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:rl(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},it=-1;++it<a.transforms.length;)ce=a.transforms[it](ce)||ce;return ce}function o(X,ce,Ce){let Ue=ce-1,it=-1,mn=!1,ua,Wt,Ot,an;for(;++Ue<=Ce;){const ht=X[Ue];switch(ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ht[0]==="enter"?it++:it--,an=void 0;break}case"lineEndingBlank":{ht[0]==="enter"&&(ua&&!an&&!it&&!Ot&&(Ot=Ue),an=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:an=void 0}if(!it&&ht[0]==="enter"&&ht[1].type==="listItemPrefix"||it===-1&&ht[0]==="exit"&&(ht[1].type==="listUnordered"||ht[1].type==="listOrdered")){if(ua){let Da=Ue;for(Wt=void 0;Da--;){const $n=X[Da];if($n[1].type==="lineEnding"||$n[1].type==="lineEndingBlank"){if($n[0]==="exit")continue;Wt&&(X[Wt][1].type="lineEndingBlank",mn=!0),$n[1].type="lineEnding",Wt=Da}else if(!($n[1].type==="linePrefix"||$n[1].type==="blockQuotePrefix"||$n[1].type==="blockQuotePrefixWhitespace"||$n[1].type==="blockQuoteMarker"||$n[1].type==="listItemIndent"))break}Ot&&(!Wt||Ot<Wt)&&(ua._spread=!0),ua.end=Object.assign({},Wt?X[Wt][1].start:ht[1].end),X.splice(Wt||Ue,0,["exit",ua,ht[2]]),Ue++,Ce++}if(ht[1].type==="listItemPrefix"){const Da={type:"listItem",_spread:!1,start:Object.assign({},ht[1].start),end:void 0};ua=Da,X.splice(Ue,0,["enter",Da,ht[2]]),Ue++,Ce++,Ot=void 0,an=!0}}}return X[ce][1]._spread=mn,Ce}function u(X,ce){return Ce;function Ce(Ue){h.call(this,X(Ue),Ue),ce&&ce.call(this,Ue)}}function c(){this.stack.push({type:"fragment",children:[]})}function h(X,ce,Ce){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([ce,Ce||void 0]),X.position={start:rl(ce.start),end:void 0}}function m(X){return ce;function ce(Ce){X&&X.call(this,Ce),p.call(this,Ce)}}function p(X,ce){const Ce=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==X.type&&(ce?ce.call(this,X,Ue[0]):(Ue[1]||cy).call(this,X,Ue[0]));else throw new Error("Cannot close `"+X.type+"` ("+Dr({start:X.start,end:X.end})+"): it’s not open");Ce.position.end=rl(X.end)}function y(){return _d(this.stack.pop())}function _(){this.data.expectingFirstListItemValue=!0}function x(X){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function b(){const X=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=X}function N(){const X=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=X}function j(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function B(){const X=this.resume(),ce=this.stack[this.stack.length-1];ce.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const X=this.resume(),ce=this.stack[this.stack.length-1];ce.value=X.replace(/(\r?\n|\r)$/g,"")}function M(X){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ce,Ce.identifier=Kn(this.sliceSerialize(X)).toLowerCase()}function z(){const X=this.resume(),ce=this.stack[this.stack.length-1];ce.title=X}function F(){const X=this.resume(),ce=this.stack[this.stack.length-1];ce.url=X}function ne(X){const ce=this.stack[this.stack.length-1];if(!ce.depth){const Ce=this.sliceSerialize(X).length;ce.depth=Ce}}function U(){this.data.setextHeadingSlurpLineEnding=!0}function te(X){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function de(){this.data.setextHeadingSlurpLineEnding=void 0}function pe(X){const Ce=this.stack[this.stack.length-1].children;let Ue=Ce[Ce.length-1];(!Ue||Ue.type!=="text")&&(Ue=Pt(),Ue.position={start:rl(X.start),end:void 0},Ce.push(Ue)),this.stack.push(Ue)}function R(X){const ce=this.stack.pop();ce.value+=this.sliceSerialize(X),ce.position.end=rl(X.end)}function W(X){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ce.children[ce.children.length-1];Ce.position.end=rl(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(ce.type)&&(pe.call(this,X),R.call(this,X))}function G(){this.data.atHardBreak=!0}function ge(){const X=this.resume(),ce=this.stack[this.stack.length-1];ce.value=X}function K(){const X=this.resume(),ce=this.stack[this.stack.length-1];ce.value=X}function ae(){const X=this.resume(),ce=this.stack[this.stack.length-1];ce.value=X}function D(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ce,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function J(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ce,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function se(X){const ce=this.sliceSerialize(X),Ce=this.stack[this.stack.length-2];Ce.label=qT(ce),Ce.identifier=Kn(ce).toLowerCase()}function be(){const X=this.stack[this.stack.length-1],ce=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ue=X.children;Ce.children=Ue}else Ce.alt=ce}function E(){const X=this.resume(),ce=this.stack[this.stack.length-1];ce.url=X}function A(){const X=this.resume(),ce=this.stack[this.stack.length-1];ce.title=X}function Z(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ee(X){const ce=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ce,Ce.identifier=Kn(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function $(X){this.data.characterReferenceType=X.type}function ue(X){const ce=this.sliceSerialize(X),Ce=this.data.characterReferenceType;let Ue;Ce?(Ue=v1(ce,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=vd(ce);const it=this.stack[this.stack.length-1];it.value+=Ue}function Ee(X){const ce=this.stack.pop();ce.position.end=rl(X.end)}function We(X){R.call(this,X);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(X)}function Ke(X){R.call(this,X);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(X)}function Ct(){return{type:"blockquote",children:[]}}function Jt(){return{type:"code",lang:null,meta:null,value:""}}function Gn(){return{type:"inlineCode",value:""}}function oa(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function fe(){return{type:"emphasis",children:[]}}function gt(){return{type:"heading",depth:0,children:[]}}function xt(){return{type:"break"}}function Cn(){return{type:"html",value:""}}function hl(){return{type:"image",title:null,url:"",alt:null}}function Fe(){return{type:"link",title:null,url:"",children:[]}}function qt(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function Zn(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function Jo(){return{type:"paragraph",children:[]}}function Po(){return{type:"strong",children:[]}}function Pt(){return{type:"text",value:""}}function Wo(){return{type:"thematicBreak"}}}function rl(t){return{line:t.line,column:t.column,offset:t.offset}}function j1(t,a){let i=-1;for(;++i<a.length;){const r=a[i];Array.isArray(r)?j1(t,r):$T(t,r)}}function $T(t,a){let i;for(i in a)if(w1.call(a,i))switch(i){case"canContainEols":{const r=a[i];r&&t[i].push(...r);break}case"transforms":{const r=a[i];r&&t[i].push(...r);break}case"enter":case"exit":{const r=a[i];r&&Object.assign(t[i],r);break}}}function cy(t,a){throw t?new Error("Cannot close `"+t.type+"` ("+Dr({start:t.start,end:t.end})+"): a different token (`"+a.type+"`, "+Dr({start:a.start,end:a.end})+") is open"):new Error("Cannot close document, a token (`"+a.type+"`, "+Dr({start:a.start,end:a.end})+") is still open")}function YT(t){const a=this;a.parser=i;function i(r){return GT(r,{...a.data("settings"),...t,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}function XT(t,a){const i={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(a),!0)};return t.patch(a,i),t.applyData(a,i)}function FT(t,a){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(a,i),[t.applyData(a,i),{type:"text",value:`
|
|
242
|
+
`;break}case-2:{c=a?" ":" ";break}case-1:{if(!a&&o)continue;c=" ";break}default:c=String.fromCharCode(u)}o=u===-2,r.push(c)}return r.join("")}function BT(t){const r={constructs:_1([RT,...(t||{}).extensions||[]]),content:o(Pk),defined:[],document:o(e2),flow:o(_T),lazy:{},string:o(bT),text:o(ST)};return r;function o(u){return c;function c(h){return OT(r,u,h)}}}function UT(t){for(;!k1(t););return t}const uy=/[\0\t\n\r]/g;function HT(){let t=1,a="",i=!0,r;return o;function o(u,c,h){const m=[];let p,_,y,x,b;for(u=a+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),y=0,a="",i&&(u.charCodeAt(0)===65279&&y++,i=void 0);y<u.length;){if(uy.lastIndex=y,p=uy.exec(u),x=p&&p.index!==void 0?p.index:u.length,b=u.charCodeAt(x),!p){a=u.slice(y);break}if(b===10&&y===x&&r)m.push(-3),r=void 0;else switch(r&&(m.push(-5),r=void 0),y<x&&(m.push(u.slice(y,x)),t+=x-y),b){case 0:{m.push(65533),t++;break}case 9:{for(_=Math.ceil(t/4)*4,m.push(-2);t++<_;)m.push(-1);break}case 10:{m.push(-4),t=1;break}default:r=!0,t=1}y=x+1}return h&&(r&&m.push(-5),a&&m.push(a),m.push(null)),m}}const IT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function qT(t){return t.replace(IT,VT)}function VT(t,a,i){if(a)return a;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),u=o===120||o===88;return v1(i.slice(u?2:1),u?16:10)}return vd(i)||t}const w1={}.hasOwnProperty;function GT(t,a,i){return a&&typeof a=="object"&&(i=a,a=void 0),ZT(i)(UT(BT(i).document().write(HT()(t,a,!0))))}function ZT(t){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Ke),autolinkProtocol:ge,autolinkEmail:ge,atxHeading:u(gt),blockQuote:u(Ct),characterEscape:ge,characterReference:ge,codeFenced:u(Jt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Jt,c),codeText:u(Gn,c),codeTextData:ge,data:ge,codeFlowValue:ge,definition:u(oa),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(ce),hardBreakEscape:u(xt),hardBreakTrailing:u(xt),htmlFlow:u(Cn,c),htmlFlowData:ge,htmlText:u(Cn,c),htmlTextData:ge,image:u(hl),label:c,link:u(Ke),listItem:u(Zn),listItemValue:x,listOrdered:u(qt,y),listUnordered:u(qt),paragraph:u(Jo),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(gt),strong:u(Po),thematicBreak:u(Wo)},exit:{atxHeading:m(),atxHeadingSequence:ae,autolink:m(),autolinkEmail:Ge,autolinkProtocol:Fe,blockQuote:m(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:Y,characterReference:xe,codeFenced:m(B),codeFencedFence:j,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:R,codeIndented:m(S),codeText:m(ne),codeTextData:R,data:R,definition:m(),definitionDestinationString:F,definitionLabelString:M,definitionTitleString:z,emphasis:m(),hardBreakEscape:m($),hardBreakTrailing:m($),htmlFlow:m(de),htmlFlowData:R,htmlText:m(J),htmlTextData:R,image:m(K),label:ke,labelText:se,lineEnding:W,link:m(L),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:te,resourceDestinationString:E,resourceTitleString:A,resource:G,setextHeading:m(he),setextHeadingLineSequence:ee,setextHeadingText:U,strong:m(),thematicBreak:m()}};j1(a,(t||{}).mdastExtensions||[]);const i={};return r;function r(X){let ue={type:"root",children:[]};const Ce={stack:[ue],tokenStack:[],config:a,enter:h,exit:p,buffer:c,resume:_,data:i},Ue=[];let it=-1;for(;++it<X.length;)if(X[it][1].type==="listOrdered"||X[it][1].type==="listUnordered")if(X[it][0]==="enter")Ue.push(it);else{const mn=Ue.pop();it=o(X,mn,it)}for(it=-1;++it<X.length;){const mn=a[X[it][0]];w1.call(mn,X[it][1].type)&&mn[X[it][1].type].call(Object.assign({sliceSerialize:X[it][2].sliceSerialize},Ce),X[it][1])}if(Ce.tokenStack.length>0){const mn=Ce.tokenStack[Ce.tokenStack.length-1];(mn[1]||cy).call(Ce,void 0,mn[0])}for(ue.position={start:rl(X.length>0?X[0][1].start:{line:1,column:1,offset:0}),end:rl(X.length>0?X[X.length-2][1].end:{line:1,column:1,offset:0})},it=-1;++it<a.transforms.length;)ue=a.transforms[it](ue)||ue;return ue}function o(X,ue,Ce){let Ue=ue-1,it=-1,mn=!1,ua,Wt,Ot,an;for(;++Ue<=Ce;){const ht=X[Ue];switch(ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ht[0]==="enter"?it++:it--,an=void 0;break}case"lineEndingBlank":{ht[0]==="enter"&&(ua&&!an&&!it&&!Ot&&(Ot=Ue),an=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:an=void 0}if(!it&&ht[0]==="enter"&&ht[1].type==="listItemPrefix"||it===-1&&ht[0]==="exit"&&(ht[1].type==="listUnordered"||ht[1].type==="listOrdered")){if(ua){let Da=Ue;for(Wt=void 0;Da--;){const $n=X[Da];if($n[1].type==="lineEnding"||$n[1].type==="lineEndingBlank"){if($n[0]==="exit")continue;Wt&&(X[Wt][1].type="lineEndingBlank",mn=!0),$n[1].type="lineEnding",Wt=Da}else if(!($n[1].type==="linePrefix"||$n[1].type==="blockQuotePrefix"||$n[1].type==="blockQuotePrefixWhitespace"||$n[1].type==="blockQuoteMarker"||$n[1].type==="listItemIndent"))break}Ot&&(!Wt||Ot<Wt)&&(ua._spread=!0),ua.end=Object.assign({},Wt?X[Wt][1].start:ht[1].end),X.splice(Wt||Ue,0,["exit",ua,ht[2]]),Ue++,Ce++}if(ht[1].type==="listItemPrefix"){const Da={type:"listItem",_spread:!1,start:Object.assign({},ht[1].start),end:void 0};ua=Da,X.splice(Ue,0,["enter",Da,ht[2]]),Ue++,Ce++,Ot=void 0,an=!0}}}return X[ue][1]._spread=mn,Ce}function u(X,ue){return Ce;function Ce(Ue){h.call(this,X(Ue),Ue),ue&&ue.call(this,Ue)}}function c(){this.stack.push({type:"fragment",children:[]})}function h(X,ue,Ce){this.stack[this.stack.length-1].children.push(X),this.stack.push(X),this.tokenStack.push([ue,Ce||void 0]),X.position={start:rl(ue.start),end:void 0}}function m(X){return ue;function ue(Ce){X&&X.call(this,Ce),p.call(this,Ce)}}function p(X,ue){const Ce=this.stack.pop(),Ue=this.tokenStack.pop();if(Ue)Ue[0].type!==X.type&&(ue?ue.call(this,X,Ue[0]):(Ue[1]||cy).call(this,X,Ue[0]));else throw new Error("Cannot close `"+X.type+"` ("+Dr({start:X.start,end:X.end})+"): it’s not open");Ce.position.end=rl(X.end)}function _(){return _d(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function x(X){if(this.data.expectingFirstListItemValue){const ue=this.stack[this.stack.length-2];ue.start=Number.parseInt(this.sliceSerialize(X),10),this.data.expectingFirstListItemValue=void 0}}function b(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.lang=X}function N(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.meta=X}function j(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function B(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X.replace(/(\r?\n|\r)$/g,"")}function M(X){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ue,Ce.identifier=Kn(this.sliceSerialize(X)).toLowerCase()}function z(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.title=X}function F(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.url=X}function ae(X){const ue=this.stack[this.stack.length-1];if(!ue.depth){const Ce=this.sliceSerialize(X).length;ue.depth=Ce}}function U(){this.data.setextHeadingSlurpLineEnding=!0}function ee(X){const ue=this.stack[this.stack.length-1];ue.depth=this.sliceSerialize(X).codePointAt(0)===61?1:2}function he(){this.data.setextHeadingSlurpLineEnding=void 0}function ge(X){const Ce=this.stack[this.stack.length-1].children;let Ue=Ce[Ce.length-1];(!Ue||Ue.type!=="text")&&(Ue=Pt(),Ue.position={start:rl(X.start),end:void 0},Ce.push(Ue)),this.stack.push(Ue)}function R(X){const ue=this.stack.pop();ue.value+=this.sliceSerialize(X),ue.position.end=rl(X.end)}function W(X){const ue=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ue.children[ue.children.length-1];Ce.position.end=rl(X.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(ue.type)&&(ge.call(this,X),R.call(this,X))}function $(){this.data.atHardBreak=!0}function de(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X}function J(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X}function ne(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.value=X}function L(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ue,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function K(){const X=this.stack[this.stack.length-1];if(this.data.inReference){const ue=this.data.referenceType||"shortcut";X.type+="Reference",X.referenceType=ue,delete X.url,delete X.title}else delete X.identifier,delete X.label;this.data.referenceType=void 0}function se(X){const ue=this.sliceSerialize(X),Ce=this.stack[this.stack.length-2];Ce.label=qT(ue),Ce.identifier=Kn(ue).toLowerCase()}function ke(){const X=this.stack[this.stack.length-1],ue=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ue=X.children;Ce.children=Ue}else Ce.alt=ue}function E(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.url=X}function A(){const X=this.resume(),ue=this.stack[this.stack.length-1];ue.title=X}function G(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function te(X){const ue=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ue,Ce.identifier=Kn(this.sliceSerialize(X)).toLowerCase(),this.data.referenceType="full"}function fe(X){this.data.characterReferenceType=X.type}function Y(X){const ue=this.sliceSerialize(X),Ce=this.data.characterReferenceType;let Ue;Ce?(Ue=v1(ue,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ue=vd(ue);const it=this.stack[this.stack.length-1];it.value+=Ue}function xe(X){const ue=this.stack.pop();ue.position.end=rl(X.end)}function Fe(X){R.call(this,X);const ue=this.stack[this.stack.length-1];ue.url=this.sliceSerialize(X)}function Ge(X){R.call(this,X);const ue=this.stack[this.stack.length-1];ue.url="mailto:"+this.sliceSerialize(X)}function Ct(){return{type:"blockquote",children:[]}}function Jt(){return{type:"code",lang:null,meta:null,value:""}}function Gn(){return{type:"inlineCode",value:""}}function oa(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ce(){return{type:"emphasis",children:[]}}function gt(){return{type:"heading",depth:0,children:[]}}function xt(){return{type:"break"}}function Cn(){return{type:"html",value:""}}function hl(){return{type:"image",title:null,url:"",alt:null}}function Ke(){return{type:"link",title:null,url:"",children:[]}}function qt(X){return{type:"list",ordered:X.type==="listOrdered",start:null,spread:X._spread,children:[]}}function Zn(X){return{type:"listItem",spread:X._spread,checked:null,children:[]}}function Jo(){return{type:"paragraph",children:[]}}function Po(){return{type:"strong",children:[]}}function Pt(){return{type:"text",value:""}}function Wo(){return{type:"thematicBreak"}}}function rl(t){return{line:t.line,column:t.column,offset:t.offset}}function j1(t,a){let i=-1;for(;++i<a.length;){const r=a[i];Array.isArray(r)?j1(t,r):$T(t,r)}}function $T(t,a){let i;for(i in a)if(w1.call(a,i))switch(i){case"canContainEols":{const r=a[i];r&&t[i].push(...r);break}case"transforms":{const r=a[i];r&&t[i].push(...r);break}case"enter":case"exit":{const r=a[i];r&&Object.assign(t[i],r);break}}}function cy(t,a){throw t?new Error("Cannot close `"+t.type+"` ("+Dr({start:t.start,end:t.end})+"): a different token (`"+a.type+"`, "+Dr({start:a.start,end:a.end})+") is open"):new Error("Cannot close document, a token (`"+a.type+"`, "+Dr({start:a.start,end:a.end})+") is still open")}function YT(t){const a=this;a.parser=i;function i(r){return GT(r,{...a.data("settings"),...t,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}function XT(t,a){const i={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(a),!0)};return t.patch(a,i),t.applyData(a,i)}function FT(t,a){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(a,i),[t.applyData(a,i),{type:"text",value:`
|
|
243
243
|
`}]}function QT(t,a){const i=a.value?a.value+`
|
|
244
|
-
`:"",r={},o=a.lang?a.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};return a.meta&&(u.data={meta:a.meta}),t.patch(a,u),u=t.applyData(a,u),u={type:"element",tagName:"pre",properties:{},children:[u]},t.patch(a,u),u}function KT(t,a){const i={type:"element",tagName:"del",properties:{},children:t.all(a)};return t.patch(a,i),t.applyData(a,i)}function JT(t,a){const i={type:"element",tagName:"em",properties:{},children:t.all(a)};return t.patch(a,i),t.applyData(a,i)}function PT(t,a){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(a.identifier).toUpperCase(),o=Ri(r.toLowerCase()),u=t.footnoteOrder.indexOf(r);let c,h=t.footnoteCounts.get(r);h===void 0?(h=0,t.footnoteOrder.push(r),c=t.footnoteOrder.length):c=u+1,h+=1,t.footnoteCounts.set(r,h);const m={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(a,m);const p={type:"element",tagName:"sup",properties:{},children:[m]};return t.patch(a,p),t.applyData(a,p)}function WT(t,a){const i={type:"element",tagName:"h"+a.depth,properties:{},children:t.all(a)};return t.patch(a,i),t.applyData(a,i)}function eN(t,a){if(t.options.allowDangerousHtml){const i={type:"raw",value:a.value};return t.patch(a,i),t.applyData(a,i)}}function M1(t,a){const i=a.referenceType;let r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(a.label||a.identifier)+"]"),a.type==="imageReference")return[{type:"text",value:"!["+a.alt+r}];const o=t.all(a),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=r:o.push({type:"text",value:r}),o}function tN(t,a){const i=String(a.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return M1(t,a);const o={src:Ri(r.url||""),alt:a.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"img",properties:o,children:[]};return t.patch(a,u),t.applyData(a,u)}function nN(t,a){const i={src:Ri(a.url)};a.alt!==null&&a.alt!==void 0&&(i.alt=a.alt),a.title!==null&&a.title!==void 0&&(i.title=a.title);const r={type:"element",tagName:"img",properties:i,children:[]};return t.patch(a,r),t.applyData(a,r)}function aN(t,a){const i={type:"text",value:a.value.replace(/\r?\n|\r/g," ")};t.patch(a,i);const r={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(a,r),t.applyData(a,r)}function lN(t,a){const i=String(a.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return M1(t,a);const o={href:Ri(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"a",properties:o,children:t.all(a)};return t.patch(a,u),t.applyData(a,u)}function iN(t,a){const i={href:Ri(a.url)};a.title!==null&&a.title!==void 0&&(i.title=a.title);const r={type:"element",tagName:"a",properties:i,children:t.all(a)};return t.patch(a,r),t.applyData(a,r)}function rN(t,a,i){const r=t.all(a),o=i?sN(i):z1(a),u={},c=[];if(typeof a.checked=="boolean"){const
|
|
245
|
-
`}),
|
|
246
|
-
`});const p={type:"element",tagName:"li",properties:u,children:c};return t.patch(a,p),t.applyData(a,p)}function sN(t){let a=!1;if(t.type==="list"){a=t.spread||!1;const i=t.children;let r=-1;for(;!a&&++r<i.length;)a=z1(i[r])}return a}function z1(t){const a=t.spread;return a??t.children.length>1}function oN(t,a){const i={},r=t.all(a);let o=-1;for(typeof a.start=="number"&&a.start!==1&&(i.start=a.start);++o<r.length;){const c=r[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:a.ordered?"ol":"ul",properties:i,children:t.wrap(r,!0)};return t.patch(a,u),t.applyData(a,u)}function uN(t,a){const i={type:"element",tagName:"p",properties:{},children:t.all(a)};return t.patch(a,i),t.applyData(a,i)}function cN(t,a){const i={type:"root",children:t.wrap(t.all(a))};return t.patch(a,i),t.applyData(a,i)}function fN(t,a){const i={type:"element",tagName:"strong",properties:{},children:t.all(a)};return t.patch(a,i),t.applyData(a,i)}function dN(t,a){const i=t.all(a),r=i.shift(),o=[];if(r){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(a.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},h=md(a.children[1]),m=f1(a.children[a.children.length-1]);h&&m&&(c.position={start:h,end:m}),o.push(c)}const u={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(a,u),t.applyData(a,u)}function hN(t,a,i){const r=i?i.children:void 0,u=(r?r.indexOf(a):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,h=c?c.length:a.children.length;let m=-1;const p=[];for(;++m<h;){const
|
|
244
|
+
`:"",r={},o=a.lang?a.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let u={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};return a.meta&&(u.data={meta:a.meta}),t.patch(a,u),u=t.applyData(a,u),u={type:"element",tagName:"pre",properties:{},children:[u]},t.patch(a,u),u}function KT(t,a){const i={type:"element",tagName:"del",properties:{},children:t.all(a)};return t.patch(a,i),t.applyData(a,i)}function JT(t,a){const i={type:"element",tagName:"em",properties:{},children:t.all(a)};return t.patch(a,i),t.applyData(a,i)}function PT(t,a){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(a.identifier).toUpperCase(),o=Ri(r.toLowerCase()),u=t.footnoteOrder.indexOf(r);let c,h=t.footnoteCounts.get(r);h===void 0?(h=0,t.footnoteOrder.push(r),c=t.footnoteOrder.length):c=u+1,h+=1,t.footnoteCounts.set(r,h);const m={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+o,id:i+"fnref-"+o+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(a,m);const p={type:"element",tagName:"sup",properties:{},children:[m]};return t.patch(a,p),t.applyData(a,p)}function WT(t,a){const i={type:"element",tagName:"h"+a.depth,properties:{},children:t.all(a)};return t.patch(a,i),t.applyData(a,i)}function eN(t,a){if(t.options.allowDangerousHtml){const i={type:"raw",value:a.value};return t.patch(a,i),t.applyData(a,i)}}function M1(t,a){const i=a.referenceType;let r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(a.label||a.identifier)+"]"),a.type==="imageReference")return[{type:"text",value:"!["+a.alt+r}];const o=t.all(a),u=o[0];u&&u.type==="text"?u.value="["+u.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=r:o.push({type:"text",value:r}),o}function tN(t,a){const i=String(a.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return M1(t,a);const o={src:Ri(r.url||""),alt:a.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"img",properties:o,children:[]};return t.patch(a,u),t.applyData(a,u)}function nN(t,a){const i={src:Ri(a.url)};a.alt!==null&&a.alt!==void 0&&(i.alt=a.alt),a.title!==null&&a.title!==void 0&&(i.title=a.title);const r={type:"element",tagName:"img",properties:i,children:[]};return t.patch(a,r),t.applyData(a,r)}function aN(t,a){const i={type:"text",value:a.value.replace(/\r?\n|\r/g," ")};t.patch(a,i);const r={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(a,r),t.applyData(a,r)}function lN(t,a){const i=String(a.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return M1(t,a);const o={href:Ri(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const u={type:"element",tagName:"a",properties:o,children:t.all(a)};return t.patch(a,u),t.applyData(a,u)}function iN(t,a){const i={href:Ri(a.url)};a.title!==null&&a.title!==void 0&&(i.title=a.title);const r={type:"element",tagName:"a",properties:i,children:t.all(a)};return t.patch(a,r),t.applyData(a,r)}function rN(t,a,i){const r=t.all(a),o=i?sN(i):z1(a),u={},c=[];if(typeof a.checked=="boolean"){const _=r[0];let y;_&&_.type==="element"&&_.tagName==="p"?y=_:(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:a.checked,disabled:!0},children:[]}),u.className=["task-list-item"]}let h=-1;for(;++h<r.length;){const _=r[h];(o||h!==0||_.type!=="element"||_.tagName!=="p")&&c.push({type:"text",value:`
|
|
245
|
+
`}),_.type==="element"&&_.tagName==="p"&&!o?c.push(..._.children):c.push(_)}const m=r[r.length-1];m&&(o||m.type!=="element"||m.tagName!=="p")&&c.push({type:"text",value:`
|
|
246
|
+
`});const p={type:"element",tagName:"li",properties:u,children:c};return t.patch(a,p),t.applyData(a,p)}function sN(t){let a=!1;if(t.type==="list"){a=t.spread||!1;const i=t.children;let r=-1;for(;!a&&++r<i.length;)a=z1(i[r])}return a}function z1(t){const a=t.spread;return a??t.children.length>1}function oN(t,a){const i={},r=t.all(a);let o=-1;for(typeof a.start=="number"&&a.start!==1&&(i.start=a.start);++o<r.length;){const c=r[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const u={type:"element",tagName:a.ordered?"ol":"ul",properties:i,children:t.wrap(r,!0)};return t.patch(a,u),t.applyData(a,u)}function uN(t,a){const i={type:"element",tagName:"p",properties:{},children:t.all(a)};return t.patch(a,i),t.applyData(a,i)}function cN(t,a){const i={type:"root",children:t.wrap(t.all(a))};return t.patch(a,i),t.applyData(a,i)}function fN(t,a){const i={type:"element",tagName:"strong",properties:{},children:t.all(a)};return t.patch(a,i),t.applyData(a,i)}function dN(t,a){const i=t.all(a),r=i.shift(),o=[];if(r){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(a.children[0],c),o.push(c)}if(i.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},h=md(a.children[1]),m=f1(a.children[a.children.length-1]);h&&m&&(c.position={start:h,end:m}),o.push(c)}const u={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(a,u),t.applyData(a,u)}function hN(t,a,i){const r=i?i.children:void 0,u=(r?r.indexOf(a):1)===0?"th":"td",c=i&&i.type==="table"?i.align:void 0,h=c?c.length:a.children.length;let m=-1;const p=[];for(;++m<h;){const y=a.children[m],x={},b=c?c[m]:void 0;b&&(x.align=b);let N={type:"element",tagName:u,properties:x,children:[]};y&&(N.children=t.all(y),t.patch(y,N),N=t.applyData(y,N)),p.push(N)}const _={type:"element",tagName:"tr",properties:{},children:t.wrap(p,!0)};return t.patch(a,_),t.applyData(a,_)}function mN(t,a){const i={type:"element",tagName:"td",properties:{},children:t.all(a)};return t.patch(a,i),t.applyData(a,i)}const fy=9,dy=32;function pN(t){const a=String(t),i=/\r?\n|\r/g;let r=i.exec(a),o=0;const u=[];for(;r;)u.push(hy(a.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=i.exec(a);return u.push(hy(a.slice(o),o>0,!1)),u.join("")}function hy(t,a,i){let r=0,o=t.length;if(a){let u=t.codePointAt(r);for(;u===fy||u===dy;)r++,u=t.codePointAt(r)}if(i){let u=t.codePointAt(o-1);for(;u===fy||u===dy;)o--,u=t.codePointAt(o-1)}return o>r?t.slice(r,o):""}function gN(t,a){const i={type:"text",value:pN(String(a.value))};return t.patch(a,i),t.applyData(a,i)}function yN(t,a){const i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(a,i),t.applyData(a,i)}const _N={blockquote:XT,break:FT,code:QT,delete:KT,emphasis:JT,footnoteReference:PT,heading:WT,html:eN,imageReference:tN,image:nN,inlineCode:aN,linkReference:lN,link:iN,listItem:rN,list:oN,paragraph:uN,root:cN,strong:fN,table:dN,tableCell:mN,tableRow:hN,text:gN,thematicBreak:yN,toml:ho,yaml:ho,definition:ho,footnoteDefinition:ho};function ho(){}const R1=-1,Go=0,Br=1,No=2,bd=3,Sd=4,kd=5,Td=6,O1=7,D1=8,my=typeof self=="object"?self:globalThis,vN=(t,a)=>{const i=(o,u)=>(t.set(u,o),o),r=o=>{if(t.has(o))return t.get(o);const[u,c]=a[o];switch(u){case Go:case R1:return i(c,o);case Br:{const h=i([],o);for(const m of c)h.push(r(m));return h}case No:{const h=i({},o);for(const[m,p]of c)h[r(m)]=r(p);return h}case bd:return i(new Date(c),o);case Sd:{const{source:h,flags:m}=c;return i(new RegExp(h,m),o)}case kd:{const h=i(new Map,o);for(const[m,p]of c)h.set(r(m),r(p));return h}case Td:{const h=i(new Set,o);for(const m of c)h.add(r(m));return h}case O1:{const{name:h,message:m}=c;return i(new my[h](m),o)}case D1:return i(BigInt(c),o);case"BigInt":return i(Object(BigInt(c)),o);case"ArrayBuffer":return i(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:h}=new Uint8Array(c);return i(new DataView(h),c)}}return i(new my[u](c),o)};return r},py=t=>vN(new Map,t)(0),Ni="",{toString:xN}={},{keys:bN}=Object,zr=t=>{const a=typeof t;if(a!=="object"||!t)return[Go,a];const i=xN.call(t).slice(8,-1);switch(i){case"Array":return[Br,Ni];case"Object":return[No,Ni];case"Date":return[bd,Ni];case"RegExp":return[Sd,Ni];case"Map":return[kd,Ni];case"Set":return[Td,Ni];case"DataView":return[Br,i]}return i.includes("Array")?[Br,i]:i.includes("Error")?[O1,i]:[No,i]},mo=([t,a])=>t===Go&&(a==="function"||a==="symbol"),SN=(t,a,i,r)=>{const o=(c,h)=>{const m=r.push(c)-1;return i.set(h,m),m},u=c=>{if(i.has(c))return i.get(c);let[h,m]=zr(c);switch(h){case Go:{let _=c;switch(m){case"bigint":h=D1,_=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+m);_=null;break;case"undefined":return o([R1],c)}return o([h,_],c)}case Br:{if(m){let x=c;return m==="DataView"?x=new Uint8Array(c.buffer):m==="ArrayBuffer"&&(x=new Uint8Array(c)),o([m,[...x]],c)}const _=[],y=o([h,_],c);for(const x of c)_.push(u(x));return y}case No:{if(m)switch(m){case"BigInt":return o([m,c.toString()],c);case"Boolean":case"Number":case"String":return o([m,c.valueOf()],c)}if(a&&"toJSON"in c)return u(c.toJSON());const _=[],y=o([h,_],c);for(const x of bN(c))(t||!mo(zr(c[x])))&&_.push([u(x),u(c[x])]);return y}case bd:return o([h,c.toISOString()],c);case Sd:{const{source:_,flags:y}=c;return o([h,{source:_,flags:y}],c)}case kd:{const _=[],y=o([h,_],c);for(const[x,b]of c)(t||!(mo(zr(x))||mo(zr(b))))&&_.push([u(x),u(b)]);return y}case Td:{const _=[],y=o([h,_],c);for(const x of c)(t||!mo(zr(x)))&&_.push(u(x));return y}}const{message:p}=c;return o([h,{name:m,message:p}],c)};return u},gy=(t,{json:a,lossy:i}={})=>{const r=[];return SN(!(a||i),!!a,new Map,r)(t),r},Eo=typeof structuredClone=="function"?(t,a)=>a&&("json"in a||"lossy"in a)?py(gy(t,a)):structuredClone(t):(t,a)=>py(gy(t,a));function kN(t,a){const i=[{type:"text",value:"↩"}];return a>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(a)}]}),i}function TN(t,a){return"Back to reference "+(t+1)+(a>1?"-"+a:"")}function NN(t){const a=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||kN,r=t.options.footnoteBackLabel||TN,o=t.options.footnoteLabel||"Footnotes",u=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let m=-1;for(;++m<t.footnoteOrder.length;){const p=t.footnoteById.get(t.footnoteOrder[m]);if(!p)continue;const _=t.all(p),y=String(p.identifier).toUpperCase(),x=Ri(y.toLowerCase());let b=0;const N=[],j=t.footnoteCounts.get(y);for(;j!==void 0&&++b<=j;){N.length>0&&N.push({type:"text",value:" "});let M=typeof i=="string"?i:i(m,b);typeof M=="string"&&(M={type:"text",value:M}),N.push({type:"element",tagName:"a",properties:{href:"#"+a+"fnref-"+x+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(m,b),className:["data-footnote-backref"]},children:Array.isArray(M)?M:[M]})}const B=_[_.length-1];if(B&&B.type==="element"&&B.tagName==="p"){const M=B.children[B.children.length-1];M&&M.type==="text"?M.value+=" ":B.children.push({type:"text",value:" "}),B.children.push(...N)}else _.push(...N);const S={type:"element",tagName:"li",properties:{id:a+"fn-"+x},children:t.wrap(_,!0)};t.patch(p,S),h.push(S)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Eo(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
247
247
|
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(h,!0)},{type:"text",value:`
|
|
248
|
-
`}]}}const Zo=(function(t){if(t==null)return wN;if(typeof t=="function")return $o(t);if(typeof t=="object")return Array.isArray(t)?EN(t):CN(t);if(typeof t=="string")return AN(t);throw new Error("Expected function, string, or object as test")});function EN(t){const a=[];let i=-1;for(;++i<t.length;)a[i]=Zo(t[i]);return $o(r);function r(...o){let u=-1;for(;++u<a.length;)if(a[u].apply(this,o))return!0;return!1}}function CN(t){const a=t;return $o(i);function i(r){const o=r;let u;for(u in t)if(o[u]!==a[u])return!1;return!0}}function AN(t){return $o(a);function a(i){return i&&i.type===t}}function $o(t){return a;function a(i,r,o){return!!(jN(i)&&t.call(this,i,typeof r=="number"?r:void 0,o||void 0))}}function wN(){return!0}function jN(t){return t!==null&&typeof t=="object"&&"type"in t}const L1=[],MN=!0,Ff=!1,zN="skip";function B1(t,a,i,r){let o;typeof a=="function"&&typeof i!="function"?(r=i,i=a):o=a;const u=Zo(o),c=r?-1:1;h(t,void 0,[])();function h(m,p,
|
|
248
|
+
`}]}}const Zo=(function(t){if(t==null)return wN;if(typeof t=="function")return $o(t);if(typeof t=="object")return Array.isArray(t)?EN(t):CN(t);if(typeof t=="string")return AN(t);throw new Error("Expected function, string, or object as test")});function EN(t){const a=[];let i=-1;for(;++i<t.length;)a[i]=Zo(t[i]);return $o(r);function r(...o){let u=-1;for(;++u<a.length;)if(a[u].apply(this,o))return!0;return!1}}function CN(t){const a=t;return $o(i);function i(r){const o=r;let u;for(u in t)if(o[u]!==a[u])return!1;return!0}}function AN(t){return $o(a);function a(i){return i&&i.type===t}}function $o(t){return a;function a(i,r,o){return!!(jN(i)&&t.call(this,i,typeof r=="number"?r:void 0,o||void 0))}}function wN(){return!0}function jN(t){return t!==null&&typeof t=="object"&&"type"in t}const L1=[],MN=!0,Ff=!1,zN="skip";function B1(t,a,i,r){let o;typeof a=="function"&&typeof i!="function"?(r=i,i=a):o=a;const u=Zo(o),c=r?-1:1;h(t,void 0,[])();function h(m,p,_){const y=m&&typeof m=="object"?m:{};if(typeof y.type=="string"){const b=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return x;function x(){let b=L1,N,j,B;if((!a||u(m,p,_[_.length-1]||void 0))&&(b=RN(i(m,_)),b[0]===Ff))return b;if("children"in m&&m.children){const S=m;if(S.children&&b[0]!==zN)for(j=(r?S.children.length:-1)+c,B=_.concat(S);j>-1&&j<S.children.length;){const M=S.children[j];if(N=h(M,j,B)(),N[0]===Ff)return N;j=typeof N[1]=="number"?N[1]:j+c}}return b}}}function RN(t){return Array.isArray(t)?t:typeof t=="number"?[MN,t]:t==null?L1:[t]}function Nd(t,a,i,r){let o,u,c;typeof a=="function"&&typeof i!="function"?(u=void 0,c=a,o=i):(u=a,c=i,o=r),B1(t,u,h,o);function h(m,p){const _=p[p.length-1],y=_?_.children.indexOf(m):void 0;return c(m,y,_)}}const Qf={}.hasOwnProperty,ON={};function DN(t,a){const i=a||ON,r=new Map,o=new Map,u=new Map,c={..._N,...i.handlers},h={all:p,applyData:BN,definitionById:r,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:c,one:m,options:i,patch:LN,wrap:HN};return Nd(t,function(_){if(_.type==="definition"||_.type==="footnoteDefinition"){const y=_.type==="definition"?r:o,x=String(_.identifier).toUpperCase();y.has(x)||y.set(x,_)}}),h;function m(_,y){const x=_.type,b=h.handlers[x];if(Qf.call(h.handlers,x)&&b)return b(h,_,y);if(h.options.passThrough&&h.options.passThrough.includes(x)){if("children"in _){const{children:j,...B}=_,S=Eo(B);return S.children=h.all(_),S}return Eo(_)}return(h.options.unknownHandler||UN)(h,_,y)}function p(_){const y=[];if("children"in _){const x=_.children;let b=-1;for(;++b<x.length;){const N=h.one(x[b],_);if(N){if(b&&x[b-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=yy(N.value)),!Array.isArray(N)&&N.type==="element")){const j=N.children[0];j&&j.type==="text"&&(j.value=yy(j.value))}Array.isArray(N)?y.push(...N):y.push(N)}}}return y}}function LN(t,a){t.position&&(a.position=Tk(t))}function BN(t,a){let i=a;if(t&&t.data){const r=t.data.hName,o=t.data.hChildren,u=t.data.hProperties;if(typeof r=="string")if(i.type==="element")i.tagName=r;else{const c="children"in i?i.children:[i];i={type:"element",tagName:r,properties:{},children:c}}i.type==="element"&&u&&Object.assign(i.properties,Eo(u)),"children"in i&&i.children&&o!==null&&o!==void 0&&(i.children=o)}return i}function UN(t,a){const i=a.data||{},r="value"in a&&!(Qf.call(i,"hProperties")||Qf.call(i,"hChildren"))?{type:"text",value:a.value}:{type:"element",tagName:"div",properties:{},children:t.all(a)};return t.patch(a,r),t.applyData(a,r)}function HN(t,a){const i=[];let r=-1;for(a&&i.push({type:"text",value:`
|
|
249
249
|
`});++r<t.length;)r&&i.push({type:"text",value:`
|
|
250
250
|
`}),i.push(t[r]);return a&&t.length>0&&i.push({type:"text",value:`
|
|
251
251
|
`}),i}function yy(t){let a=0,i=t.charCodeAt(a);for(;i===9||i===32;)a++,i=t.charCodeAt(a);return t.slice(a)}function _y(t,a){const i=DN(t,a),r=i.one(t,void 0),o=NN(i),u=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
|
|
252
|
-
`},o),u}function IN(t,a){return t&&"run"in t?async function(i,r){const o=_y(i,{file:r,...a});await t.run(o,r)}:function(i,r){return _y(i,{file:r,...t||a})}}function vy(t){if(t)throw t}var Tf,xy;function qN(){if(xy)return Tf;xy=1;var t=Object.prototype.hasOwnProperty,a=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):a.call(p)==="[object Array]"},u=function(p){if(!p||a.call(p)!=="[object Object]")return!1;var y=t.call(p,"constructor"),_=p.constructor&&p.constructor.prototype&&t.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!y&&!_)return!1;var x;for(x in p);return typeof x>"u"||t.call(p,x)},c=function(p,y){i&&y.name==="__proto__"?i(p,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):p[y.name]=y.newValue},h=function(p,y){if(y==="__proto__")if(t.call(p,y)){if(r)return r(p,y).value}else return;return p[y]};return Tf=function m(){var p,y,_,x,b,N,j=arguments[0],B=1,S=arguments.length,M=!1;for(typeof j=="boolean"&&(M=j,j=arguments[1]||{},B=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});B<S;++B)if(p=arguments[B],p!=null)for(y in p)_=h(j,y),x=h(p,y),j!==x&&(M&&x&&(u(x)||(b=o(x)))?(b?(b=!1,N=_&&o(_)?_:[]):N=_&&u(_)?_:{},c(j,{name:y,newValue:m(M,N,x)})):typeof x<"u"&&c(j,{name:y,newValue:x}));return j},Tf}var VN=qN();const Nf=Ho(VN);function Kf(t){if(typeof t!="object"||t===null)return!1;const a=Object.getPrototypeOf(t);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function GN(){const t=[],a={run:i,use:r};return a;function i(...o){let u=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);h(null,...o);function h(m,...p){const y=t[++u];let _=-1;if(m){c(m);return}for(;++_<o.length;)(p[_]===null||p[_]===void 0)&&(p[_]=o[_]);o=p,y?ZN(y,h)(...p):c(null,...p)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),a}}function ZN(t,a){let i;return r;function r(...c){const h=t.length>c.length;let m;h&&c.push(o);try{m=t.apply(this,c)}catch(p){const y=p;if(h&&i)throw y;return o(y)}h||(m&&m.then&&typeof m.then=="function"?m.then(u,o):m instanceof Error?o(m):u(m))}function o(c,...h){i||(i=!0,a(c,...h))}function u(c){o(null,c)}}const la={basename:$N,dirname:YN,extname:XN,join:FN,sep:"/"};function $N(t,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Yr(t);let i=0,r=-1,o=t.length,u;if(a===void 0||a.length===0||a.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(u){i=o+1;break}}else r<0&&(u=!0,r=o+1);return r<0?"":t.slice(i,r)}if(a===t)return"";let c=-1,h=a.length-1;for(;o--;)if(t.codePointAt(o)===47){if(u){i=o+1;break}}else c<0&&(u=!0,c=o+1),h>-1&&(t.codePointAt(o)===a.codePointAt(h--)?h<0&&(r=o):(h=-1,r=c));return i===r?r=c:r<0&&(r=t.length),t.slice(i,r)}function YN(t){if(Yr(t),t.length===0)return".";let a=-1,i=t.length,r;for(;--i;)if(t.codePointAt(i)===47){if(r){a=i;break}}else r||(r=!0);return a<0?t.codePointAt(0)===47?"/":".":a===1&&t.codePointAt(0)===47?"//":t.slice(0,a)}function XN(t){Yr(t);let a=t.length,i=-1,r=0,o=-1,u=0,c;for(;a--;){const h=t.codePointAt(a);if(h===47){if(c){r=a+1;break}continue}i<0&&(c=!0,i=a+1),h===46?o<0?o=a:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||i<0||u===0||u===1&&o===i-1&&o===r+1?"":t.slice(o,i)}function FN(...t){let a=-1,i;for(;++a<t.length;)Yr(t[a]),t[a]&&(i=i===void 0?t[a]:i+"/"+t[a]);return i===void 0?".":QN(i)}function QN(t){Yr(t);const a=t.codePointAt(0)===47;let i=KN(t,!a);return i.length===0&&!a&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),a?"/"+i:i}function KN(t,a){let i="",r=0,o=-1,u=0,c=-1,h,m;for(;++c<=t.length;){if(c<t.length)h=t.codePointAt(c);else{if(h===47)break;h=47}if(h===47){if(!(o===c-1||u===1))if(o!==c-1&&u===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(m=i.lastIndexOf("/"),m!==i.length-1){m<0?(i="",r=0):(i=i.slice(0,m),r=i.length-1-i.lastIndexOf("/")),o=c,u=0;continue}}else if(i.length>0){i="",r=0,o=c,u=0;continue}}a&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+t.slice(o+1,c):i=t.slice(o+1,c),r=c-o-1;o=c,u=0}else h===46&&u>-1?u++:u=-1}return i}function Yr(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const JN={cwd:PN};function PN(){return"/"}function Jf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function WN(t){if(typeof t=="string")t=new URL(t);else if(!Jf(t)){const a=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw a.code="ERR_INVALID_ARG_TYPE",a}if(t.protocol!=="file:"){const a=new TypeError("The URL must be of scheme file");throw a.code="ERR_INVALID_URL_SCHEME",a}return eE(t)}function eE(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 a=t.pathname;let i=-1;for(;++i<a.length;)if(a.codePointAt(i)===37&&a.codePointAt(i+1)===50){const r=a.codePointAt(i+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(a)}const Ef=["history","path","basename","stem","extname","dirname"];class U1{constructor(a){let i;a?Jf(a)?i={path:a}:typeof a=="string"||tE(a)?i={value:a}:i=a:i={},this.cwd="cwd"in i?"":JN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ef.length;){const u=Ef[r];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let o;for(o in i)Ef.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?la.basename(this.path):void 0}set basename(a){Af(a,"basename"),Cf(a,"basename"),this.path=la.join(this.dirname||"",a)}get dirname(){return typeof this.path=="string"?la.dirname(this.path):void 0}set dirname(a){by(this.basename,"dirname"),this.path=la.join(a||"",this.basename)}get extname(){return typeof this.path=="string"?la.extname(this.path):void 0}set extname(a){if(Cf(a,"extname"),by(this.dirname,"extname"),a){if(a.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(a.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=la.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){Jf(a)&&(a=WN(a)),Af(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return typeof this.path=="string"?la.basename(this.path,this.extname):void 0}set stem(a){Af(a,"stem"),Cf(a,"stem"),this.path=la.join(this.dirname||"",a+(this.extname||""))}fail(a,i,r){const o=this.message(a,i,r);throw o.fatal=!0,o}info(a,i,r){const o=this.message(a,i,r);return o.fatal=void 0,o}message(a,i,r){const o=new Kt(a,i,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(a){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(a||void 0).decode(this.value)}}function Cf(t,a){if(t&&t.includes(la.sep))throw new Error("`"+a+"` cannot be a path: did not expect `"+la.sep+"`")}function Af(t,a){if(!t)throw new Error("`"+a+"` cannot be empty")}function by(t,a){if(!t)throw new Error("Setting `"+a+"` requires `path` to be set too")}function tE(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const nE=(function(t){const r=this.constructor.prototype,o=r[t],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),aE={}.hasOwnProperty;class Ed extends nE{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=GN()}copy(){const a=new Ed;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];a.use(...r)}return a.data(Nf(!0,{},this.namespace)),a}data(a,i){return typeof a=="string"?arguments.length===2?(Mf("data",this.frozen),this.namespace[a]=i,this):aE.call(this.namespace,a)&&this.namespace[a]||void 0:a?(Mf("data",this.frozen),this.namespace=a,this):this.namespace}freeze(){if(this.frozen)return this;const a=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 o=i.call(a,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(a){this.freeze();const i=po(a),r=this.parser||this.Parser;return wf("parse",r),r(String(i),i)}process(a,i){const r=this;return this.freeze(),wf("process",this.parser||this.Parser),jf("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(u,c){const h=po(a),m=r.parse(h);r.run(m,h,function(y,_,x){if(y||!_||!x)return p(y);const b=_,N=r.stringify(b,x);rE(N)?x.value=N:x.result=N,p(y,x)});function p(y,_){y||!_?c(y):u?u(_):i(void 0,_)}}}processSync(a){let i=!1,r;return this.freeze(),wf("processSync",this.parser||this.Parser),jf("processSync",this.compiler||this.Compiler),this.process(a,o),ky("processSync","process",i),r;function o(u,c){i=!0,vy(u),r=c}}run(a,i,r){Sy(a),this.freeze();const o=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?u(void 0,r):new Promise(u);function u(c,h){const m=po(i);o.run(a,m,p);function p(y,_,x){const b=_||a;y?h(y):c?c(b):r(void 0,b,x)}}}runSync(a,i){let r=!1,o;return this.run(a,i,u),ky("runSync","run",r),o;function u(c,h){vy(c),o=h,r=!0}}stringify(a,i){this.freeze();const r=po(i),o=this.compiler||this.Compiler;return jf("stringify",o),Sy(a),o(a,r)}use(a,...i){const r=this.attachers,o=this.namespace;if(Mf("use",this.frozen),a!=null)if(typeof a=="function")m(a,i);else if(typeof a=="object")Array.isArray(a)?h(a):c(a);else throw new TypeError("Expected usable value, not `"+a+"`");return this;function u(p){if(typeof p=="function")m(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[y,..._]=p;m(y,_)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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(p.plugins),p.settings&&(o.settings=Nf(!0,o.settings,p.settings))}function h(p){let y=-1;if(p!=null)if(Array.isArray(p))for(;++y<p.length;){const _=p[y];u(_)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function m(p,y){let _=-1,x=-1;for(;++_<r.length;)if(r[_][0]===p){x=_;break}if(x===-1)r.push([p,...y]);else if(y.length>0){let[b,...N]=y;const j=r[x][1];Kf(j)&&Kf(b)&&(b=Nf(!0,j,b)),r[x]=[p,b,...N]}}}}const lE=new Ed().freeze();function wf(t,a){if(typeof a!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function jf(t,a){if(typeof a!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Mf(t,a){if(a)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Sy(t){if(!Kf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function ky(t,a,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+a+"` instead")}function po(t){return iE(t)?t:new U1(t)}function iE(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function rE(t){return typeof t=="string"||sE(t)}function sE(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const oE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ty=[],Ny={allowDangerousHtml:!0},uE=/^(https?|ircs?|mailto|xmpp)$/i,cE=[{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 fE(t){const a=dE(t),i=hE(t);return mE(a.runSync(a.parse(i),i),t)}function dE(t){const a=t.rehypePlugins||Ty,i=t.remarkPlugins||Ty,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Ny}:Ny;return lE().use(YT).use(i).use(IN,r).use(a)}function hE(t){const a=t.children||"",i=new U1;return typeof a=="string"&&(i.value=a),i}function mE(t,a){const i=a.allowedElements,r=a.allowElement,o=a.components,u=a.disallowedElements,c=a.skipHtml,h=a.unwrapDisallowed,m=a.urlTransform||pE;for(const y of cE)Object.hasOwn(a,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+oE+y.id,void 0);return Nd(t,p),wk(t,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function p(y,_,x){if(y.type==="raw"&&x&&typeof _=="number")return c?x.children.splice(_,1):x.children[_]={type:"text",value:y.value},_;if(y.type==="element"){let b;for(b in bf)if(Object.hasOwn(bf,b)&&Object.hasOwn(y.properties,b)){const N=y.properties[b],j=bf[b];(j===null||j.includes(y.tagName))&&(y.properties[b]=m(String(N||""),b,y))}}if(y.type==="element"){let b=i?!i.includes(y.tagName):u?u.includes(y.tagName):!1;if(!b&&r&&typeof _=="number"&&(b=!r(y,_,x)),b&&x&&typeof _=="number")return h&&y.children?x.children.splice(_,1,...y.children):x.children.splice(_,1),_}}}function pE(t){const a=t.indexOf(":"),i=t.indexOf("?"),r=t.indexOf("#"),o=t.indexOf("/");return a===-1||o!==-1&&a>o||i!==-1&&a>i||r!==-1&&a>r||uE.test(t.slice(0,a))?t:""}function Ey(t,a){const i=String(t);if(typeof a!="string")throw new TypeError("Expected character");let r=0,o=i.indexOf(a);for(;o!==-1;)r++,o=i.indexOf(a,o+a.length);return r}function gE(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function yE(t,a,i){const o=Zo((i||{}).ignore||[]),u=_E(a);let c=-1;for(;++c<u.length;)B1(t,"text",h);function h(p,y){let _=-1,x;for(;++_<y.length;){const b=y[_],N=x?x.children:void 0;if(o(b,N?N.indexOf(b):void 0,x))return;x=b}if(x)return m(p,y)}function m(p,y){const _=y[y.length-1],x=u[c][0],b=u[c][1];let N=0;const B=_.children.indexOf(p);let S=!1,M=[];x.lastIndex=0;let z=x.exec(p.value);for(;z;){const F=z.index,ne={index:z.index,input:z.input,stack:[...y,p]};let U=b(...z,ne);if(typeof U=="string"&&(U=U.length>0?{type:"text",value:U}:void 0),U===!1?x.lastIndex=F+1:(N!==F&&M.push({type:"text",value:p.value.slice(N,F)}),Array.isArray(U)?M.push(...U):U&&M.push(U),N=F+z[0].length,S=!0),!x.global)break;z=x.exec(p.value)}return S?(N<p.value.length&&M.push({type:"text",value:p.value.slice(N)}),_.children.splice(B,1,...M)):M=[p],B+M.length}}function _E(t){const a=[];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 o=i[r];a.push([vE(o[0]),xE(o[1])])}return a}function vE(t){return typeof t=="string"?new RegExp(gE(t),"g"):t}function xE(t){return typeof t=="function"?t:function(){return t}}const zf="phrasing",Rf=["autolink","link","image","label"];function bE(){return{transforms:[AE],enter:{literalAutolink:kE,literalAutolinkEmail:Of,literalAutolinkHttp:Of,literalAutolinkWww:Of},exit:{literalAutolink:CE,literalAutolinkEmail:EE,literalAutolinkHttp:TE,literalAutolinkWww:NE}}}function SE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zf,notInConstruct:Rf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zf,notInConstruct:Rf},{character:":",before:"[ps]",after:"\\/",inConstruct:zf,notInConstruct:Rf}]}}function kE(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Of(t){this.config.enter.autolinkProtocol.call(this,t)}function TE(t){this.config.exit.autolinkProtocol.call(this,t)}function NE(t){this.config.exit.data.call(this,t);const a=this.stack[this.stack.length-1];a.type,a.url="http://"+this.sliceSerialize(t)}function EE(t){this.config.exit.autolinkEmail.call(this,t)}function CE(t){this.exit(t)}function AE(t){yE(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,wE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),jE]],{ignore:["link","linkReference"]})}function wE(t,a,i,r,o){let u="";if(!H1(o)||(/^w/i.test(a)&&(i=a+i,a="",u="http://"),!ME(i)))return!1;const c=zE(i+r);if(!c[0])return!1;const h={type:"link",title:null,url:u+a+c[0],children:[{type:"text",value:a+c[0]}]};return c[1]?[h,{type:"text",value:c[1]}]:h}function jE(t,a,i,r){return!H1(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+a+"@"+i,children:[{type:"text",value:a+"@"+i}]}}function ME(t){const a=t.split(".");return!(a.length<2||a[a.length-1]&&(/_/.test(a[a.length-1])||!/[a-zA-Z\d]/.test(a[a.length-1]))||a[a.length-2]&&(/_/.test(a[a.length-2])||!/[a-zA-Z\d]/.test(a[a.length-2])))}function zE(t){const a=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!a)return[t,void 0];t=t.slice(0,a.index);let i=a[0],r=i.indexOf(")");const o=Ey(t,"(");let u=Ey(t,")");for(;r!==-1&&o>u;)t+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),u++;return[t,i]}function H1(t,a){const i=t.input.charCodeAt(t.index-1);return(t.index===0||Ol(i)||qo(i))&&(!a||i!==47)}I1.peek=qE;function RE(){this.buffer()}function OE(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function DE(){this.buffer()}function LE(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function BE(t){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Kn(this.sliceSerialize(t)).toLowerCase(),i.label=a}function UE(t){this.exit(t)}function HE(t){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Kn(this.sliceSerialize(t)).toLowerCase(),i.label=a}function IE(t){this.exit(t)}function qE(){return"["}function I1(t,a,i,r){const o=i.createTracker(r);let u=o.move("[^");const c=i.enter("footnoteReference"),h=i.enter("reference");return u+=o.move(i.safe(i.associationId(t),{after:"]",before:u})),h(),c(),u+=o.move("]"),u}function VE(){return{enter:{gfmFootnoteCallString:RE,gfmFootnoteCall:OE,gfmFootnoteDefinitionLabelString:DE,gfmFootnoteDefinition:LE},exit:{gfmFootnoteCallString:BE,gfmFootnoteCall:UE,gfmFootnoteDefinitionLabelString:HE,gfmFootnoteDefinition:IE}}}function GE(t){let a=!1;return t&&t.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:i,footnoteReference:I1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,o,u,c){const h=u.createTracker(c);let m=h.move("[^");const p=u.enter("footnoteDefinition"),y=u.enter("label");return m+=h.move(u.safe(u.associationId(r),{before:m,after:"]"})),y(),m+=h.move("]:"),r.children&&r.children.length>0&&(h.shift(4),m+=h.move((a?`
|
|
253
|
-
`:" ")+u.indentLines(u.containerFlow(r,h.current()),a?q1:ZE))),p(),m}}function ZE(t,a,i){return a===0?t:q1(t,a,i)}function q1(t,a,i){return(i?"":" ")+t}const $E=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];V1.peek=KE;function YE(){return{canContainEols:["delete"],enter:{strikethrough:FE},exit:{strikethrough:QE}}}function XE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$E}],handlers:{delete:V1}}}function FE(t){this.enter({type:"delete",children:[]},t)}function QE(t){this.exit(t)}function V1(t,a,i,r){const o=i.createTracker(r),u=i.enter("strikethrough");let c=o.move("~~");return c+=i.containerPhrasing(t,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),u(),c}function KE(){return"~"}function JE(t){return t.length}function PE(t,a){const i=a||{},r=(i.align||[]).concat(),o=i.stringLength||JE,u=[],c=[],h=[],m=[];let p=0,
|
|
252
|
+
`},o),u}function IN(t,a){return t&&"run"in t?async function(i,r){const o=_y(i,{file:r,...a});await t.run(o,r)}:function(i,r){return _y(i,{file:r,...t||a})}}function vy(t){if(t)throw t}var Tf,xy;function qN(){if(xy)return Tf;xy=1;var t=Object.prototype.hasOwnProperty,a=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(p){return typeof Array.isArray=="function"?Array.isArray(p):a.call(p)==="[object Array]"},u=function(p){if(!p||a.call(p)!=="[object Object]")return!1;var _=t.call(p,"constructor"),y=p.constructor&&p.constructor.prototype&&t.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!_&&!y)return!1;var x;for(x in p);return typeof x>"u"||t.call(p,x)},c=function(p,_){i&&_.name==="__proto__"?i(p,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):p[_.name]=_.newValue},h=function(p,_){if(_==="__proto__")if(t.call(p,_)){if(r)return r(p,_).value}else return;return p[_]};return Tf=function m(){var p,_,y,x,b,N,j=arguments[0],B=1,S=arguments.length,M=!1;for(typeof j=="boolean"&&(M=j,j=arguments[1]||{},B=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});B<S;++B)if(p=arguments[B],p!=null)for(_ in p)y=h(j,_),x=h(p,_),j!==x&&(M&&x&&(u(x)||(b=o(x)))?(b?(b=!1,N=y&&o(y)?y:[]):N=y&&u(y)?y:{},c(j,{name:_,newValue:m(M,N,x)})):typeof x<"u"&&c(j,{name:_,newValue:x}));return j},Tf}var VN=qN();const Nf=Ho(VN);function Kf(t){if(typeof t!="object"||t===null)return!1;const a=Object.getPrototypeOf(t);return(a===null||a===Object.prototype||Object.getPrototypeOf(a)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function GN(){const t=[],a={run:i,use:r};return a;function i(...o){let u=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);h(null,...o);function h(m,...p){const _=t[++u];let y=-1;if(m){c(m);return}for(;++y<o.length;)(p[y]===null||p[y]===void 0)&&(p[y]=o[y]);o=p,_?ZN(_,h)(...p):c(null,...p)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),a}}function ZN(t,a){let i;return r;function r(...c){const h=t.length>c.length;let m;h&&c.push(o);try{m=t.apply(this,c)}catch(p){const _=p;if(h&&i)throw _;return o(_)}h||(m&&m.then&&typeof m.then=="function"?m.then(u,o):m instanceof Error?o(m):u(m))}function o(c,...h){i||(i=!0,a(c,...h))}function u(c){o(null,c)}}const la={basename:$N,dirname:YN,extname:XN,join:FN,sep:"/"};function $N(t,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Yr(t);let i=0,r=-1,o=t.length,u;if(a===void 0||a.length===0||a.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(u){i=o+1;break}}else r<0&&(u=!0,r=o+1);return r<0?"":t.slice(i,r)}if(a===t)return"";let c=-1,h=a.length-1;for(;o--;)if(t.codePointAt(o)===47){if(u){i=o+1;break}}else c<0&&(u=!0,c=o+1),h>-1&&(t.codePointAt(o)===a.codePointAt(h--)?h<0&&(r=o):(h=-1,r=c));return i===r?r=c:r<0&&(r=t.length),t.slice(i,r)}function YN(t){if(Yr(t),t.length===0)return".";let a=-1,i=t.length,r;for(;--i;)if(t.codePointAt(i)===47){if(r){a=i;break}}else r||(r=!0);return a<0?t.codePointAt(0)===47?"/":".":a===1&&t.codePointAt(0)===47?"//":t.slice(0,a)}function XN(t){Yr(t);let a=t.length,i=-1,r=0,o=-1,u=0,c;for(;a--;){const h=t.codePointAt(a);if(h===47){if(c){r=a+1;break}continue}i<0&&(c=!0,i=a+1),h===46?o<0?o=a:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||i<0||u===0||u===1&&o===i-1&&o===r+1?"":t.slice(o,i)}function FN(...t){let a=-1,i;for(;++a<t.length;)Yr(t[a]),t[a]&&(i=i===void 0?t[a]:i+"/"+t[a]);return i===void 0?".":QN(i)}function QN(t){Yr(t);const a=t.codePointAt(0)===47;let i=KN(t,!a);return i.length===0&&!a&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),a?"/"+i:i}function KN(t,a){let i="",r=0,o=-1,u=0,c=-1,h,m;for(;++c<=t.length;){if(c<t.length)h=t.codePointAt(c);else{if(h===47)break;h=47}if(h===47){if(!(o===c-1||u===1))if(o!==c-1&&u===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(m=i.lastIndexOf("/"),m!==i.length-1){m<0?(i="",r=0):(i=i.slice(0,m),r=i.length-1-i.lastIndexOf("/")),o=c,u=0;continue}}else if(i.length>0){i="",r=0,o=c,u=0;continue}}a&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+t.slice(o+1,c):i=t.slice(o+1,c),r=c-o-1;o=c,u=0}else h===46&&u>-1?u++:u=-1}return i}function Yr(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const JN={cwd:PN};function PN(){return"/"}function Jf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function WN(t){if(typeof t=="string")t=new URL(t);else if(!Jf(t)){const a=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw a.code="ERR_INVALID_ARG_TYPE",a}if(t.protocol!=="file:"){const a=new TypeError("The URL must be of scheme file");throw a.code="ERR_INVALID_URL_SCHEME",a}return eE(t)}function eE(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 a=t.pathname;let i=-1;for(;++i<a.length;)if(a.codePointAt(i)===37&&a.codePointAt(i+1)===50){const r=a.codePointAt(i+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(a)}const Ef=["history","path","basename","stem","extname","dirname"];class U1{constructor(a){let i;a?Jf(a)?i={path:a}:typeof a=="string"||tE(a)?i={value:a}:i=a:i={},this.cwd="cwd"in i?"":JN.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ef.length;){const u=Ef[r];u in i&&i[u]!==void 0&&i[u]!==null&&(this[u]=u==="history"?[...i[u]]:i[u])}let o;for(o in i)Ef.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?la.basename(this.path):void 0}set basename(a){Af(a,"basename"),Cf(a,"basename"),this.path=la.join(this.dirname||"",a)}get dirname(){return typeof this.path=="string"?la.dirname(this.path):void 0}set dirname(a){by(this.basename,"dirname"),this.path=la.join(a||"",this.basename)}get extname(){return typeof this.path=="string"?la.extname(this.path):void 0}set extname(a){if(Cf(a,"extname"),by(this.dirname,"extname"),a){if(a.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(a.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=la.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){Jf(a)&&(a=WN(a)),Af(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return typeof this.path=="string"?la.basename(this.path,this.extname):void 0}set stem(a){Af(a,"stem"),Cf(a,"stem"),this.path=la.join(this.dirname||"",a+(this.extname||""))}fail(a,i,r){const o=this.message(a,i,r);throw o.fatal=!0,o}info(a,i,r){const o=this.message(a,i,r);return o.fatal=void 0,o}message(a,i,r){const o=new Kt(a,i,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(a){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(a||void 0).decode(this.value)}}function Cf(t,a){if(t&&t.includes(la.sep))throw new Error("`"+a+"` cannot be a path: did not expect `"+la.sep+"`")}function Af(t,a){if(!t)throw new Error("`"+a+"` cannot be empty")}function by(t,a){if(!t)throw new Error("Setting `"+a+"` requires `path` to be set too")}function tE(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const nE=(function(t){const r=this.constructor.prototype,o=r[t],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),aE={}.hasOwnProperty;class Ed extends nE{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=GN()}copy(){const a=new Ed;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];a.use(...r)}return a.data(Nf(!0,{},this.namespace)),a}data(a,i){return typeof a=="string"?arguments.length===2?(Mf("data",this.frozen),this.namespace[a]=i,this):aE.call(this.namespace,a)&&this.namespace[a]||void 0:a?(Mf("data",this.frozen),this.namespace=a,this):this.namespace}freeze(){if(this.frozen)return this;const a=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 o=i.call(a,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(a){this.freeze();const i=po(a),r=this.parser||this.Parser;return wf("parse",r),r(String(i),i)}process(a,i){const r=this;return this.freeze(),wf("process",this.parser||this.Parser),jf("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(u,c){const h=po(a),m=r.parse(h);r.run(m,h,function(_,y,x){if(_||!y||!x)return p(_);const b=y,N=r.stringify(b,x);rE(N)?x.value=N:x.result=N,p(_,x)});function p(_,y){_||!y?c(_):u?u(y):i(void 0,y)}}}processSync(a){let i=!1,r;return this.freeze(),wf("processSync",this.parser||this.Parser),jf("processSync",this.compiler||this.Compiler),this.process(a,o),ky("processSync","process",i),r;function o(u,c){i=!0,vy(u),r=c}}run(a,i,r){Sy(a),this.freeze();const o=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?u(void 0,r):new Promise(u);function u(c,h){const m=po(i);o.run(a,m,p);function p(_,y,x){const b=y||a;_?h(_):c?c(b):r(void 0,b,x)}}}runSync(a,i){let r=!1,o;return this.run(a,i,u),ky("runSync","run",r),o;function u(c,h){vy(c),o=h,r=!0}}stringify(a,i){this.freeze();const r=po(i),o=this.compiler||this.Compiler;return jf("stringify",o),Sy(a),o(a,r)}use(a,...i){const r=this.attachers,o=this.namespace;if(Mf("use",this.frozen),a!=null)if(typeof a=="function")m(a,i);else if(typeof a=="object")Array.isArray(a)?h(a):c(a);else throw new TypeError("Expected usable value, not `"+a+"`");return this;function u(p){if(typeof p=="function")m(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[_,...y]=p;m(_,y)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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(p.plugins),p.settings&&(o.settings=Nf(!0,o.settings,p.settings))}function h(p){let _=-1;if(p!=null)if(Array.isArray(p))for(;++_<p.length;){const y=p[_];u(y)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function m(p,_){let y=-1,x=-1;for(;++y<r.length;)if(r[y][0]===p){x=y;break}if(x===-1)r.push([p,..._]);else if(_.length>0){let[b,...N]=_;const j=r[x][1];Kf(j)&&Kf(b)&&(b=Nf(!0,j,b)),r[x]=[p,b,...N]}}}}const lE=new Ed().freeze();function wf(t,a){if(typeof a!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function jf(t,a){if(typeof a!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Mf(t,a){if(a)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Sy(t){if(!Kf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function ky(t,a,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+a+"` instead")}function po(t){return iE(t)?t:new U1(t)}function iE(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function rE(t){return typeof t=="string"||sE(t)}function sE(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const oE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ty=[],Ny={allowDangerousHtml:!0},uE=/^(https?|ircs?|mailto|xmpp)$/i,cE=[{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 fE(t){const a=dE(t),i=hE(t);return mE(a.runSync(a.parse(i),i),t)}function dE(t){const a=t.rehypePlugins||Ty,i=t.remarkPlugins||Ty,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Ny}:Ny;return lE().use(YT).use(i).use(IN,r).use(a)}function hE(t){const a=t.children||"",i=new U1;return typeof a=="string"&&(i.value=a),i}function mE(t,a){const i=a.allowedElements,r=a.allowElement,o=a.components,u=a.disallowedElements,c=a.skipHtml,h=a.unwrapDisallowed,m=a.urlTransform||pE;for(const _ of cE)Object.hasOwn(a,_.from)&&(""+_.from+(_.to?"use `"+_.to+"` instead":"remove it")+oE+_.id,void 0);return Nd(t,p),wk(t,{Fragment:g.Fragment,components:o,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function p(_,y,x){if(_.type==="raw"&&x&&typeof y=="number")return c?x.children.splice(y,1):x.children[y]={type:"text",value:_.value},y;if(_.type==="element"){let b;for(b in bf)if(Object.hasOwn(bf,b)&&Object.hasOwn(_.properties,b)){const N=_.properties[b],j=bf[b];(j===null||j.includes(_.tagName))&&(_.properties[b]=m(String(N||""),b,_))}}if(_.type==="element"){let b=i?!i.includes(_.tagName):u?u.includes(_.tagName):!1;if(!b&&r&&typeof y=="number"&&(b=!r(_,y,x)),b&&x&&typeof y=="number")return h&&_.children?x.children.splice(y,1,..._.children):x.children.splice(y,1),y}}}function pE(t){const a=t.indexOf(":"),i=t.indexOf("?"),r=t.indexOf("#"),o=t.indexOf("/");return a===-1||o!==-1&&a>o||i!==-1&&a>i||r!==-1&&a>r||uE.test(t.slice(0,a))?t:""}function Ey(t,a){const i=String(t);if(typeof a!="string")throw new TypeError("Expected character");let r=0,o=i.indexOf(a);for(;o!==-1;)r++,o=i.indexOf(a,o+a.length);return r}function gE(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function yE(t,a,i){const o=Zo((i||{}).ignore||[]),u=_E(a);let c=-1;for(;++c<u.length;)B1(t,"text",h);function h(p,_){let y=-1,x;for(;++y<_.length;){const b=_[y],N=x?x.children:void 0;if(o(b,N?N.indexOf(b):void 0,x))return;x=b}if(x)return m(p,_)}function m(p,_){const y=_[_.length-1],x=u[c][0],b=u[c][1];let N=0;const B=y.children.indexOf(p);let S=!1,M=[];x.lastIndex=0;let z=x.exec(p.value);for(;z;){const F=z.index,ae={index:z.index,input:z.input,stack:[..._,p]};let U=b(...z,ae);if(typeof U=="string"&&(U=U.length>0?{type:"text",value:U}:void 0),U===!1?x.lastIndex=F+1:(N!==F&&M.push({type:"text",value:p.value.slice(N,F)}),Array.isArray(U)?M.push(...U):U&&M.push(U),N=F+z[0].length,S=!0),!x.global)break;z=x.exec(p.value)}return S?(N<p.value.length&&M.push({type:"text",value:p.value.slice(N)}),y.children.splice(B,1,...M)):M=[p],B+M.length}}function _E(t){const a=[];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 o=i[r];a.push([vE(o[0]),xE(o[1])])}return a}function vE(t){return typeof t=="string"?new RegExp(gE(t),"g"):t}function xE(t){return typeof t=="function"?t:function(){return t}}const zf="phrasing",Rf=["autolink","link","image","label"];function bE(){return{transforms:[AE],enter:{literalAutolink:kE,literalAutolinkEmail:Of,literalAutolinkHttp:Of,literalAutolinkWww:Of},exit:{literalAutolink:CE,literalAutolinkEmail:EE,literalAutolinkHttp:TE,literalAutolinkWww:NE}}}function SE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zf,notInConstruct:Rf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zf,notInConstruct:Rf},{character:":",before:"[ps]",after:"\\/",inConstruct:zf,notInConstruct:Rf}]}}function kE(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Of(t){this.config.enter.autolinkProtocol.call(this,t)}function TE(t){this.config.exit.autolinkProtocol.call(this,t)}function NE(t){this.config.exit.data.call(this,t);const a=this.stack[this.stack.length-1];a.type,a.url="http://"+this.sliceSerialize(t)}function EE(t){this.config.exit.autolinkEmail.call(this,t)}function CE(t){this.exit(t)}function AE(t){yE(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,wE],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),jE]],{ignore:["link","linkReference"]})}function wE(t,a,i,r,o){let u="";if(!H1(o)||(/^w/i.test(a)&&(i=a+i,a="",u="http://"),!ME(i)))return!1;const c=zE(i+r);if(!c[0])return!1;const h={type:"link",title:null,url:u+a+c[0],children:[{type:"text",value:a+c[0]}]};return c[1]?[h,{type:"text",value:c[1]}]:h}function jE(t,a,i,r){return!H1(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+a+"@"+i,children:[{type:"text",value:a+"@"+i}]}}function ME(t){const a=t.split(".");return!(a.length<2||a[a.length-1]&&(/_/.test(a[a.length-1])||!/[a-zA-Z\d]/.test(a[a.length-1]))||a[a.length-2]&&(/_/.test(a[a.length-2])||!/[a-zA-Z\d]/.test(a[a.length-2])))}function zE(t){const a=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!a)return[t,void 0];t=t.slice(0,a.index);let i=a[0],r=i.indexOf(")");const o=Ey(t,"(");let u=Ey(t,")");for(;r!==-1&&o>u;)t+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),u++;return[t,i]}function H1(t,a){const i=t.input.charCodeAt(t.index-1);return(t.index===0||Ol(i)||qo(i))&&(!a||i!==47)}I1.peek=qE;function RE(){this.buffer()}function OE(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function DE(){this.buffer()}function LE(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function BE(t){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Kn(this.sliceSerialize(t)).toLowerCase(),i.label=a}function UE(t){this.exit(t)}function HE(t){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Kn(this.sliceSerialize(t)).toLowerCase(),i.label=a}function IE(t){this.exit(t)}function qE(){return"["}function I1(t,a,i,r){const o=i.createTracker(r);let u=o.move("[^");const c=i.enter("footnoteReference"),h=i.enter("reference");return u+=o.move(i.safe(i.associationId(t),{after:"]",before:u})),h(),c(),u+=o.move("]"),u}function VE(){return{enter:{gfmFootnoteCallString:RE,gfmFootnoteCall:OE,gfmFootnoteDefinitionLabelString:DE,gfmFootnoteDefinition:LE},exit:{gfmFootnoteCallString:BE,gfmFootnoteCall:UE,gfmFootnoteDefinitionLabelString:HE,gfmFootnoteDefinition:IE}}}function GE(t){let a=!1;return t&&t.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:i,footnoteReference:I1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,o,u,c){const h=u.createTracker(c);let m=h.move("[^");const p=u.enter("footnoteDefinition"),_=u.enter("label");return m+=h.move(u.safe(u.associationId(r),{before:m,after:"]"})),_(),m+=h.move("]:"),r.children&&r.children.length>0&&(h.shift(4),m+=h.move((a?`
|
|
253
|
+
`:" ")+u.indentLines(u.containerFlow(r,h.current()),a?q1:ZE))),p(),m}}function ZE(t,a,i){return a===0?t:q1(t,a,i)}function q1(t,a,i){return(i?"":" ")+t}const $E=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];V1.peek=KE;function YE(){return{canContainEols:["delete"],enter:{strikethrough:FE},exit:{strikethrough:QE}}}function XE(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$E}],handlers:{delete:V1}}}function FE(t){this.enter({type:"delete",children:[]},t)}function QE(t){this.exit(t)}function V1(t,a,i,r){const o=i.createTracker(r),u=i.enter("strikethrough");let c=o.move("~~");return c+=i.containerPhrasing(t,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),u(),c}function KE(){return"~"}function JE(t){return t.length}function PE(t,a){const i=a||{},r=(i.align||[]).concat(),o=i.stringLength||JE,u=[],c=[],h=[],m=[];let p=0,_=-1;for(;++_<t.length;){const j=[],B=[];let S=-1;for(t[_].length>p&&(p=t[_].length);++S<t[_].length;){const M=WE(t[_][S]);if(i.alignDelimiters!==!1){const z=o(M);B[S]=z,(m[S]===void 0||z>m[S])&&(m[S]=z)}j.push(M)}c[_]=j,h[_]=B}let y=-1;if(typeof r=="object"&&"length"in r)for(;++y<p;)u[y]=Cy(r[y]);else{const j=Cy(r);for(;++y<p;)u[y]=j}y=-1;const x=[],b=[];for(;++y<p;){const j=u[y];let B="",S="";j===99?(B=":",S=":"):j===108?B=":":j===114&&(S=":");let M=i.alignDelimiters===!1?1:Math.max(1,m[y]-B.length-S.length);const z=B+"-".repeat(M)+S;i.alignDelimiters!==!1&&(M=B.length+M+S.length,M>m[y]&&(m[y]=M),b[y]=M),x[y]=z}c.splice(1,0,x),h.splice(1,0,b),_=-1;const N=[];for(;++_<c.length;){const j=c[_],B=h[_];y=-1;const S=[];for(;++y<p;){const M=j[y]||"";let z="",F="";if(i.alignDelimiters!==!1){const ae=m[y]-(B[y]||0),U=u[y];U===114?z=" ".repeat(ae):U===99?ae%2?(z=" ".repeat(ae/2+.5),F=" ".repeat(ae/2-.5)):(z=" ".repeat(ae/2),F=z):F=" ".repeat(ae)}i.delimiterStart!==!1&&!y&&S.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&M==="")&&(i.delimiterStart!==!1||y)&&S.push(" "),i.alignDelimiters!==!1&&S.push(z),S.push(M),i.alignDelimiters!==!1&&S.push(F),i.padding!==!1&&S.push(" "),(i.delimiterEnd!==!1||y!==p-1)&&S.push("|")}N.push(i.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return N.join(`
|
|
254
254
|
`)}function WE(t){return t==null?"":String(t)}function Cy(t){const a=typeof t=="string"?t.codePointAt(0):0;return a===67||a===99?99:a===76||a===108?108:a===82||a===114?114:0}function eC(t,a,i,r){const o=i.enter("blockquote"),u=i.createTracker(r);u.move("> "),u.shift(2);const c=i.indentLines(i.containerFlow(t,u.current()),tC);return o(),c}function tC(t,a,i){return">"+(i?"":" ")+t}function nC(t,a){return Ay(t,a.inConstruct,!0)&&!Ay(t,a.notInConstruct,!1)}function Ay(t,a,i){if(typeof a=="string"&&(a=[a]),!a||a.length===0)return i;let r=-1;for(;++r<a.length;)if(t.includes(a[r]))return!0;return!1}function wy(t,a,i,r){let o=-1;for(;++o<i.unsafe.length;)if(i.unsafe[o].character===`
|
|
255
255
|
`&&nC(i.stack,i.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
256
|
-
`}function aC(t,a){const i=String(t);let r=i.indexOf(a),o=r,u=0,c=0;if(typeof a!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++u>c&&(c=u):u=1,o=r+a.length,r=i.indexOf(a,o);return c}function lC(t,a){return!!(a.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function iC(t){const a=t.options.fence||"`";if(a!=="`"&&a!=="~")throw new Error("Cannot serialize code with `"+a+"` for `options.fence`, expected `` ` `` or `~`");return a}function rC(t,a,i,r){const o=iC(i),u=t.value||"",c=o==="`"?"GraveAccent":"Tilde";if(lC(t,i)){const
|
|
257
|
-
`,encode:["`"],...h.current()})),
|
|
258
|
-
`),u&&(
|
|
259
|
-
`)),
|
|
260
|
-
`,...m.current()}))),h(),t.title&&(h=i.enter(`title${u}`),p+=m.move(" "+o),p+=m.move(i.safe(t.title,{before:p,after:o,...m.current()})),p+=m.move(o),h()),c(),p}function uC(t){const a=t.options.emphasis||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize emphasis with `"+a+"` for `options.emphasis`, expected `*`, or `_`");return a}function Hr(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Co(t,a,i){const r=wi(t),o=wi(a);return r===void 0?o===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}G1.peek=cC;function G1(t,a,i,r){const o=uC(i),u=i.enter("emphasis"),c=i.createTracker(r),h=c.move(o);let m=c.move(i.containerPhrasing(t,{after:o,before:h,...c.current()}));const p=m.charCodeAt(0),
|
|
256
|
+
`}function aC(t,a){const i=String(t);let r=i.indexOf(a),o=r,u=0,c=0;if(typeof a!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++u>c&&(c=u):u=1,o=r+a.length,r=i.indexOf(a,o);return c}function lC(t,a){return!!(a.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function iC(t){const a=t.options.fence||"`";if(a!=="`"&&a!=="~")throw new Error("Cannot serialize code with `"+a+"` for `options.fence`, expected `` ` `` or `~`");return a}function rC(t,a,i,r){const o=iC(i),u=t.value||"",c=o==="`"?"GraveAccent":"Tilde";if(lC(t,i)){const y=i.enter("codeIndented"),x=i.indentLines(u,sC);return y(),x}const h=i.createTracker(r),m=o.repeat(Math.max(aC(u,o)+1,3)),p=i.enter("codeFenced");let _=h.move(m);if(t.lang){const y=i.enter(`codeFencedLang${c}`);_+=h.move(i.safe(t.lang,{before:_,after:" ",encode:["`"],...h.current()})),y()}if(t.lang&&t.meta){const y=i.enter(`codeFencedMeta${c}`);_+=h.move(" "),_+=h.move(i.safe(t.meta,{before:_,after:`
|
|
257
|
+
`,encode:["`"],...h.current()})),y()}return _+=h.move(`
|
|
258
|
+
`),u&&(_+=h.move(u+`
|
|
259
|
+
`)),_+=h.move(m),p(),_}function sC(t,a,i){return(i?"":" ")+t}function Cd(t){const a=t.options.quote||'"';if(a!=='"'&&a!=="'")throw new Error("Cannot serialize title with `"+a+"` for `options.quote`, expected `\"`, or `'`");return a}function oC(t,a,i,r){const o=Cd(i),u=o==='"'?"Quote":"Apostrophe",c=i.enter("definition");let h=i.enter("label");const m=i.createTracker(r);let p=m.move("[");return p+=m.move(i.safe(i.associationId(t),{before:p,after:"]",...m.current()})),p+=m.move("]: "),h(),!t.url||/[\0- \u007F]/.test(t.url)?(h=i.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(i.safe(t.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(h=i.enter("destinationRaw"),p+=m.move(i.safe(t.url,{before:p,after:t.title?" ":`
|
|
260
|
+
`,...m.current()}))),h(),t.title&&(h=i.enter(`title${u}`),p+=m.move(" "+o),p+=m.move(i.safe(t.title,{before:p,after:o,...m.current()})),p+=m.move(o),h()),c(),p}function uC(t){const a=t.options.emphasis||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize emphasis with `"+a+"` for `options.emphasis`, expected `*`, or `_`");return a}function Hr(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Co(t,a,i){const r=wi(t),o=wi(a);return r===void 0?o===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}G1.peek=cC;function G1(t,a,i,r){const o=uC(i),u=i.enter("emphasis"),c=i.createTracker(r),h=c.move(o);let m=c.move(i.containerPhrasing(t,{after:o,before:h,...c.current()}));const p=m.charCodeAt(0),_=Co(r.before.charCodeAt(r.before.length-1),p,o);_.inside&&(m=Hr(p)+m.slice(1));const y=m.charCodeAt(m.length-1),x=Co(r.after.charCodeAt(0),y,o);x.inside&&(m=m.slice(0,-1)+Hr(y));const b=c.move(o);return u(),i.attentionEncodeSurroundingInfo={after:x.outside,before:_.outside},h+m+b}function cC(t,a,i){return i.options.emphasis||"*"}function fC(t,a){let i=!1;return Nd(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,Ff}),!!((!t.depth||t.depth<3)&&_d(t)&&(a.options.setext||i))}function dC(t,a,i,r){const o=Math.max(Math.min(6,t.depth||1),1),u=i.createTracker(r);if(fC(t,i)){const _=i.enter("headingSetext"),y=i.enter("phrasing"),x=i.containerPhrasing(t,{...u.current(),before:`
|
|
261
261
|
`,after:`
|
|
262
|
-
`});return
|
|
262
|
+
`});return y(),_(),x+`
|
|
263
263
|
`+(o===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
264
264
|
`))+1))}const c="#".repeat(o),h=i.enter("headingAtx"),m=i.enter("phrasing");u.move(c+" ");let p=i.containerPhrasing(t,{before:"# ",after:`
|
|
265
|
-
`,...u.current()});return/^[\t ]/.test(p)&&(p=Hr(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,i.options.closeAtx&&(p+=" "+c),m(),h(),p}Z1.peek=hC;function Z1(t){return t.value||""}function hC(){return"<"}$1.peek=mC;function $1(t,a,i,r){const o=Cd(i),u=o==='"'?"Quote":"Apostrophe",c=i.enter("image");let h=i.enter("label");const m=i.createTracker(r);let p=m.move("![");return p+=m.move(i.safe(t.alt,{before:p,after:"]",...m.current()})),p+=m.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=i.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(i.safe(t.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(h=i.enter("destinationRaw"),p+=m.move(i.safe(t.url,{before:p,after:t.title?" ":")",...m.current()}))),h(),t.title&&(h=i.enter(`title${u}`),p+=m.move(" "+o),p+=m.move(i.safe(t.title,{before:p,after:o,...m.current()})),p+=m.move(o),h()),p+=m.move(")"),c(),p}function mC(){return"!"}Y1.peek=pC;function Y1(t,a,i,r){const o=t.referenceType,u=i.enter("imageReference");let c=i.enter("label");const h=i.createTracker(r);let m=h.move("![");const p=i.safe(t.alt,{before:m,after:"]",...h.current()});m+=h.move(p+"]["),c();const
|
|
266
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:m,tableRow:h}};function c(b,N,j,B){return p(
|
|
267
|
-
`))}function m(b,N,j,B){const S=j.enter("tableCell"),M=j.enter("phrasing"),z=j.containerPhrasing(b,{...B,before:u,after:u});return M(),S(),z}function p(b,N){return PE(b,{align:N,alignDelimiters:r,padding:i,stringLength:o})}function y(b,N,j){const B=b.children;let S=-1;const M=[],z=N.enter("table");for(;++S<B.length;)M[S]=_(B[S],N,j);return z(),M}function _(b,N,j){const B=b.children;let S=-1;const M=[],z=N.enter("tableRow");for(;++S<B.length;)M[S]=m(B[S],b,N,j);return z(),M}function x(b,N,j){let B=W1.inlineCode(b,N,j);return j.stack.includes("tableCell")&&(B=B.replace(/\|/g,"\\$&")),B}}function HC(){return{exit:{taskListCheckValueChecked:My,taskListCheckValueUnchecked:My,paragraph:qC}}}function IC(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:VC}}}function My(t){const a=this.stack[this.stack.length-2];a.type,a.checked=t.type==="taskListCheckValueChecked"}function qC(t){const a=this.stack[this.stack.length-2];if(a&&a.type==="listItem"&&typeof a.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const o=a.children;let u=-1,c;for(;++u<o.length;){const h=o[u];if(h.type==="paragraph"){c=h;break}}c===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 VC(t,a,i,r){const o=t.children[0],u=typeof t.checked=="boolean"&&o&&o.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",h=i.createTracker(r);u&&h.move(c);let m=W1.listItem(t,a,i,{...r,...h.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),m;function p(y){return y+c}}function GC(){return[bE(),VE(),YE(),zC(),HC()]}function ZC(t){return{extensions:[SE(),GE(t),XE(),UC(t),IC()]}}const $C={tokenize:JC,partial:!0},e_={tokenize:PC,partial:!0},t_={tokenize:WC,partial:!0},n_={tokenize:eA,partial:!0},YC={tokenize:tA,partial:!0},a_={name:"wwwAutolink",tokenize:QC,previous:i_},l_={name:"protocolAutolink",tokenize:KC,previous:r_},Oa={name:"emailAutolink",tokenize:FC,previous:s_},sa={};function XC(){return{text:sa}}let Rl=48;for(;Rl<123;)sa[Rl]=Oa,Rl++,Rl===58?Rl=65:Rl===91&&(Rl=97);sa[43]=Oa;sa[45]=Oa;sa[46]=Oa;sa[95]=Oa;sa[72]=[Oa,l_];sa[104]=[Oa,l_];sa[87]=[Oa,a_];sa[119]=[Oa,a_];function FC(t,a,i){const r=this;let o,u;return c;function c(_){return!Pf(_)||!s_.call(r,r.previous)||wd(r.events)?i(_):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(_))}function h(_){return Pf(_)?(t.consume(_),h):_===64?(t.consume(_),m):i(_)}function m(_){return _===46?t.check(YC,y,p)(_):_===45||_===95||Qt(_)?(u=!0,t.consume(_),m):y(_)}function p(_){return t.consume(_),o=!0,m}function y(_){return u&&o&&tn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),a(_)):i(_)}}function QC(t,a,i){const r=this;return o;function o(c){return c!==87&&c!==119||!i_.call(r,r.previous)||wd(r.events)?i(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check($C,t.attempt(e_,t.attempt(t_,u),i),i)(c))}function u(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),a(c)}}function KC(t,a,i){const r=this;let o="",u=!1;return c;function c(_){return(_===72||_===104)&&r_.call(r,r.previous)&&!wd(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(_),t.consume(_),h):i(_)}function h(_){if(tn(_)&&o.length<5)return o+=String.fromCodePoint(_),t.consume(_),h;if(_===58){const x=o.toLowerCase();if(x==="http"||x==="https")return t.consume(_),m}return i(_)}function m(_){return _===47?(t.consume(_),u?p:(u=!0,m)):i(_)}function p(_){return _===null||To(_)||pt(_)||Ol(_)||qo(_)?i(_):t.attempt(e_,t.attempt(t_,y),i)(_)}function y(_){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),a(_)}}function JC(t,a,i){let r=0;return o;function o(c){return(c===87||c===119)&&r<3?(r++,t.consume(c),o):c===46&&r===3?(t.consume(c),u):i(c)}function u(c){return c===null?i(c):a(c)}}function PC(t,a,i){let r,o,u;return c;function c(p){return p===46||p===95?t.check(n_,m,h)(p):p===null||pt(p)||Ol(p)||p!==45&&qo(p)?m(p):(u=!0,t.consume(p),c)}function h(p){return p===95?r=!0:(o=r,r=void 0),t.consume(p),c}function m(p){return o||r||!u?i(p):a(p)}}function WC(t,a){let i=0,r=0;return o;function o(c){return c===40?(i++,t.consume(c),o):c===41&&r<i?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?t.check(n_,a,u)(c):c===null||pt(c)||Ol(c)?a(c):(t.consume(c),o)}function u(c){return c===41&&r++,t.consume(c),o}}function eA(t,a,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),u):h===93?(t.consume(h),o):h===60||h===null||pt(h)||Ol(h)?a(h):i(h)}function o(h){return h===null||h===40||h===91||pt(h)||Ol(h)?a(h):r(h)}function u(h){return tn(h)?c(h):i(h)}function c(h){return h===59?(t.consume(h),r):tn(h)?(t.consume(h),c):i(h)}}function tA(t,a,i){return r;function r(u){return t.consume(u),o}function o(u){return Qt(u)?i(u):a(u)}}function i_(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||pt(t)}function r_(t){return!tn(t)}function s_(t){return!(t===47||Pf(t))}function Pf(t){return t===43||t===45||t===46||t===95||Qt(t)}function wd(t){let a=t.length,i=!1;for(;a--;){const r=t[a][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 nA={tokenize:cA,partial:!0};function aA(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:sA,continuation:{tokenize:oA},exit:uA}},text:{91:{name:"gfmFootnoteCall",tokenize:rA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:lA,resolveTo:iA}}}}function lA(t,a,i){const r=this;let o=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;o--;){const m=r.events[o][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return h;function h(m){if(!c||!c._balanced)return i(m);const p=Kn(r.sliceSerialize({start:c.end,end:r.now()}));return p.codePointAt(0)!==94||!u.includes(p.slice(1))?i(m):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(m),t.exit("gfmFootnoteCallLabelMarker"),a(m))}}function iA(t,a){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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[i+3][1].end),end:Object.assign({},t[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},h=[t[i+1],t[i+2],["enter",r,a],t[i+3],t[i+4],["enter",o,a],["exit",o,a],["enter",u,a],["enter",c,a],["exit",c,a],["exit",u,a],t[t.length-2],t[t.length-1],["exit",r,a]];return t.splice(i,t.length-i+1,...h),t}function rA(t,a,i){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,c;return h;function h(_){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(_),t.exit("gfmFootnoteCallLabelMarker"),m}function m(_){return _!==94?i(_):(t.enter("gfmFootnoteCallMarker"),t.consume(_),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",p)}function p(_){if(u>999||_===93&&!c||_===null||_===91||pt(_))return i(_);if(_===93){t.exit("chunkString");const x=t.exit("gfmFootnoteCallString");return o.includes(Kn(r.sliceSerialize(x)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(_),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),a):i(_)}return pt(_)||(c=!0),u++,t.consume(_),_===92?y:p}function y(_){return _===91||_===92||_===93?(t.consume(_),u++,p):p(_)}}function sA(t,a,i){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,c=0,h;return m;function m(N){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(N){return N===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):i(N)}function y(N){if(c>999||N===93&&!h||N===null||N===91||pt(N))return i(N);if(N===93){t.exit("chunkString");const j=t.exit("gfmFootnoteDefinitionLabelString");return u=Kn(r.sliceSerialize(j)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),x}return pt(N)||(h=!0),c++,t.consume(N),N===92?_:y}function _(N){return N===91||N===92||N===93?(t.consume(N),c++,y):y(N)}function x(N){return N===58?(t.enter("definitionMarker"),t.consume(N),t.exit("definitionMarker"),o.includes(u)||o.push(u),Qe(t,b,"gfmFootnoteDefinitionWhitespace")):i(N)}function b(N){return a(N)}}function oA(t,a,i){return t.check($r,a,t.attempt(nA,a,i))}function uA(t){t.exit("gfmFootnoteDefinition")}function cA(t,a,i){const r=this;return Qe(t,o,"gfmFootnoteDefinitionIndent",5);function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?a(u):i(u)}}function fA(t){let i=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:o};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(c,h){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let p=m;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[m][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[m][1].end)},_={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[m][1].start)},x=[["enter",y,h],["enter",c[p][1],h],["exit",c[p][1],h],["enter",_,h]],b=h.parser.constructs.insideSpan.null;b&&Tn(x,x.length,0,Vo(b,c.slice(p+1,m),h)),Tn(x,x.length,0,[["exit",_,h],["enter",c[m][1],h],["exit",c[m][1],h],["exit",y,h]]),Tn(c,p-1,m-p+3,x),m=p+x.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function u(c,h,m){const p=this.previous,y=this.events;let _=0;return x;function x(N){return p===126&&y[y.length-1][1].type!=="characterEscape"?m(N):(c.enter("strikethroughSequenceTemporary"),b(N))}function b(N){const j=wi(p);if(N===126)return _>1?m(N):(c.consume(N),_++,b);if(_<2&&!i)return m(N);const B=c.exit("strikethroughSequenceTemporary"),S=wi(N);return B._open=!S||S===2&&!!j,B._close=!j||j===2&&!!S,h(N)}}}class dA{constructor(){this.map=[]}add(a,i,r){hA(this,a,i,r)}consume(a){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(a.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),a.length=this.map[i][0];r.push(a.slice()),a.length=0;let o=r.pop();for(;o;){for(const u of o)a.push(u);o=r.pop()}this.map.length=0}}function hA(t,a,i,r){let o=0;if(!(i===0&&r.length===0)){for(;o<t.map.length;){if(t.map[o][0]===a){t.map[o][1]+=i,t.map[o][2].push(...r);return}o+=1}t.map.push([a,i,r])}}function mA(t,a){let i=!1;const r=[];for(;a<t.length;){const o=t[a];if(i){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(t[a+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[a-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(i=!0);a+=1}return r}function pA(){return{flow:{null:{name:"table",tokenize:gA,resolveAll:yA}}}}function gA(t,a,i){const r=this;let o=0,u=0,c;return h;function h(R){let W=r.events.length-1;for(;W>-1;){const K=r.events[W][1].type;if(K==="lineEnding"||K==="linePrefix")W--;else break}const G=W>-1?r.events[W][1].type:null,ge=G==="tableHead"||G==="tableRow"?U:m;return ge===U&&r.parser.lazy[r.now().line]?i(R):ge(R)}function m(R){return t.enter("tableHead"),t.enter("tableRow"),p(R)}function p(R){return R===124||(c=!0,u+=1),y(R)}function y(R){return R===null?i(R):Te(R)?u>1?(u=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),b):i(R):qe(R)?Qe(t,y,"whitespace")(R):(u+=1,c&&(c=!1,o+=1),R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),c=!0,y):(t.enter("data"),_(R)))}function _(R){return R===null||R===124||pt(R)?(t.exit("data"),y(R)):(t.consume(R),R===92?x:_)}function x(R){return R===92||R===124?(t.consume(R),_):_(R)}function b(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(R):(t.enter("tableDelimiterRow"),c=!1,qe(R)?Qe(t,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):N(R))}function N(R){return R===45||R===58?B(R):R===124?(c=!0,t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),j):ne(R)}function j(R){return qe(R)?Qe(t,B,"whitespace")(R):B(R)}function B(R){return R===58?(u+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),S):R===45?(u+=1,S(R)):R===null||Te(R)?F(R):ne(R)}function S(R){return R===45?(t.enter("tableDelimiterFiller"),M(R)):ne(R)}function M(R){return R===45?(t.consume(R),M):R===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),z):(t.exit("tableDelimiterFiller"),z(R))}function z(R){return qe(R)?Qe(t,F,"whitespace")(R):F(R)}function F(R){return R===124?N(R):R===null||Te(R)?!c||o!==u?ne(R):(t.exit("tableDelimiterRow"),t.exit("tableHead"),a(R)):ne(R)}function ne(R){return i(R)}function U(R){return t.enter("tableRow"),te(R)}function te(R){return R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),te):R===null||Te(R)?(t.exit("tableRow"),a(R)):qe(R)?Qe(t,te,"whitespace")(R):(t.enter("data"),de(R))}function de(R){return R===null||R===124||pt(R)?(t.exit("data"),te(R)):(t.consume(R),R===92?pe:de)}function pe(R){return R===92||R===124?(t.consume(R),de):de(R)}}function yA(t,a){let i=-1,r=!0,o=0,u=[0,0,0,0],c=[0,0,0,0],h=!1,m=0,p,y,_;const x=new dA;for(;++i<t.length;){const b=t[i],N=b[1];b[0]==="enter"?N.type==="tableHead"?(h=!1,m!==0&&(zy(x,a,m,p,y),y=void 0,m=0),p={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},x.add(i,0,[["enter",p,a]])):N.type==="tableRow"||N.type==="tableDelimiterRow"?(r=!0,_=void 0,u=[0,0,0,0],c=[0,i+1,0,0],h&&(h=!1,y={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},x.add(i,0,[["enter",y,a]])),o=N.type==="tableDelimiterRow"?2:y?3:1):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],_=go(x,a,u,o,void 0,_),u=[0,0,0,0]),c[2]=i)):N.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(c[0]=c[1],_=go(x,a,u,o,void 0,_)),u=c,c=[u[1],i,0,0])):N.type==="tableHead"?(h=!0,m=i):N.type==="tableRow"||N.type==="tableDelimiterRow"?(m=i,u[1]!==0?(c[0]=c[1],_=go(x,a,u,o,i,_)):c[1]!==0&&(_=go(x,a,c,o,i,_)),o=0):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(c[3]=i)}for(m!==0&&zy(x,a,m,p,y),x.consume(a.events),i=-1;++i<a.events.length;){const b=a.events[i];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=mA(a.events,i))}return t}function go(t,a,i,r,o,u){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",h="tableContent";i[0]!==0&&(u.end=Object.assign({},Ei(a.events,i[0])),t.add(i[0],0,[["exit",u,a]]));const m=Ei(a.events,i[1]);if(u={type:c,start:Object.assign({},m),end:Object.assign({},m)},t.add(i[1],0,[["enter",u,a]]),i[2]!==0){const p=Ei(a.events,i[2]),y=Ei(a.events,i[3]),_={type:h,start:Object.assign({},p),end:Object.assign({},y)};if(t.add(i[2],0,[["enter",_,a]]),r!==2){const x=a.events[i[2]],b=a.events[i[3]];if(x[1].end=Object.assign({},b[1].end),x[1].type="chunkText",x[1].contentType="text",i[3]>i[2]+1){const N=i[2]+1,j=i[3]-i[2]-1;t.add(N,j,[])}}t.add(i[3]+1,0,[["exit",_,a]])}return o!==void 0&&(u.end=Object.assign({},Ei(a.events,o)),t.add(o,0,[["exit",u,a]]),u=void 0),u}function zy(t,a,i,r,o){const u=[],c=Ei(a.events,i);o&&(o.end=Object.assign({},c),u.push(["exit",o,a])),r.end=Object.assign({},c),u.push(["exit",r,a]),t.add(i+1,0,u)}function Ei(t,a){const i=t[a],r=i[0]==="enter"?"start":"end";return i[1][r]}const _A={name:"tasklistCheck",tokenize:xA};function vA(){return{text:{91:_A}}}function xA(t,a,i){const r=this;return o;function o(m){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(m):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),u)}function u(m){return pt(m)?(t.enter("taskListCheckValueUnchecked"),t.consume(m),t.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(t.enter("taskListCheckValueChecked"),t.consume(m),t.exit("taskListCheckValueChecked"),c):i(m)}function c(m){return m===93?(t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),h):i(m)}function h(m){return Te(m)?a(m):qe(m)?t.check({tokenize:bA},a,i)(m):i(m)}}function bA(t,a,i){return Qe(t,r,"whitespace");function r(o){return o===null?i(o):a(o)}}function SA(t){return _1([XC(),aA(),fA(t),pA(),vA()])}const kA={};function TA(t){const a=this,i=t||kA,r=a.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(SA(i)),u.push(GC()),c.push(ZC(i))}const NA="_root_1pdrb_1",EA="_codeBlockWrapper_1pdrb_49",CA="_codeBlockHeader_1pdrb_70",AA="_codeBlockLang_1pdrb_80",wA="_copyBtn_1pdrb_86",Rr={root:NA,codeBlockWrapper:EA,codeBlockHeader:CA,codeBlockLang:AA,copyBtn:wA};function jA({children:t,className:a,...i}){var c;if(!(/language-(\w+)/.test(a||"")||typeof t=="string"&&t.includes(`
|
|
268
|
-
`)))return g.jsx("code",{className:a,...i,children:t});const o=String(t).replace(/\n$/,""),u=(c=a==null?void 0:a.match(/language-(\w+)/))==null?void 0:c[1];return g.jsx(MA,{code:o,lang:u})}function MA({code:t,lang:a}){const[i,r]=
|
|
269
|
-
`)}function vw(t){return t.isError?ut.bodyError:t.role==="user"?ut.bodyUser:ut.bodyAssistant}const xw=L.forwardRef(({messages:t,isStreaming:a,isStarting:i,agentName:r,agentBuildType:o,agentProtocol:u,hasAvailableTargets:c=!0},h)=>{if(i)return g.jsx("div",{className:ut.messages,ref:h,"data-testid":"message-list",children:g.jsxs("div",{className:ut.emptyState,children:[g.jsx("div",{className:ut.spinner}),g.jsxs("div",{className:ut.startingText,children:["Setting up ",r||"agent",g.jsx("span",{className:ut.thinkingDot,children:"."}),g.jsx("span",{className:ut.thinkingDot,children:"."}),g.jsx("span",{className:ut.thinkingDot,children:"."})]})]})});if(t.length===0){if(!c)return g.jsx("div",{className:ut.messages,ref:h,"data-testid":"message-list",children:g.jsxs("div",{className:ut.emptyState,children:[g.jsx("div",{className:ut.emptyStateIcon,children:g.jsx(If,{size:40,strokeWidth:1.5,color:"#6366f1"})}),g.jsx("div",{className:ut.emptyStateAgent,children:"No agents found"}),g.jsxs("div",{className:ut.emptyStateText,children:["Run ",g.jsx("code",{className:"cmd",children:"agentcore add"})," to add an agent or harness"]})]})});const p=[o==="CodeZip"?"Direct code deploy":o,u??"HTTP"].filter(Boolean).join(" · ");return g.jsx("div",{className:ut.messages,ref:h,"data-testid":"message-list",children:g.jsxs("div",{className:ut.emptyState,children:[g.jsx("div",{className:ut.emptyStateIcon,children:g.jsx(If,{size:40,strokeWidth:1.5,color:"#6366f1"})}),g.jsx("div",{className:ut.emptyStateAgent,children:r||"Agent"}),p&&g.jsx("div",{className:ut.emptyStateDetails,children:p}),g.jsx("div",{className:ut.emptyStateText,children:"Send a prompt to test this agent"})]})})}return g.jsx("div",{className:ut.messages,ref:h,"data-testid":"message-list",children:t.map((m,p)=>a&&m.role==="assistant"&&m.content===""&&p===t.length-1?g.jsx("div",{className:ut.msg,"data-testid":"thinking-indicator",children:g.jsxs("div",{className:ut.thinking,children:["Thinking",g.jsx("span",{className:ut.thinkingDot,children:"."}),g.jsx("span",{className:ut.thinkingDot,children:"."}),g.jsx("span",{className:ut.thinkingDot,children:"."})]})},p):g.jsxs("div",{className:m.role==="user"?ut.msgUser:ut.msg,"data-testid":`chat-message-${p}`,children:[g.jsx("div",{className:vw(m),children:m.isError?g.jsx(qf,{content:m.content}):m.role==="assistant"?g.jsx(RA,{content:m.toolExecutions?_w(m.content):m.content}):m.content}),m.toolCalls&&m.toolCalls.length>0&&g.jsx(nw,{toolCalls:m.toolCalls}),m.toolExecutions&&Object.keys(m.toolExecutions).length>0&&g.jsx(ek,{toolExecutions:m.toolExecutions}),m.tokenUsage&&g.jsx(IA,{usage:m.tokenUsage})]},p))})});function bw(){const a=new URLSearchParams(window.location.search).get("port");return a&&/^\d+$/.test(a)?`http://localhost:${a}`:""}const In=bw();function Nn(t,a){if((a==null?void 0:a.method)==="POST"){const i=new Headers(a.headers);return i.set("X-Agentcore-Local","1"),fetch(t,{...a,headers:i})}return fetch(t,a)}function Sw(){const[t,a]=L.useState([]),[i,r]=L.useState(!1),[o,u]=L.useState(null),[c,h]=L.useState(null),m=L.useCallback(async()=>{try{return(await Nn(`${In}/api/memory?memoryName=__probe__&namespace=__probe__`)).status===404?(h(!1),!1):(h(!0),!0)}catch{return h(!1),!1}},[]),p=L.useCallback(async(x,b)=>{r(!0),u(null),a([]);try{const N=new URLSearchParams({memoryName:x,namespace:b}),j=await Nn(`${In}/api/memory?${N.toString()}`);if(j.status===404){u("Memory browsing is only available in invoke mode."),h(!1);return}const B=await j.json();B.success&&B.records?a(B.records):u(B.error||"Failed to load memory records")}catch(N){u(N instanceof Error?N.message:"Failed to load memory records")}finally{r(!1)}},[]),y=L.useCallback(async(x,b,N)=>{r(!0),u(null),a([]);try{const j={memoryName:x,namespace:b,searchQuery:N},B=await Nn(`${In}/api/memory/search`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(B.status===404){u("Memory browsing is only available in invoke mode."),h(!1);return}const S=await B.json();S.success&&S.records?a(S.records):u(S.error||"Failed to search memory records")}catch(j){u(j instanceof Error?j.message:"Failed to search memory records")}finally{r(!1)}},[]),_=L.useCallback(()=>{a([]),u(null)},[]);return{records:t,isLoading:i,error:o,isAvailable:c,checkAvailability:m,listRecords:p,searchRecords:y,clear:_}}function Yo(t){try{const a=Number(t),i=Number.isFinite(a)&&a>1e12?new Date(a):new Date(t);return isNaN(i.getTime())?t:i.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return t}}const kw="_notice_1isal_1",Tw="_warning_1isal_12",Nw="_retryBtn_1isal_16",Bf={notice:kw,warning:Tw,retryBtn:Nw};function Oy({children:t,variant:a="error",onRetry:i}){return g.jsxs("div",{className:`${Bf.notice} ${a==="warning"?Bf.warning:""}`,children:[t,i&&g.jsx("button",{className:Bf.retryBtn,onClick:i,children:"Retry"})]})}const Ew="_container_qogk5_1",Cw="_content_qogk5_47",Aw="_status_qogk5_55",ww="_error_qogk5_62",jw="_detail_qogk5_73",Mw="_detailHeader_qogk5_80",zw="_detailTitle_qogk5_89",Rw="_closeBtn_qogk5_95",Ow="_controls_qogk5_118",Dw="_field_qogk5_124",Lw="_fieldLabel_qogk5_130",Bw="_input_qogk5_138",Uw="_select_qogk5_158",Hw="_actions_qogk5_175",Iw="_actionBtn_qogk5_180",qw="_searchBtn_qogk5_202",Vw="_resultCount_qogk5_213",Gw="_recordList_qogk5_219",Zw="_recordRow_qogk5_228",$w="_recordRowSelected_qogk5_248",Yw="_recordMain_qogk5_254",Xw="_recordContent_qogk5_261",Fw="_scoreBadge_qogk5_271",Qw="_recordMeta_qogk5_281",Kw="_strategyTag_qogk5_288",Jw="_recordTime_qogk5_296",Pw="_detailBody_qogk5_302",Ww="_detailSection_qogk5_309",ej="_detailLabel_qogk5_315",tj="_detailContent_qogk5_322",nj="_metadataGrid_qogk5_335",aj="_metadataRow_qogk5_341",lj="_metadataKey_qogk5_354",ij="_metadataValue_qogk5_361",rj="_detailId_qogk5_370",sj="_namespacesValue_qogk5_377",oj="_noMetadata_qogk5_383",_e={container:Ew,content:Cw,status:Aw,error:ww,detail:jw,detailHeader:Mw,detailTitle:zw,closeBtn:Rw,controls:Ow,field:Dw,fieldLabel:Lw,input:Bw,select:Uw,actions:Hw,actionBtn:Iw,searchBtn:qw,resultCount:Vw,recordList:Gw,recordRow:Zw,recordRowSelected:$w,recordMain:Yw,recordContent:Xw,scoreBadge:Fw,recordMeta:Qw,strategyTag:Kw,recordTime:Jw,detailBody:Pw,detailSection:Ww,detailLabel:ej,detailContent:tj,metadataGrid:nj,metadataRow:aj,metadataKey:lj,metadataValue:ij,detailId:rj,namespacesValue:sj,noMetadata:oj};function uj({memories:t,sessionId:a,userId:i,isActive:r}){var ee;const{records:o,isLoading:u,error:c,isAvailable:h,checkAvailability:m,listRecords:p,searchRecords:y,clear:_}=Sw(),[x,b]=L.useState(((ee=t[0])==null?void 0:ee.name)??""),[N,j]=L.useState(""),[B,S]=L.useState({}),[M,z]=L.useState(""),[F,ne]=L.useState(null),[U,te]=L.useState(!1),[de,pe]=L.useState(!1);L.useEffect(()=>{!x&&t.length>0&&b(t[0].name)},[t,x]);const R=t.find($=>$.name===x),W=(R==null?void 0:R.strategies)??[],G=W.find($=>$.type===N),ge=(G==null?void 0:G.namespaceTemplates)??(G==null?void 0:G.namespaces)??[],K=L.useMemo(()=>G?[...new Set(ge.flatMap($=>($.match(/\{(\w+)\}/g)||[]).map(Ee=>Ee.slice(1,-1))))]:[],[G]);L.useEffect(()=>{r&&h===null&&m()},[r,h,m]),L.useEffect(()=>{if(!G){S({});return}const $={};for(const ue of K)ue==="actorId"?$[ue]=i||"default-user":ue==="sessionId"&&a?$[ue]=a:$[ue]="";S($)},[G,K,a,i]);const ae=$=>{b($),j(""),ne(null),pe(!1),_()},D=$=>{j($),ne(null),pe(!1),_()},J=($,ue)=>{S(Ee=>({...Ee,[$]:ue}))},se=()=>G?ge.map($=>$.replace(/\{(\w+)\}/g,(ue,Ee)=>{var We;return((We=B[Ee])==null?void 0:We.trim())||""})).join(","):"",be=G!=null&&K.every($=>{var ue;return(ue=B[$])==null?void 0:ue.trim()}),E=()=>{be&&(te(!1),ne(null),pe(!0),p(x,se()))},A=()=>{!be||!M.trim()||(te(!0),ne(null),pe(!0),y(x,se(),M.trim()))},Z=$=>{$.key==="Enter"&&(M.trim()?A():E())},T=$=>{ne(ue=>(ue==null?void 0:ue.memoryRecordId)===$.memoryRecordId?null:$)};return t.length===0?g.jsxs("div",{className:_e.status,children:[g.jsx("div",{children:"No AgentCore Memory found."}),g.jsxs("div",{children:["Run ",g.jsx("code",{className:"cmd",children:"agentcore add"})," to add Memory, then"," ",g.jsx("code",{className:"cmd",children:"agentcore deploy"})," to deploy it."]})]}):g.jsx("div",{className:_e.container,children:g.jsxs("div",{className:_e.content,children:[t.some($=>$.deploymentStatus!=="deployed")&&g.jsxs(Oy,{variant:"warning",children:[g.jsx("span",{children:"AgentCore Memory must be deployed before it can be used."}),g.jsxs("span",{children:["To test memory, run ",g.jsx("code",{className:"cmd",children:"agentcore deploy"})," and restart dev."]})]}),t.some($=>$.deploymentStatus==="deployed")&&g.jsx(Oy,{variant:"warning",children:"Memories may take 1-2 minutes to update after an invocation."}),h!==!1&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:_e.controls,children:[g.jsxs("div",{className:_e.field,children:[g.jsx("label",{className:_e.fieldLabel,htmlFor:"memory-selector",children:"Memory"}),g.jsx("select",{id:"memory-selector",className:_e.select,value:x,onChange:$=>ae($.target.value),children:t.map($=>g.jsx("option",{value:$.name,children:$.name},$.name))})]}),g.jsxs("div",{className:_e.field,children:[g.jsx("label",{className:_e.fieldLabel,htmlFor:`strat-${x}`,children:"Strategy"}),g.jsxs("select",{id:`strat-${x}`,className:_e.select,value:N,onChange:$=>D($.target.value),children:[g.jsx("option",{value:"",disabled:!0,children:"Select a strategy…"}),W.map($=>g.jsx("option",{value:$.type,children:$.type},$.type))]})]}),K.map($=>g.jsxs("div",{className:_e.field,children:[g.jsx("label",{className:_e.fieldLabel,htmlFor:`ns-${x}-${$}`,children:$}),g.jsx("input",{id:`ns-${x}-${$}`,className:_e.input,type:"text",placeholder:`Enter ${$}…`,value:B[$]||"",onChange:ue=>J($,ue.target.value),onKeyDown:Z})]},$)),G&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:_e.field,children:[g.jsx("label",{className:_e.fieldLabel,htmlFor:`search-${x}`,children:"Search (optional)"}),g.jsx("input",{id:`search-${x}`,className:_e.input,type:"text",placeholder:"Semantic search query…",value:M,onChange:$=>z($.target.value),onKeyDown:Z})]}),g.jsxs("div",{className:_e.actions,children:[g.jsx("button",{className:_e.actionBtn,onClick:E,disabled:!be||u,children:"List"}),g.jsx("button",{className:`${_e.actionBtn} ${_e.searchBtn}`,onClick:A,disabled:!be||!M.trim()||u,children:"Search"})]})]})]}),u&&g.jsx("div",{className:_e.status,children:"Loading records…"}),c&&g.jsx("div",{className:_e.error,children:g.jsxs("span",{children:[g.jsx(cd,{size:12})," ",c]})}),!u&&!c&&de&&o.length===0&&g.jsx("div",{className:_e.status,children:"No memory records found for this namespace."}),!u&&o.length>0&&g.jsxs("div",{className:_e.recordList,children:[g.jsxs("div",{className:_e.resultCount,children:[o.length," record",o.length!==1?"s":"",U?" (search results)":""]}),o.map($=>g.jsx(cj,{record:$,isSelected:(F==null?void 0:F.memoryRecordId)===$.memoryRecordId,showScore:U,onClick:()=>T($)},$.memoryRecordId))]}),F&&g.jsx(fj,{record:F,onClose:()=>ne(null)})]})]})})}function cj({record:t,isSelected:a,showScore:i,onClick:r}){const o=t.content?t.content.length>120?t.content.slice(0,120)+"…":t.content:"(no content)";return g.jsxs("button",{className:`${_e.recordRow} ${a?_e.recordRowSelected:""}`,onClick:r,"aria-label":`Memory record ${t.memoryRecordId}`,children:[g.jsxs("div",{className:_e.recordMain,children:[g.jsx("span",{className:_e.recordContent,children:o}),i&&t.score!==null&&t.score!==void 0&&g.jsx("span",{className:_e.scoreBadge,children:t.score.toFixed(3)})]}),g.jsxs("div",{className:_e.recordMeta,children:[g.jsx("span",{className:_e.strategyTag,children:t.memoryStrategyId}),g.jsx("span",{className:_e.recordTime,children:Yo(t.createdAt)})]})]})}function fj({record:t,onClose:a}){const i=Object.entries(t.metadata||{});return g.jsxs("div",{className:_e.detail,children:[g.jsxs("div",{className:_e.detailHeader,children:[g.jsx("span",{className:_e.detailTitle,children:"Record Detail"}),g.jsx("button",{className:_e.closeBtn,onClick:a,"aria-label":"Close record detail",children:g.jsx(Gr,{size:12})})]}),g.jsxs("div",{className:_e.detailBody,children:[g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"ID"}),g.jsx("span",{className:_e.detailId,children:t.memoryRecordId})]}),g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Content"}),g.jsx("div",{className:_e.detailContent,children:t.content||"(no content)"})]}),g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Strategy"}),g.jsx("span",{className:_e.strategyTag,children:t.memoryStrategyId})]}),g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Created"}),g.jsx("span",{className:_e.recordTime,children:Yo(t.createdAt)})]}),t.score!==null&&t.score!==void 0&&g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Relevance Score"}),g.jsx("span",{className:_e.scoreBadge,children:t.score.toFixed(4)})]}),t.namespaces.length>0&&g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Namespaces"}),g.jsx("span",{className:_e.namespacesValue,children:t.namespaces.join(", ")})]}),i.length>0&&g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Metadata"}),g.jsx("div",{className:_e.metadataGrid,children:i.map(([r,o])=>g.jsxs("div",{className:_e.metadataRow,children:[g.jsx("span",{className:_e.metadataKey,children:r}),g.jsx("span",{className:_e.metadataValue,children:o})]},r))})]}),i.length===0&&g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Metadata"}),g.jsx("span",{className:_e.noMetadata,children:"No metadata"})]})]})]})}const dj="_panel_lfvg8_1",hj="_resizeHandle_lfvg8_13",mj="_header_lfvg8_30",pj="_projectName_lfvg8_39",gj="_headerActions_lfvg8_45",yj="_iconBtn_lfvg8_50",_j="_tabBar_lfvg8_70",vj="_tab_lfvg8_70",xj="_tabActive_lfvg8_93",bj="_body_lfvg8_98",Sj="_tabContent_lfvg8_104",kj="_status_lfvg8_114",Tj="_error_lfvg8_121",Nj="_retryBtn_lfvg8_132",Ej="_graph_lfvg8_146",Cj="_section_lfvg8_152",Aj="_sectionTitle_lfvg8_158",wj="_childNode_lfvg8_167",jj="_node_lfvg8_183",Mj="_nodeSelected_lfvg8_201",zj="_nodeIcon_lfvg8_206",Rj="_agent_lfvg8_216",Oj="_harness_lfvg8_220",Dj="_memory_lfvg8_224",Lj="_credential_lfvg8_228",Bj="_gateway_lfvg8_232",Uj="_gatewayTarget_lfvg8_236",Hj="_mcpTool_lfvg8_240",Ij="_evaluator_lfvg8_244",qj="_onlineEval_lfvg8_248",Vj="_policyEngine_lfvg8_252",Gj="_policy_lfvg8_252",Zj="_unassignedTarget_lfvg8_260",$j="_nodeContent_lfvg8_264",Yj="_nodeName_lfvg8_272",Xj="_nodeNameRow_lfvg8_281",Fj="_deployBadge_lfvg8_288",Qj="_deploy_deployed_lfvg8_298",Kj="_nodeSubtitle_lfvg8_313",Jj="_nodeConnections_lfvg8_321",Pj="_connectionTag_lfvg8_328",Wj="_infoCard_lfvg8_386",e4="_infoHeader_lfvg8_393",t4="_kindBadge_lfvg8_402",n4="_infoName_lfvg8_461",a4="_infoBody_lfvg8_467",l4="_infoSectionHeader_lfvg8_471",i4="_infoRow_lfvg8_481",r4="_infoKey_lfvg8_494",s4="_infoValue_lfvg8_499",Ae={panel:dj,resizeHandle:hj,header:mj,projectName:pj,headerActions:gj,iconBtn:yj,tabBar:_j,tab:vj,tabActive:xj,body:bj,tabContent:Sj,status:kj,error:Tj,retryBtn:Nj,graph:Ej,section:Cj,sectionTitle:Aj,childNode:wj,node:jj,nodeSelected:Mj,nodeIcon:zj,agent:Rj,harness:Oj,memory:Dj,credential:Lj,gateway:Bj,gatewayTarget:Uj,mcpTool:Hj,evaluator:Ij,onlineEval:qj,policyEngine:Vj,policy:Gj,unassignedTarget:Zj,nodeContent:$j,nodeName:Yj,nodeNameRow:Xj,deployBadge:Fj,deploy_deployed:Qj,"deploy_local-only":"_deploy_local-only_lfvg8_303","deploy_pending-removal":"_deploy_pending-removal_lfvg8_308",nodeSubtitle:Kj,nodeConnections:Jj,connectionTag:Pj,infoCard:Wj,infoHeader:e4,kindBadge:t4,infoName:n4,infoBody:a4,infoSectionHeader:l4,infoRow:i4,infoKey:r4,infoValue:s4},o4={agent:If,harness:sx,memory:ax,credential:Mx,gateway:Cx,gatewayTarget:bx,mcpTool:Ra,evaluator:gx,onlineEval:ex,policyEngine:Bx,policy:Nx,unassignedTarget:a1},u4={deployed:"Deployed","local-only":"Not deployed","pending-removal":"Removed locally"};function Un({kind:t,name:a,subtitle:i,isSelected:r,onClick:o,connections:u,deploymentStatus:c}){const h=o4[t];return g.jsxs("button",{className:`${Ae.node} ${Ae[t]} ${r?Ae.nodeSelected:""}`,onClick:o,"aria-label":`${t}: ${a}`,children:[g.jsx("span",{className:Ae.nodeIcon,children:g.jsx(h,{size:14})}),g.jsxs("div",{className:Ae.nodeContent,children:[g.jsxs("div",{className:Ae.nodeNameRow,children:[g.jsx("span",{className:Ae.nodeName,children:a}),c&&g.jsx("span",{className:`${Ae.deployBadge} ${Ae[`deploy_${c}`]}`,children:u4[c]})]}),i&&g.jsx("span",{className:Ae.nodeSubtitle,children:i}),u&&u.length>0&&g.jsx("div",{className:Ae.nodeConnections,children:u.map(m=>g.jsx("span",{className:Ae.connectionTag,children:m},m))})]})]})}function Dy(t,a){const i=new URLSearchParams;return t!=null&&t.agentName&&i.set("agentName",t.agentName),t!=null&&t.harnessName&&i.set("harnessName",t.harnessName),(a==null?void 0:a.startTime)!==void 0&&i.set("startTime",String(a.startTime)),(a==null?void 0:a.endTime)!==void 0&&i.set("endTime",String(a.endTime)),i}function c4(){const t=In,[a,i]=L.useState([]),[r,o]=L.useState([]),[u,c]=L.useState([]),[h,m]=L.useState([]),[p,y]=L.useState(!1),[_,x]=L.useState(!1),[b,N]=L.useState(null),[j,B]=L.useState(null),S=L.useCallback(async(F,ne,U)=>{y(!0),N(null),o([]),c([]),m([]);try{const te=Dy(ne,U),pe=await Nn(`${t}/api/${F==="cloudwatch"?"cloudwatch-traces":"traces"}?${te.toString()}`);if(pe.status===404){B(!1),i([]);return}B(!0);const R=await pe.json();R.success?i(R.traces):(N(R.error),i([]))}catch(te){N(te instanceof Error?te.message:"Failed to load traces"),i([])}finally{y(!1)}},[t]),M=L.useCallback(async(F,ne,U,te)=>{x(!0),N(null);try{const de=Dy(U,te),W=await(await Nn(`${t}/api/${F==="cloudwatch"?"cloudwatch-traces":"traces"}/${encodeURIComponent(ne)}?${de.toString()}`)).json();if(W.success)if(F==="cloudwatch"){const G=W;c(G.records??[]),m(G.spans??[]),o([])}else{const G=W;o(o_(G.resourceSpans,G.resourceLogs)),c([]),m([])}else N(W.error),o([]),c([]),m([])}catch(de){N(de instanceof Error?de.message:"Failed to load trace detail"),o([]),c([]),m([])}finally{x(!1)}},[t]),z=L.useCallback(()=>{o([]),c([]),m([]),N(null)},[]);return{traces:a,spans:r,deployedRecords:u,deployedSpans:h,isLoadingTraces:p,isLoadingDetail:_,error:b,isAvailable:j,fetchTraces:S,fetchTraceDetail:M,clearDetail:z}}function Ir(t){if(!t)return{};const a={};for(const i of t){if(!i.key||!i.value)continue;const r=i.value;r.stringValue!==void 0?a[i.key]=r.stringValue:r.intValue!==void 0?a[i.key]=r.intValue:r.doubleValue!==void 0?a[i.key]=r.doubleValue:r.boolValue!==void 0&&(a[i.key]=r.boolValue)}return a}function kn(t){if(t!=null){if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}}}function f4(t){if(!t||!t.startsWith("["))return null;try{const a=JSON.parse(t);if(Array.isArray(a)&&a.length>0&&typeof a[0]=="object")return a}catch{}return null}function Ly(t){if(!t||!t.startsWith("{")&&!t.startsWith("["))return null;try{return JSON.parse(t)}catch{return null}}const d4="_dimText_rs5f0_1",h4="_assistantMsg_rs5f0_5",m4="_toolCalls_rs5f0_9",p4="_toolCall_rs5f0_9",g4="_toolIcon_rs5f0_22",y4="_toolName_rs5f0_26",_4="_toolArgs_rs5f0_32",v4="_toolResult_rs5f0_45",x4="_toolResultStatus_rs5f0_51",b4="_toolResultError_rs5f0_58",S4="_finishReason_rs5f0_62",k4="_genAiContent_rs5f0_68",T4="_contentText_rs5f0_74",N4="_strandsEvent_rs5f0_78",E4="_strandsSection_rs5f0_84",C4="_strandsLabel_rs5f0_90",A4="_messageList_rs5f0_97",w4="_msgRow_rs5f0_103",j4="_roleBadge_rs5f0_109",M4="_role_user_rs5f0_120",z4="_role_assistant_rs5f0_125",R4="_role_system_rs5f0_130",O4="_role_tool_rs5f0_135",D4="_msgText_rs5f0_140",L4="_msgContent_rs5f0_146",B4="_parsedContent_rs5f0_151",U4="_spanScope_rs5f0_157",H4="_spanRaw_rs5f0_163",we={dimText:d4,assistantMsg:h4,toolCalls:m4,toolCall:p4,toolIcon:g4,toolName:y4,toolArgs:_4,toolResult:v4,toolResultStatus:x4,toolResultError:b4,finishReason:S4,genAiContent:k4,contentText:T4,strandsEvent:N4,strandsSection:E4,strandsLabel:C4,messageList:A4,msgRow:w4,roleBadge:j4,role_user:M4,role_assistant:z4,role_system:R4,role_tool:O4,msgText:D4,msgContent:L4,parsedContent:B4,spanScope:U4,spanRaw:H4};function Md({body:t}){if(t==null)return g.jsx("span",{className:we.dimText,children:"—"});if(typeof t=="string")return g.jsx("span",{children:t});if(typeof t!="object")return g.jsx("span",{children:String(t)});const a=t;if(typeof a.message=="string"&&!a.content&&!a.input&&!a.output)return g.jsx("span",{children:a.message});if(Array.isArray(a.content))return g.jsx(zd,{content:a.content});if(a.message&&typeof a.message=="object"){const i=a.message;if(i.role==="assistant"&&Array.isArray(i.content)){const r=i.content.map(o=>o.text).filter(Boolean).join("");if(r)return g.jsx("div",{className:we.assistantMsg,children:r})}if(Array.isArray(i.tool_calls))return g.jsxs("div",{className:we.toolCalls,children:[i.tool_calls.map((r,o)=>{const u=r.function;return g.jsxs("div",{className:we.toolCall,children:[g.jsx("span",{className:we.toolIcon,children:g.jsx(Ra,{size:12})}),g.jsx("span",{className:we.toolName,children:String((u==null?void 0:u.name)??"unknown")}),g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(u==null?void 0:u.arguments,null,2)})]},o)}),a.finish_reason!==null&&a.finish_reason!==void 0&&g.jsx("span",{className:we.finishReason,children:String(a.finish_reason)})]});if(i.role==="assistant"&&typeof i.content=="string")return g.jsx("div",{className:we.assistantMsg,children:i.content})}return a.input||a.output?g.jsx(I4,{input:a.input,output:a.output}):g.jsx("pre",{className:we.spanRaw,children:JSON.stringify(a,null,2)})}function zd({content:t}){return g.jsx("div",{className:we.genAiContent,children:t.map((a,i)=>{const r=a;if(r.text)return g.jsx("div",{className:we.contentText,children:String(r.text)},i);if(r.toolUse){const o=r.toolUse;return g.jsxs("div",{className:we.toolCall,children:[g.jsx("span",{className:we.toolIcon,children:g.jsx(Ra,{size:12})}),g.jsx("span",{className:we.toolName,children:String(o.name)}),g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(o.input,null,2)})]},i)}if(r.toolResult){const o=r.toolResult;return g.jsxs("div",{className:we.toolResult,children:[g.jsx("span",{className:`${we.toolResultStatus} ${String(o.status).toLowerCase()==="error"?we.toolResultError:""}`,children:String(o.status||"result")}),Array.isArray(o.content)&&o.content.map((u,c)=>g.jsx("pre",{className:we.toolArgs,children:String(u.text??JSON.stringify(u))},c))]},i)}return g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(r,null,2)},i)})})}function By(t){if(t&&typeof t=="object"&&!Array.isArray(t)){const a=t.messages;if(Array.isArray(a))return a}}function I4({input:t,output:a}){const i=By(t),r=By(a);return g.jsxs("div",{className:we.strandsEvent,children:[t!=null&&g.jsxs("div",{className:we.strandsSection,children:[g.jsx("span",{className:we.strandsLabel,children:"Input"}),i?g.jsx(Uy,{messages:i}):g.jsx("pre",{className:we.spanRaw,children:JSON.stringify(t,null,2)})]}),a!=null&&g.jsxs("div",{className:we.strandsSection,children:[g.jsx("span",{className:we.strandsLabel,children:"Output"}),r?g.jsx(Uy,{messages:r}):g.jsx("pre",{className:we.spanRaw,children:JSON.stringify(a,null,2)})]})]})}function Uy({messages:t}){return!t||!Array.isArray(t)?null:g.jsx("div",{className:we.messageList,children:t.map((a,i)=>{const r=a,o=String(r.role||""),u=r.content;let c="";typeof u=="string"?c=u:u&&typeof u=="object"&&(c=u.message||u.content||"");const h=f4(c);return g.jsxs("div",{className:we.msgRow,children:[g.jsx("span",{className:`${we.roleBadge} ${we[`role_${o}`]||""}`,children:o}),g.jsx("div",{className:we.msgContent,children:h?g.jsx(q4,{items:h}):g.jsx("span",{className:we.msgText,children:c||JSON.stringify(u)})})]},i)})})}function q4({items:t}){return g.jsx("div",{className:we.parsedContent,children:t.map((a,i)=>{if(a.text){const r=String(a.text),o=Ly(r);return o?g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(o,null,2)},i):g.jsx("div",{className:we.contentText,children:r},i)}if(a.toolUse){const r=a.toolUse;return g.jsxs("div",{className:we.toolCall,children:[g.jsx("span",{className:we.toolIcon,children:g.jsx(Ra,{size:12})}),g.jsx("span",{className:we.toolName,children:String(r.name)}),r.input!==null&&r.input!==void 0&&Object.keys(r.input).length>0&&g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(r.input,null,2)})]},i)}if(a.toolResult){const r=a.toolResult,o=String(r.status||"result");return g.jsxs("div",{className:we.toolResult,children:[g.jsx("span",{className:`${we.toolResultStatus} ${o.toLowerCase()==="error"?we.toolResultError:""}`,children:o}),Array.isArray(r.content)&&r.content.map((u,c)=>{const h=String(u.text??""),m=Ly(h);return m?g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(m,null,2)},c):g.jsx("pre",{className:we.toolArgs,children:h},c)})]},i)}return g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(a,null,2)},i)})})}const V4="_container_c3i5z_1",G4="_toggleRow_c3i5z_6",Z4="_toggle_c3i5z_6",$4="_chevron_c3i5z_32",Y4="_icon_c3i5z_38",X4="_label_c3i5z_43",F4="_content_c3i5z_47",Q4="_status_c3i5z_55",K4="_error_c3i5z_62",J4="_detail_c3i5z_73",P4="_logPanel_c3i5z_73",W4="_traceDetail_c3i5z_73",e3="_detailHeader_c3i5z_80",t3="_detailTitle_c3i5z_89",n3="_closeBtn_c3i5z_95",a3="_controls_c3i5z_115",l3="_controlRow_c3i5z_122",i3="_refreshBtn_c3i5z_128",r3="_retryBtn_c3i5z_148",s3="_timeFilter_c3i5z_162",o3="_timeFilterHeader_c3i5z_168",u3="_timeModeToggle_c3i5z_174",c3="_timeModeBtn_c3i5z_183",f3="_timeModeBtnActive_c3i5z_198",d3="_dateRange_c3i5z_203",h3="_dateField_c3i5z_210",m3="_dateLabel_c3i5z_218",p3="_dateInput_c3i5z_226",g3="_cloudwatchNote_c3i5z_248",y3="_traceList_c3i5z_255",_3="_traceRow_c3i5z_264",v3="_traceRowSelected_c3i5z_284",x3="_traceMain_c3i5z_290",b3="_traceId_c3i5z_296",S3="_spanCount_c3i5z_308",k3="_traceMeta_c3i5z_316",T3="_traceTime_c3i5z_322",N3="_sessionId_c3i5z_327",E3="_detailControls_c3i5z_344",C3="_quickFilter_c3i5z_350",A3="_spanList_c3i5z_365",w3="_tokenPill_c3i5z_370",j3="_tokenIcon_c3i5z_385",M3="_tokenSep_c3i5z_390",z3="_tokenDim_c3i5z_394",R3="_durationPill_c3i5z_399",O3="_spanTimestamp_c3i5z_414",D3="_severityBadge_c3i5z_419",L3="_sevINFO_c3i5z_429",B3="_sevWARN_c3i5z_434",U3="_sevERROR_c3i5z_439",H3="_spanScope_c3i5z_444",I3="_spanBody_c3i5z_450",q3="_rawToggle_c3i5z_456",V3="_spanRaw_c3i5z_471",G3="_treeNode_c3i5z_486",Z3="_treeRow_c3i5z_493",$3="_treeRowExpandable_c3i5z_502",Y3="_treeRowSelected_c3i5z_509",X3="_treeToggle_c3i5z_514",F3="_treeName_c3i5z_521",Q3="_treeError_c3i5z_530",K3="_treeMetrics_c3i5z_540",J3="_treeChildren_c3i5z_548",P3="_treeLogRow_c3i5z_552",W3="_treeLogHeader_c3i5z_562",oe={container:V4,toggleRow:G4,toggle:Z4,chevron:$4,icon:Y4,label:X4,content:F4,status:Q4,error:K4,detail:J4,logPanel:P4,traceDetail:W4,detailHeader:e3,detailTitle:t3,closeBtn:n3,controls:a3,controlRow:l3,refreshBtn:i3,retryBtn:r3,timeFilter:s3,timeFilterHeader:o3,timeModeToggle:u3,timeModeBtn:c3,timeModeBtnActive:f3,dateRange:d3,dateField:h3,dateLabel:m3,dateInput:p3,cloudwatchNote:g3,traceList:y3,traceRow:_3,traceRowSelected:v3,traceMain:x3,traceId:b3,spanCount:S3,traceMeta:k3,traceTime:T3,sessionId:N3,detailControls:E3,quickFilter:C3,spanList:A3,tokenPill:w3,tokenIcon:j3,tokenSep:M3,tokenDim:z3,durationPill:R3,spanTimestamp:O3,severityBadge:D3,sevINFO:L3,sevWARN:B3,sevERROR:U3,spanScope:H3,spanBody:I3,rawToggle:q3,spanRaw:V3,treeNode:G3,treeRow:Z3,treeRowExpandable:$3,treeRowSelected:Y3,treeToggle:X3,treeName:F3,treeError:Q3,treeMetrics:K3,treeChildren:J3,treeLogRow:P3,treeLogHeader:W3};function eM({spanName:t,logs:a,onClose:i}){return g.jsxs("div",{className:oe.logPanel,"data-testid":"traces-log-panel",children:[g.jsxs("div",{className:oe.detailHeader,children:[g.jsx("span",{className:oe.detailTitle,children:t}),g.jsx("button",{className:oe.closeBtn,onClick:i,"aria-label":"Close logs",children:g.jsx(Gr,{size:12})})]}),a.length===0?g.jsx("div",{className:oe.status,children:"No logs for this span."}):g.jsx("div",{children:a.map((r,o)=>g.jsx(tM,{log:r},o))})]})}function tM({log:t}){const[a,i]=L.useState(!1);return g.jsxs("div",{className:oe.treeLogRow,children:[g.jsxs("div",{className:oe.treeLogHeader,children:[g.jsx("span",{className:oe.spanTimestamp,children:t.timestamp}),t.scopeName&&g.jsx("span",{className:oe.spanScope,children:t.scopeName}),t.severity&&g.jsx("span",{className:`${oe.severityBadge} ${oe[`sev${t.severity.toUpperCase()}`]||""}`,children:t.severity})]}),t.body!==void 0&&g.jsx("div",{className:oe.spanBody,children:g.jsx(Md,{body:t.body})}),g.jsx("button",{className:oe.rawToggle,onClick:()=>i(r=>!r),children:a?g.jsxs(g.Fragment,{children:[g.jsx(Ma,{size:10})," Hide raw"]}):g.jsxs(g.Fragment,{children:[g.jsx(cl,{size:10})," Raw JSON"]})}),a&&g.jsx("pre",{className:oe.spanRaw,children:JSON.stringify(t,null,2)})]})}function ol(t){const a=Date.now();return{startTime:a-t,endTime:a}}function yo(t,a){const i=t?new Date(t).getTime():void 0,r=a?new Date(a).getTime():void 0,o=i!==void 0&&!Number.isNaN(i)?i:void 0,u=r!==void 0&&!Number.isNaN(r)?r:void 0;if(!(o===void 0&&u===void 0))return{startTime:o,endTime:u}}function _o(t){const a=i=>String(i).padStart(2,"0");return`${t.getFullYear()}-${a(t.getMonth()+1)}-${a(t.getDate())}T${a(t.getHours())}:${a(t.getMinutes())}`}function Hy(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function bo(t){return(t==null?void 0:t.kind)==="agent"}function So(t){return!!(t!=null&&t.isDeployed)}function Iy(t){return(t==null?void 0:t.kind)==="harness"||So(t)&&!bo(t)?"cloudwatch":"local"}function qy(t){if(t)return t.kind==="harness"?{harnessName:t.name}:{agentName:t.name}}function nM(t){const a=t.body;return typeof a=="object"&&a!==null&&"input"in a&&"output"in a}function aM(t,a){return a==="all"?t:t.map(i=>u_(i,a)).filter(i=>i!==null)}function u_(t,a){const i=t.children.map(o=>u_(o,a)).filter(o=>o!==null);return lM(t,a)||i.length>0?{...t,children:i}:null}function lM(t,a){return a==="errors"?t.statusCode==="ERROR":a==="with-tokens"?t.logs.some(nM)||(t.inputTokens??0)>0||(t.outputTokens??0)>0:!0}const iM=20;function rM({roots:t,selectedSpanId:a,onSelectSpan:i}){return t.length===0?g.jsx("div",{className:oe.status,children:"No spans found."}):g.jsx("div",{className:oe.spanList,"data-testid":"traces-span-tree",children:t.map(r=>g.jsx(c_,{node:r,selectedSpanId:a,onSelectSpan:i},r.spanId))})}function c_({node:t,selectedSpanId:a,onSelectSpan:i}){const[r,o]=L.useState(!0),u=t.children.length>0,c=a===t.spanId,h=(t.inputTokens??0)>0||(t.outputTokens??0)>0,m=t.durationMs>0;return g.jsxs("div",{className:oe.treeNode,"data-testid":"traces-span-node",children:[g.jsxs("div",{className:`${oe.treeRow} ${oe.treeRowExpandable} ${c?oe.treeRowSelected:""}`,style:{paddingLeft:`${t.depth*iM+8}px`},onClick:()=>i(t.spanId),role:"button",tabIndex:0,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&i(t.spanId)},children:[g.jsx("span",{className:oe.treeToggle,onClick:u?p=>{p.stopPropagation(),o(y=>!y)}:void 0,children:u?r?g.jsx(Ma,{size:12}):g.jsx(cl,{size:12}):g.jsx("span",{style:{width:12}})}),g.jsx("span",{className:oe.treeName,children:t.name}),t.statusCode==="ERROR"&&g.jsx("span",{className:oe.treeError,children:"ERR"}),g.jsxs("div",{className:oe.treeMetrics,children:[h&&g.jsxs("span",{className:oe.tokenPill,children:[g.jsx(fd,{size:9,className:oe.tokenIcon}),Hy(t.inputTokens??0)," ",g.jsx("span",{className:oe.tokenDim,children:"in"}),g.jsx("span",{className:oe.tokenSep,children:"/"}),Hy(t.outputTokens??0)," ",g.jsx("span",{className:oe.tokenDim,children:"out"})]}),m&&g.jsxs("span",{className:oe.durationPill,children:[g.jsx(_x,{size:9}),jd(t.durationMs)]})]})]}),r&&u&&g.jsx("div",{className:oe.treeChildren,children:t.children.map(p=>g.jsx(c_,{node:p,selectedSpanId:a,onSelectSpan:i},p.spanId))})]})}function sM({trace:t,isSelected:a,onClick:i}){return g.jsxs("button",{className:`${oe.traceRow} ${a?oe.traceRowSelected:""}`,onClick:i,"aria-label":`Trace ${t.traceId}`,children:[g.jsxs("div",{className:oe.traceMain,children:[g.jsx("span",{className:oe.traceId,children:t.traceId}),g.jsxs("span",{className:oe.spanCount,children:[t.spanCount," spans"]})]}),g.jsxs("div",{className:oe.traceMeta,children:[g.jsx("span",{className:oe.traceTime,children:Yo(t.timestamp)}),t.sessionId&&g.jsxs("span",{className:oe.sessionId,children:["session: ",t.sessionId]})]})]})}function oM(t){var o,u,c,h;const a=t.filter(m=>m.type==="span"&&m.spanId),i=t.filter(m=>m.type==="log"&&m.spanId),r=new Map;for(const m of a){const p=m.attributes??{};r.set(m.spanId,{spanId:m.spanId,parentSpanId:m.parentSpanId,name:m.name||((o=m.scope)==null?void 0:o.name)||"span",depth:0,startMs:It(m.startTimeUnixNano),durationMs:It(m.endTimeUnixNano)-It(m.startTimeUnixNano),inputTokens:Number(p["gen_ai.usage.input_tokens"]??0)||void 0,outputTokens:Number(p["gen_ai.usage.output_tokens"]??0)||void 0,statusCode:typeof((u=m.status)==null?void 0:u.code)=="number"?m.status.code===2?"ERROR":"OK":(c=m.status)==null?void 0:c.code,children:[],logs:[]})}for(const m of i){const p=r.get(m.spanId);p&&p.logs.push({timestamp:m.timestampMs>0?new Date(m.timestampMs).toISOString():"",scopeName:(h=m.scope)==null?void 0:h.name,severity:m.severityText,body:m.body})}return f_(r)}function uM(t,a){var r;const i=new Map;for(const o of t){const u=o.durationNano?It(o.durationNano):0;i.set(o.spanId,{spanId:o.spanId,parentSpanId:o.parentSpanId,name:o.name||"span",depth:0,startMs:o.startTimeUnixNano?It(o.startTimeUnixNano):0,durationMs:u,inputTokens:o.inputTokens||void 0,outputTokens:o.outputTokens||void 0,statusCode:o.statusCode,children:[],logs:[]})}for(const o of a){const u=o["@message"];if(typeof u!="object"||u===null)continue;const c=u,h=c.spanId;if(!h)continue;const m=i.get(h);m&&m.logs.push({timestamp:o["@timestamp"],scopeName:(r=c.scope)==null?void 0:r.name,severity:c.severityText,body:c.body})}return f_(i)}function f_(t){const a=[];for(const r of t.values()){const o=r.parentSpanId?t.get(r.parentSpanId):void 0;o?o.children.push(r):a.push(r)}const i=(r,o)=>{r.depth=o,r.children.sort((u,c)=>u.startMs-c.startMs);for(const u of r.children)i(u,o+1)};a.sort((r,o)=>r.startMs-o.startMs);for(const r of a)i(r,0);return a}const cM=[{label:"Last 1 hour",ms:3600*1e3},{label:"Last 6 hours",ms:360*60*1e3},{label:"Last 12 hours",ms:720*60*1e3},{label:"Last 24 hours",ms:1440*60*1e3},{label:"Last 3 days",ms:4320*60*1e3},{label:"Last 7 days",ms:10080*60*1e3}],fM=720*60*1e3;function dM({agents:t,harnesses:a=[],isActive:i}){const{traces:r,spans:o,deployedRecords:u,deployedSpans:c,isLoadingTraces:h,isLoadingDetail:m,error:p,isAvailable:y,fetchTraces:_,fetchTraceDetail:x,clearDetail:b}=c4(),N=L.useMemo(()=>[...t.map(fe=>({value:`agent:${fe.name}`,name:fe.name,kind:"agent",isDeployed:fe.deploymentStatus==="deployed"})),...a.map(fe=>({value:`harness:${fe.name}`,name:fe.name,kind:"harness",isDeployed:fe.deploymentStatus==="deployed"}))],[t,a]),[j,B]=L.useState(""),[S,M]=L.useState("local"),[z,F]=L.useState(null),[ne,U]=L.useState(null),[te,de]=L.useState("with-tokens"),pe=L.useRef(!1);L.useEffect(()=>{if(!(j===""||!N.find(xt=>xt.value===j)))return;const gt=N[0];gt&&(B(gt.value),M(Iy(gt)))},[N,j]);const R=N.find(fe=>fe.value===j),W=!bo(R)&&!So(R),[G,ge]=L.useState("relative"),[K,ae]=L.useState(fM),[D,J]=L.useState(""),[se,be]=L.useState(""),E=L.useCallback(()=>G==="relative"?ol(K):yo(D,se)??ol(K),[G,K,D,se]),A=L.useCallback((fe,gt,xt)=>{F(null),U(null),b(),_(fe,qy(gt),xt)},[b,_]);L.useEffect(()=>{i&&!pe.current&&R&&!W&&A(S,R,ol(K)),pe.current=!!i},[i,A,S,R,W,K]);const Z=fe=>{B(fe);const gt=N.find(Cn=>Cn.value===fe);if(!bo(gt)&&!So(gt))return;const xt=Iy(gt);M(xt),A(xt,gt,E())},T=fe=>{M(fe),A(fe,R,E())},ee=()=>{A(S,R,E())},$=fe=>{U(null),z===fe.traceId?(F(null),b()):(F(fe.traceId),x(S,fe.traceId,qy(R),E()))},ue=fe=>{if(ge(fe),fe==="relative")A(S,R,ol(K));else{const gt=new Date,xt=new Date(gt.getTime()-K);J(_o(xt)),be(_o(gt)),A(S,R,yo(_o(xt),_o(gt))??ol(K))}},Ee=fe=>{ae(fe),A(S,R,ol(fe))},We=fe=>{J(fe),A(S,R,yo(fe,se)??ol(K))},Ke=fe=>{be(fe),A(S,R,yo(D,fe)??ol(K))},Ct=L.useMemo(()=>S==="cloudwatch"?uM(c,u):oM(o),[S,o,c,u]),Jt=L.useMemo(()=>aM(Ct,te),[Ct,te]),Gn=L.useMemo(()=>{if(!ne)return null;const fe=gt=>{for(const xt of gt){if(xt.spanId===ne)return xt;const Cn=fe(xt.children);if(Cn)return Cn}return null};return fe(Ct)},[ne,Ct]);if(N.length===0)return g.jsx("div",{className:oe.status,children:"No traces available."});const oa=Ct.length>0;return g.jsxs("div",{className:oe.container,children:[g.jsx("div",{className:oe.controls,children:g.jsxs("div",{className:oe.controlRow,children:[g.jsxs("div",{className:oe.dateField,children:[g.jsx("label",{className:oe.dateLabel,htmlFor:"traces-resource",children:"Resource"}),g.jsx("select",{id:"traces-resource",className:oe.dateInput,value:j,onChange:fe=>Z(fe.target.value),children:N.map(fe=>g.jsxs("option",{value:fe.value,children:[fe.name," (",fe.kind,")"]},fe.value))})]}),g.jsxs("div",{className:oe.dateField,children:[g.jsx("label",{className:oe.dateLabel,htmlFor:"traces-source",children:"Source"}),g.jsxs("select",{id:"traces-source",className:oe.dateInput,value:S,onChange:fe=>T(fe.target.value),children:[g.jsx("option",{value:"local",disabled:!bo(R),children:"Local traces"}),g.jsx("option",{value:"cloudwatch",disabled:!So(R),children:"CloudWatch"})]})]}),g.jsx("button",{className:oe.refreshBtn,onClick:ee,title:"Refresh traces","aria-label":"Refresh traces",children:g.jsx(ud,{size:12})})]})}),S==="cloudwatch"&&!W&&g.jsx("div",{className:oe.cloudwatchNote,children:"Note: Traces may take 2-3 minutes to appear in CloudWatch"}),g.jsx("div",{className:oe.content,children:W?g.jsx("div",{className:oe.status,children:"No traces available — deploy this resource to view CloudWatch traces."}):g.jsxs(g.Fragment,{children:[y!==!1&&g.jsxs("div",{className:oe.timeFilter,children:[g.jsxs("div",{className:oe.timeFilterHeader,children:[g.jsx("label",{className:oe.dateLabel,children:"Time range"}),g.jsxs("div",{className:oe.timeModeToggle,children:[g.jsx("button",{className:`${oe.timeModeBtn} ${G==="relative"?oe.timeModeBtnActive:""}`,onClick:()=>ue("relative"),children:"Relative"}),g.jsx("button",{className:`${oe.timeModeBtn} ${G==="absolute"?oe.timeModeBtnActive:""}`,onClick:()=>ue("absolute"),children:"Absolute"})]})]}),G==="relative"?g.jsx("div",{className:oe.dateField,children:g.jsx("select",{id:"traces-time-range",className:oe.dateInput,value:K,onChange:fe=>Ee(Number(fe.target.value)),children:cM.map(fe=>g.jsx("option",{value:fe.ms,children:fe.label},fe.ms))})}):g.jsxs("div",{className:oe.dateRange,children:[g.jsxs("div",{className:oe.dateField,children:[g.jsx("label",{className:oe.dateLabel,htmlFor:"traces-start",children:"Start"}),g.jsx("input",{id:"traces-start",className:oe.dateInput,type:"datetime-local",value:D,onChange:fe=>We(fe.target.value)})]}),g.jsxs("div",{className:oe.dateField,children:[g.jsx("label",{className:oe.dateLabel,htmlFor:"traces-end",children:"End"}),g.jsx("input",{id:"traces-end",className:oe.dateInput,type:"datetime-local",value:se,onChange:fe=>Ke(fe.target.value)})]})]})]}),h&&g.jsx("div",{className:oe.status,children:"Loading traces…"}),p&&g.jsxs("div",{className:oe.error,children:[g.jsxs("span",{children:[g.jsx(cd,{size:12})," ",p]}),g.jsx("button",{className:oe.retryBtn,onClick:ee,children:"Retry"})]}),!h&&!p&&y!==!1&&r.length===0&&g.jsx("div",{className:oe.status,children:"No traces found."}),!h&&r.length>0&&g.jsx("div",{className:oe.traceList,"data-testid":"traces-trace-list",children:r.map(fe=>g.jsx(sM,{trace:fe,isSelected:z===fe.traceId,onClick:()=>$(fe)},fe.traceId))}),z&&g.jsxs("div",{className:oe.traceDetail,children:[g.jsxs("div",{className:oe.detailHeader,children:[g.jsx("span",{className:oe.detailTitle,children:"Spans"}),g.jsxs("div",{className:oe.detailControls,children:[g.jsxs("select",{className:oe.quickFilter,value:te,onChange:fe=>de(fe.target.value),children:[g.jsx("option",{value:"all",children:"All"}),g.jsx("option",{value:"errors",children:"Errors"}),g.jsx("option",{value:"with-tokens",children:"Agent spans"})]}),g.jsx("button",{className:oe.closeBtn,onClick:()=>{F(null),b()},"aria-label":"Close detail",children:g.jsx(Gr,{size:12})})]})]}),m&&g.jsx("div",{className:oe.status,children:"Loading…"}),!m&&!oa&&!p&&g.jsx("div",{className:oe.status,children:"No data found."}),!m&&oa&&Jt.length===0&&te!=="all"&&g.jsx("div",{className:oe.status,children:"No matching spans."}),!m&&Jt.length>0&&g.jsx(rM,{roots:Jt,selectedSpanId:ne,onSelectSpan:U})]}),Gn&&g.jsx(eM,{spanName:Gn.name,logs:Gn.logs,onClose:()=>U(null)})]})})]})}function hM({resources:t,sessionId:a,userId:i,onClose:r}){const{data:o,isLoading:u,error:c,fetch:h}=t,[m,p]=L.useState(null),[y,_]=L.useState("resources"),[x,b]=L.useState(620),N=L.useRef(null),j=L.useCallback(S=>{S.preventDefault();const M=F=>{const ne=window.innerWidth-F.clientX;b(Math.max(320,Math.min(ne,window.innerWidth*.8)))},z=()=>{N.current=null,document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",z),document.body.style.cursor="",document.body.style.userSelect=""};N.current={move:M,up:z},document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",M),document.addEventListener("mouseup",z)},[]);L.useEffect(()=>()=>{N.current&&(document.removeEventListener("mousemove",N.current.move),document.removeEventListener("mouseup",N.current.up),document.body.style.cursor="",document.body.style.userSelect="")},[]);const B=(S,M)=>{p(z=>(z==null?void 0:z.kind)===S&&z.resource.name===M.name?null:{kind:S,resource:M})};return g.jsxs("div",{className:Ae.panel,style:{width:x},"data-testid":"resource-panel",children:[g.jsx("div",{className:Ae.resizeHandle,onMouseDown:j,role:"separator","aria-label":"Resize panel"}),g.jsxs("div",{className:Ae.header,children:[g.jsx("span",{className:Ae.projectName,children:(o==null?void 0:o.project)||"Resources"}),g.jsxs("div",{className:Ae.headerActions,children:[g.jsx("button",{className:Ae.iconBtn,onClick:h,title:"Refresh","aria-label":"Refresh resources",children:g.jsx(ud,{size:12})}),g.jsx("button",{className:Ae.iconBtn,onClick:r,title:"Close","aria-label":"Close resource panel",children:g.jsx(Gr,{size:12})})]})]}),g.jsx("div",{className:Ae.tabBar,role:"tablist",children:["resources","traces","memories"].map(S=>g.jsx("button",{role:"tab","aria-selected":y===S,className:`${Ae.tab} ${y===S?Ae.tabActive:""}`,onClick:()=>_(S),children:S.charAt(0).toUpperCase()+S.slice(1)},S))}),g.jsxs("div",{className:Ae.body,children:[g.jsxs("div",{className:Ae.tabContent,hidden:y!=="resources",children:[u&&!o&&g.jsx("div",{className:Ae.status,children:"Loading resources…"}),c&&!o&&g.jsxs("div",{className:Ae.error,children:[g.jsxs("span",{children:[g.jsx(cd,{size:12})," ",c]}),g.jsx("button",{className:Ae.retryBtn,onClick:h,children:"Retry"})]}),o&&g.jsxs("div",{className:Ae.graph,children:[o.agents.length>0&&g.jsx(aa,{title:"Agents",children:o.agents.map(S=>g.jsx(Un,{kind:"agent",name:S.name,subtitle:S.build,isSelected:(m==null?void 0:m.kind)==="agent"&&m.resource.name===S.name,onClick:()=>B("agent",S),connections:mM(S,o.mcpRuntimeTools),deploymentStatus:S.deploymentStatus},S.name))}),(o.harnesses??[]).length>0&&g.jsx(aa,{title:"Harnesses",children:(o.harnesses??[]).map(S=>g.jsx(Un,{kind:"harness",name:S.name,subtitle:S.model,isSelected:(m==null?void 0:m.kind)==="harness"&&m.resource.name===S.name,onClick:()=>B("harness",S),deploymentStatus:S.deploymentStatus},S.name))}),o.memories.length>0&&g.jsx(aa,{title:"Memories",children:o.memories.map(S=>g.jsx(Un,{kind:"memory",name:S.name,subtitle:S.strategies.map(M=>M.type).join(", "),isSelected:(m==null?void 0:m.kind)==="memory"&&m.resource.name===S.name,onClick:()=>B("memory",S),deploymentStatus:S.deploymentStatus},S.name))}),o.credentials.length>0&&g.jsx(aa,{title:"Credentials",children:o.credentials.map(S=>g.jsx(Un,{kind:"credential",name:S.name,subtitle:S.type,isSelected:(m==null?void 0:m.kind)==="credential"&&m.resource.name===S.name,onClick:()=>B("credential",S),deploymentStatus:S.deploymentStatus},S.name))}),o.gateways.length>0&&g.jsx(aa,{title:"Gateways",children:o.gateways.map(S=>g.jsxs("div",{children:[g.jsx(Un,{kind:"gateway",name:S.name,subtitle:`${S.targets.length} target(s)`,isSelected:(m==null?void 0:m.kind)==="gateway"&&m.resource.name===S.name,onClick:()=>B("gateway",S),deploymentStatus:S.deploymentStatus}),S.targets.map(M=>g.jsx("div",{className:Ae.childNode,children:g.jsx(Un,{kind:"gatewayTarget",name:M.name,subtitle:M.targetType,isSelected:(m==null?void 0:m.kind)==="gatewayTarget"&&m.resource.name===M.name,onClick:()=>B("gatewayTarget",M)})},M.name))]},S.name))}),o.mcpRuntimeTools.length>0&&g.jsx(aa,{title:"MCP Runtime Tools",children:o.mcpRuntimeTools.map(S=>g.jsx(Un,{kind:"mcpTool",name:S.name,subtitle:S.bindings.map(M=>M.runtimeName).join(", "),isSelected:(m==null?void 0:m.kind)==="mcpTool"&&m.resource.name===S.name,onClick:()=>B("mcpTool",S),connections:S.bindings.map(M=>`→ ${M.runtimeName}`),deploymentStatus:S.deploymentStatus},S.name))}),o.evaluators.length>0&&g.jsx(aa,{title:"Evaluators",children:o.evaluators.map(S=>g.jsx(Un,{kind:"evaluator",name:S.name,subtitle:`${S.level} — ${S.configType}`,isSelected:(m==null?void 0:m.kind)==="evaluator"&&m.resource.name===S.name,onClick:()=>B("evaluator",S),deploymentStatus:S.deploymentStatus},S.name))}),o.onlineEvalConfigs.length>0&&g.jsx(aa,{title:"Online Eval Configs",children:o.onlineEvalConfigs.map(S=>g.jsx(Un,{kind:"onlineEval",name:S.name,subtitle:`${S.evaluators.length} evaluator(s), ${S.samplingRate}% sampling`,isSelected:(m==null?void 0:m.kind)==="onlineEval"&&m.resource.name===S.name,onClick:()=>B("onlineEval",S),connections:[`→ ${S.agent}`],deploymentStatus:S.deploymentStatus},S.name))}),o.policyEngines.length>0&&g.jsx(aa,{title:"Policy Engines",children:o.policyEngines.map(S=>g.jsxs("div",{children:[g.jsx(Un,{kind:"policyEngine",name:S.name,subtitle:`${S.policies.length} polic${S.policies.length!==1?"ies":"y"}`,isSelected:(m==null?void 0:m.kind)==="policyEngine"&&m.resource.name===S.name,onClick:()=>B("policyEngine",S),deploymentStatus:S.deploymentStatus}),S.policies.map(M=>g.jsx("div",{className:Ae.childNode,children:g.jsx(Un,{kind:"policy",name:M.name,subtitle:M.description,isSelected:(m==null?void 0:m.kind)==="policy"&&m.resource.name===M.name,onClick:()=>B("policy",M),deploymentStatus:M.deploymentStatus})},M.name))]},S.name))}),o.unassignedTargets.length>0&&g.jsx(aa,{title:"Unassigned Targets",children:o.unassignedTargets.map(S=>g.jsx(Un,{kind:"unassignedTarget",name:S.name,subtitle:S.targetType,isSelected:(m==null?void 0:m.kind)==="unassignedTarget"&&m.resource.name===S.name,onClick:()=>B("unassignedTarget",S)},S.name))})]}),m&&g.jsxs("div",{className:Ae.infoCard,children:[g.jsxs("div",{className:Ae.infoHeader,children:[g.jsx("span",{className:`${Ae.kindBadge} ${Ae[m.kind]}`,children:gM(m.kind)}),g.jsx("span",{className:Ae.infoName,children:m.resource.name})]}),g.jsxs("div",{className:Ae.infoBody,children:[Object.entries(m.resource).filter(([S,M])=>S!=="deployed"&&!pM(M)).map(([S,M])=>g.jsxs("div",{className:Ae.infoRow,children:[g.jsx("span",{className:Ae.infoKey,children:S}),g.jsx("span",{className:Ae.infoValue,children:Vy(M)})]},S)),"deployed"in m.resource&&m.resource.deployed!==null&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:Ae.infoSectionHeader,children:"Deployed State"}),Object.entries(m.resource.deployed).map(([S,M])=>g.jsxs("div",{className:Ae.infoRow,children:[g.jsx("span",{className:Ae.infoKey,children:S}),g.jsx("span",{className:Ae.infoValue,children:Vy(M)})]},S))]})]})]})]}),g.jsx("div",{className:Ae.tabContent,hidden:y!=="traces",children:g.jsx(dM,{agents:(o==null?void 0:o.agents)??[],harnesses:(o==null?void 0:o.harnesses)??[],isActive:y==="traces"})}),g.jsx("div",{className:Ae.tabContent,hidden:y!=="memories",children:g.jsx(uj,{memories:(o==null?void 0:o.memories)??[],sessionId:a,userId:i,isActive:y==="memories"})})]})]})}function aa({title:t,children:a}){return g.jsxs("div",{className:Ae.section,children:[g.jsx("div",{className:Ae.sectionTitle,children:t}),a]})}function mM(t,a){const i=[];for(const r of a)r.bindings.some(o=>o.runtimeName===t.name)&&i.push(`← ${r.name}`);return i}function pM(t){return!!(t===null||t===""||t===void 0||Array.isArray(t)&&t.length===0)}function Vy(t){if(t==null)return"—";if(Array.isArray(t))return t.map(i=>typeof i=="object"?JSON.stringify(i):i).join(", ")||"—";const a=String(t);return a===""?"—":a}function gM(t){return{agent:"Agent",harness:"Harness",memory:"Memory",credential:"Credential",gateway:"Gateway",gatewayTarget:"Target",mcpTool:"MCP Tool",evaluator:"Evaluator",onlineEval:"Online Eval",policyEngine:"Policy Engine",policy:"Policy",unassignedTarget:"Unassigned Target"}[t]}const yM="_body_sadpk_1",_M="_interactionsList_sadpk_9",vM="_interactionItem_sadpk_17",xM="_interactionItemSelected_sadpk_36",bM="_interactionPrompt_sadpk_41",SM="_interactionMeta_sadpk_49",kM="_interactionTraceId_sadpk_55",TM="_interactionTime_sadpk_61",NM="_interactionSpanCount_sadpk_66",EM="_rightArea_sadpk_75",CM="_waterfall_sadpk_84",AM="_userPromptRow_sadpk_90",wM="_userPromptText_sadpk_101",jM="_waterfallRow_sadpk_108",MM="_waterfallRowSelected_sadpk_122",zM="_spanIcon_sadpk_128",RM="_spanLabel_sadpk_135",OM="_barContainer_sadpk_145",DM="_bar_sadpk_145",LM="_barInvocation_sadpk_160",BM="_barAgent_sadpk_164",UM="_barLlm_sadpk_168",HM="_barTool_sadpk_172",IM="_barOther_sadpk_176",qM="_duration_sadpk_180",VM="_detailPane_sadpk_190",GM="_detailHeader_sadpk_197",ZM="_iconBtn_sadpk_209",$M="_tabBar_sadpk_224",YM="_tab_sadpk_224",XM="_tabActive_sadpk_244",FM="_detailBody_sadpk_249",QM="_attrTable_sadpk_254",KM="_attrKey_sadpk_265",JM="_attrValue_sadpk_273",PM="_emptyState_sadpk_280",Oe={body:yM,interactionsList:_M,interactionItem:vM,interactionItemSelected:xM,interactionPrompt:bM,interactionMeta:SM,interactionTraceId:kM,interactionTime:TM,interactionSpanCount:NM,rightArea:EM,waterfall:CM,userPromptRow:AM,userPromptText:wM,waterfallRow:jM,waterfallRowSelected:MM,spanIcon:zM,spanLabel:RM,barContainer:OM,bar:DM,barInvocation:LM,barAgent:BM,barLlm:UM,barTool:HM,barOther:IM,duration:qM,detailPane:VM,detailHeader:GM,iconBtn:ZM,tabBar:$M,tab:YM,tabActive:XM,detailBody:FM,attrTable:QM,attrKey:KM,attrValue:JM,emptyState:PM};function WM({invocations:t,selectedTraceId:a,onSelect:i}){return t.length===0?g.jsx("div",{className:Oe.emptyState,children:"No interactions yet"}):g.jsx("div",{className:Oe.interactionsList,"data-testid":"trace-list",children:t.map(r=>g.jsxs("button",{className:`${Oe.interactionItem} ${a===r.traceId?Oe.interactionItemSelected:""}`,onClick:()=>i(r.traceId),"aria-label":`Trace ${r.traceId}`,children:[r.userPrompt&&g.jsx("span",{className:Oe.interactionPrompt,title:r.userPrompt,children:r.userPrompt}),g.jsxs("div",{className:Oe.interactionMeta,children:[g.jsxs("span",{className:Oe.interactionTraceId,children:[r.traceId.slice(0,12),"..."]}),g.jsx("span",{className:Oe.interactionSpanCount,children:r.spanCount})]}),g.jsx("span",{className:Oe.interactionTime,children:Yo(r.timestamp)})]},r.traceId))})}function ko(t){if(typeof t=="string"){const a=kn(t);return typeof a!="string"?ko(a)??t:t}if(Array.isArray(t)){const a=t.filter(i=>i.text).map(i=>String(i.text));if(a.length>0)return a.join(" ")}return null}function ez(t){var i;for(const r of t){if(!((i=r.name)!=null&&i.startsWith("invoke_agent")))continue;const o=r.events;if(o)for(const u of o){if(u.name!=="gen_ai.user.message")continue;const c=Ir(u.attributes),h=ko(c.content);if(h)return h}}let a=null;for(const r of t){const o=r.events;if(o)for(const u of o){if(u.name!=="gen_ai.user.message")continue;const c=Ir(u.attributes),h=ko(c.content);h&&(a=h)}}if(a)return a;for(const r of t){const o=r.attributes??{};if(o["gen_ai.content.prompt"]){const u=ko(o["gen_ai.content.prompt"]);if(u)return u}}for(const r of t){const o=r.attributes??{};if(o["gen_ai.input.messages"]){const u=o["gen_ai.input.messages"],c=typeof u=="string"?kn(u):u;if(Array.isArray(c)){const h=c.find(m=>m.role==="user");if(h!=null&&h.parts&&Array.isArray(h.parts)){const m=h.parts.filter(p=>p.type==="text"&&p.content).map(p=>String(p.content));if(m.length>0)return m.join(" ")}}}}return null}function tz(t){switch(t){case 1:return"SERVER";case 2:return"CLIENT";case 3:return"PRODUCER";case 4:return"CONSUMER";default:return"INTERNAL"}}function nz(t){var u;const a={...t.attributes??{}},i=It(t.startTimeUnixNano),o=It(t.endTimeUnixNano)-i;return{attributes:a,status:t.status,kind:t.type==="span"?tz(t.kind):void 0,scope:(u=t.scope)==null?void 0:u.name,duration:o>0?`${o}ms`:void 0}}function az(t){const a=t.events;if(a){let r=null;for(const o of a){const u=o.name,c=Ir(o.attributes);u==="gen_ai.user.message"&&(r={type:"genai",content:kn(c.content)??c.content})}if(r)return r}const i=t.attributes??{};return i["gen_ai.content.prompt"]?{type:"genai",content:kn(i["gen_ai.content.prompt"])}:i["gen_ai.tool.call.arguments"]?{type:"tool",content:kn(i["gen_ai.tool.call.arguments"])}:i["gen_ai.input.messages"]?{type:"genai",content:kn(i["gen_ai.input.messages"])}:i["gen_ai.task.input"]?{type:"raw",content:kn(i["gen_ai.task.input"])}:t.type==="log"&&t.body?{type:"raw",content:t.body}:null}function lz(t){const a=t.events;if(a){let r=null;for(const o of a){const u=o.name,c=Ir(o.attributes);u==="gen_ai.choice"&&(r={type:"genai",content:kn(c.message)??c})}if(r)return r}const i=t.attributes??{};if(i["tool.name"]&&a){for(const r of a)if(r.name==="gen_ai.tool.message"){const u=Ir(r.attributes);return{type:"tool",content:kn(u.content)??u.content}}}return i["gen_ai.content.completion"]?{type:"genai",content:kn(i["gen_ai.content.completion"])}:i["gen_ai.tool.call.result"]?{type:"tool",content:kn(i["gen_ai.tool.call.result"])}:i["gen_ai.output.messages"]?{type:"genai",content:kn(i["gen_ai.output.messages"])}:i["gen_ai.task.output"]?{type:"raw",content:kn(i["gen_ai.task.output"])}:null}function iz({span:t,onClose:a}){const[i,r]=L.useState("event");return g.jsxs("div",{className:Oe.detailPane,children:[g.jsxs("div",{className:Oe.detailHeader,children:[g.jsx("div",{className:Oe.tabBar,children:["event","request","response"].map(o=>g.jsx("button",{className:`${Oe.tab} ${i===o?Oe.tabActive:""}`,onClick:()=>r(o),children:o.charAt(0).toUpperCase()+o.slice(1)},o))}),g.jsx("button",{className:Oe.iconBtn,onClick:a,"aria-label":"Close detail",children:g.jsx(Gr,{size:14})})]}),g.jsxs("div",{className:Oe.detailBody,children:[i==="event"&&g.jsx(rz,{span:t}),i==="request"&&g.jsx(sz,{span:t}),i==="response"&&g.jsx(oz,{span:t})]})]})}function rz({span:t}){const a=nz(t),i=[];t.name&&i.push(["name",t.name]),a.kind&&i.push(["kind",a.kind]),a.scope&&i.push(["scope",a.scope]),a.duration&&i.push(["duration",a.duration]),a.status&&(i.push(["status.code",String(a.status.code??"OK")]),a.status.message&&i.push(["status.message",a.status.message]));const r=new Set(i.map(([o])=>o));for(const[o,u]of Object.entries(a.attributes))u!=null&&!r.has(o)&&i.push([o,typeof u=="object"?JSON.stringify(u):String(u)]);return i.length===0?g.jsx("div",{className:Oe.emptyState,children:"No event data"}):g.jsx("table",{className:Oe.attrTable,children:g.jsx("tbody",{children:i.map(([o,u])=>g.jsxs("tr",{children:[g.jsx("td",{className:Oe.attrKey,children:o}),g.jsx("td",{className:Oe.attrValue,children:u})]},o))})})}function sz({span:t}){const a=az(t);return a?a.type==="genai"&&Array.isArray(a.content)?g.jsx(zd,{content:a.content}):g.jsx(Md,{body:a.content}):g.jsx("div",{className:Oe.emptyState,children:"No request data"})}function oz({span:t}){const a=lz(t);return a?a.type==="genai"&&Array.isArray(a.content)?g.jsx(zd,{content:a.content}):g.jsx(Md,{body:a.content}):g.jsx("div",{className:Oe.emptyState,children:"No response data"})}const uz=16,cz={invocation:g.jsx(fd,{size:12}),agent:g.jsx(kx,{size:12}),llm:g.jsx(Ox,{size:12}),tool:g.jsx(Ra,{size:12}),other:g.jsx(mx,{size:10})},fz={invocation:Oe.barInvocation,agent:Oe.barAgent,llm:Oe.barLlm,tool:Oe.barTool,other:Oe.barOther};function dz({tree:t,selectedSpanId:a,onSelectSpan:i,userPrompt:r}){const o=GA(t);return o.length===0?g.jsx("div",{className:Oe.emptyState,children:"No spans"}):g.jsxs("div",{className:Oe.waterfall,children:[r&&g.jsxs("div",{className:Oe.userPromptRow,children:[g.jsx("span",{className:Oe.spanIcon,children:g.jsx(Gx,{size:12})}),g.jsx("span",{className:Oe.userPromptText,title:r,children:r})]}),o.map((u,c)=>g.jsx(hz,{entry:u,isSelected:a===u.node.span.spanId,onSelect:()=>i(u.node.span)},u.node.span.spanId??c))]})}function hz({entry:t,isSelected:a,onSelect:i}){var y;const{node:r,offsetPercent:o,widthPercent:u}=t,c=ZA(r.span),h=cz[c],m=fz[c],p=r.span.name||((y=r.span.scope)==null?void 0:y.name)||"span";return g.jsxs("div",{className:`${Oe.waterfallRow} ${a?Oe.waterfallRowSelected:""}`,style:{paddingLeft:`${10+r.depth*uz}px`},onClick:i,role:"button",tabIndex:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&i()},children:[g.jsx("span",{className:Oe.spanIcon,children:h}),g.jsx("span",{className:Oe.spanLabel,title:p,children:p}),g.jsx("div",{className:Oe.barContainer,children:g.jsx("div",{className:`${Oe.bar} ${m}`,style:{left:`${o}%`,width:`${u}%`}})}),g.jsx("span",{className:Oe.duration,children:jd(r.durationMs)})]})}function mz({traces:t}){const{invocations:a,selectedInvocation:i,isLoading:r,selectTrace:o,refresh:u}=t,[c,h]=L.useState(null);return L.useEffect(()=>{h(null)},[i==null?void 0:i.traceId]),g.jsx(Io,{title:"Timeline view",status:r?"Loading...":void 0,onRefresh:u,children:g.jsxs("div",{className:Oe.body,children:[g.jsx(WM,{invocations:a,selectedTraceId:(i==null?void 0:i.traceId)??null,onSelect:o}),g.jsxs("div",{className:Oe.rightArea,children:[!i&&g.jsx("div",{className:Oe.emptyState,children:"Select an interaction to view"}),i&&g.jsxs(g.Fragment,{children:[g.jsx(dz,{tree:i.tree,selectedSpanId:(c==null?void 0:c.spanId)??null,onSelectSpan:h,userPrompt:i.userPrompt}),c&&g.jsx(iz,{span:c,onClose:()=>h(null)})]})]})]})})}const pz="_error_1vxci_1",gz="_toolListItems_1vxci_7",yz="_toolItem_1vxci_14",_z="_toolItemSelected_1vxci_34",vz="_toolName_1vxci_39",xz="_toolDesc_1vxci_45",bz="_toolForm_1vxci_53",Sz="_toolFormHeader_1vxci_58",kz="_toolFormDesc_1vxci_66",Tz="_noParams_1vxci_72",Nz="_field_1vxci_78",Ez="_fieldLabel_1vxci_82",Cz="_fieldType_1vxci_92",Az="_fieldInput_1vxci_98",wz="_fieldTextarea_1vxci_115",jz="_fieldHint_1vxci_122",Mz="_callBtn_1vxci_128",zz="_spinning_1vxci_153",Et={error:pz,toolListItems:gz,toolItem:yz,toolItemSelected:_z,toolName:vz,toolDesc:xz,toolForm:bz,toolFormHeader:Sz,toolFormDesc:kz,noParams:Tz,field:Nz,fieldLabel:Ez,fieldType:Cz,fieldInput:Az,fieldTextarea:wz,fieldHint:jz,callBtn:Mz,spinning:zz};function Rz(t,a){if(a.type==="integer"){const i=parseInt(t,10);return Number.isNaN(i)?0:i}if(a.type==="number"){const i=parseFloat(t);return Number.isNaN(i)?0:i}if(a.type==="boolean")return t==="true";if(a.type==="object"||a.type==="array")try{return JSON.parse(t)}catch{return t}return t}function Oz(t){return t.type==="integer"||t.type==="number"?"number":"text"}function Dz({tool:t,isCalling:a,onCall:i}){var p,y;const r=((p=t.inputSchema)==null?void 0:p.properties)??{},o=new Set(((y=t.inputSchema)==null?void 0:y.required)??[]),u=Object.keys(r),[c,h]=L.useState(()=>{const _={};for(const x of u){const b=r[x];_[x]=b.default!==void 0?String(b.default):""}return _}),m=_=>{_.preventDefault();const x={};for(const b of u){const N=c[b];N===""&&!o.has(b)||(x[b]=Rz(N,r[b]))}i(t.name,x)};return g.jsxs("form",{className:Et.toolForm,onSubmit:m,children:[g.jsx("div",{className:Et.toolFormHeader,children:t.name}),t.description&&g.jsx("div",{className:Et.toolFormDesc,children:t.description}),u.length===0&&g.jsx("div",{className:Et.noParams,children:"No parameters"}),u.map(_=>{const x=r[_],b=o.has(_);return g.jsxs("div",{className:Et.field,children:[g.jsxs("label",{className:Et.fieldLabel,children:[_,g.jsxs("span",{className:Et.fieldType,children:[x.type,b?", required":""]})]}),x.enum?g.jsxs("select",{className:Et.fieldInput,value:c[_],onChange:N=>h(j=>({...j,[_]:N.target.value})),children:[g.jsx("option",{value:"",children:"Select..."}),x.enum.map(N=>g.jsx("option",{value:N,children:N},N))]}):x.type==="boolean"?g.jsxs("select",{className:Et.fieldInput,value:c[_],onChange:N=>h(j=>({...j,[_]:N.target.value})),children:[g.jsx("option",{value:"",children:"Select..."}),g.jsx("option",{value:"true",children:"true"}),g.jsx("option",{value:"false",children:"false"})]}):x.type==="object"||x.type==="array"?g.jsx("textarea",{className:`${Et.fieldInput} ${Et.fieldTextarea}`,value:c[_],onChange:N=>h(j=>({...j,[_]:N.target.value})),placeholder:"JSON",rows:3}):g.jsx("input",{className:Et.fieldInput,type:Oz(x),value:c[_],onChange:N=>h(j=>({...j,[_]:N.target.value})),placeholder:x.description??""}),x.description&&g.jsx("div",{className:Et.fieldHint,children:x.description})]},_)}),g.jsx("button",{type:"submit",className:Et.callBtn,disabled:a,children:a?g.jsxs(g.Fragment,{children:[g.jsx(n1,{size:14,className:Et.spinning}),"Calling..."]}):"Call Tool"})]})}function Lz({tools:t,isLoading:a,error:i,onRefresh:r,onCallTool:o,onToolCallMessage:u}){const[c,h]=L.useState(null),[m,p]=L.useState(!1),y=t.find(x=>x.name===c),_=async(x,b)=>{var B;p(!0);const N=Object.keys(b).length>0?`(${JSON.stringify(b)})`:"()",j=`Called ${x}${N}`;try{const S=await o(x,b),M=((B=S.content)==null?void 0:B.filter(F=>F.text!==void 0).map(F=>F.text))??[],z=M.length>0?M.join(`
|
|
270
|
-
`):JSON.stringify(S,null,2);u(j,z,S.isError)}catch(S){u(j,S.message,!0)}finally{p(!1)}};return g.jsxs(Io,{title:`Tools (${t.length})`,onRefresh:r,isRefreshing:a,children:[i&&g.jsx("div",{className:Et.error,children:i}),g.jsx("div",{className:Et.toolListItems,children:t.map(x=>g.jsxs("button",{className:`${Et.toolItem} ${c===x.name?Et.toolItemSelected:""}`,onClick:()=>h(c===x.name?null:x.name),children:[g.jsx("span",{className:Et.toolName,children:x.name}),g.jsx("span",{className:Et.toolDesc,children:x.description??""})]},x.name))}),
|
|
271
|
-
`);
|
|
265
|
+
`,...u.current()});return/^[\t ]/.test(p)&&(p=Hr(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,i.options.closeAtx&&(p+=" "+c),m(),h(),p}Z1.peek=hC;function Z1(t){return t.value||""}function hC(){return"<"}$1.peek=mC;function $1(t,a,i,r){const o=Cd(i),u=o==='"'?"Quote":"Apostrophe",c=i.enter("image");let h=i.enter("label");const m=i.createTracker(r);let p=m.move("![");return p+=m.move(i.safe(t.alt,{before:p,after:"]",...m.current()})),p+=m.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=i.enter("destinationLiteral"),p+=m.move("<"),p+=m.move(i.safe(t.url,{before:p,after:">",...m.current()})),p+=m.move(">")):(h=i.enter("destinationRaw"),p+=m.move(i.safe(t.url,{before:p,after:t.title?" ":")",...m.current()}))),h(),t.title&&(h=i.enter(`title${u}`),p+=m.move(" "+o),p+=m.move(i.safe(t.title,{before:p,after:o,...m.current()})),p+=m.move(o),h()),p+=m.move(")"),c(),p}function mC(){return"!"}Y1.peek=pC;function Y1(t,a,i,r){const o=t.referenceType,u=i.enter("imageReference");let c=i.enter("label");const h=i.createTracker(r);let m=h.move("![");const p=i.safe(t.alt,{before:m,after:"]",...h.current()});m+=h.move(p+"]["),c();const _=i.stack;i.stack=[],c=i.enter("reference");const y=i.safe(i.associationId(t),{before:m,after:"]",...h.current()});return c(),i.stack=_,u(),o==="full"||!p||p!==y?m+=h.move(y+"]"):o==="shortcut"?m=m.slice(0,-1):m+=h.move("]"),m}function pC(){return"!"}X1.peek=gC;function X1(t,a,i){let r=t.value||"",o="`",u=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++u<i.unsafe.length;){const c=i.unsafe[u],h=i.compilePattern(c);let m;if(c.atBreak)for(;m=h.exec(r);){let p=m.index;r.charCodeAt(p)===10&&r.charCodeAt(p-1)===13&&p--,r=r.slice(0,p)+" "+r.slice(m.index+1)}}return o+r+o}function gC(){return"`"}function F1(t,a){const i=_d(t);return!!(!a.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))}Q1.peek=yC;function Q1(t,a,i,r){const o=Cd(i),u=o==='"'?"Quote":"Apostrophe",c=i.createTracker(r);let h,m;if(F1(t,i)){const _=i.stack;i.stack=[],h=i.enter("autolink");let y=c.move("<");return y+=c.move(i.containerPhrasing(t,{before:y,after:">",...c.current()})),y+=c.move(">"),h(),i.stack=_,y}h=i.enter("link"),m=i.enter("label");let p=c.move("[");return p+=c.move(i.containerPhrasing(t,{before:p,after:"](",...c.current()})),p+=c.move("]("),m(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(m=i.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(i.safe(t.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(m=i.enter("destinationRaw"),p+=c.move(i.safe(t.url,{before:p,after:t.title?" ":")",...c.current()}))),m(),t.title&&(m=i.enter(`title${u}`),p+=c.move(" "+o),p+=c.move(i.safe(t.title,{before:p,after:o,...c.current()})),p+=c.move(o),m()),p+=c.move(")"),h(),p}function yC(t,a,i){return F1(t,i)?"<":"["}K1.peek=_C;function K1(t,a,i,r){const o=t.referenceType,u=i.enter("linkReference");let c=i.enter("label");const h=i.createTracker(r);let m=h.move("[");const p=i.containerPhrasing(t,{before:m,after:"]",...h.current()});m+=h.move(p+"]["),c();const _=i.stack;i.stack=[],c=i.enter("reference");const y=i.safe(i.associationId(t),{before:m,after:"]",...h.current()});return c(),i.stack=_,u(),o==="full"||!p||p!==y?m+=h.move(y+"]"):o==="shortcut"?m=m.slice(0,-1):m+=h.move("]"),m}function _C(){return"["}function Ad(t){const a=t.options.bullet||"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bullet`, expected `*`, `+`, or `-`");return a}function vC(t){const a=Ad(t),i=t.options.bulletOther;if(!i)return a==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===a)throw new Error("Expected `bullet` (`"+a+"`) and `bulletOther` (`"+i+"`) to be different");return i}function xC(t){const a=t.options.bulletOrdered||".";if(a!=="."&&a!==")")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOrdered`, expected `.` or `)`");return a}function J1(t){const a=t.options.rule||"*";if(a!=="*"&&a!=="-"&&a!=="_")throw new Error("Cannot serialize rules with `"+a+"` for `options.rule`, expected `*`, `-`, or `_`");return a}function bC(t,a,i,r){const o=i.enter("list"),u=i.bulletCurrent;let c=t.ordered?xC(i):Ad(i);const h=t.ordered?c==="."?")":".":vC(i);let m=a&&i.bulletLastUsed?c===i.bulletLastUsed:!1;if(!t.ordered){const _=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&_&&(!_.children||!_.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&&(m=!0),J1(i)===c&&_){let y=-1;for(;++y<t.children.length;){const x=t.children[y];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){m=!0;break}}}}m&&(c=h),i.bulletCurrent=c;const p=i.containerFlow(t,r);return i.bulletLastUsed=c,i.bulletCurrent=u,o(),p}function SC(t){const a=t.options.listItemIndent||"one";if(a!=="tab"&&a!=="one"&&a!=="mixed")throw new Error("Cannot serialize items with `"+a+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return a}function kC(t,a,i,r){const o=SC(i);let u=i.bulletCurrent||Ad(i);a&&a.type==="list"&&a.ordered&&(u=(typeof a.start=="number"&&a.start>-1?a.start:1)+(i.options.incrementListMarker===!1?0:a.children.indexOf(t))+u);let c=u.length+1;(o==="tab"||o==="mixed"&&(a&&a.type==="list"&&a.spread||t.spread))&&(c=Math.ceil(c/4)*4);const h=i.createTracker(r);h.move(u+" ".repeat(c-u.length)),h.shift(c);const m=i.enter("listItem"),p=i.indentLines(i.containerFlow(t,h.current()),_);return m(),p;function _(y,x,b){return x?(b?"":" ".repeat(c))+y:(b?u:u+" ".repeat(c-u.length))+y}}function TC(t,a,i,r){const o=i.enter("paragraph"),u=i.enter("phrasing"),c=i.containerPhrasing(t,r);return u(),o(),c}const NC=Zo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function EC(t,a,i,r){return(t.children.some(function(c){return NC(c)})?i.containerPhrasing:i.containerFlow).call(i,t,r)}function CC(t){const a=t.options.strong||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize strong with `"+a+"` for `options.strong`, expected `*`, or `_`");return a}P1.peek=AC;function P1(t,a,i,r){const o=CC(i),u=i.enter("strong"),c=i.createTracker(r),h=c.move(o+o);let m=c.move(i.containerPhrasing(t,{after:o,before:h,...c.current()}));const p=m.charCodeAt(0),_=Co(r.before.charCodeAt(r.before.length-1),p,o);_.inside&&(m=Hr(p)+m.slice(1));const y=m.charCodeAt(m.length-1),x=Co(r.after.charCodeAt(0),y,o);x.inside&&(m=m.slice(0,-1)+Hr(y));const b=c.move(o+o);return u(),i.attentionEncodeSurroundingInfo={after:x.outside,before:_.outside},h+m+b}function AC(t,a,i){return i.options.strong||"*"}function wC(t,a,i,r){return i.safe(t.value,r)}function jC(t){const a=t.options.ruleRepetition||3;if(a<3)throw new Error("Cannot serialize rules with repetition `"+a+"` for `options.ruleRepetition`, expected `3` or more");return a}function MC(t,a,i){const r=(J1(i)+(i.options.ruleSpaces?" ":"")).repeat(jC(i));return i.options.ruleSpaces?r.slice(0,-1):r}const W1={blockquote:eC,break:wy,code:rC,definition:oC,emphasis:G1,hardBreak:wy,heading:dC,html:Z1,image:$1,imageReference:Y1,inlineCode:X1,link:Q1,linkReference:K1,list:bC,listItem:kC,paragraph:TC,root:EC,strong:P1,text:wC,thematicBreak:MC};function zC(){return{enter:{table:RC,tableData:jy,tableHeader:jy,tableRow:DC},exit:{codeText:LC,table:OC,tableData:Df,tableHeader:Df,tableRow:Df}}}function RC(t){const a=t._align;this.enter({type:"table",align:a.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function OC(t){this.exit(t),this.data.inTable=void 0}function DC(t){this.enter({type:"tableRow",children:[]},t)}function Df(t){this.exit(t)}function jy(t){this.enter({type:"tableCell",children:[]},t)}function LC(t){let a=this.resume();this.data.inTable&&(a=a.replace(/\\([\\|])/g,BC));const i=this.stack[this.stack.length-1];i.type,i.value=a,this.exit(t)}function BC(t,a){return a==="|"?a:t}function UC(t){const a=t||{},i=a.tableCellPadding,r=a.tablePipeAlign,o=a.stringLength,u=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
266
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:m,tableRow:h}};function c(b,N,j,B){return p(_(b,j,B),b.align)}function h(b,N,j,B){const S=y(b,j,B),M=p([S]);return M.slice(0,M.indexOf(`
|
|
267
|
+
`))}function m(b,N,j,B){const S=j.enter("tableCell"),M=j.enter("phrasing"),z=j.containerPhrasing(b,{...B,before:u,after:u});return M(),S(),z}function p(b,N){return PE(b,{align:N,alignDelimiters:r,padding:i,stringLength:o})}function _(b,N,j){const B=b.children;let S=-1;const M=[],z=N.enter("table");for(;++S<B.length;)M[S]=y(B[S],N,j);return z(),M}function y(b,N,j){const B=b.children;let S=-1;const M=[],z=N.enter("tableRow");for(;++S<B.length;)M[S]=m(B[S],b,N,j);return z(),M}function x(b,N,j){let B=W1.inlineCode(b,N,j);return j.stack.includes("tableCell")&&(B=B.replace(/\|/g,"\\$&")),B}}function HC(){return{exit:{taskListCheckValueChecked:My,taskListCheckValueUnchecked:My,paragraph:qC}}}function IC(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:VC}}}function My(t){const a=this.stack[this.stack.length-2];a.type,a.checked=t.type==="taskListCheckValueChecked"}function qC(t){const a=this.stack[this.stack.length-2];if(a&&a.type==="listItem"&&typeof a.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const o=a.children;let u=-1,c;for(;++u<o.length;){const h=o[u];if(h.type==="paragraph"){c=h;break}}c===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 VC(t,a,i,r){const o=t.children[0],u=typeof t.checked=="boolean"&&o&&o.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",h=i.createTracker(r);u&&h.move(c);let m=W1.listItem(t,a,i,{...r,...h.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),m;function p(_){return _+c}}function GC(){return[bE(),VE(),YE(),zC(),HC()]}function ZC(t){return{extensions:[SE(),GE(t),XE(),UC(t),IC()]}}const $C={tokenize:JC,partial:!0},e_={tokenize:PC,partial:!0},t_={tokenize:WC,partial:!0},n_={tokenize:eA,partial:!0},YC={tokenize:tA,partial:!0},a_={name:"wwwAutolink",tokenize:QC,previous:i_},l_={name:"protocolAutolink",tokenize:KC,previous:r_},Oa={name:"emailAutolink",tokenize:FC,previous:s_},sa={};function XC(){return{text:sa}}let Rl=48;for(;Rl<123;)sa[Rl]=Oa,Rl++,Rl===58?Rl=65:Rl===91&&(Rl=97);sa[43]=Oa;sa[45]=Oa;sa[46]=Oa;sa[95]=Oa;sa[72]=[Oa,l_];sa[104]=[Oa,l_];sa[87]=[Oa,a_];sa[119]=[Oa,a_];function FC(t,a,i){const r=this;let o,u;return c;function c(y){return!Pf(y)||!s_.call(r,r.previous)||wd(r.events)?i(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(y))}function h(y){return Pf(y)?(t.consume(y),h):y===64?(t.consume(y),m):i(y)}function m(y){return y===46?t.check(YC,_,p)(y):y===45||y===95||Qt(y)?(u=!0,t.consume(y),m):_(y)}function p(y){return t.consume(y),o=!0,m}function _(y){return u&&o&&tn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),a(y)):i(y)}}function QC(t,a,i){const r=this;return o;function o(c){return c!==87&&c!==119||!i_.call(r,r.previous)||wd(r.events)?i(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check($C,t.attempt(e_,t.attempt(t_,u),i),i)(c))}function u(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),a(c)}}function KC(t,a,i){const r=this;let o="",u=!1;return c;function c(y){return(y===72||y===104)&&r_.call(r,r.previous)&&!wd(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(y),t.consume(y),h):i(y)}function h(y){if(tn(y)&&o.length<5)return o+=String.fromCodePoint(y),t.consume(y),h;if(y===58){const x=o.toLowerCase();if(x==="http"||x==="https")return t.consume(y),m}return i(y)}function m(y){return y===47?(t.consume(y),u?p:(u=!0,m)):i(y)}function p(y){return y===null||To(y)||pt(y)||Ol(y)||qo(y)?i(y):t.attempt(e_,t.attempt(t_,_),i)(y)}function _(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),a(y)}}function JC(t,a,i){let r=0;return o;function o(c){return(c===87||c===119)&&r<3?(r++,t.consume(c),o):c===46&&r===3?(t.consume(c),u):i(c)}function u(c){return c===null?i(c):a(c)}}function PC(t,a,i){let r,o,u;return c;function c(p){return p===46||p===95?t.check(n_,m,h)(p):p===null||pt(p)||Ol(p)||p!==45&&qo(p)?m(p):(u=!0,t.consume(p),c)}function h(p){return p===95?r=!0:(o=r,r=void 0),t.consume(p),c}function m(p){return o||r||!u?i(p):a(p)}}function WC(t,a){let i=0,r=0;return o;function o(c){return c===40?(i++,t.consume(c),o):c===41&&r<i?u(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?t.check(n_,a,u)(c):c===null||pt(c)||Ol(c)?a(c):(t.consume(c),o)}function u(c){return c===41&&r++,t.consume(c),o}}function eA(t,a,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),u):h===93?(t.consume(h),o):h===60||h===null||pt(h)||Ol(h)?a(h):i(h)}function o(h){return h===null||h===40||h===91||pt(h)||Ol(h)?a(h):r(h)}function u(h){return tn(h)?c(h):i(h)}function c(h){return h===59?(t.consume(h),r):tn(h)?(t.consume(h),c):i(h)}}function tA(t,a,i){return r;function r(u){return t.consume(u),o}function o(u){return Qt(u)?i(u):a(u)}}function i_(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||pt(t)}function r_(t){return!tn(t)}function s_(t){return!(t===47||Pf(t))}function Pf(t){return t===43||t===45||t===46||t===95||Qt(t)}function wd(t){let a=t.length,i=!1;for(;a--;){const r=t[a][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 nA={tokenize:cA,partial:!0};function aA(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:sA,continuation:{tokenize:oA},exit:uA}},text:{91:{name:"gfmFootnoteCall",tokenize:rA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:lA,resolveTo:iA}}}}function lA(t,a,i){const r=this;let o=r.events.length;const u=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;o--;){const m=r.events[o][1];if(m.type==="labelImage"){c=m;break}if(m.type==="gfmFootnoteCall"||m.type==="labelLink"||m.type==="label"||m.type==="image"||m.type==="link")break}return h;function h(m){if(!c||!c._balanced)return i(m);const p=Kn(r.sliceSerialize({start:c.end,end:r.now()}));return p.codePointAt(0)!==94||!u.includes(p.slice(1))?i(m):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(m),t.exit("gfmFootnoteCallLabelMarker"),a(m))}}function iA(t,a){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)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[i+3][1].end),end:Object.assign({},t[i+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},h=[t[i+1],t[i+2],["enter",r,a],t[i+3],t[i+4],["enter",o,a],["exit",o,a],["enter",u,a],["enter",c,a],["exit",c,a],["exit",u,a],t[t.length-2],t[t.length-1],["exit",r,a]];return t.splice(i,t.length-i+1,...h),t}function rA(t,a,i){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,c;return h;function h(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),m}function m(y){return y!==94?i(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",p)}function p(y){if(u>999||y===93&&!c||y===null||y===91||pt(y))return i(y);if(y===93){t.exit("chunkString");const x=t.exit("gfmFootnoteCallString");return o.includes(Kn(r.sliceSerialize(x)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),a):i(y)}return pt(y)||(c=!0),u++,t.consume(y),y===92?_:p}function _(y){return y===91||y===92||y===93?(t.consume(y),u++,p):p(y)}}function sA(t,a,i){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,c=0,h;return m;function m(N){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(N){return N===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",_):i(N)}function _(N){if(c>999||N===93&&!h||N===null||N===91||pt(N))return i(N);if(N===93){t.exit("chunkString");const j=t.exit("gfmFootnoteDefinitionLabelString");return u=Kn(r.sliceSerialize(j)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),x}return pt(N)||(h=!0),c++,t.consume(N),N===92?y:_}function y(N){return N===91||N===92||N===93?(t.consume(N),c++,_):_(N)}function x(N){return N===58?(t.enter("definitionMarker"),t.consume(N),t.exit("definitionMarker"),o.includes(u)||o.push(u),Je(t,b,"gfmFootnoteDefinitionWhitespace")):i(N)}function b(N){return a(N)}}function oA(t,a,i){return t.check($r,a,t.attempt(nA,a,i))}function uA(t){t.exit("gfmFootnoteDefinition")}function cA(t,a,i){const r=this;return Je(t,o,"gfmFootnoteDefinitionIndent",5);function o(u){const c=r.events[r.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?a(u):i(u)}}function fA(t){let i=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:o};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(c,h){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let p=m;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[m][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const _={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[m][1].end)},y={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[m][1].start)},x=[["enter",_,h],["enter",c[p][1],h],["exit",c[p][1],h],["enter",y,h]],b=h.parser.constructs.insideSpan.null;b&&Tn(x,x.length,0,Vo(b,c.slice(p+1,m),h)),Tn(x,x.length,0,[["exit",y,h],["enter",c[m][1],h],["exit",c[m][1],h],["exit",_,h]]),Tn(c,p-1,m-p+3,x),m=p+x.length-2;break}}for(m=-1;++m<c.length;)c[m][1].type==="strikethroughSequenceTemporary"&&(c[m][1].type="data");return c}function u(c,h,m){const p=this.previous,_=this.events;let y=0;return x;function x(N){return p===126&&_[_.length-1][1].type!=="characterEscape"?m(N):(c.enter("strikethroughSequenceTemporary"),b(N))}function b(N){const j=wi(p);if(N===126)return y>1?m(N):(c.consume(N),y++,b);if(y<2&&!i)return m(N);const B=c.exit("strikethroughSequenceTemporary"),S=wi(N);return B._open=!S||S===2&&!!j,B._close=!j||j===2&&!!S,h(N)}}}class dA{constructor(){this.map=[]}add(a,i,r){hA(this,a,i,r)}consume(a){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(a.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),a.length=this.map[i][0];r.push(a.slice()),a.length=0;let o=r.pop();for(;o;){for(const u of o)a.push(u);o=r.pop()}this.map.length=0}}function hA(t,a,i,r){let o=0;if(!(i===0&&r.length===0)){for(;o<t.map.length;){if(t.map[o][0]===a){t.map[o][1]+=i,t.map[o][2].push(...r);return}o+=1}t.map.push([a,i,r])}}function mA(t,a){let i=!1;const r=[];for(;a<t.length;){const o=t[a];if(i){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(t[a+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[a-1][1].type==="tableDelimiterMarker"){const u=r.length-1;r[u]=r[u]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(i=!0);a+=1}return r}function pA(){return{flow:{null:{name:"table",tokenize:gA,resolveAll:yA}}}}function gA(t,a,i){const r=this;let o=0,u=0,c;return h;function h(R){let W=r.events.length-1;for(;W>-1;){const J=r.events[W][1].type;if(J==="lineEnding"||J==="linePrefix")W--;else break}const $=W>-1?r.events[W][1].type:null,de=$==="tableHead"||$==="tableRow"?U:m;return de===U&&r.parser.lazy[r.now().line]?i(R):de(R)}function m(R){return t.enter("tableHead"),t.enter("tableRow"),p(R)}function p(R){return R===124||(c=!0,u+=1),_(R)}function _(R){return R===null?i(R):Ne(R)?u>1?(u=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),b):i(R):qe(R)?Je(t,_,"whitespace")(R):(u+=1,c&&(c=!1,o+=1),R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),c=!0,_):(t.enter("data"),y(R)))}function y(R){return R===null||R===124||pt(R)?(t.exit("data"),_(R)):(t.consume(R),R===92?x:y)}function x(R){return R===92||R===124?(t.consume(R),y):y(R)}function b(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(R):(t.enter("tableDelimiterRow"),c=!1,qe(R)?Je(t,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):N(R))}function N(R){return R===45||R===58?B(R):R===124?(c=!0,t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),j):ae(R)}function j(R){return qe(R)?Je(t,B,"whitespace")(R):B(R)}function B(R){return R===58?(u+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),S):R===45?(u+=1,S(R)):R===null||Ne(R)?F(R):ae(R)}function S(R){return R===45?(t.enter("tableDelimiterFiller"),M(R)):ae(R)}function M(R){return R===45?(t.consume(R),M):R===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),z):(t.exit("tableDelimiterFiller"),z(R))}function z(R){return qe(R)?Je(t,F,"whitespace")(R):F(R)}function F(R){return R===124?N(R):R===null||Ne(R)?!c||o!==u?ae(R):(t.exit("tableDelimiterRow"),t.exit("tableHead"),a(R)):ae(R)}function ae(R){return i(R)}function U(R){return t.enter("tableRow"),ee(R)}function ee(R){return R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),ee):R===null||Ne(R)?(t.exit("tableRow"),a(R)):qe(R)?Je(t,ee,"whitespace")(R):(t.enter("data"),he(R))}function he(R){return R===null||R===124||pt(R)?(t.exit("data"),ee(R)):(t.consume(R),R===92?ge:he)}function ge(R){return R===92||R===124?(t.consume(R),he):he(R)}}function yA(t,a){let i=-1,r=!0,o=0,u=[0,0,0,0],c=[0,0,0,0],h=!1,m=0,p,_,y;const x=new dA;for(;++i<t.length;){const b=t[i],N=b[1];b[0]==="enter"?N.type==="tableHead"?(h=!1,m!==0&&(zy(x,a,m,p,_),_=void 0,m=0),p={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},x.add(i,0,[["enter",p,a]])):N.type==="tableRow"||N.type==="tableDelimiterRow"?(r=!0,y=void 0,u=[0,0,0,0],c=[0,i+1,0,0],h&&(h=!1,_={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},x.add(i,0,[["enter",_,a]])),o=N.type==="tableDelimiterRow"?2:_?3:1):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(u[1]!==0&&(c[0]=c[1],y=go(x,a,u,o,void 0,y),u=[0,0,0,0]),c[2]=i)):N.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(c[0]=c[1],y=go(x,a,u,o,void 0,y)),u=c,c=[u[1],i,0,0])):N.type==="tableHead"?(h=!0,m=i):N.type==="tableRow"||N.type==="tableDelimiterRow"?(m=i,u[1]!==0?(c[0]=c[1],y=go(x,a,u,o,i,y)):c[1]!==0&&(y=go(x,a,c,o,i,y)),o=0):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(c[3]=i)}for(m!==0&&zy(x,a,m,p,_),x.consume(a.events),i=-1;++i<a.events.length;){const b=a.events[i];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=mA(a.events,i))}return t}function go(t,a,i,r,o,u){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",h="tableContent";i[0]!==0&&(u.end=Object.assign({},Ei(a.events,i[0])),t.add(i[0],0,[["exit",u,a]]));const m=Ei(a.events,i[1]);if(u={type:c,start:Object.assign({},m),end:Object.assign({},m)},t.add(i[1],0,[["enter",u,a]]),i[2]!==0){const p=Ei(a.events,i[2]),_=Ei(a.events,i[3]),y={type:h,start:Object.assign({},p),end:Object.assign({},_)};if(t.add(i[2],0,[["enter",y,a]]),r!==2){const x=a.events[i[2]],b=a.events[i[3]];if(x[1].end=Object.assign({},b[1].end),x[1].type="chunkText",x[1].contentType="text",i[3]>i[2]+1){const N=i[2]+1,j=i[3]-i[2]-1;t.add(N,j,[])}}t.add(i[3]+1,0,[["exit",y,a]])}return o!==void 0&&(u.end=Object.assign({},Ei(a.events,o)),t.add(o,0,[["exit",u,a]]),u=void 0),u}function zy(t,a,i,r,o){const u=[],c=Ei(a.events,i);o&&(o.end=Object.assign({},c),u.push(["exit",o,a])),r.end=Object.assign({},c),u.push(["exit",r,a]),t.add(i+1,0,u)}function Ei(t,a){const i=t[a],r=i[0]==="enter"?"start":"end";return i[1][r]}const _A={name:"tasklistCheck",tokenize:xA};function vA(){return{text:{91:_A}}}function xA(t,a,i){const r=this;return o;function o(m){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(m):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),u)}function u(m){return pt(m)?(t.enter("taskListCheckValueUnchecked"),t.consume(m),t.exit("taskListCheckValueUnchecked"),c):m===88||m===120?(t.enter("taskListCheckValueChecked"),t.consume(m),t.exit("taskListCheckValueChecked"),c):i(m)}function c(m){return m===93?(t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),h):i(m)}function h(m){return Ne(m)?a(m):qe(m)?t.check({tokenize:bA},a,i)(m):i(m)}}function bA(t,a,i){return Je(t,r,"whitespace");function r(o){return o===null?i(o):a(o)}}function SA(t){return _1([XC(),aA(),fA(t),pA(),vA()])}const kA={};function TA(t){const a=this,i=t||kA,r=a.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(SA(i)),u.push(GC()),c.push(ZC(i))}const NA="_root_1pdrb_1",EA="_codeBlockWrapper_1pdrb_49",CA="_codeBlockHeader_1pdrb_70",AA="_codeBlockLang_1pdrb_80",wA="_copyBtn_1pdrb_86",Rr={root:NA,codeBlockWrapper:EA,codeBlockHeader:CA,codeBlockLang:AA,copyBtn:wA};function jA({children:t,className:a,...i}){var c;if(!(/language-(\w+)/.test(a||"")||typeof t=="string"&&t.includes(`
|
|
268
|
+
`)))return g.jsx("code",{className:a,...i,children:t});const o=String(t).replace(/\n$/,""),u=(c=a==null?void 0:a.match(/language-(\w+)/))==null?void 0:c[1];return g.jsx(MA,{code:o,lang:u})}function MA({code:t,lang:a}){const[i,r]=D.useState(!1),o=D.useCallback(()=>{navigator.clipboard.writeText(t).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)}).catch(()=>{})},[t]);return g.jsxs("div",{className:Rr.codeBlockWrapper,children:[g.jsxs("div",{className:Rr.codeBlockHeader,children:[a&&g.jsx("span",{className:Rr.codeBlockLang,children:a}),g.jsx("button",{className:Rr.copyBtn,onClick:o,"aria-label":"Copy code",children:i?g.jsx(e1,{size:13}):g.jsx(t1,{size:13})})]}),g.jsx("pre",{children:g.jsx("code",{children:t})})]})}const zA={code:jA,a:({children:t,...a})=>g.jsx("a",{...a,target:"_blank",rel:"noopener noreferrer",children:t})};function RA({content:t}){return g.jsx("div",{className:Rr.root,children:g.jsx(fE,{remarkPlugins:[TA],components:zA,children:t})})}const OA="_root_11p18_1",DA="_pill_11p18_8",LA="_icon_11p18_22",BA="_separator_11p18_27",UA="_dim_11p18_31",HA="_cache_11p18_36",sl={root:OA,pill:DA,icon:LA,separator:BA,dim:UA,cache:HA};function Lf(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function IA({usage:t}){return g.jsx("div",{className:sl.root,children:g.jsxs("span",{className:sl.pill,children:[g.jsx(fd,{size:10,className:sl.icon}),Lf(t.inputTokens)," ",g.jsx("span",{className:sl.dim,children:"in"}),g.jsx("span",{className:sl.separator,children:"/"}),Lf(t.outputTokens)," ",g.jsx("span",{className:sl.dim,children:"out"}),t.cacheReadInputTokens!==void 0&&t.cacheReadInputTokens>0&&g.jsxs(g.Fragment,{children:[g.jsx("span",{className:sl.separator,children:"/"}),g.jsxs("span",{className:sl.cache,children:[Lf(t.cacheReadInputTokens)," cached"]})]})]})})}function It(t){if(!t)return 0;try{return Number(BigInt(t)/1000000n)}catch{return Math.floor(Number(t)/1e6)}}function o_(t,a){const i=[];if(t)for(const r of t)for(const o of r.scopeSpans??[])for(const u of o.spans??[])i.push({type:"span",traceId:u.traceId,spanId:u.spanId,parentSpanId:u.parentSpanId,name:u.name,kind:u.kind,startTimeUnixNano:u.startTimeUnixNano,endTimeUnixNano:u.endTimeUnixNano,attributes:u.attributes,events:u.events,status:u.status,resource:r.resource,scope:o.scope,timestampMs:It(u.startTimeUnixNano)||Date.now()});if(a)for(const r of a)for(const o of r.scopeLogs??[])for(const u of o.logRecords??[])i.push({type:"log",traceId:u.traceId,spanId:u.spanId,severityNumber:u.severityNumber,severityText:u.severityText,body:u.body,attributes:u.attributes,timeUnixNano:u.timeUnixNano,observedTimeUnixNano:u.observedTimeUnixNano,resource:r.resource,scope:o.scope,timestampMs:It(u.timeUnixNano)||It(u.observedTimeUnixNano)||Date.now()});return i.sort((r,o)=>r.timestampMs-o.timestampMs),i}function qA(t){const a=t.filter(u=>u.type==="span"&&u.spanId),i=new Map;for(const u of a)i.set(u.spanId,{span:u,children:[],depth:0,durationMs:It(u.endTimeUnixNano)-It(u.startTimeUnixNano)});const r=[];for(const u of i.values()){const c=u.span.parentSpanId,h=c?i.get(c):void 0;h?h.children.push(u):r.push(u)}const o=(u,c)=>{u.depth=c,u.children.sort((h,m)=>h.span.timestampMs-m.span.timestampMs);for(const h of u.children)o(h,c+1)};r.sort((u,c)=>u.span.timestampMs-c.span.timestampMs);for(const u of r)o(u,0);return r}function VA(t){const a=[],i=r=>{a.push(r);for(const o of r.children)i(o)};for(const r of t)i(r);return a}function GA(t){const a=VA(t);if(a.length===0)return[];let i=1/0,r=0;for(const u of a){const c=It(u.span.startTimeUnixNano),h=It(u.span.endTimeUnixNano);c>0&&c<i&&(i=c),h>r&&(r=h)}const o=r-i;return o<=0?a.map(u=>({node:u,offsetPercent:0,widthPercent:100})):a.map(u=>{const c=It(u.span.startTimeUnixNano),h=It(u.span.endTimeUnixNano),m=(c-i)/o*100,p=Math.max((h-c)/o*100,.5);return{node:u,offsetPercent:Math.max(0,m),widthPercent:Math.min(p,100-m)}})}function jd(t){return t<0?"—":t<1?"<1ms":t<1e3?`${Math.round(t)}ms`:t<6e4?`${(t/1e3).toFixed(2)}s`:`${(t/6e4).toFixed(1)}m`}function ZA(t){const a=(t.name??"").toLowerCase(),i=t.attributes??{};return a==="tool_use"||a==="tool_call"||a.startsWith("execute_tool")||i["tool.name"]||i["gen_ai.tool.name"]?"tool":t.parentSpanId?a.includes("invoke")||a.includes("agent")?"agent":Object.keys(i).some(r=>r.startsWith("gen_ai."))?"llm":"other":"invocation"}const $A="_root_ryrat_1",YA="_pill_ryrat_5",XA="_cards_ryrat_24",FA="_card_ryrat_24",QA="_cardHeader_ryrat_39",KA="_toolIcon_ryrat_45",JA="_toolName_ryrat_50",PA="_duration_ryrat_57",WA="_toggle_ryrat_64",ew="_json_ryrat_80",Hn={root:$A,pill:YA,cards:XA,card:FA,cardHeader:QA,toolIcon:KA,toolName:JA,duration:PA,toggle:WA,json:ew};function Ry(t){if(!t)return null;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function tw({tool:t}){const[a,i]=D.useState(!0),[r,o]=D.useState(!0),u=Ry(t.input),c=Ry(t.output);return g.jsxs("div",{className:Hn.card,children:[g.jsxs("div",{className:Hn.cardHeader,children:[g.jsx(Ra,{size:12,className:Hn.toolIcon}),g.jsx("span",{className:Hn.toolName,children:t.name}),t.durationMs!==void 0&&g.jsx("span",{className:Hn.duration,children:jd(t.durationMs)})]}),u&&g.jsxs("button",{className:Hn.toggle,onClick:()=>i(h=>!h),children:[a?g.jsx(Ma,{size:12}):g.jsx(cl,{size:12}),"Input"]}),a&&u&&g.jsx("pre",{className:Hn.json,children:u}),c&&g.jsxs("button",{className:Hn.toggle,onClick:()=>o(h=>!h),children:[r?g.jsx(Ma,{size:12}):g.jsx(cl,{size:12}),"Output"]}),r&&c&&g.jsx("pre",{className:Hn.json,children:c})]})}function nw({toolCalls:t}){const[a,i]=D.useState(!1);return t.length===0?null:g.jsxs("div",{className:Hn.root,children:[g.jsxs("button",{className:Hn.pill,onClick:()=>i(r=>!r),children:[g.jsx(Ra,{size:12}),t.length," tool",t.length===1?"":"s"," used",a?g.jsx(Ma,{size:14}):g.jsx(cl,{size:14})]}),a&&g.jsx("div",{className:Hn.cards,children:t.map((r,o)=>g.jsx(tw,{tool:r},`${r.spanId}-${o}`))})]})}const aw="_messages_nks4r_1",lw="_emptyState_nks4r_10",iw="_emptyStateIcon_nks4r_20",rw="_emptyStateAgent_nks4r_26",sw="_emptyStateDetails_nks4r_32",ow="_emptyStateText_nks4r_37",uw="_msg_nks4r_42",cw="_msgUser_nks4r_48",fw="_bodyUser_nks4r_74 _body_nks4r_66",dw="_bodyAssistant_nks4r_81 _body_nks4r_66",hw="_bodyError_nks4r_87 _body_nks4r_66",mw="_thinking_nks4r_94",pw="_thinkingDot_nks4r_104",gw="_spinner_nks4r_127",yw="_startingText_nks4r_136",ut={messages:aw,emptyState:lw,emptyStateIcon:iw,emptyStateAgent:rw,emptyStateDetails:sw,emptyStateText:ow,msg:uw,msgUser:cw,bodyUser:fw,bodyAssistant:dw,bodyError:hw,thinking:mw,thinkingDot:pw,spinner:gw,startingText:yw};function _w(t){return t.replace(/\n?\n?```[^\n`]+\n\n```\n?\n?/g,`
|
|
269
|
+
`)}function vw(t){return t.isError?ut.bodyError:t.role==="user"?ut.bodyUser:ut.bodyAssistant}const xw=D.forwardRef(({messages:t,isStreaming:a,isStarting:i,agentName:r,agentBuildType:o,agentProtocol:u,hasAvailableTargets:c=!0},h)=>{if(i)return g.jsx("div",{className:ut.messages,ref:h,"data-testid":"message-list",children:g.jsxs("div",{className:ut.emptyState,children:[g.jsx("div",{className:ut.spinner}),g.jsxs("div",{className:ut.startingText,children:["Setting up ",r||"agent",g.jsx("span",{className:ut.thinkingDot,children:"."}),g.jsx("span",{className:ut.thinkingDot,children:"."}),g.jsx("span",{className:ut.thinkingDot,children:"."})]})]})});if(t.length===0){if(!c)return g.jsx("div",{className:ut.messages,ref:h,"data-testid":"message-list",children:g.jsxs("div",{className:ut.emptyState,children:[g.jsx("div",{className:ut.emptyStateIcon,children:g.jsx(If,{size:40,strokeWidth:1.5,color:"#6366f1"})}),g.jsx("div",{className:ut.emptyStateAgent,children:"No agents found"}),g.jsxs("div",{className:ut.emptyStateText,children:["Run ",g.jsx("code",{className:"cmd",children:"agentcore add"})," to add an agent or harness"]})]})});const p=[o==="CodeZip"?"Direct code deploy":o,u??"HTTP"].filter(Boolean).join(" · ");return g.jsx("div",{className:ut.messages,ref:h,"data-testid":"message-list",children:g.jsxs("div",{className:ut.emptyState,children:[g.jsx("div",{className:ut.emptyStateIcon,children:g.jsx(If,{size:40,strokeWidth:1.5,color:"#6366f1"})}),g.jsx("div",{className:ut.emptyStateAgent,children:r||"Agent"}),p&&g.jsx("div",{className:ut.emptyStateDetails,children:p}),g.jsx("div",{className:ut.emptyStateText,children:"Send a prompt to test this agent"})]})})}return g.jsx("div",{className:ut.messages,ref:h,"data-testid":"message-list",children:t.map((m,p)=>a&&m.role==="assistant"&&m.content===""&&p===t.length-1?g.jsx("div",{className:ut.msg,"data-testid":"thinking-indicator",children:g.jsxs("div",{className:ut.thinking,children:["Thinking",g.jsx("span",{className:ut.thinkingDot,children:"."}),g.jsx("span",{className:ut.thinkingDot,children:"."}),g.jsx("span",{className:ut.thinkingDot,children:"."})]})},p):g.jsxs("div",{className:m.role==="user"?ut.msgUser:ut.msg,"data-testid":`chat-message-${p}`,children:[g.jsx("div",{className:vw(m),children:m.isError?g.jsx(qf,{content:m.content}):m.role==="assistant"?g.jsx(RA,{content:m.toolExecutions?_w(m.content):m.content}):m.content}),m.toolCalls&&m.toolCalls.length>0&&g.jsx(nw,{toolCalls:m.toolCalls}),m.toolExecutions&&Object.keys(m.toolExecutions).length>0&&g.jsx(ek,{toolExecutions:m.toolExecutions}),m.tokenUsage&&g.jsx(IA,{usage:m.tokenUsage})]},p))})});function bw(){const a=new URLSearchParams(window.location.search).get("port");return a&&/^\d+$/.test(a)?`http://localhost:${a}`:""}const In=bw();function Nn(t,a){if((a==null?void 0:a.method)==="POST"){const i=new Headers(a.headers);return i.set("X-Agentcore-Local","1"),fetch(t,{...a,headers:i})}return fetch(t,a)}function Sw(){const[t,a]=D.useState([]),[i,r]=D.useState(!1),[o,u]=D.useState(null),[c,h]=D.useState(null),m=D.useCallback(async()=>{try{return(await Nn(`${In}/api/memory?memoryName=__probe__&namespace=__probe__`)).status===404?(h(!1),!1):(h(!0),!0)}catch{return h(!1),!1}},[]),p=D.useCallback(async(x,b)=>{r(!0),u(null),a([]);try{const N=new URLSearchParams({memoryName:x,namespace:b}),j=await Nn(`${In}/api/memory?${N.toString()}`);if(j.status===404){u("Memory browsing is only available in invoke mode."),h(!1);return}const B=await j.json();B.success&&B.records?a(B.records):u(B.error||"Failed to load memory records")}catch(N){u(N instanceof Error?N.message:"Failed to load memory records")}finally{r(!1)}},[]),_=D.useCallback(async(x,b,N)=>{r(!0),u(null),a([]);try{const j={memoryName:x,namespace:b,searchQuery:N},B=await Nn(`${In}/api/memory/search`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(j)});if(B.status===404){u("Memory browsing is only available in invoke mode."),h(!1);return}const S=await B.json();S.success&&S.records?a(S.records):u(S.error||"Failed to search memory records")}catch(j){u(j instanceof Error?j.message:"Failed to search memory records")}finally{r(!1)}},[]),y=D.useCallback(()=>{a([]),u(null)},[]);return{records:t,isLoading:i,error:o,isAvailable:c,checkAvailability:m,listRecords:p,searchRecords:_,clear:y}}function Yo(t){try{const a=Number(t),i=Number.isFinite(a)&&a>1e12?new Date(a):new Date(t);return isNaN(i.getTime())?t:i.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return t}}const kw="_notice_1isal_1",Tw="_warning_1isal_12",Nw="_retryBtn_1isal_16",Bf={notice:kw,warning:Tw,retryBtn:Nw};function Oy({children:t,variant:a="error",onRetry:i}){return g.jsxs("div",{className:`${Bf.notice} ${a==="warning"?Bf.warning:""}`,children:[t,i&&g.jsx("button",{className:Bf.retryBtn,onClick:i,children:"Retry"})]})}const Ew="_container_qogk5_1",Cw="_content_qogk5_47",Aw="_status_qogk5_55",ww="_error_qogk5_62",jw="_detail_qogk5_73",Mw="_detailHeader_qogk5_80",zw="_detailTitle_qogk5_89",Rw="_closeBtn_qogk5_95",Ow="_controls_qogk5_118",Dw="_field_qogk5_124",Lw="_fieldLabel_qogk5_130",Bw="_input_qogk5_138",Uw="_select_qogk5_158",Hw="_actions_qogk5_175",Iw="_actionBtn_qogk5_180",qw="_searchBtn_qogk5_202",Vw="_resultCount_qogk5_213",Gw="_recordList_qogk5_219",Zw="_recordRow_qogk5_228",$w="_recordRowSelected_qogk5_248",Yw="_recordMain_qogk5_254",Xw="_recordContent_qogk5_261",Fw="_scoreBadge_qogk5_271",Qw="_recordMeta_qogk5_281",Kw="_strategyTag_qogk5_288",Jw="_recordTime_qogk5_296",Pw="_detailBody_qogk5_302",Ww="_detailSection_qogk5_309",ej="_detailLabel_qogk5_315",tj="_detailContent_qogk5_322",nj="_metadataGrid_qogk5_335",aj="_metadataRow_qogk5_341",lj="_metadataKey_qogk5_354",ij="_metadataValue_qogk5_361",rj="_detailId_qogk5_370",sj="_namespacesValue_qogk5_377",oj="_noMetadata_qogk5_383",_e={container:Ew,content:Cw,status:Aw,error:ww,detail:jw,detailHeader:Mw,detailTitle:zw,closeBtn:Rw,controls:Ow,field:Dw,fieldLabel:Lw,input:Bw,select:Uw,actions:Hw,actionBtn:Iw,searchBtn:qw,resultCount:Vw,recordList:Gw,recordRow:Zw,recordRowSelected:$w,recordMain:Yw,recordContent:Xw,scoreBadge:Fw,recordMeta:Qw,strategyTag:Kw,recordTime:Jw,detailBody:Pw,detailSection:Ww,detailLabel:ej,detailContent:tj,metadataGrid:nj,metadataRow:aj,metadataKey:lj,metadataValue:ij,detailId:rj,namespacesValue:sj,noMetadata:oj};function uj({memories:t,sessionId:a,userId:i,isActive:r}){var fe;const{records:o,isLoading:u,error:c,isAvailable:h,checkAvailability:m,listRecords:p,searchRecords:_,clear:y}=Sw(),[x,b]=D.useState(((fe=t[0])==null?void 0:fe.name)??""),[N,j]=D.useState(""),[B,S]=D.useState({}),[M,z]=D.useState(""),[F,ae]=D.useState(null),[U,ee]=D.useState(!1),[he,ge]=D.useState(!1),R=D.useRef(!1);D.useEffect(()=>{!x&&t.length>0&&b(t[0].name)},[t,x]);const W=t.find(Y=>Y.name===x),$=(W==null?void 0:W.strategies)??[],de=$.find(Y=>Y.type===N),J=(de==null?void 0:de.namespaceTemplates)??(de==null?void 0:de.namespaces)??[],ne=D.useMemo(()=>de?[...new Set(J.flatMap(Y=>(Y.match(/\{(\w+)\}/g)||[]).map(Fe=>Fe.slice(1,-1))))]:[],[de]);D.useEffect(()=>{r&&h===null&&m()},[r,h,m]),D.useEffect(()=>{if(!de){S({});return}const Y={};for(const xe of ne)xe==="actorId"?Y[xe]=i||"default-user":xe==="sessionId"&&a?Y[xe]=a:Y[xe]="";S(Y)},[de,ne,a,i]);const L=Y=>{b(Y),j(""),ae(null),ge(!1),y()},K=Y=>{j(Y),ae(null),ge(!1),y()},se=(Y,xe)=>{S(Fe=>({...Fe,[Y]:xe}))},ke=()=>de?J.map(Y=>Y.replace(/\{(\w+)\}/g,(xe,Fe)=>{var Ge;return((Ge=B[Fe])==null?void 0:Ge.trim())||""})).join(","):"",E=de!=null&&ne.every(Y=>{var xe;return(xe=B[Y])==null?void 0:xe.trim()}),A=()=>{E&&(ee(!1),ae(null),ge(!0),p(x,ke()))},G=()=>{!E||!M.trim()||(ee(!0),ae(null),ge(!0),_(x,ke(),M.trim()))},T=Y=>{Y.key==="Enter"&&!R.current&&(M.trim()?G():A())},te=Y=>{ae(xe=>(xe==null?void 0:xe.memoryRecordId)===Y.memoryRecordId?null:Y)};return t.length===0?g.jsxs("div",{className:_e.status,children:[g.jsx("div",{children:"No AgentCore Memory found."}),g.jsxs("div",{children:["Run ",g.jsx("code",{className:"cmd",children:"agentcore add"})," to add Memory, then"," ",g.jsx("code",{className:"cmd",children:"agentcore deploy"})," to deploy it."]})]}):g.jsx("div",{className:_e.container,children:g.jsxs("div",{className:_e.content,children:[t.some(Y=>Y.deploymentStatus!=="deployed")&&g.jsxs(Oy,{variant:"warning",children:[g.jsx("span",{children:"AgentCore Memory must be deployed before it can be used."}),g.jsxs("span",{children:["To test memory, run ",g.jsx("code",{className:"cmd",children:"agentcore deploy"})," and restart dev."]})]}),t.some(Y=>Y.deploymentStatus==="deployed")&&g.jsx(Oy,{variant:"warning",children:"Memories may take 1-2 minutes to update after an invocation."}),h!==!1&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:_e.controls,children:[g.jsxs("div",{className:_e.field,children:[g.jsx("label",{className:_e.fieldLabel,htmlFor:"memory-selector",children:"Memory"}),g.jsx("select",{id:"memory-selector",className:_e.select,value:x,onChange:Y=>L(Y.target.value),children:t.map(Y=>g.jsx("option",{value:Y.name,children:Y.name},Y.name))})]}),g.jsxs("div",{className:_e.field,children:[g.jsx("label",{className:_e.fieldLabel,htmlFor:`strat-${x}`,children:"Strategy"}),g.jsxs("select",{id:`strat-${x}`,className:_e.select,value:N,onChange:Y=>K(Y.target.value),children:[g.jsx("option",{value:"",disabled:!0,children:"Select a strategy…"}),$.map(Y=>g.jsx("option",{value:Y.type,children:Y.type},Y.type))]})]}),ne.map(Y=>g.jsxs("div",{className:_e.field,children:[g.jsx("label",{className:_e.fieldLabel,htmlFor:`ns-${x}-${Y}`,children:Y}),g.jsx("input",{id:`ns-${x}-${Y}`,className:_e.input,type:"text",placeholder:`Enter ${Y}…`,value:B[Y]||"",onChange:xe=>se(Y,xe.target.value),onKeyDown:T,onCompositionStart:()=>{R.current=!0},onCompositionEnd:()=>{R.current=!1}})]},Y)),de&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:_e.field,children:[g.jsx("label",{className:_e.fieldLabel,htmlFor:`search-${x}`,children:"Search (optional)"}),g.jsx("input",{id:`search-${x}`,className:_e.input,type:"text",placeholder:"Semantic search query…",value:M,onChange:Y=>z(Y.target.value),onKeyDown:T,onCompositionStart:()=>{R.current=!0},onCompositionEnd:()=>{R.current=!1}})]}),g.jsxs("div",{className:_e.actions,children:[g.jsx("button",{className:_e.actionBtn,onClick:A,disabled:!E||u,children:"List"}),g.jsx("button",{className:`${_e.actionBtn} ${_e.searchBtn}`,onClick:G,disabled:!E||!M.trim()||u,children:"Search"})]})]})]}),u&&g.jsx("div",{className:_e.status,children:"Loading records…"}),c&&g.jsx("div",{className:_e.error,children:g.jsxs("span",{children:[g.jsx(cd,{size:12})," ",c]})}),!u&&!c&&he&&o.length===0&&g.jsx("div",{className:_e.status,children:"No memory records found for this namespace."}),!u&&o.length>0&&g.jsxs("div",{className:_e.recordList,children:[g.jsxs("div",{className:_e.resultCount,children:[o.length," record",o.length!==1?"s":"",U?" (search results)":""]}),o.map(Y=>g.jsx(cj,{record:Y,isSelected:(F==null?void 0:F.memoryRecordId)===Y.memoryRecordId,showScore:U,onClick:()=>te(Y)},Y.memoryRecordId))]}),F&&g.jsx(fj,{record:F,onClose:()=>ae(null)})]})]})})}function cj({record:t,isSelected:a,showScore:i,onClick:r}){const o=t.content?t.content.length>120?t.content.slice(0,120)+"…":t.content:"(no content)";return g.jsxs("button",{className:`${_e.recordRow} ${a?_e.recordRowSelected:""}`,onClick:r,"aria-label":`Memory record ${t.memoryRecordId}`,children:[g.jsxs("div",{className:_e.recordMain,children:[g.jsx("span",{className:_e.recordContent,children:o}),i&&t.score!==null&&t.score!==void 0&&g.jsx("span",{className:_e.scoreBadge,children:t.score.toFixed(3)})]}),g.jsxs("div",{className:_e.recordMeta,children:[g.jsx("span",{className:_e.strategyTag,children:t.memoryStrategyId}),g.jsx("span",{className:_e.recordTime,children:Yo(t.createdAt)})]})]})}function fj({record:t,onClose:a}){const i=Object.entries(t.metadata||{});return g.jsxs("div",{className:_e.detail,children:[g.jsxs("div",{className:_e.detailHeader,children:[g.jsx("span",{className:_e.detailTitle,children:"Record Detail"}),g.jsx("button",{className:_e.closeBtn,onClick:a,"aria-label":"Close record detail",children:g.jsx(Gr,{size:12})})]}),g.jsxs("div",{className:_e.detailBody,children:[g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"ID"}),g.jsx("span",{className:_e.detailId,children:t.memoryRecordId})]}),g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Content"}),g.jsx("div",{className:_e.detailContent,children:t.content||"(no content)"})]}),g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Strategy"}),g.jsx("span",{className:_e.strategyTag,children:t.memoryStrategyId})]}),g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Created"}),g.jsx("span",{className:_e.recordTime,children:Yo(t.createdAt)})]}),t.score!==null&&t.score!==void 0&&g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Relevance Score"}),g.jsx("span",{className:_e.scoreBadge,children:t.score.toFixed(4)})]}),t.namespaces.length>0&&g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Namespaces"}),g.jsx("span",{className:_e.namespacesValue,children:t.namespaces.join(", ")})]}),i.length>0&&g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Metadata"}),g.jsx("div",{className:_e.metadataGrid,children:i.map(([r,o])=>g.jsxs("div",{className:_e.metadataRow,children:[g.jsx("span",{className:_e.metadataKey,children:r}),g.jsx("span",{className:_e.metadataValue,children:o})]},r))})]}),i.length===0&&g.jsxs("div",{className:_e.detailSection,children:[g.jsx("span",{className:_e.detailLabel,children:"Metadata"}),g.jsx("span",{className:_e.noMetadata,children:"No metadata"})]})]})]})}const dj="_panel_lfvg8_1",hj="_resizeHandle_lfvg8_13",mj="_header_lfvg8_30",pj="_projectName_lfvg8_39",gj="_headerActions_lfvg8_45",yj="_iconBtn_lfvg8_50",_j="_tabBar_lfvg8_70",vj="_tab_lfvg8_70",xj="_tabActive_lfvg8_93",bj="_body_lfvg8_98",Sj="_tabContent_lfvg8_104",kj="_status_lfvg8_114",Tj="_error_lfvg8_121",Nj="_retryBtn_lfvg8_132",Ej="_graph_lfvg8_146",Cj="_section_lfvg8_152",Aj="_sectionTitle_lfvg8_158",wj="_childNode_lfvg8_167",jj="_node_lfvg8_183",Mj="_nodeSelected_lfvg8_201",zj="_nodeIcon_lfvg8_206",Rj="_agent_lfvg8_216",Oj="_harness_lfvg8_220",Dj="_memory_lfvg8_224",Lj="_credential_lfvg8_228",Bj="_gateway_lfvg8_232",Uj="_gatewayTarget_lfvg8_236",Hj="_mcpTool_lfvg8_240",Ij="_evaluator_lfvg8_244",qj="_onlineEval_lfvg8_248",Vj="_policyEngine_lfvg8_252",Gj="_policy_lfvg8_252",Zj="_unassignedTarget_lfvg8_260",$j="_nodeContent_lfvg8_264",Yj="_nodeName_lfvg8_272",Xj="_nodeNameRow_lfvg8_281",Fj="_deployBadge_lfvg8_288",Qj="_deploy_deployed_lfvg8_298",Kj="_nodeSubtitle_lfvg8_313",Jj="_nodeConnections_lfvg8_321",Pj="_connectionTag_lfvg8_328",Wj="_infoCard_lfvg8_386",e4="_infoHeader_lfvg8_393",t4="_kindBadge_lfvg8_402",n4="_infoName_lfvg8_461",a4="_infoBody_lfvg8_467",l4="_infoSectionHeader_lfvg8_471",i4="_infoRow_lfvg8_481",r4="_infoKey_lfvg8_494",s4="_infoValue_lfvg8_499",Ae={panel:dj,resizeHandle:hj,header:mj,projectName:pj,headerActions:gj,iconBtn:yj,tabBar:_j,tab:vj,tabActive:xj,body:bj,tabContent:Sj,status:kj,error:Tj,retryBtn:Nj,graph:Ej,section:Cj,sectionTitle:Aj,childNode:wj,node:jj,nodeSelected:Mj,nodeIcon:zj,agent:Rj,harness:Oj,memory:Dj,credential:Lj,gateway:Bj,gatewayTarget:Uj,mcpTool:Hj,evaluator:Ij,onlineEval:qj,policyEngine:Vj,policy:Gj,unassignedTarget:Zj,nodeContent:$j,nodeName:Yj,nodeNameRow:Xj,deployBadge:Fj,deploy_deployed:Qj,"deploy_local-only":"_deploy_local-only_lfvg8_303","deploy_pending-removal":"_deploy_pending-removal_lfvg8_308",nodeSubtitle:Kj,nodeConnections:Jj,connectionTag:Pj,infoCard:Wj,infoHeader:e4,kindBadge:t4,infoName:n4,infoBody:a4,infoSectionHeader:l4,infoRow:i4,infoKey:r4,infoValue:s4},o4={agent:If,harness:sx,memory:ax,credential:Mx,gateway:Cx,gatewayTarget:bx,mcpTool:Ra,evaluator:gx,onlineEval:ex,policyEngine:Bx,policy:Nx,unassignedTarget:a1},u4={deployed:"Deployed","local-only":"Not deployed","pending-removal":"Removed locally"};function Un({kind:t,name:a,subtitle:i,isSelected:r,onClick:o,connections:u,deploymentStatus:c}){const h=o4[t];return g.jsxs("button",{className:`${Ae.node} ${Ae[t]} ${r?Ae.nodeSelected:""}`,onClick:o,"aria-label":`${t}: ${a}`,children:[g.jsx("span",{className:Ae.nodeIcon,children:g.jsx(h,{size:14})}),g.jsxs("div",{className:Ae.nodeContent,children:[g.jsxs("div",{className:Ae.nodeNameRow,children:[g.jsx("span",{className:Ae.nodeName,children:a}),c&&g.jsx("span",{className:`${Ae.deployBadge} ${Ae[`deploy_${c}`]}`,children:u4[c]})]}),i&&g.jsx("span",{className:Ae.nodeSubtitle,children:i}),u&&u.length>0&&g.jsx("div",{className:Ae.nodeConnections,children:u.map(m=>g.jsx("span",{className:Ae.connectionTag,children:m},m))})]})]})}function Dy(t,a){const i=new URLSearchParams;return t!=null&&t.agentName&&i.set("agentName",t.agentName),t!=null&&t.harnessName&&i.set("harnessName",t.harnessName),(a==null?void 0:a.startTime)!==void 0&&i.set("startTime",String(a.startTime)),(a==null?void 0:a.endTime)!==void 0&&i.set("endTime",String(a.endTime)),i}function c4(){const t=In,[a,i]=D.useState([]),[r,o]=D.useState([]),[u,c]=D.useState([]),[h,m]=D.useState([]),[p,_]=D.useState(!1),[y,x]=D.useState(!1),[b,N]=D.useState(null),[j,B]=D.useState(null),S=D.useCallback(async(F,ae,U)=>{_(!0),N(null),o([]),c([]),m([]);try{const ee=Dy(ae,U),ge=await Nn(`${t}/api/${F==="cloudwatch"?"cloudwatch-traces":"traces"}?${ee.toString()}`);if(ge.status===404){B(!1),i([]);return}B(!0);const R=await ge.json();R.success?i(R.traces):(N(R.error),i([]))}catch(ee){N(ee instanceof Error?ee.message:"Failed to load traces"),i([])}finally{_(!1)}},[t]),M=D.useCallback(async(F,ae,U,ee)=>{x(!0),N(null);try{const he=Dy(U,ee),W=await(await Nn(`${t}/api/${F==="cloudwatch"?"cloudwatch-traces":"traces"}/${encodeURIComponent(ae)}?${he.toString()}`)).json();if(W.success)if(F==="cloudwatch"){const $=W;c($.records??[]),m($.spans??[]),o([])}else{const $=W;o(o_($.resourceSpans,$.resourceLogs)),c([]),m([])}else N(W.error),o([]),c([]),m([])}catch(he){N(he instanceof Error?he.message:"Failed to load trace detail"),o([]),c([]),m([])}finally{x(!1)}},[t]),z=D.useCallback(()=>{o([]),c([]),m([]),N(null)},[]);return{traces:a,spans:r,deployedRecords:u,deployedSpans:h,isLoadingTraces:p,isLoadingDetail:y,error:b,isAvailable:j,fetchTraces:S,fetchTraceDetail:M,clearDetail:z}}function Ir(t){if(!t)return{};const a={};for(const i of t){if(!i.key||!i.value)continue;const r=i.value;r.stringValue!==void 0?a[i.key]=r.stringValue:r.intValue!==void 0?a[i.key]=r.intValue:r.doubleValue!==void 0?a[i.key]=r.doubleValue:r.boolValue!==void 0&&(a[i.key]=r.boolValue)}return a}function kn(t){if(t!=null){if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}}}function f4(t){if(!t||!t.startsWith("["))return null;try{const a=JSON.parse(t);if(Array.isArray(a)&&a.length>0&&typeof a[0]=="object")return a}catch{}return null}function Ly(t){if(!t||!t.startsWith("{")&&!t.startsWith("["))return null;try{return JSON.parse(t)}catch{return null}}const d4="_dimText_rs5f0_1",h4="_assistantMsg_rs5f0_5",m4="_toolCalls_rs5f0_9",p4="_toolCall_rs5f0_9",g4="_toolIcon_rs5f0_22",y4="_toolName_rs5f0_26",_4="_toolArgs_rs5f0_32",v4="_toolResult_rs5f0_45",x4="_toolResultStatus_rs5f0_51",b4="_toolResultError_rs5f0_58",S4="_finishReason_rs5f0_62",k4="_genAiContent_rs5f0_68",T4="_contentText_rs5f0_74",N4="_strandsEvent_rs5f0_78",E4="_strandsSection_rs5f0_84",C4="_strandsLabel_rs5f0_90",A4="_messageList_rs5f0_97",w4="_msgRow_rs5f0_103",j4="_roleBadge_rs5f0_109",M4="_role_user_rs5f0_120",z4="_role_assistant_rs5f0_125",R4="_role_system_rs5f0_130",O4="_role_tool_rs5f0_135",D4="_msgText_rs5f0_140",L4="_msgContent_rs5f0_146",B4="_parsedContent_rs5f0_151",U4="_spanScope_rs5f0_157",H4="_spanRaw_rs5f0_163",we={dimText:d4,assistantMsg:h4,toolCalls:m4,toolCall:p4,toolIcon:g4,toolName:y4,toolArgs:_4,toolResult:v4,toolResultStatus:x4,toolResultError:b4,finishReason:S4,genAiContent:k4,contentText:T4,strandsEvent:N4,strandsSection:E4,strandsLabel:C4,messageList:A4,msgRow:w4,roleBadge:j4,role_user:M4,role_assistant:z4,role_system:R4,role_tool:O4,msgText:D4,msgContent:L4,parsedContent:B4,spanScope:U4,spanRaw:H4};function Md({body:t}){if(t==null)return g.jsx("span",{className:we.dimText,children:"—"});if(typeof t=="string")return g.jsx("span",{children:t});if(typeof t!="object")return g.jsx("span",{children:String(t)});const a=t;if(typeof a.message=="string"&&!a.content&&!a.input&&!a.output)return g.jsx("span",{children:a.message});if(Array.isArray(a.content))return g.jsx(zd,{content:a.content});if(a.message&&typeof a.message=="object"){const i=a.message;if(i.role==="assistant"&&Array.isArray(i.content)){const r=i.content.map(o=>o.text).filter(Boolean).join("");if(r)return g.jsx("div",{className:we.assistantMsg,children:r})}if(Array.isArray(i.tool_calls))return g.jsxs("div",{className:we.toolCalls,children:[i.tool_calls.map((r,o)=>{const u=r.function;return g.jsxs("div",{className:we.toolCall,children:[g.jsx("span",{className:we.toolIcon,children:g.jsx(Ra,{size:12})}),g.jsx("span",{className:we.toolName,children:String((u==null?void 0:u.name)??"unknown")}),g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(u==null?void 0:u.arguments,null,2)})]},o)}),a.finish_reason!==null&&a.finish_reason!==void 0&&g.jsx("span",{className:we.finishReason,children:String(a.finish_reason)})]});if(i.role==="assistant"&&typeof i.content=="string")return g.jsx("div",{className:we.assistantMsg,children:i.content})}return a.input||a.output?g.jsx(I4,{input:a.input,output:a.output}):g.jsx("pre",{className:we.spanRaw,children:JSON.stringify(a,null,2)})}function zd({content:t}){return g.jsx("div",{className:we.genAiContent,children:t.map((a,i)=>{const r=a;if(r.text)return g.jsx("div",{className:we.contentText,children:String(r.text)},i);if(r.toolUse){const o=r.toolUse;return g.jsxs("div",{className:we.toolCall,children:[g.jsx("span",{className:we.toolIcon,children:g.jsx(Ra,{size:12})}),g.jsx("span",{className:we.toolName,children:String(o.name)}),g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(o.input,null,2)})]},i)}if(r.toolResult){const o=r.toolResult;return g.jsxs("div",{className:we.toolResult,children:[g.jsx("span",{className:`${we.toolResultStatus} ${String(o.status).toLowerCase()==="error"?we.toolResultError:""}`,children:String(o.status||"result")}),Array.isArray(o.content)&&o.content.map((u,c)=>g.jsx("pre",{className:we.toolArgs,children:String(u.text??JSON.stringify(u))},c))]},i)}return g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(r,null,2)},i)})})}function By(t){if(t&&typeof t=="object"&&!Array.isArray(t)){const a=t.messages;if(Array.isArray(a))return a}}function I4({input:t,output:a}){const i=By(t),r=By(a);return g.jsxs("div",{className:we.strandsEvent,children:[t!=null&&g.jsxs("div",{className:we.strandsSection,children:[g.jsx("span",{className:we.strandsLabel,children:"Input"}),i?g.jsx(Uy,{messages:i}):g.jsx("pre",{className:we.spanRaw,children:JSON.stringify(t,null,2)})]}),a!=null&&g.jsxs("div",{className:we.strandsSection,children:[g.jsx("span",{className:we.strandsLabel,children:"Output"}),r?g.jsx(Uy,{messages:r}):g.jsx("pre",{className:we.spanRaw,children:JSON.stringify(a,null,2)})]})]})}function Uy({messages:t}){return!t||!Array.isArray(t)?null:g.jsx("div",{className:we.messageList,children:t.map((a,i)=>{const r=a,o=String(r.role||""),u=r.content;let c="";typeof u=="string"?c=u:u&&typeof u=="object"&&(c=u.message||u.content||"");const h=f4(c);return g.jsxs("div",{className:we.msgRow,children:[g.jsx("span",{className:`${we.roleBadge} ${we[`role_${o}`]||""}`,children:o}),g.jsx("div",{className:we.msgContent,children:h?g.jsx(q4,{items:h}):g.jsx("span",{className:we.msgText,children:c||JSON.stringify(u)})})]},i)})})}function q4({items:t}){return g.jsx("div",{className:we.parsedContent,children:t.map((a,i)=>{if(a.text){const r=String(a.text),o=Ly(r);return o?g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(o,null,2)},i):g.jsx("div",{className:we.contentText,children:r},i)}if(a.toolUse){const r=a.toolUse;return g.jsxs("div",{className:we.toolCall,children:[g.jsx("span",{className:we.toolIcon,children:g.jsx(Ra,{size:12})}),g.jsx("span",{className:we.toolName,children:String(r.name)}),r.input!==null&&r.input!==void 0&&Object.keys(r.input).length>0&&g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(r.input,null,2)})]},i)}if(a.toolResult){const r=a.toolResult,o=String(r.status||"result");return g.jsxs("div",{className:we.toolResult,children:[g.jsx("span",{className:`${we.toolResultStatus} ${o.toLowerCase()==="error"?we.toolResultError:""}`,children:o}),Array.isArray(r.content)&&r.content.map((u,c)=>{const h=String(u.text??""),m=Ly(h);return m?g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(m,null,2)},c):g.jsx("pre",{className:we.toolArgs,children:h},c)})]},i)}return g.jsx("pre",{className:we.toolArgs,children:JSON.stringify(a,null,2)},i)})})}const V4="_container_c3i5z_1",G4="_toggleRow_c3i5z_6",Z4="_toggle_c3i5z_6",$4="_chevron_c3i5z_32",Y4="_icon_c3i5z_38",X4="_label_c3i5z_43",F4="_content_c3i5z_47",Q4="_status_c3i5z_55",K4="_error_c3i5z_62",J4="_detail_c3i5z_73",P4="_logPanel_c3i5z_73",W4="_traceDetail_c3i5z_73",e3="_detailHeader_c3i5z_80",t3="_detailTitle_c3i5z_89",n3="_closeBtn_c3i5z_95",a3="_controls_c3i5z_115",l3="_controlRow_c3i5z_122",i3="_refreshBtn_c3i5z_128",r3="_retryBtn_c3i5z_148",s3="_timeFilter_c3i5z_162",o3="_timeFilterHeader_c3i5z_168",u3="_timeModeToggle_c3i5z_174",c3="_timeModeBtn_c3i5z_183",f3="_timeModeBtnActive_c3i5z_198",d3="_dateRange_c3i5z_203",h3="_dateField_c3i5z_210",m3="_dateLabel_c3i5z_218",p3="_dateInput_c3i5z_226",g3="_cloudwatchNote_c3i5z_248",y3="_traceList_c3i5z_255",_3="_traceRow_c3i5z_264",v3="_traceRowSelected_c3i5z_284",x3="_traceMain_c3i5z_290",b3="_traceId_c3i5z_296",S3="_spanCount_c3i5z_308",k3="_traceMeta_c3i5z_316",T3="_traceTime_c3i5z_322",N3="_sessionId_c3i5z_327",E3="_detailControls_c3i5z_344",C3="_quickFilter_c3i5z_350",A3="_spanList_c3i5z_365",w3="_tokenPill_c3i5z_370",j3="_tokenIcon_c3i5z_385",M3="_tokenSep_c3i5z_390",z3="_tokenDim_c3i5z_394",R3="_durationPill_c3i5z_399",O3="_spanTimestamp_c3i5z_414",D3="_severityBadge_c3i5z_419",L3="_sevINFO_c3i5z_429",B3="_sevWARN_c3i5z_434",U3="_sevERROR_c3i5z_439",H3="_spanScope_c3i5z_444",I3="_spanBody_c3i5z_450",q3="_rawToggle_c3i5z_456",V3="_spanRaw_c3i5z_471",G3="_treeNode_c3i5z_486",Z3="_treeRow_c3i5z_493",$3="_treeRowExpandable_c3i5z_502",Y3="_treeRowSelected_c3i5z_509",X3="_treeToggle_c3i5z_514",F3="_treeName_c3i5z_521",Q3="_treeError_c3i5z_530",K3="_treeMetrics_c3i5z_540",J3="_treeChildren_c3i5z_548",P3="_treeLogRow_c3i5z_552",W3="_treeLogHeader_c3i5z_562",oe={container:V4,toggleRow:G4,toggle:Z4,chevron:$4,icon:Y4,label:X4,content:F4,status:Q4,error:K4,detail:J4,logPanel:P4,traceDetail:W4,detailHeader:e3,detailTitle:t3,closeBtn:n3,controls:a3,controlRow:l3,refreshBtn:i3,retryBtn:r3,timeFilter:s3,timeFilterHeader:o3,timeModeToggle:u3,timeModeBtn:c3,timeModeBtnActive:f3,dateRange:d3,dateField:h3,dateLabel:m3,dateInput:p3,cloudwatchNote:g3,traceList:y3,traceRow:_3,traceRowSelected:v3,traceMain:x3,traceId:b3,spanCount:S3,traceMeta:k3,traceTime:T3,sessionId:N3,detailControls:E3,quickFilter:C3,spanList:A3,tokenPill:w3,tokenIcon:j3,tokenSep:M3,tokenDim:z3,durationPill:R3,spanTimestamp:O3,severityBadge:D3,sevINFO:L3,sevWARN:B3,sevERROR:U3,spanScope:H3,spanBody:I3,rawToggle:q3,spanRaw:V3,treeNode:G3,treeRow:Z3,treeRowExpandable:$3,treeRowSelected:Y3,treeToggle:X3,treeName:F3,treeError:Q3,treeMetrics:K3,treeChildren:J3,treeLogRow:P3,treeLogHeader:W3};function eM({spanName:t,logs:a,onClose:i}){return g.jsxs("div",{className:oe.logPanel,"data-testid":"traces-log-panel",children:[g.jsxs("div",{className:oe.detailHeader,children:[g.jsx("span",{className:oe.detailTitle,children:t}),g.jsx("button",{className:oe.closeBtn,onClick:i,"aria-label":"Close logs",children:g.jsx(Gr,{size:12})})]}),a.length===0?g.jsx("div",{className:oe.status,children:"No logs for this span."}):g.jsx("div",{children:a.map((r,o)=>g.jsx(tM,{log:r},o))})]})}function tM({log:t}){const[a,i]=D.useState(!1);return g.jsxs("div",{className:oe.treeLogRow,children:[g.jsxs("div",{className:oe.treeLogHeader,children:[g.jsx("span",{className:oe.spanTimestamp,children:t.timestamp}),t.scopeName&&g.jsx("span",{className:oe.spanScope,children:t.scopeName}),t.severity&&g.jsx("span",{className:`${oe.severityBadge} ${oe[`sev${t.severity.toUpperCase()}`]||""}`,children:t.severity})]}),t.body!==void 0&&g.jsx("div",{className:oe.spanBody,children:g.jsx(Md,{body:t.body})}),g.jsx("button",{className:oe.rawToggle,onClick:()=>i(r=>!r),children:a?g.jsxs(g.Fragment,{children:[g.jsx(Ma,{size:10})," Hide raw"]}):g.jsxs(g.Fragment,{children:[g.jsx(cl,{size:10})," Raw JSON"]})}),a&&g.jsx("pre",{className:oe.spanRaw,children:JSON.stringify(t,null,2)})]})}function ol(t){const a=Date.now();return{startTime:a-t,endTime:a}}function yo(t,a){const i=t?new Date(t).getTime():void 0,r=a?new Date(a).getTime():void 0,o=i!==void 0&&!Number.isNaN(i)?i:void 0,u=r!==void 0&&!Number.isNaN(r)?r:void 0;if(!(o===void 0&&u===void 0))return{startTime:o,endTime:u}}function _o(t){const a=i=>String(i).padStart(2,"0");return`${t.getFullYear()}-${a(t.getMonth()+1)}-${a(t.getDate())}T${a(t.getHours())}:${a(t.getMinutes())}`}function Hy(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function bo(t){return(t==null?void 0:t.kind)==="agent"}function So(t){return!!(t!=null&&t.isDeployed)}function Iy(t){return(t==null?void 0:t.kind)==="harness"||So(t)&&!bo(t)?"cloudwatch":"local"}function qy(t){if(t)return t.kind==="harness"?{harnessName:t.name}:{agentName:t.name}}function nM(t){const a=t.body;return typeof a=="object"&&a!==null&&"input"in a&&"output"in a}function aM(t,a){return a==="all"?t:t.map(i=>u_(i,a)).filter(i=>i!==null)}function u_(t,a){const i=t.children.map(o=>u_(o,a)).filter(o=>o!==null);return lM(t,a)||i.length>0?{...t,children:i}:null}function lM(t,a){return a==="errors"?t.statusCode==="ERROR":a==="with-tokens"?t.logs.some(nM)||(t.inputTokens??0)>0||(t.outputTokens??0)>0:!0}const iM=20;function rM({roots:t,selectedSpanId:a,onSelectSpan:i}){return t.length===0?g.jsx("div",{className:oe.status,children:"No spans found."}):g.jsx("div",{className:oe.spanList,"data-testid":"traces-span-tree",children:t.map(r=>g.jsx(c_,{node:r,selectedSpanId:a,onSelectSpan:i},r.spanId))})}function c_({node:t,selectedSpanId:a,onSelectSpan:i}){const[r,o]=D.useState(!0),u=t.children.length>0,c=a===t.spanId,h=(t.inputTokens??0)>0||(t.outputTokens??0)>0,m=t.durationMs>0;return g.jsxs("div",{className:oe.treeNode,"data-testid":"traces-span-node",children:[g.jsxs("div",{className:`${oe.treeRow} ${oe.treeRowExpandable} ${c?oe.treeRowSelected:""}`,style:{paddingLeft:`${t.depth*iM+8}px`},onClick:()=>i(t.spanId),role:"button",tabIndex:0,onKeyDown:p=>{(p.key==="Enter"||p.key===" ")&&i(t.spanId)},children:[g.jsx("span",{className:oe.treeToggle,onClick:u?p=>{p.stopPropagation(),o(_=>!_)}:void 0,children:u?r?g.jsx(Ma,{size:12}):g.jsx(cl,{size:12}):g.jsx("span",{style:{width:12}})}),g.jsx("span",{className:oe.treeName,children:t.name}),t.statusCode==="ERROR"&&g.jsx("span",{className:oe.treeError,children:"ERR"}),g.jsxs("div",{className:oe.treeMetrics,children:[h&&g.jsxs("span",{className:oe.tokenPill,children:[g.jsx(fd,{size:9,className:oe.tokenIcon}),Hy(t.inputTokens??0)," ",g.jsx("span",{className:oe.tokenDim,children:"in"}),g.jsx("span",{className:oe.tokenSep,children:"/"}),Hy(t.outputTokens??0)," ",g.jsx("span",{className:oe.tokenDim,children:"out"})]}),m&&g.jsxs("span",{className:oe.durationPill,children:[g.jsx(_x,{size:9}),jd(t.durationMs)]})]})]}),r&&u&&g.jsx("div",{className:oe.treeChildren,children:t.children.map(p=>g.jsx(c_,{node:p,selectedSpanId:a,onSelectSpan:i},p.spanId))})]})}function sM({trace:t,isSelected:a,onClick:i}){return g.jsxs("button",{className:`${oe.traceRow} ${a?oe.traceRowSelected:""}`,onClick:i,"aria-label":`Trace ${t.traceId}`,children:[g.jsxs("div",{className:oe.traceMain,children:[g.jsx("span",{className:oe.traceId,children:t.traceId}),g.jsxs("span",{className:oe.spanCount,children:[t.spanCount," spans"]})]}),g.jsxs("div",{className:oe.traceMeta,children:[g.jsx("span",{className:oe.traceTime,children:Yo(t.timestamp)}),t.sessionId&&g.jsxs("span",{className:oe.sessionId,children:["session: ",t.sessionId]})]})]})}function oM(t){var o,u,c,h;const a=t.filter(m=>m.type==="span"&&m.spanId),i=t.filter(m=>m.type==="log"&&m.spanId),r=new Map;for(const m of a){const p=m.attributes??{};r.set(m.spanId,{spanId:m.spanId,parentSpanId:m.parentSpanId,name:m.name||((o=m.scope)==null?void 0:o.name)||"span",depth:0,startMs:It(m.startTimeUnixNano),durationMs:It(m.endTimeUnixNano)-It(m.startTimeUnixNano),inputTokens:Number(p["gen_ai.usage.input_tokens"]??0)||void 0,outputTokens:Number(p["gen_ai.usage.output_tokens"]??0)||void 0,statusCode:typeof((u=m.status)==null?void 0:u.code)=="number"?m.status.code===2?"ERROR":"OK":(c=m.status)==null?void 0:c.code,children:[],logs:[]})}for(const m of i){const p=r.get(m.spanId);p&&p.logs.push({timestamp:m.timestampMs>0?new Date(m.timestampMs).toISOString():"",scopeName:(h=m.scope)==null?void 0:h.name,severity:m.severityText,body:m.body})}return f_(r)}function uM(t,a){var r;const i=new Map;for(const o of t){const u=o.durationNano?It(o.durationNano):0;i.set(o.spanId,{spanId:o.spanId,parentSpanId:o.parentSpanId,name:o.name||"span",depth:0,startMs:o.startTimeUnixNano?It(o.startTimeUnixNano):0,durationMs:u,inputTokens:o.inputTokens||void 0,outputTokens:o.outputTokens||void 0,statusCode:o.statusCode,children:[],logs:[]})}for(const o of a){const u=o["@message"];if(typeof u!="object"||u===null)continue;const c=u,h=c.spanId;if(!h)continue;const m=i.get(h);m&&m.logs.push({timestamp:o["@timestamp"],scopeName:(r=c.scope)==null?void 0:r.name,severity:c.severityText,body:c.body})}return f_(i)}function f_(t){const a=[];for(const r of t.values()){const o=r.parentSpanId?t.get(r.parentSpanId):void 0;o?o.children.push(r):a.push(r)}const i=(r,o)=>{r.depth=o,r.children.sort((u,c)=>u.startMs-c.startMs);for(const u of r.children)i(u,o+1)};a.sort((r,o)=>r.startMs-o.startMs);for(const r of a)i(r,0);return a}const cM=[{label:"Last 1 hour",ms:3600*1e3},{label:"Last 6 hours",ms:360*60*1e3},{label:"Last 12 hours",ms:720*60*1e3},{label:"Last 24 hours",ms:1440*60*1e3},{label:"Last 3 days",ms:4320*60*1e3},{label:"Last 7 days",ms:10080*60*1e3}],fM=720*60*1e3;function dM({agents:t,harnesses:a=[],isActive:i}){const{traces:r,spans:o,deployedRecords:u,deployedSpans:c,isLoadingTraces:h,isLoadingDetail:m,error:p,isAvailable:_,fetchTraces:y,fetchTraceDetail:x,clearDetail:b}=c4(),N=D.useMemo(()=>[...t.map(ce=>({value:`agent:${ce.name}`,name:ce.name,kind:"agent",isDeployed:ce.deploymentStatus==="deployed"})),...a.map(ce=>({value:`harness:${ce.name}`,name:ce.name,kind:"harness",isDeployed:ce.deploymentStatus==="deployed"}))],[t,a]),[j,B]=D.useState(""),[S,M]=D.useState("local"),[z,F]=D.useState(null),[ae,U]=D.useState(null),[ee,he]=D.useState("with-tokens"),ge=D.useRef(!1);D.useEffect(()=>{if(!(j===""||!N.find(xt=>xt.value===j)))return;const gt=N[0];gt&&(B(gt.value),M(Iy(gt)))},[N,j]);const R=N.find(ce=>ce.value===j),W=!bo(R)&&!So(R),[$,de]=D.useState("relative"),[J,ne]=D.useState(fM),[L,K]=D.useState(""),[se,ke]=D.useState(""),E=D.useCallback(()=>$==="relative"?ol(J):yo(L,se)??ol(J),[$,J,L,se]),A=D.useCallback((ce,gt,xt)=>{F(null),U(null),b(),y(ce,qy(gt),xt)},[b,y]);D.useEffect(()=>{i&&!ge.current&&R&&!W&&A(S,R,ol(J)),ge.current=!!i},[i,A,S,R,W,J]);const G=ce=>{B(ce);const gt=N.find(Cn=>Cn.value===ce);if(!bo(gt)&&!So(gt))return;const xt=Iy(gt);M(xt),A(xt,gt,E())},T=ce=>{M(ce),A(ce,R,E())},te=()=>{A(S,R,E())},fe=ce=>{U(null),z===ce.traceId?(F(null),b()):(F(ce.traceId),x(S,ce.traceId,qy(R),E()))},Y=ce=>{if(de(ce),ce==="relative")A(S,R,ol(J));else{const gt=new Date,xt=new Date(gt.getTime()-J);K(_o(xt)),ke(_o(gt)),A(S,R,yo(_o(xt),_o(gt))??ol(J))}},xe=ce=>{ne(ce),A(S,R,ol(ce))},Fe=ce=>{K(ce),A(S,R,yo(ce,se)??ol(J))},Ge=ce=>{ke(ce),A(S,R,yo(L,ce)??ol(J))},Ct=D.useMemo(()=>S==="cloudwatch"?uM(c,u):oM(o),[S,o,c,u]),Jt=D.useMemo(()=>aM(Ct,ee),[Ct,ee]),Gn=D.useMemo(()=>{if(!ae)return null;const ce=gt=>{for(const xt of gt){if(xt.spanId===ae)return xt;const Cn=ce(xt.children);if(Cn)return Cn}return null};return ce(Ct)},[ae,Ct]);if(N.length===0)return g.jsx("div",{className:oe.status,children:"No traces available."});const oa=Ct.length>0;return g.jsxs("div",{className:oe.container,children:[g.jsx("div",{className:oe.controls,children:g.jsxs("div",{className:oe.controlRow,children:[g.jsxs("div",{className:oe.dateField,children:[g.jsx("label",{className:oe.dateLabel,htmlFor:"traces-resource",children:"Resource"}),g.jsx("select",{id:"traces-resource",className:oe.dateInput,value:j,onChange:ce=>G(ce.target.value),children:N.map(ce=>g.jsxs("option",{value:ce.value,children:[ce.name," (",ce.kind,")"]},ce.value))})]}),g.jsxs("div",{className:oe.dateField,children:[g.jsx("label",{className:oe.dateLabel,htmlFor:"traces-source",children:"Source"}),g.jsxs("select",{id:"traces-source",className:oe.dateInput,value:S,onChange:ce=>T(ce.target.value),children:[g.jsx("option",{value:"local",disabled:!bo(R),children:"Local traces"}),g.jsx("option",{value:"cloudwatch",disabled:!So(R),children:"CloudWatch"})]})]}),g.jsx("button",{className:oe.refreshBtn,onClick:te,title:"Refresh traces","aria-label":"Refresh traces",children:g.jsx(ud,{size:12})})]})}),S==="cloudwatch"&&!W&&g.jsx("div",{className:oe.cloudwatchNote,children:"Note: Traces may take 2-3 minutes to appear in CloudWatch"}),g.jsx("div",{className:oe.content,children:W?g.jsx("div",{className:oe.status,children:"No traces available — deploy this resource to view CloudWatch traces."}):g.jsxs(g.Fragment,{children:[_!==!1&&g.jsxs("div",{className:oe.timeFilter,children:[g.jsxs("div",{className:oe.timeFilterHeader,children:[g.jsx("label",{className:oe.dateLabel,children:"Time range"}),g.jsxs("div",{className:oe.timeModeToggle,children:[g.jsx("button",{className:`${oe.timeModeBtn} ${$==="relative"?oe.timeModeBtnActive:""}`,onClick:()=>Y("relative"),children:"Relative"}),g.jsx("button",{className:`${oe.timeModeBtn} ${$==="absolute"?oe.timeModeBtnActive:""}`,onClick:()=>Y("absolute"),children:"Absolute"})]})]}),$==="relative"?g.jsx("div",{className:oe.dateField,children:g.jsx("select",{id:"traces-time-range",className:oe.dateInput,value:J,onChange:ce=>xe(Number(ce.target.value)),children:cM.map(ce=>g.jsx("option",{value:ce.ms,children:ce.label},ce.ms))})}):g.jsxs("div",{className:oe.dateRange,children:[g.jsxs("div",{className:oe.dateField,children:[g.jsx("label",{className:oe.dateLabel,htmlFor:"traces-start",children:"Start"}),g.jsx("input",{id:"traces-start",className:oe.dateInput,type:"datetime-local",value:L,onChange:ce=>Fe(ce.target.value)})]}),g.jsxs("div",{className:oe.dateField,children:[g.jsx("label",{className:oe.dateLabel,htmlFor:"traces-end",children:"End"}),g.jsx("input",{id:"traces-end",className:oe.dateInput,type:"datetime-local",value:se,onChange:ce=>Ge(ce.target.value)})]})]})]}),h&&g.jsx("div",{className:oe.status,children:"Loading traces…"}),p&&g.jsxs("div",{className:oe.error,children:[g.jsxs("span",{children:[g.jsx(cd,{size:12})," ",p]}),g.jsx("button",{className:oe.retryBtn,onClick:te,children:"Retry"})]}),!h&&!p&&_!==!1&&r.length===0&&g.jsx("div",{className:oe.status,children:"No traces found."}),!h&&r.length>0&&g.jsx("div",{className:oe.traceList,"data-testid":"traces-trace-list",children:r.map(ce=>g.jsx(sM,{trace:ce,isSelected:z===ce.traceId,onClick:()=>fe(ce)},ce.traceId))}),z&&g.jsxs("div",{className:oe.traceDetail,children:[g.jsxs("div",{className:oe.detailHeader,children:[g.jsx("span",{className:oe.detailTitle,children:"Spans"}),g.jsxs("div",{className:oe.detailControls,children:[g.jsxs("select",{className:oe.quickFilter,value:ee,onChange:ce=>he(ce.target.value),children:[g.jsx("option",{value:"all",children:"All"}),g.jsx("option",{value:"errors",children:"Errors"}),g.jsx("option",{value:"with-tokens",children:"Agent spans"})]}),g.jsx("button",{className:oe.closeBtn,onClick:()=>{F(null),b()},"aria-label":"Close detail",children:g.jsx(Gr,{size:12})})]})]}),m&&g.jsx("div",{className:oe.status,children:"Loading…"}),!m&&!oa&&!p&&g.jsx("div",{className:oe.status,children:"No data found."}),!m&&oa&&Jt.length===0&&ee!=="all"&&g.jsx("div",{className:oe.status,children:"No matching spans."}),!m&&Jt.length>0&&g.jsx(rM,{roots:Jt,selectedSpanId:ae,onSelectSpan:U})]}),Gn&&g.jsx(eM,{spanName:Gn.name,logs:Gn.logs,onClose:()=>U(null)})]})})]})}function hM({resources:t,sessionId:a,userId:i,onClose:r}){const{data:o,isLoading:u,error:c,fetch:h}=t,[m,p]=D.useState(null),[_,y]=D.useState("resources"),[x,b]=D.useState(620),N=D.useRef(null),j=D.useCallback(S=>{S.preventDefault();const M=F=>{const ae=window.innerWidth-F.clientX;b(Math.max(320,Math.min(ae,window.innerWidth*.8)))},z=()=>{N.current=null,document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",z),document.body.style.cursor="",document.body.style.userSelect=""};N.current={move:M,up:z},document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",M),document.addEventListener("mouseup",z)},[]);D.useEffect(()=>()=>{N.current&&(document.removeEventListener("mousemove",N.current.move),document.removeEventListener("mouseup",N.current.up),document.body.style.cursor="",document.body.style.userSelect="")},[]);const B=(S,M)=>{p(z=>(z==null?void 0:z.kind)===S&&z.resource.name===M.name?null:{kind:S,resource:M})};return g.jsxs("div",{className:Ae.panel,style:{width:x},"data-testid":"resource-panel",children:[g.jsx("div",{className:Ae.resizeHandle,onMouseDown:j,role:"separator","aria-label":"Resize panel"}),g.jsxs("div",{className:Ae.header,children:[g.jsx("span",{className:Ae.projectName,children:(o==null?void 0:o.project)||"Resources"}),g.jsxs("div",{className:Ae.headerActions,children:[g.jsx("button",{className:Ae.iconBtn,onClick:h,title:"Refresh","aria-label":"Refresh resources",children:g.jsx(ud,{size:12})}),g.jsx("button",{className:Ae.iconBtn,onClick:r,title:"Close","aria-label":"Close resource panel",children:g.jsx(Gr,{size:12})})]})]}),g.jsx("div",{className:Ae.tabBar,role:"tablist",children:["resources","traces","memories"].map(S=>g.jsx("button",{role:"tab","aria-selected":_===S,className:`${Ae.tab} ${_===S?Ae.tabActive:""}`,onClick:()=>y(S),children:S.charAt(0).toUpperCase()+S.slice(1)},S))}),g.jsxs("div",{className:Ae.body,children:[g.jsxs("div",{className:Ae.tabContent,hidden:_!=="resources",children:[u&&!o&&g.jsx("div",{className:Ae.status,children:"Loading resources…"}),c&&!o&&g.jsxs("div",{className:Ae.error,children:[g.jsxs("span",{children:[g.jsx(cd,{size:12})," ",c]}),g.jsx("button",{className:Ae.retryBtn,onClick:h,children:"Retry"})]}),o&&g.jsxs("div",{className:Ae.graph,children:[o.agents.length>0&&g.jsx(aa,{title:"Agents",children:o.agents.map(S=>g.jsx(Un,{kind:"agent",name:S.name,subtitle:S.build,isSelected:(m==null?void 0:m.kind)==="agent"&&m.resource.name===S.name,onClick:()=>B("agent",S),connections:mM(S,o.mcpRuntimeTools),deploymentStatus:S.deploymentStatus},S.name))}),(o.harnesses??[]).length>0&&g.jsx(aa,{title:"Harnesses",children:(o.harnesses??[]).map(S=>g.jsx(Un,{kind:"harness",name:S.name,subtitle:S.model,isSelected:(m==null?void 0:m.kind)==="harness"&&m.resource.name===S.name,onClick:()=>B("harness",S),deploymentStatus:S.deploymentStatus},S.name))}),o.memories.length>0&&g.jsx(aa,{title:"Memories",children:o.memories.map(S=>g.jsx(Un,{kind:"memory",name:S.name,subtitle:S.strategies.map(M=>M.type).join(", "),isSelected:(m==null?void 0:m.kind)==="memory"&&m.resource.name===S.name,onClick:()=>B("memory",S),deploymentStatus:S.deploymentStatus},S.name))}),o.credentials.length>0&&g.jsx(aa,{title:"Credentials",children:o.credentials.map(S=>g.jsx(Un,{kind:"credential",name:S.name,subtitle:S.type,isSelected:(m==null?void 0:m.kind)==="credential"&&m.resource.name===S.name,onClick:()=>B("credential",S),deploymentStatus:S.deploymentStatus},S.name))}),o.gateways.length>0&&g.jsx(aa,{title:"Gateways",children:o.gateways.map(S=>g.jsxs("div",{children:[g.jsx(Un,{kind:"gateway",name:S.name,subtitle:`${S.targets.length} target(s)`,isSelected:(m==null?void 0:m.kind)==="gateway"&&m.resource.name===S.name,onClick:()=>B("gateway",S),deploymentStatus:S.deploymentStatus}),S.targets.map(M=>g.jsx("div",{className:Ae.childNode,children:g.jsx(Un,{kind:"gatewayTarget",name:M.name,subtitle:M.targetType,isSelected:(m==null?void 0:m.kind)==="gatewayTarget"&&m.resource.name===M.name,onClick:()=>B("gatewayTarget",M)})},M.name))]},S.name))}),o.mcpRuntimeTools.length>0&&g.jsx(aa,{title:"MCP Runtime Tools",children:o.mcpRuntimeTools.map(S=>g.jsx(Un,{kind:"mcpTool",name:S.name,subtitle:S.bindings.map(M=>M.runtimeName).join(", "),isSelected:(m==null?void 0:m.kind)==="mcpTool"&&m.resource.name===S.name,onClick:()=>B("mcpTool",S),connections:S.bindings.map(M=>`→ ${M.runtimeName}`),deploymentStatus:S.deploymentStatus},S.name))}),o.evaluators.length>0&&g.jsx(aa,{title:"Evaluators",children:o.evaluators.map(S=>g.jsx(Un,{kind:"evaluator",name:S.name,subtitle:`${S.level} — ${S.configType}`,isSelected:(m==null?void 0:m.kind)==="evaluator"&&m.resource.name===S.name,onClick:()=>B("evaluator",S),deploymentStatus:S.deploymentStatus},S.name))}),o.onlineEvalConfigs.length>0&&g.jsx(aa,{title:"Online Eval Configs",children:o.onlineEvalConfigs.map(S=>g.jsx(Un,{kind:"onlineEval",name:S.name,subtitle:`${S.evaluators.length} evaluator(s), ${S.samplingRate}% sampling`,isSelected:(m==null?void 0:m.kind)==="onlineEval"&&m.resource.name===S.name,onClick:()=>B("onlineEval",S),connections:[`→ ${S.agent}`],deploymentStatus:S.deploymentStatus},S.name))}),o.policyEngines.length>0&&g.jsx(aa,{title:"Policy Engines",children:o.policyEngines.map(S=>g.jsxs("div",{children:[g.jsx(Un,{kind:"policyEngine",name:S.name,subtitle:`${S.policies.length} polic${S.policies.length!==1?"ies":"y"}`,isSelected:(m==null?void 0:m.kind)==="policyEngine"&&m.resource.name===S.name,onClick:()=>B("policyEngine",S),deploymentStatus:S.deploymentStatus}),S.policies.map(M=>g.jsx("div",{className:Ae.childNode,children:g.jsx(Un,{kind:"policy",name:M.name,subtitle:M.description,isSelected:(m==null?void 0:m.kind)==="policy"&&m.resource.name===M.name,onClick:()=>B("policy",M),deploymentStatus:M.deploymentStatus})},M.name))]},S.name))}),o.unassignedTargets.length>0&&g.jsx(aa,{title:"Unassigned Targets",children:o.unassignedTargets.map(S=>g.jsx(Un,{kind:"unassignedTarget",name:S.name,subtitle:S.targetType,isSelected:(m==null?void 0:m.kind)==="unassignedTarget"&&m.resource.name===S.name,onClick:()=>B("unassignedTarget",S)},S.name))})]}),m&&g.jsxs("div",{className:Ae.infoCard,children:[g.jsxs("div",{className:Ae.infoHeader,children:[g.jsx("span",{className:`${Ae.kindBadge} ${Ae[m.kind]}`,children:gM(m.kind)}),g.jsx("span",{className:Ae.infoName,children:m.resource.name})]}),g.jsxs("div",{className:Ae.infoBody,children:[Object.entries(m.resource).filter(([S,M])=>S!=="deployed"&&!pM(M)).map(([S,M])=>g.jsxs("div",{className:Ae.infoRow,children:[g.jsx("span",{className:Ae.infoKey,children:S}),g.jsx("span",{className:Ae.infoValue,children:Vy(M)})]},S)),"deployed"in m.resource&&m.resource.deployed!==null&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:Ae.infoSectionHeader,children:"Deployed State"}),Object.entries(m.resource.deployed).map(([S,M])=>g.jsxs("div",{className:Ae.infoRow,children:[g.jsx("span",{className:Ae.infoKey,children:S}),g.jsx("span",{className:Ae.infoValue,children:Vy(M)})]},S))]})]})]})]}),g.jsx("div",{className:Ae.tabContent,hidden:_!=="traces",children:g.jsx(dM,{agents:(o==null?void 0:o.agents)??[],harnesses:(o==null?void 0:o.harnesses)??[],isActive:_==="traces"})}),g.jsx("div",{className:Ae.tabContent,hidden:_!=="memories",children:g.jsx(uj,{memories:(o==null?void 0:o.memories)??[],sessionId:a,userId:i,isActive:_==="memories"})})]})]})}function aa({title:t,children:a}){return g.jsxs("div",{className:Ae.section,children:[g.jsx("div",{className:Ae.sectionTitle,children:t}),a]})}function mM(t,a){const i=[];for(const r of a)r.bindings.some(o=>o.runtimeName===t.name)&&i.push(`← ${r.name}`);return i}function pM(t){return!!(t===null||t===""||t===void 0||Array.isArray(t)&&t.length===0)}function Vy(t){if(t==null)return"—";if(Array.isArray(t))return t.map(i=>typeof i=="object"?JSON.stringify(i):i).join(", ")||"—";const a=String(t);return a===""?"—":a}function gM(t){return{agent:"Agent",harness:"Harness",memory:"Memory",credential:"Credential",gateway:"Gateway",gatewayTarget:"Target",mcpTool:"MCP Tool",evaluator:"Evaluator",onlineEval:"Online Eval",policyEngine:"Policy Engine",policy:"Policy",unassignedTarget:"Unassigned Target"}[t]}const yM="_body_sadpk_1",_M="_interactionsList_sadpk_9",vM="_interactionItem_sadpk_17",xM="_interactionItemSelected_sadpk_36",bM="_interactionPrompt_sadpk_41",SM="_interactionMeta_sadpk_49",kM="_interactionTraceId_sadpk_55",TM="_interactionTime_sadpk_61",NM="_interactionSpanCount_sadpk_66",EM="_rightArea_sadpk_75",CM="_waterfall_sadpk_84",AM="_userPromptRow_sadpk_90",wM="_userPromptText_sadpk_101",jM="_waterfallRow_sadpk_108",MM="_waterfallRowSelected_sadpk_122",zM="_spanIcon_sadpk_128",RM="_spanLabel_sadpk_135",OM="_barContainer_sadpk_145",DM="_bar_sadpk_145",LM="_barInvocation_sadpk_160",BM="_barAgent_sadpk_164",UM="_barLlm_sadpk_168",HM="_barTool_sadpk_172",IM="_barOther_sadpk_176",qM="_duration_sadpk_180",VM="_detailPane_sadpk_190",GM="_detailHeader_sadpk_197",ZM="_iconBtn_sadpk_209",$M="_tabBar_sadpk_224",YM="_tab_sadpk_224",XM="_tabActive_sadpk_244",FM="_detailBody_sadpk_249",QM="_attrTable_sadpk_254",KM="_attrKey_sadpk_265",JM="_attrValue_sadpk_273",PM="_emptyState_sadpk_280",Oe={body:yM,interactionsList:_M,interactionItem:vM,interactionItemSelected:xM,interactionPrompt:bM,interactionMeta:SM,interactionTraceId:kM,interactionTime:TM,interactionSpanCount:NM,rightArea:EM,waterfall:CM,userPromptRow:AM,userPromptText:wM,waterfallRow:jM,waterfallRowSelected:MM,spanIcon:zM,spanLabel:RM,barContainer:OM,bar:DM,barInvocation:LM,barAgent:BM,barLlm:UM,barTool:HM,barOther:IM,duration:qM,detailPane:VM,detailHeader:GM,iconBtn:ZM,tabBar:$M,tab:YM,tabActive:XM,detailBody:FM,attrTable:QM,attrKey:KM,attrValue:JM,emptyState:PM};function WM({invocations:t,selectedTraceId:a,onSelect:i}){return t.length===0?g.jsx("div",{className:Oe.emptyState,children:"No interactions yet"}):g.jsx("div",{className:Oe.interactionsList,"data-testid":"trace-list",children:t.map(r=>g.jsxs("button",{className:`${Oe.interactionItem} ${a===r.traceId?Oe.interactionItemSelected:""}`,onClick:()=>i(r.traceId),"aria-label":`Trace ${r.traceId}`,children:[r.userPrompt&&g.jsx("span",{className:Oe.interactionPrompt,title:r.userPrompt,children:r.userPrompt}),g.jsxs("div",{className:Oe.interactionMeta,children:[g.jsxs("span",{className:Oe.interactionTraceId,children:[r.traceId.slice(0,12),"..."]}),g.jsx("span",{className:Oe.interactionSpanCount,children:r.spanCount})]}),g.jsx("span",{className:Oe.interactionTime,children:Yo(r.timestamp)})]},r.traceId))})}function ko(t){if(typeof t=="string"){const a=kn(t);return typeof a!="string"?ko(a)??t:t}if(Array.isArray(t)){const a=t.filter(i=>i.text).map(i=>String(i.text));if(a.length>0)return a.join(" ")}return null}function ez(t){var i;for(const r of t){if(!((i=r.name)!=null&&i.startsWith("invoke_agent")))continue;const o=r.events;if(o)for(const u of o){if(u.name!=="gen_ai.user.message")continue;const c=Ir(u.attributes),h=ko(c.content);if(h)return h}}let a=null;for(const r of t){const o=r.events;if(o)for(const u of o){if(u.name!=="gen_ai.user.message")continue;const c=Ir(u.attributes),h=ko(c.content);h&&(a=h)}}if(a)return a;for(const r of t){const o=r.attributes??{};if(o["gen_ai.content.prompt"]){const u=ko(o["gen_ai.content.prompt"]);if(u)return u}}for(const r of t){const o=r.attributes??{};if(o["gen_ai.input.messages"]){const u=o["gen_ai.input.messages"],c=typeof u=="string"?kn(u):u;if(Array.isArray(c)){const h=c.find(m=>m.role==="user");if(h!=null&&h.parts&&Array.isArray(h.parts)){const m=h.parts.filter(p=>p.type==="text"&&p.content).map(p=>String(p.content));if(m.length>0)return m.join(" ")}}}}return null}function tz(t){switch(t){case 1:return"SERVER";case 2:return"CLIENT";case 3:return"PRODUCER";case 4:return"CONSUMER";default:return"INTERNAL"}}function nz(t){var u;const a={...t.attributes??{}},i=It(t.startTimeUnixNano),o=It(t.endTimeUnixNano)-i;return{attributes:a,status:t.status,kind:t.type==="span"?tz(t.kind):void 0,scope:(u=t.scope)==null?void 0:u.name,duration:o>0?`${o}ms`:void 0}}function az(t){const a=t.events;if(a){let r=null;for(const o of a){const u=o.name,c=Ir(o.attributes);u==="gen_ai.user.message"&&(r={type:"genai",content:kn(c.content)??c.content})}if(r)return r}const i=t.attributes??{};return i["gen_ai.content.prompt"]?{type:"genai",content:kn(i["gen_ai.content.prompt"])}:i["gen_ai.tool.call.arguments"]?{type:"tool",content:kn(i["gen_ai.tool.call.arguments"])}:i["gen_ai.input.messages"]?{type:"genai",content:kn(i["gen_ai.input.messages"])}:i["gen_ai.task.input"]?{type:"raw",content:kn(i["gen_ai.task.input"])}:t.type==="log"&&t.body?{type:"raw",content:t.body}:null}function lz(t){const a=t.events;if(a){let r=null;for(const o of a){const u=o.name,c=Ir(o.attributes);u==="gen_ai.choice"&&(r={type:"genai",content:kn(c.message)??c})}if(r)return r}const i=t.attributes??{};if(i["tool.name"]&&a){for(const r of a)if(r.name==="gen_ai.tool.message"){const u=Ir(r.attributes);return{type:"tool",content:kn(u.content)??u.content}}}return i["gen_ai.content.completion"]?{type:"genai",content:kn(i["gen_ai.content.completion"])}:i["gen_ai.tool.call.result"]?{type:"tool",content:kn(i["gen_ai.tool.call.result"])}:i["gen_ai.output.messages"]?{type:"genai",content:kn(i["gen_ai.output.messages"])}:i["gen_ai.task.output"]?{type:"raw",content:kn(i["gen_ai.task.output"])}:null}function iz({span:t,onClose:a}){const[i,r]=D.useState("event");return g.jsxs("div",{className:Oe.detailPane,children:[g.jsxs("div",{className:Oe.detailHeader,children:[g.jsx("div",{className:Oe.tabBar,children:["event","request","response"].map(o=>g.jsx("button",{className:`${Oe.tab} ${i===o?Oe.tabActive:""}`,onClick:()=>r(o),children:o.charAt(0).toUpperCase()+o.slice(1)},o))}),g.jsx("button",{className:Oe.iconBtn,onClick:a,"aria-label":"Close detail",children:g.jsx(Gr,{size:14})})]}),g.jsxs("div",{className:Oe.detailBody,children:[i==="event"&&g.jsx(rz,{span:t}),i==="request"&&g.jsx(sz,{span:t}),i==="response"&&g.jsx(oz,{span:t})]})]})}function rz({span:t}){const a=nz(t),i=[];t.name&&i.push(["name",t.name]),a.kind&&i.push(["kind",a.kind]),a.scope&&i.push(["scope",a.scope]),a.duration&&i.push(["duration",a.duration]),a.status&&(i.push(["status.code",String(a.status.code??"OK")]),a.status.message&&i.push(["status.message",a.status.message]));const r=new Set(i.map(([o])=>o));for(const[o,u]of Object.entries(a.attributes))u!=null&&!r.has(o)&&i.push([o,typeof u=="object"?JSON.stringify(u):String(u)]);return i.length===0?g.jsx("div",{className:Oe.emptyState,children:"No event data"}):g.jsx("table",{className:Oe.attrTable,children:g.jsx("tbody",{children:i.map(([o,u])=>g.jsxs("tr",{children:[g.jsx("td",{className:Oe.attrKey,children:o}),g.jsx("td",{className:Oe.attrValue,children:u})]},o))})})}function sz({span:t}){const a=az(t);return a?a.type==="genai"&&Array.isArray(a.content)?g.jsx(zd,{content:a.content}):g.jsx(Md,{body:a.content}):g.jsx("div",{className:Oe.emptyState,children:"No request data"})}function oz({span:t}){const a=lz(t);return a?a.type==="genai"&&Array.isArray(a.content)?g.jsx(zd,{content:a.content}):g.jsx(Md,{body:a.content}):g.jsx("div",{className:Oe.emptyState,children:"No response data"})}const uz=16,cz={invocation:g.jsx(fd,{size:12}),agent:g.jsx(kx,{size:12}),llm:g.jsx(Ox,{size:12}),tool:g.jsx(Ra,{size:12}),other:g.jsx(mx,{size:10})},fz={invocation:Oe.barInvocation,agent:Oe.barAgent,llm:Oe.barLlm,tool:Oe.barTool,other:Oe.barOther};function dz({tree:t,selectedSpanId:a,onSelectSpan:i,userPrompt:r}){const o=GA(t);return o.length===0?g.jsx("div",{className:Oe.emptyState,children:"No spans"}):g.jsxs("div",{className:Oe.waterfall,children:[r&&g.jsxs("div",{className:Oe.userPromptRow,children:[g.jsx("span",{className:Oe.spanIcon,children:g.jsx(Gx,{size:12})}),g.jsx("span",{className:Oe.userPromptText,title:r,children:r})]}),o.map((u,c)=>g.jsx(hz,{entry:u,isSelected:a===u.node.span.spanId,onSelect:()=>i(u.node.span)},u.node.span.spanId??c))]})}function hz({entry:t,isSelected:a,onSelect:i}){var _;const{node:r,offsetPercent:o,widthPercent:u}=t,c=ZA(r.span),h=cz[c],m=fz[c],p=r.span.name||((_=r.span.scope)==null?void 0:_.name)||"span";return g.jsxs("div",{className:`${Oe.waterfallRow} ${a?Oe.waterfallRowSelected:""}`,style:{paddingLeft:`${10+r.depth*uz}px`},onClick:i,role:"button",tabIndex:0,onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&i()},children:[g.jsx("span",{className:Oe.spanIcon,children:h}),g.jsx("span",{className:Oe.spanLabel,title:p,children:p}),g.jsx("div",{className:Oe.barContainer,children:g.jsx("div",{className:`${Oe.bar} ${m}`,style:{left:`${o}%`,width:`${u}%`}})}),g.jsx("span",{className:Oe.duration,children:jd(r.durationMs)})]})}function mz({traces:t}){const{invocations:a,selectedInvocation:i,isLoading:r,selectTrace:o,refresh:u}=t,[c,h]=D.useState(null);return D.useEffect(()=>{h(null)},[i==null?void 0:i.traceId]),g.jsx(Io,{title:"Timeline view",status:r?"Loading...":void 0,onRefresh:u,children:g.jsxs("div",{className:Oe.body,children:[g.jsx(WM,{invocations:a,selectedTraceId:(i==null?void 0:i.traceId)??null,onSelect:o}),g.jsxs("div",{className:Oe.rightArea,children:[!i&&g.jsx("div",{className:Oe.emptyState,children:"Select an interaction to view"}),i&&g.jsxs(g.Fragment,{children:[g.jsx(dz,{tree:i.tree,selectedSpanId:(c==null?void 0:c.spanId)??null,onSelectSpan:h,userPrompt:i.userPrompt}),c&&g.jsx(iz,{span:c,onClose:()=>h(null)})]})]})]})})}const pz="_error_1vxci_1",gz="_toolListItems_1vxci_7",yz="_toolItem_1vxci_14",_z="_toolItemSelected_1vxci_34",vz="_toolName_1vxci_39",xz="_toolDesc_1vxci_45",bz="_toolForm_1vxci_53",Sz="_toolFormHeader_1vxci_58",kz="_toolFormDesc_1vxci_66",Tz="_noParams_1vxci_72",Nz="_field_1vxci_78",Ez="_fieldLabel_1vxci_82",Cz="_fieldType_1vxci_92",Az="_fieldInput_1vxci_98",wz="_fieldTextarea_1vxci_115",jz="_fieldHint_1vxci_122",Mz="_callBtn_1vxci_128",zz="_spinning_1vxci_153",Et={error:pz,toolListItems:gz,toolItem:yz,toolItemSelected:_z,toolName:vz,toolDesc:xz,toolForm:bz,toolFormHeader:Sz,toolFormDesc:kz,noParams:Tz,field:Nz,fieldLabel:Ez,fieldType:Cz,fieldInput:Az,fieldTextarea:wz,fieldHint:jz,callBtn:Mz,spinning:zz};function Rz(t,a){if(a.type==="integer"){const i=parseInt(t,10);return Number.isNaN(i)?0:i}if(a.type==="number"){const i=parseFloat(t);return Number.isNaN(i)?0:i}if(a.type==="boolean")return t==="true";if(a.type==="object"||a.type==="array")try{return JSON.parse(t)}catch{return t}return t}function Oz(t){return t.type==="integer"||t.type==="number"?"number":"text"}function Dz({tool:t,isCalling:a,onCall:i}){var p,_;const r=((p=t.inputSchema)==null?void 0:p.properties)??{},o=new Set(((_=t.inputSchema)==null?void 0:_.required)??[]),u=Object.keys(r),[c,h]=D.useState(()=>{const y={};for(const x of u){const b=r[x];y[x]=b.default!==void 0?String(b.default):""}return y}),m=y=>{y.preventDefault();const x={};for(const b of u){const N=c[b];N===""&&!o.has(b)||(x[b]=Rz(N,r[b]))}i(t.name,x)};return g.jsxs("form",{className:Et.toolForm,onSubmit:m,children:[g.jsx("div",{className:Et.toolFormHeader,children:t.name}),t.description&&g.jsx("div",{className:Et.toolFormDesc,children:t.description}),u.length===0&&g.jsx("div",{className:Et.noParams,children:"No parameters"}),u.map(y=>{const x=r[y],b=o.has(y);return g.jsxs("div",{className:Et.field,children:[g.jsxs("label",{className:Et.fieldLabel,children:[y,g.jsxs("span",{className:Et.fieldType,children:[x.type,b?", required":""]})]}),x.enum?g.jsxs("select",{className:Et.fieldInput,value:c[y],onChange:N=>h(j=>({...j,[y]:N.target.value})),children:[g.jsx("option",{value:"",children:"Select..."}),x.enum.map(N=>g.jsx("option",{value:N,children:N},N))]}):x.type==="boolean"?g.jsxs("select",{className:Et.fieldInput,value:c[y],onChange:N=>h(j=>({...j,[y]:N.target.value})),children:[g.jsx("option",{value:"",children:"Select..."}),g.jsx("option",{value:"true",children:"true"}),g.jsx("option",{value:"false",children:"false"})]}):x.type==="object"||x.type==="array"?g.jsx("textarea",{className:`${Et.fieldInput} ${Et.fieldTextarea}`,value:c[y],onChange:N=>h(j=>({...j,[y]:N.target.value})),placeholder:"JSON",rows:3}):g.jsx("input",{className:Et.fieldInput,type:Oz(x),value:c[y],onChange:N=>h(j=>({...j,[y]:N.target.value})),placeholder:x.description??""}),x.description&&g.jsx("div",{className:Et.fieldHint,children:x.description})]},y)}),g.jsx("button",{type:"submit",className:Et.callBtn,disabled:a,children:a?g.jsxs(g.Fragment,{children:[g.jsx(n1,{size:14,className:Et.spinning}),"Calling..."]}):"Call Tool"})]})}function Lz({tools:t,isLoading:a,error:i,onRefresh:r,onCallTool:o,onToolCallMessage:u}){const[c,h]=D.useState(null),[m,p]=D.useState(!1),_=t.find(x=>x.name===c),y=async(x,b)=>{var B;p(!0);const N=Object.keys(b).length>0?`(${JSON.stringify(b)})`:"()",j=`Called ${x}${N}`;try{const S=await o(x,b),M=((B=S.content)==null?void 0:B.filter(F=>F.text!==void 0).map(F=>F.text))??[],z=M.length>0?M.join(`
|
|
270
|
+
`):JSON.stringify(S,null,2);u(j,z,S.isError)}catch(S){u(j,S.message,!0)}finally{p(!1)}};return g.jsxs(Io,{title:`Tools (${t.length})`,onRefresh:r,isRefreshing:a,children:[i&&g.jsx("div",{className:Et.error,children:i}),g.jsx("div",{className:Et.toolListItems,children:t.map(x=>g.jsxs("button",{className:`${Et.toolItem} ${c===x.name?Et.toolItemSelected:""}`,onClick:()=>h(c===x.name?null:x.name),children:[g.jsx("span",{className:Et.toolName,children:x.name}),g.jsx("span",{className:Et.toolDesc,children:x.description??""})]},x.name))}),_&&g.jsx(Dz,{tool:_,isCalling:m,onCall:y},_.name)]})}function Bz(t,a,i,r){const[o,u]=D.useState(null),[c,h]=D.useState(!1),[m,p]=D.useState(null);D.useEffect(()=>{u(null),p(null)},[a]);const _=D.useCallback(async()=>{if(!(!a||i!=="A2A")){h(!0),p(null);try{const y=await Nn(`${t}/api/a2a/agent-card?agentName=${encodeURIComponent(a)}`);if(!y.ok){const b=await y.text();throw new Error(`Failed to fetch agent card (${y.status}): ${b}`)}const x=await y.json();if(!x.success||!x.card)throw new Error(x.error??"Agent card not available");u(x.card)}catch(y){p(y.message)}finally{h(!1)}}},[t,a,i]);return D.useEffect(()=>{a&&i==="A2A"&&r&&_()},[a,i,r,_]),{card:o,isLoading:c,error:m,fetchCard:_}}function Uz(t){const[a,i]=D.useState([]),[r,o]=D.useState([]),[u,c]=D.useState([]),[h,m]=D.useState(void 0),[p,_]=D.useState(!1),[y,x]=D.useState(!1);return D.useEffect(()=>{let b,N=!1;async function j(){try{const S=await(await Nn(`${t}/api/status`)).json();if(N)return;i(S.agents),o(S.harnesses??[]),c(S.errors??[]),m(M=>M??S.selectedAgent),_(!0),x(!0)}catch{if(N)return;_(!1)}N||(b=setTimeout(j,5e3))}return j(),()=>{N=!0,clearTimeout(b)}},[t]),{agents:a,harnesses:r,errors:u,selectedAgent:h,isConnected:p,hasConnected:y}}const Hz=60;function Iz(t,a){const i=D.useRef(null),r=D.useRef(!1),o=()=>{const h=i.current;return h?h.scrollHeight-h.scrollTop-h.clientHeight<=Hz:!0},u=D.useCallback(()=>{const h=i.current;h&&(r.current=!1,h.scrollTop=h.scrollHeight)},[]),c=D.useCallback(()=>{const h=i.current;!h||r.current||(a?h.scrollTop=h.scrollHeight:h.scrollTo({top:h.scrollHeight,behavior:"smooth"}))},[a]);return D.useLayoutEffect(()=>{const h=i.current;if(!h)return;const m=()=>{requestAnimationFrame(()=>{i.current&&(r.current=!o())})},p=()=>{o()&&r.current&&(r.current=!1)};return h.addEventListener("wheel",m,{passive:!0}),h.addEventListener("touchmove",m,{passive:!0}),h.addEventListener("scroll",p,{passive:!0}),()=>{h.removeEventListener("wheel",m),h.removeEventListener("touchmove",m),h.removeEventListener("scroll",p)}},[]),D.useEffect(()=>{c()},[t,c]),{containerRef:i,forceScrollToBottom:u}}function qz(t){if(!t.startsWith("data: "))return null;const a=t.slice(6);try{const i=JSON.parse(a);return typeof i.type!="string"?null:i}catch{return null}}function Vz(t,a,i){const[r,o]=D.useState([]),[u,c]=D.useState(!1),[h,m]=D.useState(null),[p,_]=D.useState({}),y=D.useRef(null),x=D.useRef({}),b=D.useRef(null);D.useEffect(()=>{_({})},[a]);const N=D.useCallback(async S=>{var z,F;(z=b.current)==null||z.abort();const M=new AbortController;b.current=M,c(!0);try{const ae=await Nn(`${t}/invocations`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(S),signal:M.signal});if(!ae.ok){const K=await ae.text();o(se=>{const ke=[...se];return ke[ke.length-1]={role:"assistant",content:K||`Error: ${ae.status}`,isError:!0},ke});return}const U=ae.headers.get("x-session-id");if(U&&(y.current=U,m(U)),!ae.body){o(K=>{const se=[...K];return se[se.length-1]={role:"assistant",content:"(empty response)"},se});return}const ee=ae.body.getReader(),he=new TextDecoder;let ge="",R="",W=null,$;const de=new Map,J=()=>{W=null;const K=Object.keys(x.current).length>0?{...x.current}:void 0;o(se=>{const ke=[...se];return ke[ke.length-1]={role:"assistant",content:R,...K?{toolExecutions:K}:{}},ke})},ne=()=>{W===null&&(W=requestAnimationFrame(J))};for(;;){const{done:K,value:se}=await ee.read();if(K)break;ge+=he.decode(se,{stream:!0});const ke=ge.split(`
|
|
271
|
+
`);ge=ke.pop()||"";for(const E of ke){const A=qz(E);if(!A)continue;const G=A,T=G.contentBlockIndex;switch(A.type){case"messageStart":break;case"contentBlockStart":{const te=G.start;if((te==null?void 0:te.type)==="toolUse"){const fe=te.toolUse;x.current[fe.toolUseId]={toolName:fe.name,serverName:fe.serverName,input:"",result:""},T!==void 0&&de.set(T,fe.toolUseId)}else if((te==null?void 0:te.type)==="toolResult"){const fe=te.toolResult;fe!=null&&fe.toolUseId&&x.current[fe.toolUseId]&&(fe.status&&(x.current[fe.toolUseId].resultStatus=fe.status),T!==void 0&&de.set(T,fe.toolUseId))}ne();break}case"contentBlockDelta":{const te=G.delta;if((te==null?void 0:te.type)==="text")R+=te.text;else if((te==null?void 0:te.type)==="toolUse"){const fe=T!==void 0?de.get(T):void 0;fe&&x.current[fe]&&(x.current[fe].input+=te.input)}else if((te==null?void 0:te.type)==="toolResult"){const fe=T!==void 0?de.get(T):void 0,Y=te.results;if(fe&&x.current[fe]&&Y)for(const xe of Y)typeof xe.text=="string"&&(x.current[fe].result+=xe.text)}ne();break}case"contentBlockStop":{const te=T!==void 0?de.get(T):void 0;te&&((F=x.current[te])!=null&&F.result)&&(R+=`
|
|
272
272
|
|
|
273
|
-
\`\`\`${
|
|
273
|
+
\`\`\`${te}
|
|
274
274
|
|
|
275
275
|
\`\`\`
|
|
276
276
|
|
|
277
|
-
`),
|
|
278
|
-
Error: ${Z.message}`,ae();break}default:break}}}W!==null&&cancelAnimationFrame(W);const D=Object.keys(x.current).length>0?{...x.current}:void 0;x.current={},o(J=>{const se=[...J];return se[se.length-1]={role:"assistant",content:R||(D?"":"(empty response)"),...D?{toolExecutions:D}:{},...G?{tokenUsage:{inputTokens:G.inputTokens,outputTokens:G.outputTokens,totalTokens:G.totalTokens}}:{}},se})}catch(ne){const U=ne instanceof Error&&ne.message.includes("Failed to fetch")?"Connection failed — is the dev server running?":ne instanceof Error?ne.message:"Unknown error";o(te=>{const de=[...te];return de[de.length-1]={role:"assistant",content:U,isError:!0},de})}finally{c(!1)}},[t]),j=L.useCallback(async S=>{var F,ne,U,te;if(!S||u||!a)return;x.current={},o(de=>[...de,{role:"user",content:S},{role:"assistant",content:""}]);const M=p.model,z=M&&(((F=M.bedrockModelConfig)==null?void 0:F.modelId)||((ne=M.openAiModelConfig)==null?void 0:ne.modelId)||((U=M.geminiModelConfig)==null?void 0:U.modelId));await N({harnessName:a,prompt:S,..._.current?{sessionId:_.current}:{},...i?{userId:i}:{},harnessOverrides:{...p,model:z?M:void 0,skills:(te=p.skills)==null?void 0:te.map(de=>({path:de}))}})},[a,u,i,p,N]),B=L.useCallback(()=>{var S;(S=b.current)==null||S.abort(),b.current=null,o([]),m(null),_.current=null,x.current={},c(!1)},[]);return{messages:r,isStreaming:u,sessionId:h,harnessOverrides:p,setHarnessOverrides:y,sendMessage:j,resetChat:B}}function Gz(t){const a=o_(t.resourceSpans,t.resourceLogs),i=qA(a),r=ez(a);return{traceId:t.traceId,timestamp:t.timestamp,sessionId:t.sessionId,spanCount:t.spanCount,spans:a,tree:i,userPrompt:r}}function Zz(t){const a=In,[i,r]=L.useState([]),[o,u]=L.useState(null),[c,h]=L.useState(!1),[m,p]=L.useState(null),[y,_]=L.useState(null),x=L.useRef(t);x.current=t;const b=L.useCallback(async()=>{h(!0),p(null);try{const F=new URLSearchParams;x.current&&F.set("agentName",x.current);const ne=Date.now();F.set("startTime",String(ne-720*60*1e3)),F.set("endTime",String(ne));const U=await Nn(`${a}/api/traces?${F.toString()}`);if(U.status===404){_(!1),r([]);return}_(!0);const te=await U.json();te.success?r(te.traces.map(Gz)):(p(te.error),r([]))}catch(F){p(F instanceof Error?F.message:"Failed to load traces"),r([])}finally{h(!1)}},[a]),N=i.find(F=>F.traceId===o)??null,j=L.useCallback(F=>{u(ne=>ne===F?ne:F)},[]),B=L.useCallback(()=>{u(null)},[]),S=L.useCallback(()=>{b()},[b]),M=L.useCallback(()=>{setTimeout(()=>b(),1500),setTimeout(()=>b(),5e3)},[b]),z=L.useRef(t);return L.useEffect(()=>{z.current!==t&&(z.current=t,r([]),u(null),p(null)),b()},[t,b]),{invocations:i,selectedInvocation:N,isLoading:c,error:m,isAvailable:y,selectTrace:j,deselectTrace:B,refresh:S,onInvocationComplete:M}}let Uf=1;function Gy(t){if(typeof t=="string"){const a=t.match(/^data:\s*(.+)$/m);if(a)try{return JSON.parse(a[1])}catch{throw new Error(`Failed to parse SSE data: ${a[1].slice(0,200)}`)}try{return JSON.parse(t)}catch{throw new Error(`Unexpected MCP result format: ${t.slice(0,200)}`)}}if(t&&typeof t=="object")return t;throw new Error("Empty MCP result")}async function vo(t,a,i,r){const o=await Nn(`${t}/api/mcp`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentName:a,body:i,sessionId:r})});if(!o.ok){const u=await o.text();throw new Error(`MCP proxy error (${o.status}): ${u}`)}return o.json()}function $z(t,a,i,r){const[o,u]=L.useState([]),[c,h]=L.useState(!1),[m,p]=L.useState(null),y=L.useRef(void 0),_=L.useRef(null);L.useEffect(()=>{u([]),p(null),y.current=void 0,_.current=null},[a]);const x=L.useCallback(j=>{if(_.current)return _.current;const B=(async()=>{const S=await vo(t,j,{jsonrpc:"2.0",id:Uf++,method:"initialize",params:{protocolVersion:"2025-03-26",capabilities:{},clientInfo:{name:"agentcore-inspector",version:"1.0.0"}}});if(!S.success)throw new Error(S.error??"Failed to initialize MCP session");y.current=S.sessionId,await vo(t,j,{jsonrpc:"2.0",method:"notifications/initialized"},y.current)})().catch(S=>{throw _.current=null,S});return _.current=B,B},[t]),b=L.useCallback(async()=>{if(!(!a||i!=="MCP")){h(!0),p(null);try{await x(a);const j=await vo(t,a,{jsonrpc:"2.0",id:Uf++,method:"tools/list",params:{}},y.current);if(!j.success)throw new Error(j.error??"Failed to list tools");const S=Gy(j.result).result;u((S==null?void 0:S.tools)??[])}catch(j){p(j.message)}finally{h(!1)}}},[t,a,i,x]),N=L.useCallback(async(j,B)=>{if(!a)throw new Error("No agent selected");await x(a);const S=await vo(t,a,{jsonrpc:"2.0",id:Uf++,method:"tools/call",params:{name:j,arguments:B}},y.current);if(!S.success)throw new Error(S.error??"Tool call failed");const M=Gy(S.result),z=M.result,F=M.error;if(F)throw new Error(F.message);return z??{content:[{type:"text",text:JSON.stringify(M)}]}},[t,a,x]);return L.useEffect(()=>{a&&i==="MCP"&&r&&b()},[a,i,r,b]),{tools:o,isLoading:c,error:m,fetchTools:b,callTool:N}}const Yz=15e3;function Xz(t){const[a,i]=L.useState(null),[r,o]=L.useState(!1),[u,c]=L.useState(null),h=L.useRef(void 0),m=L.useCallback(async()=>{o(p=>p||a===null),c(null);try{const y=await(await Nn(`${t}/api/resources`)).json();y.success?i(y):c(y.error||"Failed to load resources")}catch(p){c(p instanceof Error?p.message:"Failed to load resources")}finally{o(!1)}},[t]);return L.useEffect(()=>(m(),h.current=setInterval(m,Yz),()=>clearInterval(h.current)),[m]),{data:a,isLoading:r,error:u,fetch:m}}function Fz(t){const[a,i]=L.useState(!1),[r,o]=L.useState(!1),[u,c]=L.useState(null),h=L.useCallback(async m=>{i(!0),o(!1),c(null);try{const y=await(await Nn(`${t}/api/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentName:m})})).json();return y.success?(o(!0),!0):(c(y.error||"Failed to start agent"),!1)}catch(p){return c(p instanceof Error?p.message:"Failed to start agent"),!1}finally{i(!1)}},[t]);return{isStarting:a,isReady:r,error:u,startAgent:h}}var Je;(function(t){t.assertEqual=o=>{};function a(o){}t.assertIs=a;function i(o){throw new Error}t.assertNever=i,t.arrayToEnum=o=>{const u={};for(const c of o)u[c]=c;return u},t.getValidEnumValues=o=>{const u=t.objectKeys(o).filter(h=>typeof o[o[h]]!="number"),c={};for(const h of u)c[h]=o[h];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(u){return o[u]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const u=[];for(const c in o)Object.prototype.hasOwnProperty.call(o,c)&&u.push(c);return u},t.find=(o,u)=>{for(const c of o)if(u(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,u=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(u)}t.joinValues=r,t.jsonStringifyReplacer=(o,u)=>typeof u=="bigint"?u.toString():u})(Je||(Je={}));var Zy;(function(t){t.mergeShapes=(a,i)=>({...a,...i})})(Zy||(Zy={}));const me=Je.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ul=t=>{switch(typeof t){case"undefined":return me.undefined;case"string":return me.string;case"number":return Number.isNaN(t)?me.nan:me.number;case"boolean":return me.boolean;case"function":return me.function;case"bigint":return me.bigint;case"symbol":return me.symbol;case"object":return Array.isArray(t)?me.array:t===null?me.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?me.promise:typeof Map<"u"&&t instanceof Map?me.map:typeof Set<"u"&&t instanceof Set?me.set:typeof Date<"u"&&t instanceof Date?me.date:me.object;default:return me.unknown}},ie=Je.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 za extends Error{get errors(){return this.issues}constructor(a){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=a}format(a){const i=a||function(u){return u.message},r={_errors:[]},o=u=>{for(const c of u.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)r._errors.push(i(c));else{let h=r,m=0;for(;m<c.path.length;){const p=c.path[m];m===c.path.length-1?(h[p]=h[p]||{_errors:[]},h[p]._errors.push(i(c))):h[p]=h[p]||{_errors:[]},h=h[p],m++}}};return o(this),r}static assert(a){if(!(a instanceof za))throw new Error(`Not a ZodError: ${a}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Je.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(a=i=>i.message){const i={},r=[];for(const o of this.issues)if(o.path.length>0){const u=o.path[0];i[u]=i[u]||[],i[u].push(a(o))}else r.push(a(o));return{formErrors:r,fieldErrors:i}}get formErrors(){return this.flatten()}}za.create=t=>new za(t);const Wf=(t,a)=>{let i;switch(t.code){case ie.invalid_type:t.received===me.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case ie.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,Je.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:i=`Unrecognized key(s) in object: ${Je.joinValues(t.keys,", ")}`;break;case ie.invalid_union:i="Invalid input";break;case ie.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${Je.joinValues(t.options)}`;break;case ie.invalid_enum_value:i=`Invalid enum value. Expected ${Je.joinValues(t.options)}, received '${t.received}'`;break;case ie.invalid_arguments:i="Invalid function arguments";break;case ie.invalid_return_type:i="Invalid function return type";break;case ie.invalid_date:i="Invalid date";break;case ie.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}"`:Je.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case ie.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 ie.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 ie.custom:i="Invalid input";break;case ie.invalid_intersection_types:i="Intersection results could not be merged";break;case ie.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case ie.not_finite:i="Number must be finite";break;default:i=a.defaultError,Je.assertNever(t)}return{message:i}};let Qz=Wf;function Kz(){return Qz}const Jz=t=>{const{data:a,path:i,errorMaps:r,issueData:o}=t,u=[...i,...o.path||[]],c={...o,path:u};if(o.message!==void 0)return{...o,path:u,message:o.message};let h="";const m=r.filter(p=>!!p).slice().reverse();for(const p of m)h=p(c,{data:a,defaultError:h}).message;return{...o,path:u,message:h}};function he(t,a){const i=Kz(),r=Jz({issueData:a,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,i,i===Wf?void 0:Wf].filter(o=>!!o)});t.common.issues.push(r)}class nn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(a,i){const r=[];for(const o of i){if(o.status==="aborted")return je;o.status==="dirty"&&a.dirty(),r.push(o.value)}return{status:a.value,value:r}}static async mergeObjectAsync(a,i){const r=[];for(const o of i){const u=await o.key,c=await o.value;r.push({key:u,value:c})}return nn.mergeObjectSync(a,r)}static mergeObjectSync(a,i){const r={};for(const o of i){const{key:u,value:c}=o;if(u.status==="aborted"||c.status==="aborted")return je;u.status==="dirty"&&a.dirty(),c.status==="dirty"&&a.dirty(),u.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(r[u.value]=c.value)}return{status:a.value,value:r}}}const je=Object.freeze({status:"aborted"}),Or=t=>({status:"dirty",value:t}),Vn=t=>({status:"valid",value:t}),$y=t=>t.status==="aborted",Yy=t=>t.status==="dirty",ji=t=>t.status==="valid",Ao=t=>typeof Promise<"u"&&t instanceof Promise;var Se;(function(t){t.errToObj=a=>typeof a=="string"?{message:a}:a||{},t.toString=a=>typeof a=="string"?a:a==null?void 0:a.message})(Se||(Se={}));class ra{constructor(a,i,r,o){this._cachedPath=[],this.parent=a,this.data=i,this._path=r,this._key=o}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 Xy=(t,a)=>{if(ji(a))return{success:!0,data:a.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 za(t.common.issues);return this._error=i,this._error}}};function Be(t){if(!t)return{};const{errorMap:a,invalid_type_error:i,required_error:r,description:o}=t;if(a&&(i||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return a?{errorMap:a,description:o}:{errorMap:(c,h)=>{const{message:m}=t;return c.code==="invalid_enum_value"?{message:m??h.defaultError}:typeof h.data>"u"?{message:m??r??h.defaultError}:c.code!=="invalid_type"?{message:h.defaultError}:{message:m??i??h.defaultError}},description:o}}class Ye{get description(){return this._def.description}_getType(a){return ul(a.data)}_getOrReturnCtx(a,i){return i||{common:a.parent.common,data:a.data,parsedType:ul(a.data),schemaErrorMap:this._def.errorMap,path:a.path,parent:a.parent}}_processInputParams(a){return{status:new nn,ctx:{common:a.parent.common,data:a.data,parsedType:ul(a.data),schemaErrorMap:this._def.errorMap,path:a.path,parent:a.parent}}}_parseSync(a){const i=this._parse(a);if(Ao(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(a){const i=this._parse(a);return Promise.resolve(i)}parse(a,i){const r=this.safeParse(a,i);if(r.success)return r.data;throw r.error}safeParse(a,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:a,parsedType:ul(a)},o=this._parseSync({data:a,path:r.path,parent:r});return Xy(r,o)}"~validate"(a){var r,o;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:a,parsedType:ul(a)};if(!this["~standard"].async)try{const u=this._parseSync({data:a,path:[],parent:i});return ji(u)?{value:u.value}:{issues:i.common.issues}}catch(u){(o=(r=u==null?void 0:u.message)==null?void 0:r.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:a,path:[],parent:i}).then(u=>ji(u)?{value:u.value}:{issues:i.common.issues})}async parseAsync(a,i){const r=await this.safeParseAsync(a,i);if(r.success)return r.data;throw r.error}async safeParseAsync(a,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:a,parsedType:ul(a)},o=this._parse({data:a,path:r.path,parent:r}),u=await(Ao(o)?o:Promise.resolve(o));return Xy(r,u)}refine(a,i){const r=o=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(o):i;return this._refinement((o,u)=>{const c=a(o),h=()=>u.addIssue({code:ie.custom,...r(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(m=>m?!0:(h(),!1)):c?!0:(h(),!1)})}refinement(a,i){return this._refinement((r,o)=>a(r)?!0:(o.addIssue(typeof i=="function"?i(r,o):i),!1))}_refinement(a){return new Bl({schema:this,typeName:Me.ZodEffects,effect:{type:"refinement",refinement:a}})}superRefine(a){return this._refinement(a)}constructor(a){this.spa=this.safeParseAsync,this._def=a,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 ja.create(this,this._def)}nullable(){return Ul.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ia.create(this)}promise(){return Do.create(this,this._def)}or(a){return jo.create([this,a],this._def)}and(a){return Mo.create(this,a,this._def)}transform(a){return new Bl({...Be(this._def),schema:this,typeName:Me.ZodEffects,effect:{type:"transform",transform:a}})}default(a){const i=typeof a=="function"?a:()=>a;return new Lo({...Be(this._def),innerType:this,defaultValue:i,typeName:Me.ZodDefault})}brand(){return new p_({typeName:Me.ZodBranded,type:this,...Be(this._def)})}catch(a){const i=typeof a=="function"?a:()=>a;return new Bo({...Be(this._def),innerType:this,catchValue:i,typeName:Me.ZodCatch})}describe(a){const i=this.constructor;return new i({...this._def,description:a})}pipe(a){return Od.create(this,a)}readonly(){return Uo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Pz=/^c[^\s-]{8,}$/i,Wz=/^[0-9a-z]+$/,eR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,tR=/^[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,nR=/^[a-z0-9_-]{21}$/i,aR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,lR=/^[-+]?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)?)??$/,iR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Hf;const sR=/^(?:(?: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])$/,oR=/^(?:(?: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])$/,uR=/^(([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]))$/,cR=/^(([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])$/,fR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,d_="((\\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])))",hR=new RegExp(`^${d_}$`);function h_(t){let a="[0-5]\\d";t.precision?a=`${a}\\.\\d{${t.precision}}`:t.precision==null&&(a=`${a}(\\.\\d+)?`);const i=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${a})${i}`}function mR(t){return new RegExp(`^${h_(t)}$`)}function pR(t){let a=`${d_}T${h_(t)}`;const i=[];return i.push(t.local?"Z?":"Z"),t.offset&&i.push("([+-]\\d{2}:?\\d{2})"),a=`${a}(${i.join("|")})`,new RegExp(`^${a}$`)}function gR(t,a){return!!((a==="v4"||!a)&&sR.test(t)||(a==="v6"||!a)&&uR.test(t))}function yR(t,a){if(!aR.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,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||a&&o.alg!==a)}catch{return!1}}function _R(t,a){return!!((a==="v4"||!a)&&oR.test(t)||(a==="v6"||!a)&&cR.test(t))}class wa extends Ye{_parse(a){if(this._def.coerce&&(a.data=String(a.data)),this._getType(a)!==me.string){const u=this._getOrReturnCtx(a);return he(u,{code:ie.invalid_type,expected:me.string,received:u.parsedType}),je}const r=new nn;let o;for(const u of this._def.checks)if(u.kind==="min")a.data.length<u.value&&(o=this._getOrReturnCtx(a,o),he(o,{code:ie.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),r.dirty());else if(u.kind==="max")a.data.length>u.value&&(o=this._getOrReturnCtx(a,o),he(o,{code:ie.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),r.dirty());else if(u.kind==="length"){const c=a.data.length>u.value,h=a.data.length<u.value;(c||h)&&(o=this._getOrReturnCtx(a,o),c?he(o,{code:ie.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}):h&&he(o,{code:ie.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}),r.dirty())}else if(u.kind==="email")iR.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"email",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="emoji")Hf||(Hf=new RegExp(rR,"u")),Hf.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"emoji",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="uuid")tR.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"uuid",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="nanoid")nR.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"nanoid",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="cuid")Pz.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"cuid",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="cuid2")Wz.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"cuid2",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="ulid")eR.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"ulid",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="url")try{new URL(a.data)}catch{o=this._getOrReturnCtx(a,o),he(o,{validation:"url",code:ie.invalid_string,message:u.message}),r.dirty()}else u.kind==="regex"?(u.regex.lastIndex=0,u.regex.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"regex",code:ie.invalid_string,message:u.message}),r.dirty())):u.kind==="trim"?a.data=a.data.trim():u.kind==="includes"?a.data.includes(u.value,u.position)||(o=this._getOrReturnCtx(a,o),he(o,{code:ie.invalid_string,validation:{includes:u.value,position:u.position},message:u.message}),r.dirty()):u.kind==="toLowerCase"?a.data=a.data.toLowerCase():u.kind==="toUpperCase"?a.data=a.data.toUpperCase():u.kind==="startsWith"?a.data.startsWith(u.value)||(o=this._getOrReturnCtx(a,o),he(o,{code:ie.invalid_string,validation:{startsWith:u.value},message:u.message}),r.dirty()):u.kind==="endsWith"?a.data.endsWith(u.value)||(o=this._getOrReturnCtx(a,o),he(o,{code:ie.invalid_string,validation:{endsWith:u.value},message:u.message}),r.dirty()):u.kind==="datetime"?pR(u).test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{code:ie.invalid_string,validation:"datetime",message:u.message}),r.dirty()):u.kind==="date"?hR.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{code:ie.invalid_string,validation:"date",message:u.message}),r.dirty()):u.kind==="time"?mR(u).test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{code:ie.invalid_string,validation:"time",message:u.message}),r.dirty()):u.kind==="duration"?lR.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"duration",code:ie.invalid_string,message:u.message}),r.dirty()):u.kind==="ip"?gR(a.data,u.version)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"ip",code:ie.invalid_string,message:u.message}),r.dirty()):u.kind==="jwt"?yR(a.data,u.alg)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"jwt",code:ie.invalid_string,message:u.message}),r.dirty()):u.kind==="cidr"?_R(a.data,u.version)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"cidr",code:ie.invalid_string,message:u.message}),r.dirty()):u.kind==="base64"?fR.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"base64",code:ie.invalid_string,message:u.message}),r.dirty()):u.kind==="base64url"?dR.test(a.data)||(o=this._getOrReturnCtx(a,o),he(o,{validation:"base64url",code:ie.invalid_string,message:u.message}),r.dirty()):Je.assertNever(u);return{status:r.value,value:a.data}}_regex(a,i,r){return this.refinement(o=>a.test(o),{validation:i,code:ie.invalid_string,...Se.errToObj(r)})}_addCheck(a){return new wa({...this._def,checks:[...this._def.checks,a]})}email(a){return this._addCheck({kind:"email",...Se.errToObj(a)})}url(a){return this._addCheck({kind:"url",...Se.errToObj(a)})}emoji(a){return this._addCheck({kind:"emoji",...Se.errToObj(a)})}uuid(a){return this._addCheck({kind:"uuid",...Se.errToObj(a)})}nanoid(a){return this._addCheck({kind:"nanoid",...Se.errToObj(a)})}cuid(a){return this._addCheck({kind:"cuid",...Se.errToObj(a)})}cuid2(a){return this._addCheck({kind:"cuid2",...Se.errToObj(a)})}ulid(a){return this._addCheck({kind:"ulid",...Se.errToObj(a)})}base64(a){return this._addCheck({kind:"base64",...Se.errToObj(a)})}base64url(a){return this._addCheck({kind:"base64url",...Se.errToObj(a)})}jwt(a){return this._addCheck({kind:"jwt",...Se.errToObj(a)})}ip(a){return this._addCheck({kind:"ip",...Se.errToObj(a)})}cidr(a){return this._addCheck({kind:"cidr",...Se.errToObj(a)})}datetime(a){return typeof a=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:a}):this._addCheck({kind:"datetime",precision:typeof(a==null?void 0:a.precision)>"u"?null:a==null?void 0:a.precision,offset:(a==null?void 0:a.offset)??!1,local:(a==null?void 0:a.local)??!1,...Se.errToObj(a==null?void 0:a.message)})}date(a){return this._addCheck({kind:"date",message:a})}time(a){return typeof a=="string"?this._addCheck({kind:"time",precision:null,message:a}):this._addCheck({kind:"time",precision:typeof(a==null?void 0:a.precision)>"u"?null:a==null?void 0:a.precision,...Se.errToObj(a==null?void 0:a.message)})}duration(a){return this._addCheck({kind:"duration",...Se.errToObj(a)})}regex(a,i){return this._addCheck({kind:"regex",regex:a,...Se.errToObj(i)})}includes(a,i){return this._addCheck({kind:"includes",value:a,position:i==null?void 0:i.position,...Se.errToObj(i==null?void 0:i.message)})}startsWith(a,i){return this._addCheck({kind:"startsWith",value:a,...Se.errToObj(i)})}endsWith(a,i){return this._addCheck({kind:"endsWith",value:a,...Se.errToObj(i)})}min(a,i){return this._addCheck({kind:"min",value:a,...Se.errToObj(i)})}max(a,i){return this._addCheck({kind:"max",value:a,...Se.errToObj(i)})}length(a,i){return this._addCheck({kind:"length",value:a,...Se.errToObj(i)})}nonempty(a){return this.min(1,Se.errToObj(a))}trim(){return new wa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new wa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new wa({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(a=>a.kind==="datetime")}get isDate(){return!!this._def.checks.find(a=>a.kind==="date")}get isTime(){return!!this._def.checks.find(a=>a.kind==="time")}get isDuration(){return!!this._def.checks.find(a=>a.kind==="duration")}get isEmail(){return!!this._def.checks.find(a=>a.kind==="email")}get isURL(){return!!this._def.checks.find(a=>a.kind==="url")}get isEmoji(){return!!this._def.checks.find(a=>a.kind==="emoji")}get isUUID(){return!!this._def.checks.find(a=>a.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(a=>a.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(a=>a.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(a=>a.kind==="cuid2")}get isULID(){return!!this._def.checks.find(a=>a.kind==="ulid")}get isIP(){return!!this._def.checks.find(a=>a.kind==="ip")}get isCIDR(){return!!this._def.checks.find(a=>a.kind==="cidr")}get isBase64(){return!!this._def.checks.find(a=>a.kind==="base64")}get isBase64url(){return!!this._def.checks.find(a=>a.kind==="base64url")}get minLength(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a}get maxLength(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a}}wa.create=t=>new wa({checks:[],typeName:Me.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...Be(t)});function vR(t,a){const i=(t.toString().split(".")[1]||"").length,r=(a.toString().split(".")[1]||"").length,o=i>r?i:r,u=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(a.toFixed(o).replace(".",""));return u%c/10**o}class Mi extends Ye{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(a){if(this._def.coerce&&(a.data=Number(a.data)),this._getType(a)!==me.number){const u=this._getOrReturnCtx(a);return he(u,{code:ie.invalid_type,expected:me.number,received:u.parsedType}),je}let r;const o=new nn;for(const u of this._def.checks)u.kind==="int"?Je.isInteger(a.data)||(r=this._getOrReturnCtx(a,r),he(r,{code:ie.invalid_type,expected:"integer",received:"float",message:u.message}),o.dirty()):u.kind==="min"?(u.inclusive?a.data<u.value:a.data<=u.value)&&(r=this._getOrReturnCtx(a,r),he(r,{code:ie.too_small,minimum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),o.dirty()):u.kind==="max"?(u.inclusive?a.data>u.value:a.data>=u.value)&&(r=this._getOrReturnCtx(a,r),he(r,{code:ie.too_big,maximum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),o.dirty()):u.kind==="multipleOf"?vR(a.data,u.value)!==0&&(r=this._getOrReturnCtx(a,r),he(r,{code:ie.not_multiple_of,multipleOf:u.value,message:u.message}),o.dirty()):u.kind==="finite"?Number.isFinite(a.data)||(r=this._getOrReturnCtx(a,r),he(r,{code:ie.not_finite,message:u.message}),o.dirty()):Je.assertNever(u);return{status:o.value,value:a.data}}gte(a,i){return this.setLimit("min",a,!0,Se.toString(i))}gt(a,i){return this.setLimit("min",a,!1,Se.toString(i))}lte(a,i){return this.setLimit("max",a,!0,Se.toString(i))}lt(a,i){return this.setLimit("max",a,!1,Se.toString(i))}setLimit(a,i,r,o){return new Mi({...this._def,checks:[...this._def.checks,{kind:a,value:i,inclusive:r,message:Se.toString(o)}]})}_addCheck(a){return new Mi({...this._def,checks:[...this._def.checks,a]})}int(a){return this._addCheck({kind:"int",message:Se.toString(a)})}positive(a){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Se.toString(a)})}negative(a){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Se.toString(a)})}nonpositive(a){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Se.toString(a)})}nonnegative(a){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Se.toString(a)})}multipleOf(a,i){return this._addCheck({kind:"multipleOf",value:a,message:Se.toString(i)})}finite(a){return this._addCheck({kind:"finite",message:Se.toString(a)})}safe(a){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Se.toString(a)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Se.toString(a)})}get minValue(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a}get maxValue(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a}get isInt(){return!!this._def.checks.find(a=>a.kind==="int"||a.kind==="multipleOf"&&Je.isInteger(a.value))}get isFinite(){let a=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"&&(a===null||r.value<a)&&(a=r.value)}return Number.isFinite(i)&&Number.isFinite(a)}}Mi.create=t=>new Mi({checks:[],typeName:Me.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});class qr extends Ye{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(a){if(this._def.coerce)try{a.data=BigInt(a.data)}catch{return this._getInvalidInput(a)}if(this._getType(a)!==me.bigint)return this._getInvalidInput(a);let r;const o=new nn;for(const u of this._def.checks)u.kind==="min"?(u.inclusive?a.data<u.value:a.data<=u.value)&&(r=this._getOrReturnCtx(a,r),he(r,{code:ie.too_small,type:"bigint",minimum:u.value,inclusive:u.inclusive,message:u.message}),o.dirty()):u.kind==="max"?(u.inclusive?a.data>u.value:a.data>=u.value)&&(r=this._getOrReturnCtx(a,r),he(r,{code:ie.too_big,type:"bigint",maximum:u.value,inclusive:u.inclusive,message:u.message}),o.dirty()):u.kind==="multipleOf"?a.data%u.value!==BigInt(0)&&(r=this._getOrReturnCtx(a,r),he(r,{code:ie.not_multiple_of,multipleOf:u.value,message:u.message}),o.dirty()):Je.assertNever(u);return{status:o.value,value:a.data}}_getInvalidInput(a){const i=this._getOrReturnCtx(a);return he(i,{code:ie.invalid_type,expected:me.bigint,received:i.parsedType}),je}gte(a,i){return this.setLimit("min",a,!0,Se.toString(i))}gt(a,i){return this.setLimit("min",a,!1,Se.toString(i))}lte(a,i){return this.setLimit("max",a,!0,Se.toString(i))}lt(a,i){return this.setLimit("max",a,!1,Se.toString(i))}setLimit(a,i,r,o){return new qr({...this._def,checks:[...this._def.checks,{kind:a,value:i,inclusive:r,message:Se.toString(o)}]})}_addCheck(a){return new qr({...this._def,checks:[...this._def.checks,a]})}positive(a){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Se.toString(a)})}negative(a){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Se.toString(a)})}nonpositive(a){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Se.toString(a)})}nonnegative(a){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Se.toString(a)})}multipleOf(a,i){return this._addCheck({kind:"multipleOf",value:a,message:Se.toString(i)})}get minValue(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a}get maxValue(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a}}qr.create=t=>new qr({checks:[],typeName:Me.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...Be(t)});class ed extends Ye{_parse(a){if(this._def.coerce&&(a.data=!!a.data),this._getType(a)!==me.boolean){const r=this._getOrReturnCtx(a);return he(r,{code:ie.invalid_type,expected:me.boolean,received:r.parsedType}),je}return Vn(a.data)}}ed.create=t=>new ed({typeName:Me.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});class wo extends Ye{_parse(a){if(this._def.coerce&&(a.data=new Date(a.data)),this._getType(a)!==me.date){const u=this._getOrReturnCtx(a);return he(u,{code:ie.invalid_type,expected:me.date,received:u.parsedType}),je}if(Number.isNaN(a.data.getTime())){const u=this._getOrReturnCtx(a);return he(u,{code:ie.invalid_date}),je}const r=new nn;let o;for(const u of this._def.checks)u.kind==="min"?a.data.getTime()<u.value&&(o=this._getOrReturnCtx(a,o),he(o,{code:ie.too_small,message:u.message,inclusive:!0,exact:!1,minimum:u.value,type:"date"}),r.dirty()):u.kind==="max"?a.data.getTime()>u.value&&(o=this._getOrReturnCtx(a,o),he(o,{code:ie.too_big,message:u.message,inclusive:!0,exact:!1,maximum:u.value,type:"date"}),r.dirty()):Je.assertNever(u);return{status:r.value,value:new Date(a.data.getTime())}}_addCheck(a){return new wo({...this._def,checks:[...this._def.checks,a]})}min(a,i){return this._addCheck({kind:"min",value:a.getTime(),message:Se.toString(i)})}max(a,i){return this._addCheck({kind:"max",value:a.getTime(),message:Se.toString(i)})}get minDate(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a!=null?new Date(a):null}get maxDate(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a!=null?new Date(a):null}}wo.create=t=>new wo({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Me.ZodDate,...Be(t)});class Fy extends Ye{_parse(a){if(this._getType(a)!==me.symbol){const r=this._getOrReturnCtx(a);return he(r,{code:ie.invalid_type,expected:me.symbol,received:r.parsedType}),je}return Vn(a.data)}}Fy.create=t=>new Fy({typeName:Me.ZodSymbol,...Be(t)});class td extends Ye{_parse(a){if(this._getType(a)!==me.undefined){const r=this._getOrReturnCtx(a);return he(r,{code:ie.invalid_type,expected:me.undefined,received:r.parsedType}),je}return Vn(a.data)}}td.create=t=>new td({typeName:Me.ZodUndefined,...Be(t)});class nd extends Ye{_parse(a){if(this._getType(a)!==me.null){const r=this._getOrReturnCtx(a);return he(r,{code:ie.invalid_type,expected:me.null,received:r.parsedType}),je}return Vn(a.data)}}nd.create=t=>new nd({typeName:Me.ZodNull,...Be(t)});class ad extends Ye{constructor(){super(...arguments),this._any=!0}_parse(a){return Vn(a.data)}}ad.create=t=>new ad({typeName:Me.ZodAny,...Be(t)});class ld extends Ye{constructor(){super(...arguments),this._unknown=!0}_parse(a){return Vn(a.data)}}ld.create=t=>new ld({typeName:Me.ZodUnknown,...Be(t)});class fl extends Ye{_parse(a){const i=this._getOrReturnCtx(a);return he(i,{code:ie.invalid_type,expected:me.never,received:i.parsedType}),je}}fl.create=t=>new fl({typeName:Me.ZodNever,...Be(t)});class Qy extends Ye{_parse(a){if(this._getType(a)!==me.undefined){const r=this._getOrReturnCtx(a);return he(r,{code:ie.invalid_type,expected:me.void,received:r.parsedType}),je}return Vn(a.data)}}Qy.create=t=>new Qy({typeName:Me.ZodVoid,...Be(t)});class ia extends Ye{_parse(a){const{ctx:i,status:r}=this._processInputParams(a),o=this._def;if(i.parsedType!==me.array)return he(i,{code:ie.invalid_type,expected:me.array,received:i.parsedType}),je;if(o.exactLength!==null){const c=i.data.length>o.exactLength.value,h=i.data.length<o.exactLength.value;(c||h)&&(he(i,{code:c?ie.too_big:ie.too_small,minimum:h?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&i.data.length<o.minLength.value&&(he(i,{code:ie.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&i.data.length>o.maxLength.value&&(he(i,{code:ie.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),i.common.async)return Promise.all([...i.data].map((c,h)=>o.type._parseAsync(new ra(i,c,i.path,h)))).then(c=>nn.mergeArray(r,c));const u=[...i.data].map((c,h)=>o.type._parseSync(new ra(i,c,i.path,h)));return nn.mergeArray(r,u)}get element(){return this._def.type}min(a,i){return new ia({...this._def,minLength:{value:a,message:Se.toString(i)}})}max(a,i){return new ia({...this._def,maxLength:{value:a,message:Se.toString(i)}})}length(a,i){return new ia({...this._def,exactLength:{value:a,message:Se.toString(i)}})}nonempty(a){return this.min(1,a)}}ia.create=(t,a)=>new ia({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Me.ZodArray,...Be(a)});function Ci(t){if(t instanceof Rt){const a={};for(const i in t.shape){const r=t.shape[i];a[i]=ja.create(Ci(r))}return new Rt({...t._def,shape:()=>a})}else return t instanceof ia?new ia({...t._def,type:Ci(t.element)}):t instanceof ja?ja.create(Ci(t.unwrap())):t instanceof Ul?Ul.create(Ci(t.unwrap())):t instanceof Dl?Dl.create(t.items.map(a=>Ci(a))):t}class Rt extends Ye{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const a=this._def.shape(),i=Je.objectKeys(a);return this._cached={shape:a,keys:i},this._cached}_parse(a){if(this._getType(a)!==me.object){const p=this._getOrReturnCtx(a);return he(p,{code:ie.invalid_type,expected:me.object,received:p.parsedType}),je}const{status:r,ctx:o}=this._processInputParams(a),{shape:u,keys:c}=this._getCached(),h=[];if(!(this._def.catchall instanceof fl&&this._def.unknownKeys==="strip"))for(const p in o.data)c.includes(p)||h.push(p);const m=[];for(const p of c){const y=u[p],_=o.data[p];m.push({key:{status:"valid",value:p},value:y._parse(new ra(o,_,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof fl){const p=this._def.unknownKeys;if(p==="passthrough")for(const y of h)m.push({key:{status:"valid",value:y},value:{status:"valid",value:o.data[y]}});else if(p==="strict")h.length>0&&(he(o,{code:ie.unrecognized_keys,keys:h}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const y of h){const _=o.data[y];m.push({key:{status:"valid",value:y},value:p._parse(new ra(o,_,o.path,y)),alwaysSet:y in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const y of m){const _=await y.key,x=await y.value;p.push({key:_,value:x,alwaysSet:y.alwaysSet})}return p}).then(p=>nn.mergeObjectSync(r,p)):nn.mergeObjectSync(r,m)}get shape(){return this._def.shape()}strict(a){return Se.errToObj,new Rt({...this._def,unknownKeys:"strict",...a!==void 0?{errorMap:(i,r)=>{var u,c;const o=((c=(u=this._def).errorMap)==null?void 0:c.call(u,i,r).message)??r.defaultError;return i.code==="unrecognized_keys"?{message:Se.errToObj(a).message??o}:{message:o}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(a){return new Rt({...this._def,shape:()=>({...this._def.shape(),...a})})}merge(a){return new Rt({unknownKeys:a._def.unknownKeys,catchall:a._def.catchall,shape:()=>({...this._def.shape(),...a._def.shape()}),typeName:Me.ZodObject})}setKey(a,i){return this.augment({[a]:i})}catchall(a){return new Rt({...this._def,catchall:a})}pick(a){const i={};for(const r of Je.objectKeys(a))a[r]&&this.shape[r]&&(i[r]=this.shape[r]);return new Rt({...this._def,shape:()=>i})}omit(a){const i={};for(const r of Je.objectKeys(this.shape))a[r]||(i[r]=this.shape[r]);return new Rt({...this._def,shape:()=>i})}deepPartial(){return Ci(this)}partial(a){const i={};for(const r of Je.objectKeys(this.shape)){const o=this.shape[r];a&&!a[r]?i[r]=o:i[r]=o.optional()}return new Rt({...this._def,shape:()=>i})}required(a){const i={};for(const r of Je.objectKeys(this.shape))if(a&&!a[r])i[r]=this.shape[r];else{let u=this.shape[r];for(;u instanceof ja;)u=u._def.innerType;i[r]=u}return new Rt({...this._def,shape:()=>i})}keyof(){return m_(Je.objectKeys(this.shape))}}Rt.create=(t,a)=>new Rt({shape:()=>t,unknownKeys:"strip",catchall:fl.create(),typeName:Me.ZodObject,...Be(a)});Rt.strictCreate=(t,a)=>new Rt({shape:()=>t,unknownKeys:"strict",catchall:fl.create(),typeName:Me.ZodObject,...Be(a)});Rt.lazycreate=(t,a)=>new Rt({shape:t,unknownKeys:"strip",catchall:fl.create(),typeName:Me.ZodObject,...Be(a)});class jo extends Ye{_parse(a){const{ctx:i}=this._processInputParams(a),r=this._def.options;function o(u){for(const h of u)if(h.result.status==="valid")return h.result;for(const h of u)if(h.result.status==="dirty")return i.common.issues.push(...h.ctx.common.issues),h.result;const c=u.map(h=>new za(h.ctx.common.issues));return he(i,{code:ie.invalid_union,unionErrors:c}),je}if(i.common.async)return Promise.all(r.map(async u=>{const c={...i,common:{...i.common,issues:[]},parent:null};return{result:await u._parseAsync({data:i.data,path:i.path,parent:c}),ctx:c}})).then(o);{let u;const c=[];for(const m of r){const p={...i,common:{...i.common,issues:[]},parent:null},y=m._parseSync({data:i.data,path:i.path,parent:p});if(y.status==="valid")return y;y.status==="dirty"&&!u&&(u={result:y,ctx:p}),p.common.issues.length&&c.push(p.common.issues)}if(u)return i.common.issues.push(...u.ctx.common.issues),u.result;const h=c.map(m=>new za(m));return he(i,{code:ie.invalid_union,unionErrors:h}),je}}get options(){return this._def.options}}jo.create=(t,a)=>new jo({options:t,typeName:Me.ZodUnion,...Be(a)});const Aa=t=>t instanceof rd?Aa(t.schema):t instanceof Bl?Aa(t.innerType()):t instanceof Ro?[t.value]:t instanceof Ll?t.options:t instanceof Oo?Je.objectValues(t.enum):t instanceof Lo?Aa(t._def.innerType):t instanceof td?[void 0]:t instanceof nd?[null]:t instanceof ja?[void 0,...Aa(t.unwrap())]:t instanceof Ul?[null,...Aa(t.unwrap())]:t instanceof p_||t instanceof Uo?Aa(t.unwrap()):t instanceof Bo?Aa(t._def.innerType):[];class Rd extends Ye{_parse(a){const{ctx:i}=this._processInputParams(a);if(i.parsedType!==me.object)return he(i,{code:ie.invalid_type,expected:me.object,received:i.parsedType}),je;const r=this.discriminator,o=i.data[r],u=this.optionsMap.get(o);return u?i.common.async?u._parseAsync({data:i.data,path:i.path,parent:i}):u._parseSync({data:i.data,path:i.path,parent:i}):(he(i,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(a,i,r){const o=new Map;for(const u of i){const c=Aa(u.shape[a]);if(!c.length)throw new Error(`A discriminator value for key \`${a}\` could not be extracted from all schema options`);for(const h of c){if(o.has(h))throw new Error(`Discriminator property ${String(a)} has duplicate value ${String(h)}`);o.set(h,u)}}return new Rd({typeName:Me.ZodDiscriminatedUnion,discriminator:a,options:i,optionsMap:o,...Be(r)})}}function id(t,a){const i=ul(t),r=ul(a);if(t===a)return{valid:!0,data:t};if(i===me.object&&r===me.object){const o=Je.objectKeys(a),u=Je.objectKeys(t).filter(h=>o.indexOf(h)!==-1),c={...t,...a};for(const h of u){const m=id(t[h],a[h]);if(!m.valid)return{valid:!1};c[h]=m.data}return{valid:!0,data:c}}else if(i===me.array&&r===me.array){if(t.length!==a.length)return{valid:!1};const o=[];for(let u=0;u<t.length;u++){const c=t[u],h=a[u],m=id(c,h);if(!m.valid)return{valid:!1};o.push(m.data)}return{valid:!0,data:o}}else return i===me.date&&r===me.date&&+t==+a?{valid:!0,data:t}:{valid:!1}}class Mo extends Ye{_parse(a){const{status:i,ctx:r}=this._processInputParams(a),o=(u,c)=>{if($y(u)||$y(c))return je;const h=id(u.value,c.value);return h.valid?((Yy(u)||Yy(c))&&i.dirty(),{status:i.value,value:h.data}):(he(r,{code:ie.invalid_intersection_types}),je)};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(([u,c])=>o(u,c)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Mo.create=(t,a,i)=>new Mo({left:t,right:a,typeName:Me.ZodIntersection,...Be(i)});class Dl extends Ye{_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.parsedType!==me.array)return he(r,{code:ie.invalid_type,expected:me.array,received:r.parsedType}),je;if(r.data.length<this._def.items.length)return he(r,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),je;!this._def.rest&&r.data.length>this._def.items.length&&(he(r,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const u=[...r.data].map((c,h)=>{const m=this._def.items[h]||this._def.rest;return m?m._parse(new ra(r,c,r.path,h)):null}).filter(c=>!!c);return r.common.async?Promise.all(u).then(c=>nn.mergeArray(i,c)):nn.mergeArray(i,u)}get items(){return this._def.items}rest(a){return new Dl({...this._def,rest:a})}}Dl.create=(t,a)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Dl({items:t,typeName:Me.ZodTuple,rest:null,...Be(a)})};class zo extends Ye{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.parsedType!==me.object)return he(r,{code:ie.invalid_type,expected:me.object,received:r.parsedType}),je;const o=[],u=this._def.keyType,c=this._def.valueType;for(const h in r.data)o.push({key:u._parse(new ra(r,h,r.path,h)),value:c._parse(new ra(r,r.data[h],r.path,h)),alwaysSet:h in r.data});return r.common.async?nn.mergeObjectAsync(i,o):nn.mergeObjectSync(i,o)}get element(){return this._def.valueType}static create(a,i,r){return i instanceof Ye?new zo({keyType:a,valueType:i,typeName:Me.ZodRecord,...Be(r)}):new zo({keyType:wa.create(),valueType:a,typeName:Me.ZodRecord,...Be(i)})}}class Ky extends Ye{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.parsedType!==me.map)return he(r,{code:ie.invalid_type,expected:me.map,received:r.parsedType}),je;const o=this._def.keyType,u=this._def.valueType,c=[...r.data.entries()].map(([h,m],p)=>({key:o._parse(new ra(r,h,r.path,[p,"key"])),value:u._parse(new ra(r,m,r.path,[p,"value"]))}));if(r.common.async){const h=new Map;return Promise.resolve().then(async()=>{for(const m of c){const p=await m.key,y=await m.value;if(p.status==="aborted"||y.status==="aborted")return je;(p.status==="dirty"||y.status==="dirty")&&i.dirty(),h.set(p.value,y.value)}return{status:i.value,value:h}})}else{const h=new Map;for(const m of c){const p=m.key,y=m.value;if(p.status==="aborted"||y.status==="aborted")return je;(p.status==="dirty"||y.status==="dirty")&&i.dirty(),h.set(p.value,y.value)}return{status:i.value,value:h}}}}Ky.create=(t,a,i)=>new Ky({valueType:a,keyType:t,typeName:Me.ZodMap,...Be(i)});class Vr extends Ye{_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.parsedType!==me.set)return he(r,{code:ie.invalid_type,expected:me.set,received:r.parsedType}),je;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(he(r,{code:ie.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),i.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(he(r,{code:ie.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),i.dirty());const u=this._def.valueType;function c(m){const p=new Set;for(const y of m){if(y.status==="aborted")return je;y.status==="dirty"&&i.dirty(),p.add(y.value)}return{status:i.value,value:p}}const h=[...r.data.values()].map((m,p)=>u._parse(new ra(r,m,r.path,p)));return r.common.async?Promise.all(h).then(m=>c(m)):c(h)}min(a,i){return new Vr({...this._def,minSize:{value:a,message:Se.toString(i)}})}max(a,i){return new Vr({...this._def,maxSize:{value:a,message:Se.toString(i)}})}size(a,i){return this.min(a,i).max(a,i)}nonempty(a){return this.min(1,a)}}Vr.create=(t,a)=>new Vr({valueType:t,minSize:null,maxSize:null,typeName:Me.ZodSet,...Be(a)});class rd extends Ye{get schema(){return this._def.getter()}_parse(a){const{ctx:i}=this._processInputParams(a);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}rd.create=(t,a)=>new rd({getter:t,typeName:Me.ZodLazy,...Be(a)});class Ro extends Ye{_parse(a){if(a.data!==this._def.value){const i=this._getOrReturnCtx(a);return he(i,{received:i.data,code:ie.invalid_literal,expected:this._def.value}),je}return{status:"valid",value:a.data}}get value(){return this._def.value}}Ro.create=(t,a)=>new Ro({value:t,typeName:Me.ZodLiteral,...Be(a)});function m_(t,a){return new Ll({values:t,typeName:Me.ZodEnum,...Be(a)})}class Ll extends Ye{_parse(a){if(typeof a.data!="string"){const i=this._getOrReturnCtx(a),r=this._def.values;return he(i,{expected:Je.joinValues(r),received:i.parsedType,code:ie.invalid_type}),je}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(a.data)){const i=this._getOrReturnCtx(a),r=this._def.values;return he(i,{received:i.data,code:ie.invalid_enum_value,options:r}),je}return Vn(a.data)}get options(){return this._def.values}get enum(){const a={};for(const i of this._def.values)a[i]=i;return a}get Values(){const a={};for(const i of this._def.values)a[i]=i;return a}get Enum(){const a={};for(const i of this._def.values)a[i]=i;return a}extract(a,i=this._def){return Ll.create(a,{...this._def,...i})}exclude(a,i=this._def){return Ll.create(this.options.filter(r=>!a.includes(r)),{...this._def,...i})}}Ll.create=m_;class Oo extends Ye{_parse(a){const i=Je.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(a);if(r.parsedType!==me.string&&r.parsedType!==me.number){const o=Je.objectValues(i);return he(r,{expected:Je.joinValues(o),received:r.parsedType,code:ie.invalid_type}),je}if(this._cache||(this._cache=new Set(Je.getValidEnumValues(this._def.values))),!this._cache.has(a.data)){const o=Je.objectValues(i);return he(r,{received:r.data,code:ie.invalid_enum_value,options:o}),je}return Vn(a.data)}get enum(){return this._def.values}}Oo.create=(t,a)=>new Oo({values:t,typeName:Me.ZodNativeEnum,...Be(a)});class Do extends Ye{unwrap(){return this._def.type}_parse(a){const{ctx:i}=this._processInputParams(a);if(i.parsedType!==me.promise&&i.common.async===!1)return he(i,{code:ie.invalid_type,expected:me.promise,received:i.parsedType}),je;const r=i.parsedType===me.promise?i.data:Promise.resolve(i.data);return Vn(r.then(o=>this._def.type.parseAsync(o,{path:i.path,errorMap:i.common.contextualErrorMap})))}}Do.create=(t,a)=>new Do({type:t,typeName:Me.ZodPromise,...Be(a)});class Bl extends Ye{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Me.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(a){const{status:i,ctx:r}=this._processInputParams(a),o=this._def.effect||null,u={addIssue:c=>{he(r,c),c.fatal?i.abort():i.dirty()},get path(){return r.path}};if(u.addIssue=u.addIssue.bind(u),o.type==="preprocess"){const c=o.transform(r.data,u);if(r.common.async)return Promise.resolve(c).then(async h=>{if(i.value==="aborted")return je;const m=await this._def.schema._parseAsync({data:h,path:r.path,parent:r});return m.status==="aborted"?je:m.status==="dirty"||i.value==="dirty"?Or(m.value):m});{if(i.value==="aborted")return je;const h=this._def.schema._parseSync({data:c,path:r.path,parent:r});return h.status==="aborted"?je:h.status==="dirty"||i.value==="dirty"?Or(h.value):h}}if(o.type==="refinement"){const c=h=>{const m=o.refinement(h,u);if(r.common.async)return Promise.resolve(m);if(m 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"?je:(h.status==="dirty"&&i.dirty(),c(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"?je:(h.status==="dirty"&&i.dirty(),c(h.value).then(()=>({status:i.value,value:h.value}))))}if(o.type==="transform")if(r.common.async===!1){const c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ji(c))return je;const h=o.transform(c.value,u);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(c=>ji(c)?Promise.resolve(o.transform(c.value,u)).then(h=>({status:i.value,value:h})):je);Je.assertNever(o)}}Bl.create=(t,a,i)=>new Bl({schema:t,typeName:Me.ZodEffects,effect:a,...Be(i)});Bl.createWithPreprocess=(t,a,i)=>new Bl({schema:a,effect:{type:"preprocess",transform:t},typeName:Me.ZodEffects,...Be(i)});class ja extends Ye{_parse(a){return this._getType(a)===me.undefined?Vn(void 0):this._def.innerType._parse(a)}unwrap(){return this._def.innerType}}ja.create=(t,a)=>new ja({innerType:t,typeName:Me.ZodOptional,...Be(a)});class Ul extends Ye{_parse(a){return this._getType(a)===me.null?Vn(null):this._def.innerType._parse(a)}unwrap(){return this._def.innerType}}Ul.create=(t,a)=>new Ul({innerType:t,typeName:Me.ZodNullable,...Be(a)});class Lo extends Ye{_parse(a){const{ctx:i}=this._processInputParams(a);let r=i.data;return i.parsedType===me.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}Lo.create=(t,a)=>new Lo({innerType:t,typeName:Me.ZodDefault,defaultValue:typeof a.default=="function"?a.default:()=>a.default,...Be(a)});class Bo extends Ye{_parse(a){const{ctx:i}=this._processInputParams(a),r={...i,common:{...i.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ao(o)?o.then(u=>({status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new za(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new za(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Bo.create=(t,a)=>new Bo({innerType:t,typeName:Me.ZodCatch,catchValue:typeof a.catch=="function"?a.catch:()=>a.catch,...Be(a)});class Jy extends Ye{_parse(a){if(this._getType(a)!==me.nan){const r=this._getOrReturnCtx(a);return he(r,{code:ie.invalid_type,expected:me.nan,received:r.parsedType}),je}return{status:"valid",value:a.data}}}Jy.create=t=>new Jy({typeName:Me.ZodNaN,...Be(t)});class p_ extends Ye{_parse(a){const{ctx:i}=this._processInputParams(a),r=i.data;return this._def.type._parse({data:r,path:i.path,parent:i})}unwrap(){return this._def.type}}class Od extends Ye{_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.common.async)return(async()=>{const u=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?je:u.status==="dirty"?(i.dirty(),Or(u.value)):this._def.out._parseAsync({data:u.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?je:o.status==="dirty"?(i.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(a,i){return new Od({in:a,out:i,typeName:Me.ZodPipeline})}}class Uo extends Ye{_parse(a){const i=this._def.innerType._parse(a),r=o=>(ji(o)&&(o.value=Object.freeze(o.value)),o);return Ao(i)?i.then(o=>r(o)):r(i)}unwrap(){return this._def.innerType}}Uo.create=(t,a)=>new Uo({innerType:t,typeName:Me.ZodReadonly,...Be(a)});var Me;(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"})(Me||(Me={}));const le=wa.create,sd=Mi.create,Pe=ed.create,En=ad.create,Oi=ld.create;fl.create;const Jn=ia.create,nt=Rt.create,Xo=jo.create,Fo=Rd.create;Mo.create;Dl.create;const Xr=zo.create,ve=Ro.create;Ll.create;const xR=Oo.create;Do.create;ja.create;Ul.create;const bR=nt({name:le(),arguments:le()}),SR=nt({id:le(),type:ve("function"),function:bR,encryptedValue:le().optional()}),Qo=nt({id:le(),role:le(),content:le().optional(),name:le().optional(),encryptedValue:le().optional()}),kR=nt({type:ve("text"),text:le()}),TR=nt({type:ve("data"),value:le(),mimeType:le()}),NR=nt({type:ve("url"),value:le(),mimeType:le().optional()}),Ko=Fo("type",[TR,NR]),ER=nt({type:ve("image"),source:Ko,metadata:Oi().optional()}),CR=nt({type:ve("audio"),source:Ko,metadata:Oi().optional()}),AR=nt({type:ve("video"),source:Ko,metadata:Oi().optional()}),wR=nt({type:ve("document"),source:Ko,metadata:Oi().optional()}),g_=nt({type:ve("binary"),mimeType:le(),id:le().optional(),url:le().optional(),data:le().optional(),filename:le().optional()}),y_=(t,a)=>{!t.id&&!t.url&&!t.data&&a.addIssue({code:ie.custom,message:"BinaryInputContent requires at least one of id, url, or data.",path:["id"]})};g_.superRefine((t,a)=>{y_(t,a)});const jR=Fo("type",[kR,ER,CR,AR,wR,g_]),MR=jR.superRefine((t,a)=>{t.type==="binary"&&y_(t,a)}),zR=Qo.extend({role:ve("developer"),content:le()}),RR=Qo.extend({role:ve("system"),content:le()}),OR=Qo.extend({role:ve("assistant"),content:le().optional(),toolCalls:Jn(SR).optional()}),DR=Qo.extend({role:ve("user"),content:Xo([le(),Jn(MR)])}),LR=nt({id:le(),content:le(),role:ve("tool"),toolCallId:le(),error:le().optional(),encryptedValue:le().optional()}),BR=nt({id:le(),role:ve("activity"),activityType:le(),content:Xr(En())}),UR=nt({id:le(),role:ve("reasoning"),content:le(),encryptedValue:le().optional()}),__=Fo("role",[zR,RR,OR,DR,LR,BR,UR]);Xo([ve("developer"),ve("system"),ve("assistant"),ve("user"),ve("tool"),ve("activity"),ve("reasoning")]);const HR=nt({description:le(),value:le()}),v_=nt({name:le(),description:le(),parameters:En(),metadata:Xr(En()).optional()}),IR=nt({threadId:le(),runId:le(),parentRunId:le().optional(),state:En(),messages:Jn(__),tools:Jn(v_),context:Jn(HR),forwardedProps:En()}),qR=En(),VR=nt({name:le(),description:le().optional()}),GR=nt({name:le().optional(),type:le().optional(),description:le().optional(),version:le().optional(),provider:le().optional(),documentationUrl:le().optional(),metadata:Xr(Oi()).optional()}),ZR=nt({streaming:Pe().optional(),websocket:Pe().optional(),httpBinary:Pe().optional(),pushNotifications:Pe().optional(),resumable:Pe().optional()}),$R=nt({supported:Pe().optional(),items:Jn(v_).optional(),parallelCalls:Pe().optional(),clientProvided:Pe().optional()}),YR=nt({structuredOutput:Pe().optional(),supportedMimeTypes:Jn(le()).optional()}),XR=nt({snapshots:Pe().optional(),deltas:Pe().optional(),memory:Pe().optional(),persistentState:Pe().optional()}),FR=nt({supported:Pe().optional(),delegation:Pe().optional(),handoffs:Pe().optional(),subAgents:Jn(VR).optional()}),QR=nt({supported:Pe().optional(),streaming:Pe().optional(),encrypted:Pe().optional()}),KR=nt({image:Pe().optional(),audio:Pe().optional(),video:Pe().optional(),pdf:Pe().optional(),file:Pe().optional()}),JR=nt({image:Pe().optional(),audio:Pe().optional()}),PR=nt({input:KR.optional(),output:JR.optional()}),WR=nt({codeExecution:Pe().optional(),sandboxed:Pe().optional(),maxIterations:sd().optional(),maxExecutionTime:sd().optional()}),eO=nt({supported:Pe().optional(),approvals:Pe().optional(),interventions:Pe().optional(),feedback:Pe().optional()});nt({identity:GR.optional(),transport:ZR.optional(),tools:$R.optional(),output:YR.optional(),state:XR.optional(),multiAgent:FR.optional(),reasoning:QR.optional(),multimodal:PR.optional(),execution:WR.optional(),humanInTheLoop:eO.optional(),custom:Xr(Oi()).optional()});const x_=Xo([ve("developer"),ve("system"),ve("assistant"),ve("user")]);let Ve=(function(t){return t.TEXT_MESSAGE_START="TEXT_MESSAGE_START",t.TEXT_MESSAGE_CONTENT="TEXT_MESSAGE_CONTENT",t.TEXT_MESSAGE_END="TEXT_MESSAGE_END",t.TEXT_MESSAGE_CHUNK="TEXT_MESSAGE_CHUNK",t.TOOL_CALL_START="TOOL_CALL_START",t.TOOL_CALL_ARGS="TOOL_CALL_ARGS",t.TOOL_CALL_END="TOOL_CALL_END",t.TOOL_CALL_CHUNK="TOOL_CALL_CHUNK",t.TOOL_CALL_RESULT="TOOL_CALL_RESULT",t.THINKING_START="THINKING_START",t.THINKING_END="THINKING_END",t.THINKING_TEXT_MESSAGE_START="THINKING_TEXT_MESSAGE_START",t.THINKING_TEXT_MESSAGE_CONTENT="THINKING_TEXT_MESSAGE_CONTENT",t.THINKING_TEXT_MESSAGE_END="THINKING_TEXT_MESSAGE_END",t.STATE_SNAPSHOT="STATE_SNAPSHOT",t.STATE_DELTA="STATE_DELTA",t.MESSAGES_SNAPSHOT="MESSAGES_SNAPSHOT",t.ACTIVITY_SNAPSHOT="ACTIVITY_SNAPSHOT",t.ACTIVITY_DELTA="ACTIVITY_DELTA",t.RAW="RAW",t.CUSTOM="CUSTOM",t.RUN_STARTED="RUN_STARTED",t.RUN_FINISHED="RUN_FINISHED",t.RUN_ERROR="RUN_ERROR",t.STEP_STARTED="STEP_STARTED",t.STEP_FINISHED="STEP_FINISHED",t.REASONING_START="REASONING_START",t.REASONING_MESSAGE_START="REASONING_MESSAGE_START",t.REASONING_MESSAGE_CONTENT="REASONING_MESSAGE_CONTENT",t.REASONING_MESSAGE_END="REASONING_MESSAGE_END",t.REASONING_MESSAGE_CHUNK="REASONING_MESSAGE_CHUNK",t.REASONING_END="REASONING_END",t.REASONING_ENCRYPTED_VALUE="REASONING_ENCRYPTED_VALUE",t})({});const at=nt({type:xR(Ve),timestamp:sd().optional(),rawEvent:En().optional()}).passthrough(),tO=at.extend({type:ve(Ve.TEXT_MESSAGE_START),messageId:le(),role:x_.default("assistant"),name:le().optional()}),b_=at.extend({type:ve(Ve.TEXT_MESSAGE_CONTENT),messageId:le(),delta:le()}),nO=at.extend({type:ve(Ve.TEXT_MESSAGE_END),messageId:le()}),aO=at.extend({type:ve(Ve.TEXT_MESSAGE_CHUNK),messageId:le().optional(),role:x_.optional(),delta:le().optional(),name:le().optional()}),lO=at.extend({type:ve(Ve.THINKING_TEXT_MESSAGE_START)}),iO=b_.omit({messageId:!0,type:!0}).extend({type:ve(Ve.THINKING_TEXT_MESSAGE_CONTENT)}),rO=at.extend({type:ve(Ve.THINKING_TEXT_MESSAGE_END)}),sO=at.extend({type:ve(Ve.TOOL_CALL_START),toolCallId:le(),toolCallName:le(),parentMessageId:le().optional()}),oO=at.extend({type:ve(Ve.TOOL_CALL_ARGS),toolCallId:le(),delta:le()}),uO=at.extend({type:ve(Ve.TOOL_CALL_END),toolCallId:le()}),cO=at.extend({messageId:le(),type:ve(Ve.TOOL_CALL_RESULT),toolCallId:le(),content:le(),role:ve("tool").optional()}),fO=at.extend({type:ve(Ve.TOOL_CALL_CHUNK),toolCallId:le().optional(),toolCallName:le().optional(),parentMessageId:le().optional(),delta:le().optional()}),dO=at.extend({type:ve(Ve.THINKING_START),title:le().optional()}),hO=at.extend({type:ve(Ve.THINKING_END)}),mO=at.extend({type:ve(Ve.STATE_SNAPSHOT),snapshot:qR}),pO=at.extend({type:ve(Ve.STATE_DELTA),delta:Jn(En())}),gO=at.extend({type:ve(Ve.MESSAGES_SNAPSHOT),messages:Jn(__)}),yO=at.extend({type:ve(Ve.ACTIVITY_SNAPSHOT),messageId:le(),activityType:le(),content:Xr(En()),replace:Pe().optional().default(!0)}),_O=at.extend({type:ve(Ve.ACTIVITY_DELTA),messageId:le(),activityType:le(),patch:Jn(En())}),vO=at.extend({type:ve(Ve.RAW),event:En(),source:le().optional()}),xO=at.extend({type:ve(Ve.CUSTOM),name:le(),value:En()}),bO=at.extend({type:ve(Ve.RUN_STARTED),threadId:le(),runId:le(),parentRunId:le().optional(),input:IR.optional()}),SO=at.extend({type:ve(Ve.RUN_FINISHED),threadId:le(),runId:le(),result:En().optional()}),kO=at.extend({type:ve(Ve.RUN_ERROR),message:le(),code:le().optional()}),TO=at.extend({type:ve(Ve.STEP_STARTED),stepName:le()}),NO=at.extend({type:ve(Ve.STEP_FINISHED),stepName:le()}),EO=Xo([ve("tool-call"),ve("message")]),CO=at.extend({type:ve(Ve.REASONING_START),messageId:le()}),AO=at.extend({type:ve(Ve.REASONING_MESSAGE_START),messageId:le(),role:ve("reasoning")}),wO=at.extend({type:ve(Ve.REASONING_MESSAGE_CONTENT),messageId:le(),delta:le()}),jO=at.extend({type:ve(Ve.REASONING_MESSAGE_END),messageId:le()}),MO=at.extend({type:ve(Ve.REASONING_MESSAGE_CHUNK),messageId:le().optional(),delta:le().optional()}),zO=at.extend({type:ve(Ve.REASONING_END),messageId:le()}),RO=at.extend({type:ve(Ve.REASONING_ENCRYPTED_VALUE),subtype:EO,entityId:le(),encryptedValue:le()}),OO=Fo("type",[tO,b_,nO,aO,dO,hO,lO,iO,rO,sO,oO,uO,fO,cO,mO,pO,gO,yO,_O,vO,xO,bO,SO,kO,TO,NO,CO,AO,wO,jO,MO,zO,RO]);function DO(t){let a;try{a=JSON.parse(t)}catch{return"not-agui"}if(typeof a!="object"||a===null||!("type"in a))return"not-agui";const i=OO.safeParse(a);if(!i.success)return"not-agui";switch(i.data.type){case Ve.TEXT_MESSAGE_CONTENT:case Ve.TEXT_MESSAGE_CHUNK:return{type:"data",content:i.data.delta??""};case Ve.RUN_ERROR:return{type:"data",content:`Error: ${i.data.message??"Unknown error"}`};default:return null}}function LO(t){try{const a=JSON.parse(t);if(typeof a=="string")return{type:"data",content:a};if(a&&typeof a=="object"&&"error"in a)return{type:"data",content:`Error: ${a.error}`}}catch{}return{type:"data",content:t}}function BO(t,a){if(!t.startsWith("data: "))return null;const i=t.slice(6);if(a==="metadata")return{type:"metadata",content:i};const r=DO(i);return r!=="not-agui"?r:LO(i)}function UO(t,a,i){const[r,o]=L.useState([]),[u,c]=L.useState(!1),[h,m]=L.useState(null),p=L.useRef(null),y=async N=>{if(!(!N||u)){c(!0),o(j=>[...j,{role:"user",content:N},{role:"assistant",content:""}]);try{const j=await Nn(`${t}/invocations`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:N,...a?{agentName:a}:{},...p.current?{sessionId:p.current}:{},...i?{userId:i}:{}})});if(!j.ok){const W=await j.text();o(G=>{const ge=[...G];return ge[ge.length-1]={role:"assistant",content:W||`Error: ${j.status}`,isError:!0},ge});return}const B=j.headers.get("x-session-id");if(B&&(p.current=B,m(B)),!j.body){o(W=>{const G=[...W];return G[G.length-1]={role:"assistant",content:"(empty response)"},G});return}const S=j.body.getReader(),M=new TextDecoder;let z="",F="",ne=!1,U="",te=null;const de=()=>{te=null,o(W=>{const G=[...W];return G[G.length-1]={role:"assistant",content:F},G})},pe=()=>{te===null&&(te=requestAnimationFrame(de))},R=W=>{if(W.startsWith("event: ")||W.startsWith("event:")){U=W.slice(W.indexOf(":")+1).trim();return}if(W===""){U="";return}const G=BO(W,U);G!==null&&(G.type==="metadata"||(ne=!0,F+=G.content))};for(;;){const{done:W,value:G}=await S.read();if(W)break;z+=M.decode(G,{stream:!0});const ge=z.split(`
|
|
279
|
-
`);z=
|
|
277
|
+
`),ne();break}case"metadata":{$=G.usage;break}case"error":{R+=`
|
|
278
|
+
Error: ${G.message}`,ne();break}default:break}}}W!==null&&cancelAnimationFrame(W);const L=Object.keys(x.current).length>0?{...x.current}:void 0;x.current={},o(K=>{const se=[...K];return se[se.length-1]={role:"assistant",content:R||(L?"":"(empty response)"),...L?{toolExecutions:L}:{},...$?{tokenUsage:{inputTokens:$.inputTokens,outputTokens:$.outputTokens,totalTokens:$.totalTokens}}:{}},se})}catch(ae){const U=ae instanceof Error&&ae.message.includes("Failed to fetch")?"Connection failed — is the dev server running?":ae instanceof Error?ae.message:"Unknown error";o(ee=>{const he=[...ee];return he[he.length-1]={role:"assistant",content:U,isError:!0},he})}finally{c(!1)}},[t]),j=D.useCallback(async S=>{var F,ae,U,ee;if(!S||u||!a)return;x.current={},o(he=>[...he,{role:"user",content:S},{role:"assistant",content:""}]);const M=p.model,z=M&&(((F=M.bedrockModelConfig)==null?void 0:F.modelId)||((ae=M.openAiModelConfig)==null?void 0:ae.modelId)||((U=M.geminiModelConfig)==null?void 0:U.modelId));await N({harnessName:a,prompt:S,...y.current?{sessionId:y.current}:{},...i?{userId:i}:{},harnessOverrides:{...p,model:z?M:void 0,skills:(ee=p.skills)==null?void 0:ee.map(he=>({path:he}))}})},[a,u,i,p,N]),B=D.useCallback(()=>{var S;(S=b.current)==null||S.abort(),b.current=null,o([]),m(null),y.current=null,x.current={},c(!1)},[]);return{messages:r,isStreaming:u,sessionId:h,harnessOverrides:p,setHarnessOverrides:_,sendMessage:j,resetChat:B}}function Gz(t){const a=o_(t.resourceSpans,t.resourceLogs),i=qA(a),r=ez(a);return{traceId:t.traceId,timestamp:t.timestamp,sessionId:t.sessionId,spanCount:t.spanCount,spans:a,tree:i,userPrompt:r}}function Zz(t){const a=In,[i,r]=D.useState([]),[o,u]=D.useState(null),[c,h]=D.useState(!1),[m,p]=D.useState(null),[_,y]=D.useState(null),x=D.useRef(t);x.current=t;const b=D.useCallback(async()=>{h(!0),p(null);try{const F=new URLSearchParams;x.current&&F.set("agentName",x.current);const ae=Date.now();F.set("startTime",String(ae-720*60*1e3)),F.set("endTime",String(ae));const U=await Nn(`${a}/api/traces?${F.toString()}`);if(U.status===404){y(!1),r([]);return}y(!0);const ee=await U.json();ee.success?r(ee.traces.map(Gz)):(p(ee.error),r([]))}catch(F){p(F instanceof Error?F.message:"Failed to load traces"),r([])}finally{h(!1)}},[a]),N=i.find(F=>F.traceId===o)??null,j=D.useCallback(F=>{u(ae=>ae===F?ae:F)},[]),B=D.useCallback(()=>{u(null)},[]),S=D.useCallback(()=>{b()},[b]),M=D.useCallback(()=>{setTimeout(()=>b(),1500),setTimeout(()=>b(),5e3)},[b]),z=D.useRef(t);return D.useEffect(()=>{z.current!==t&&(z.current=t,r([]),u(null),p(null)),b()},[t,b]),{invocations:i,selectedInvocation:N,isLoading:c,error:m,isAvailable:_,selectTrace:j,deselectTrace:B,refresh:S,onInvocationComplete:M}}let Uf=1;function Gy(t){if(typeof t=="string"){const a=t.match(/^data:\s*(.+)$/m);if(a)try{return JSON.parse(a[1])}catch{throw new Error(`Failed to parse SSE data: ${a[1].slice(0,200)}`)}try{return JSON.parse(t)}catch{throw new Error(`Unexpected MCP result format: ${t.slice(0,200)}`)}}if(t&&typeof t=="object")return t;throw new Error("Empty MCP result")}async function vo(t,a,i,r){const o=await Nn(`${t}/api/mcp`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentName:a,body:i,sessionId:r})});if(!o.ok){const u=await o.text();throw new Error(`MCP proxy error (${o.status}): ${u}`)}return o.json()}function $z(t,a,i,r){const[o,u]=D.useState([]),[c,h]=D.useState(!1),[m,p]=D.useState(null),_=D.useRef(void 0),y=D.useRef(null);D.useEffect(()=>{u([]),p(null),_.current=void 0,y.current=null},[a]);const x=D.useCallback(j=>{if(y.current)return y.current;const B=(async()=>{const S=await vo(t,j,{jsonrpc:"2.0",id:Uf++,method:"initialize",params:{protocolVersion:"2025-03-26",capabilities:{},clientInfo:{name:"agentcore-inspector",version:"1.0.0"}}});if(!S.success)throw new Error(S.error??"Failed to initialize MCP session");_.current=S.sessionId,await vo(t,j,{jsonrpc:"2.0",method:"notifications/initialized"},_.current)})().catch(S=>{throw y.current=null,S});return y.current=B,B},[t]),b=D.useCallback(async()=>{if(!(!a||i!=="MCP")){h(!0),p(null);try{await x(a);const j=await vo(t,a,{jsonrpc:"2.0",id:Uf++,method:"tools/list",params:{}},_.current);if(!j.success)throw new Error(j.error??"Failed to list tools");const S=Gy(j.result).result;u((S==null?void 0:S.tools)??[])}catch(j){p(j.message)}finally{h(!1)}}},[t,a,i,x]),N=D.useCallback(async(j,B)=>{if(!a)throw new Error("No agent selected");await x(a);const S=await vo(t,a,{jsonrpc:"2.0",id:Uf++,method:"tools/call",params:{name:j,arguments:B}},_.current);if(!S.success)throw new Error(S.error??"Tool call failed");const M=Gy(S.result),z=M.result,F=M.error;if(F)throw new Error(F.message);return z??{content:[{type:"text",text:JSON.stringify(M)}]}},[t,a,x]);return D.useEffect(()=>{a&&i==="MCP"&&r&&b()},[a,i,r,b]),{tools:o,isLoading:c,error:m,fetchTools:b,callTool:N}}const Yz=15e3;function Xz(t){const[a,i]=D.useState(null),[r,o]=D.useState(!1),[u,c]=D.useState(null),h=D.useRef(void 0),m=D.useCallback(async()=>{o(p=>p||a===null),c(null);try{const _=await(await Nn(`${t}/api/resources`)).json();_.success?i(_):c(_.error||"Failed to load resources")}catch(p){c(p instanceof Error?p.message:"Failed to load resources")}finally{o(!1)}},[t]);return D.useEffect(()=>(m(),h.current=setInterval(m,Yz),()=>clearInterval(h.current)),[m]),{data:a,isLoading:r,error:u,fetch:m}}function Fz(t){const[a,i]=D.useState(!1),[r,o]=D.useState(!1),[u,c]=D.useState(null),h=D.useCallback(async m=>{i(!0),o(!1),c(null);try{const _=await(await Nn(`${t}/api/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentName:m})})).json();return _.success?(o(!0),!0):(c(_.error||"Failed to start agent"),!1)}catch(p){return c(p instanceof Error?p.message:"Failed to start agent"),!1}finally{i(!1)}},[t]);return{isStarting:a,isReady:r,error:u,startAgent:h}}var Pe;(function(t){t.assertEqual=o=>{};function a(o){}t.assertIs=a;function i(o){throw new Error}t.assertNever=i,t.arrayToEnum=o=>{const u={};for(const c of o)u[c]=c;return u},t.getValidEnumValues=o=>{const u=t.objectKeys(o).filter(h=>typeof o[o[h]]!="number"),c={};for(const h of u)c[h]=o[h];return t.objectValues(c)},t.objectValues=o=>t.objectKeys(o).map(function(u){return o[u]}),t.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const u=[];for(const c in o)Object.prototype.hasOwnProperty.call(o,c)&&u.push(c);return u},t.find=(o,u)=>{for(const c of o)if(u(c))return c},t.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&Number.isFinite(o)&&Math.floor(o)===o;function r(o,u=" | "){return o.map(c=>typeof c=="string"?`'${c}'`:c).join(u)}t.joinValues=r,t.jsonStringifyReplacer=(o,u)=>typeof u=="bigint"?u.toString():u})(Pe||(Pe={}));var Zy;(function(t){t.mergeShapes=(a,i)=>({...a,...i})})(Zy||(Zy={}));const pe=Pe.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ul=t=>{switch(typeof t){case"undefined":return pe.undefined;case"string":return pe.string;case"number":return Number.isNaN(t)?pe.nan:pe.number;case"boolean":return pe.boolean;case"function":return pe.function;case"bigint":return pe.bigint;case"symbol":return pe.symbol;case"object":return Array.isArray(t)?pe.array:t===null?pe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?pe.promise:typeof Map<"u"&&t instanceof Map?pe.map:typeof Set<"u"&&t instanceof Set?pe.set:typeof Date<"u"&&t instanceof Date?pe.date:pe.object;default:return pe.unknown}},ie=Pe.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 za extends Error{get errors(){return this.issues}constructor(a){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=a}format(a){const i=a||function(u){return u.message},r={_errors:[]},o=u=>{for(const c of u.issues)if(c.code==="invalid_union")c.unionErrors.map(o);else if(c.code==="invalid_return_type")o(c.returnTypeError);else if(c.code==="invalid_arguments")o(c.argumentsError);else if(c.path.length===0)r._errors.push(i(c));else{let h=r,m=0;for(;m<c.path.length;){const p=c.path[m];m===c.path.length-1?(h[p]=h[p]||{_errors:[]},h[p]._errors.push(i(c))):h[p]=h[p]||{_errors:[]},h=h[p],m++}}};return o(this),r}static assert(a){if(!(a instanceof za))throw new Error(`Not a ZodError: ${a}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Pe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(a=i=>i.message){const i={},r=[];for(const o of this.issues)if(o.path.length>0){const u=o.path[0];i[u]=i[u]||[],i[u].push(a(o))}else r.push(a(o));return{formErrors:r,fieldErrors:i}}get formErrors(){return this.flatten()}}za.create=t=>new za(t);const Wf=(t,a)=>{let i;switch(t.code){case ie.invalid_type:t.received===pe.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case ie.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,Pe.jsonStringifyReplacer)}`;break;case ie.unrecognized_keys:i=`Unrecognized key(s) in object: ${Pe.joinValues(t.keys,", ")}`;break;case ie.invalid_union:i="Invalid input";break;case ie.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${Pe.joinValues(t.options)}`;break;case ie.invalid_enum_value:i=`Invalid enum value. Expected ${Pe.joinValues(t.options)}, received '${t.received}'`;break;case ie.invalid_arguments:i="Invalid function arguments";break;case ie.invalid_return_type:i="Invalid function return type";break;case ie.invalid_date:i="Invalid date";break;case ie.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}"`:Pe.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case ie.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 ie.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 ie.custom:i="Invalid input";break;case ie.invalid_intersection_types:i="Intersection results could not be merged";break;case ie.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case ie.not_finite:i="Number must be finite";break;default:i=a.defaultError,Pe.assertNever(t)}return{message:i}};let Qz=Wf;function Kz(){return Qz}const Jz=t=>{const{data:a,path:i,errorMaps:r,issueData:o}=t,u=[...i,...o.path||[]],c={...o,path:u};if(o.message!==void 0)return{...o,path:u,message:o.message};let h="";const m=r.filter(p=>!!p).slice().reverse();for(const p of m)h=p(c,{data:a,defaultError:h}).message;return{...o,path:u,message:h}};function me(t,a){const i=Kz(),r=Jz({issueData:a,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,i,i===Wf?void 0:Wf].filter(o=>!!o)});t.common.issues.push(r)}class nn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(a,i){const r=[];for(const o of i){if(o.status==="aborted")return je;o.status==="dirty"&&a.dirty(),r.push(o.value)}return{status:a.value,value:r}}static async mergeObjectAsync(a,i){const r=[];for(const o of i){const u=await o.key,c=await o.value;r.push({key:u,value:c})}return nn.mergeObjectSync(a,r)}static mergeObjectSync(a,i){const r={};for(const o of i){const{key:u,value:c}=o;if(u.status==="aborted"||c.status==="aborted")return je;u.status==="dirty"&&a.dirty(),c.status==="dirty"&&a.dirty(),u.value!=="__proto__"&&(typeof c.value<"u"||o.alwaysSet)&&(r[u.value]=c.value)}return{status:a.value,value:r}}}const je=Object.freeze({status:"aborted"}),Or=t=>({status:"dirty",value:t}),Vn=t=>({status:"valid",value:t}),$y=t=>t.status==="aborted",Yy=t=>t.status==="dirty",ji=t=>t.status==="valid",Ao=t=>typeof Promise<"u"&&t instanceof Promise;var Se;(function(t){t.errToObj=a=>typeof a=="string"?{message:a}:a||{},t.toString=a=>typeof a=="string"?a:a==null?void 0:a.message})(Se||(Se={}));class ra{constructor(a,i,r,o){this._cachedPath=[],this.parent=a,this.data=i,this._path=r,this._key=o}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 Xy=(t,a)=>{if(ji(a))return{success:!0,data:a.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 za(t.common.issues);return this._error=i,this._error}}};function Be(t){if(!t)return{};const{errorMap:a,invalid_type_error:i,required_error:r,description:o}=t;if(a&&(i||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return a?{errorMap:a,description:o}:{errorMap:(c,h)=>{const{message:m}=t;return c.code==="invalid_enum_value"?{message:m??h.defaultError}:typeof h.data>"u"?{message:m??r??h.defaultError}:c.code!=="invalid_type"?{message:h.defaultError}:{message:m??i??h.defaultError}},description:o}}class Xe{get description(){return this._def.description}_getType(a){return ul(a.data)}_getOrReturnCtx(a,i){return i||{common:a.parent.common,data:a.data,parsedType:ul(a.data),schemaErrorMap:this._def.errorMap,path:a.path,parent:a.parent}}_processInputParams(a){return{status:new nn,ctx:{common:a.parent.common,data:a.data,parsedType:ul(a.data),schemaErrorMap:this._def.errorMap,path:a.path,parent:a.parent}}}_parseSync(a){const i=this._parse(a);if(Ao(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(a){const i=this._parse(a);return Promise.resolve(i)}parse(a,i){const r=this.safeParse(a,i);if(r.success)return r.data;throw r.error}safeParse(a,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:a,parsedType:ul(a)},o=this._parseSync({data:a,path:r.path,parent:r});return Xy(r,o)}"~validate"(a){var r,o;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:a,parsedType:ul(a)};if(!this["~standard"].async)try{const u=this._parseSync({data:a,path:[],parent:i});return ji(u)?{value:u.value}:{issues:i.common.issues}}catch(u){(o=(r=u==null?void 0:u.message)==null?void 0:r.toLowerCase())!=null&&o.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:a,path:[],parent:i}).then(u=>ji(u)?{value:u.value}:{issues:i.common.issues})}async parseAsync(a,i){const r=await this.safeParseAsync(a,i);if(r.success)return r.data;throw r.error}async safeParseAsync(a,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:a,parsedType:ul(a)},o=this._parse({data:a,path:r.path,parent:r}),u=await(Ao(o)?o:Promise.resolve(o));return Xy(r,u)}refine(a,i){const r=o=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(o):i;return this._refinement((o,u)=>{const c=a(o),h=()=>u.addIssue({code:ie.custom,...r(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(m=>m?!0:(h(),!1)):c?!0:(h(),!1)})}refinement(a,i){return this._refinement((r,o)=>a(r)?!0:(o.addIssue(typeof i=="function"?i(r,o):i),!1))}_refinement(a){return new Bl({schema:this,typeName:Me.ZodEffects,effect:{type:"refinement",refinement:a}})}superRefine(a){return this._refinement(a)}constructor(a){this.spa=this.safeParseAsync,this._def=a,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 ja.create(this,this._def)}nullable(){return Ul.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ia.create(this)}promise(){return Do.create(this,this._def)}or(a){return jo.create([this,a],this._def)}and(a){return Mo.create(this,a,this._def)}transform(a){return new Bl({...Be(this._def),schema:this,typeName:Me.ZodEffects,effect:{type:"transform",transform:a}})}default(a){const i=typeof a=="function"?a:()=>a;return new Lo({...Be(this._def),innerType:this,defaultValue:i,typeName:Me.ZodDefault})}brand(){return new p_({typeName:Me.ZodBranded,type:this,...Be(this._def)})}catch(a){const i=typeof a=="function"?a:()=>a;return new Bo({...Be(this._def),innerType:this,catchValue:i,typeName:Me.ZodCatch})}describe(a){const i=this.constructor;return new i({...this._def,description:a})}pipe(a){return Od.create(this,a)}readonly(){return Uo.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const Pz=/^c[^\s-]{8,}$/i,Wz=/^[0-9a-z]+$/,eR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,tR=/^[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,nR=/^[a-z0-9_-]{21}$/i,aR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,lR=/^[-+]?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)?)??$/,iR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,rR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Hf;const sR=/^(?:(?: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])$/,oR=/^(?:(?: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])$/,uR=/^(([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]))$/,cR=/^(([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])$/,fR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,dR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,d_="((\\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])))",hR=new RegExp(`^${d_}$`);function h_(t){let a="[0-5]\\d";t.precision?a=`${a}\\.\\d{${t.precision}}`:t.precision==null&&(a=`${a}(\\.\\d+)?`);const i=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${a})${i}`}function mR(t){return new RegExp(`^${h_(t)}$`)}function pR(t){let a=`${d_}T${h_(t)}`;const i=[];return i.push(t.local?"Z?":"Z"),t.offset&&i.push("([+-]\\d{2}:?\\d{2})"),a=`${a}(${i.join("|")})`,new RegExp(`^${a}$`)}function gR(t,a){return!!((a==="v4"||!a)&&sR.test(t)||(a==="v6"||!a)&&uR.test(t))}function yR(t,a){if(!aR.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,"="),o=JSON.parse(atob(r));return!(typeof o!="object"||o===null||"typ"in o&&(o==null?void 0:o.typ)!=="JWT"||!o.alg||a&&o.alg!==a)}catch{return!1}}function _R(t,a){return!!((a==="v4"||!a)&&oR.test(t)||(a==="v6"||!a)&&cR.test(t))}class wa extends Xe{_parse(a){if(this._def.coerce&&(a.data=String(a.data)),this._getType(a)!==pe.string){const u=this._getOrReturnCtx(a);return me(u,{code:ie.invalid_type,expected:pe.string,received:u.parsedType}),je}const r=new nn;let o;for(const u of this._def.checks)if(u.kind==="min")a.data.length<u.value&&(o=this._getOrReturnCtx(a,o),me(o,{code:ie.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),r.dirty());else if(u.kind==="max")a.data.length>u.value&&(o=this._getOrReturnCtx(a,o),me(o,{code:ie.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),r.dirty());else if(u.kind==="length"){const c=a.data.length>u.value,h=a.data.length<u.value;(c||h)&&(o=this._getOrReturnCtx(a,o),c?me(o,{code:ie.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}):h&&me(o,{code:ie.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}),r.dirty())}else if(u.kind==="email")iR.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"email",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="emoji")Hf||(Hf=new RegExp(rR,"u")),Hf.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"emoji",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="uuid")tR.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"uuid",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="nanoid")nR.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"nanoid",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="cuid")Pz.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"cuid",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="cuid2")Wz.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"cuid2",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="ulid")eR.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"ulid",code:ie.invalid_string,message:u.message}),r.dirty());else if(u.kind==="url")try{new URL(a.data)}catch{o=this._getOrReturnCtx(a,o),me(o,{validation:"url",code:ie.invalid_string,message:u.message}),r.dirty()}else u.kind==="regex"?(u.regex.lastIndex=0,u.regex.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"regex",code:ie.invalid_string,message:u.message}),r.dirty())):u.kind==="trim"?a.data=a.data.trim():u.kind==="includes"?a.data.includes(u.value,u.position)||(o=this._getOrReturnCtx(a,o),me(o,{code:ie.invalid_string,validation:{includes:u.value,position:u.position},message:u.message}),r.dirty()):u.kind==="toLowerCase"?a.data=a.data.toLowerCase():u.kind==="toUpperCase"?a.data=a.data.toUpperCase():u.kind==="startsWith"?a.data.startsWith(u.value)||(o=this._getOrReturnCtx(a,o),me(o,{code:ie.invalid_string,validation:{startsWith:u.value},message:u.message}),r.dirty()):u.kind==="endsWith"?a.data.endsWith(u.value)||(o=this._getOrReturnCtx(a,o),me(o,{code:ie.invalid_string,validation:{endsWith:u.value},message:u.message}),r.dirty()):u.kind==="datetime"?pR(u).test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{code:ie.invalid_string,validation:"datetime",message:u.message}),r.dirty()):u.kind==="date"?hR.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{code:ie.invalid_string,validation:"date",message:u.message}),r.dirty()):u.kind==="time"?mR(u).test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{code:ie.invalid_string,validation:"time",message:u.message}),r.dirty()):u.kind==="duration"?lR.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"duration",code:ie.invalid_string,message:u.message}),r.dirty()):u.kind==="ip"?gR(a.data,u.version)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"ip",code:ie.invalid_string,message:u.message}),r.dirty()):u.kind==="jwt"?yR(a.data,u.alg)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"jwt",code:ie.invalid_string,message:u.message}),r.dirty()):u.kind==="cidr"?_R(a.data,u.version)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"cidr",code:ie.invalid_string,message:u.message}),r.dirty()):u.kind==="base64"?fR.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"base64",code:ie.invalid_string,message:u.message}),r.dirty()):u.kind==="base64url"?dR.test(a.data)||(o=this._getOrReturnCtx(a,o),me(o,{validation:"base64url",code:ie.invalid_string,message:u.message}),r.dirty()):Pe.assertNever(u);return{status:r.value,value:a.data}}_regex(a,i,r){return this.refinement(o=>a.test(o),{validation:i,code:ie.invalid_string,...Se.errToObj(r)})}_addCheck(a){return new wa({...this._def,checks:[...this._def.checks,a]})}email(a){return this._addCheck({kind:"email",...Se.errToObj(a)})}url(a){return this._addCheck({kind:"url",...Se.errToObj(a)})}emoji(a){return this._addCheck({kind:"emoji",...Se.errToObj(a)})}uuid(a){return this._addCheck({kind:"uuid",...Se.errToObj(a)})}nanoid(a){return this._addCheck({kind:"nanoid",...Se.errToObj(a)})}cuid(a){return this._addCheck({kind:"cuid",...Se.errToObj(a)})}cuid2(a){return this._addCheck({kind:"cuid2",...Se.errToObj(a)})}ulid(a){return this._addCheck({kind:"ulid",...Se.errToObj(a)})}base64(a){return this._addCheck({kind:"base64",...Se.errToObj(a)})}base64url(a){return this._addCheck({kind:"base64url",...Se.errToObj(a)})}jwt(a){return this._addCheck({kind:"jwt",...Se.errToObj(a)})}ip(a){return this._addCheck({kind:"ip",...Se.errToObj(a)})}cidr(a){return this._addCheck({kind:"cidr",...Se.errToObj(a)})}datetime(a){return typeof a=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:a}):this._addCheck({kind:"datetime",precision:typeof(a==null?void 0:a.precision)>"u"?null:a==null?void 0:a.precision,offset:(a==null?void 0:a.offset)??!1,local:(a==null?void 0:a.local)??!1,...Se.errToObj(a==null?void 0:a.message)})}date(a){return this._addCheck({kind:"date",message:a})}time(a){return typeof a=="string"?this._addCheck({kind:"time",precision:null,message:a}):this._addCheck({kind:"time",precision:typeof(a==null?void 0:a.precision)>"u"?null:a==null?void 0:a.precision,...Se.errToObj(a==null?void 0:a.message)})}duration(a){return this._addCheck({kind:"duration",...Se.errToObj(a)})}regex(a,i){return this._addCheck({kind:"regex",regex:a,...Se.errToObj(i)})}includes(a,i){return this._addCheck({kind:"includes",value:a,position:i==null?void 0:i.position,...Se.errToObj(i==null?void 0:i.message)})}startsWith(a,i){return this._addCheck({kind:"startsWith",value:a,...Se.errToObj(i)})}endsWith(a,i){return this._addCheck({kind:"endsWith",value:a,...Se.errToObj(i)})}min(a,i){return this._addCheck({kind:"min",value:a,...Se.errToObj(i)})}max(a,i){return this._addCheck({kind:"max",value:a,...Se.errToObj(i)})}length(a,i){return this._addCheck({kind:"length",value:a,...Se.errToObj(i)})}nonempty(a){return this.min(1,Se.errToObj(a))}trim(){return new wa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new wa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new wa({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(a=>a.kind==="datetime")}get isDate(){return!!this._def.checks.find(a=>a.kind==="date")}get isTime(){return!!this._def.checks.find(a=>a.kind==="time")}get isDuration(){return!!this._def.checks.find(a=>a.kind==="duration")}get isEmail(){return!!this._def.checks.find(a=>a.kind==="email")}get isURL(){return!!this._def.checks.find(a=>a.kind==="url")}get isEmoji(){return!!this._def.checks.find(a=>a.kind==="emoji")}get isUUID(){return!!this._def.checks.find(a=>a.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(a=>a.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(a=>a.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(a=>a.kind==="cuid2")}get isULID(){return!!this._def.checks.find(a=>a.kind==="ulid")}get isIP(){return!!this._def.checks.find(a=>a.kind==="ip")}get isCIDR(){return!!this._def.checks.find(a=>a.kind==="cidr")}get isBase64(){return!!this._def.checks.find(a=>a.kind==="base64")}get isBase64url(){return!!this._def.checks.find(a=>a.kind==="base64url")}get minLength(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a}get maxLength(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a}}wa.create=t=>new wa({checks:[],typeName:Me.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...Be(t)});function vR(t,a){const i=(t.toString().split(".")[1]||"").length,r=(a.toString().split(".")[1]||"").length,o=i>r?i:r,u=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(a.toFixed(o).replace(".",""));return u%c/10**o}class Mi extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(a){if(this._def.coerce&&(a.data=Number(a.data)),this._getType(a)!==pe.number){const u=this._getOrReturnCtx(a);return me(u,{code:ie.invalid_type,expected:pe.number,received:u.parsedType}),je}let r;const o=new nn;for(const u of this._def.checks)u.kind==="int"?Pe.isInteger(a.data)||(r=this._getOrReturnCtx(a,r),me(r,{code:ie.invalid_type,expected:"integer",received:"float",message:u.message}),o.dirty()):u.kind==="min"?(u.inclusive?a.data<u.value:a.data<=u.value)&&(r=this._getOrReturnCtx(a,r),me(r,{code:ie.too_small,minimum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),o.dirty()):u.kind==="max"?(u.inclusive?a.data>u.value:a.data>=u.value)&&(r=this._getOrReturnCtx(a,r),me(r,{code:ie.too_big,maximum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),o.dirty()):u.kind==="multipleOf"?vR(a.data,u.value)!==0&&(r=this._getOrReturnCtx(a,r),me(r,{code:ie.not_multiple_of,multipleOf:u.value,message:u.message}),o.dirty()):u.kind==="finite"?Number.isFinite(a.data)||(r=this._getOrReturnCtx(a,r),me(r,{code:ie.not_finite,message:u.message}),o.dirty()):Pe.assertNever(u);return{status:o.value,value:a.data}}gte(a,i){return this.setLimit("min",a,!0,Se.toString(i))}gt(a,i){return this.setLimit("min",a,!1,Se.toString(i))}lte(a,i){return this.setLimit("max",a,!0,Se.toString(i))}lt(a,i){return this.setLimit("max",a,!1,Se.toString(i))}setLimit(a,i,r,o){return new Mi({...this._def,checks:[...this._def.checks,{kind:a,value:i,inclusive:r,message:Se.toString(o)}]})}_addCheck(a){return new Mi({...this._def,checks:[...this._def.checks,a]})}int(a){return this._addCheck({kind:"int",message:Se.toString(a)})}positive(a){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Se.toString(a)})}negative(a){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Se.toString(a)})}nonpositive(a){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Se.toString(a)})}nonnegative(a){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Se.toString(a)})}multipleOf(a,i){return this._addCheck({kind:"multipleOf",value:a,message:Se.toString(i)})}finite(a){return this._addCheck({kind:"finite",message:Se.toString(a)})}safe(a){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Se.toString(a)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Se.toString(a)})}get minValue(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a}get maxValue(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a}get isInt(){return!!this._def.checks.find(a=>a.kind==="int"||a.kind==="multipleOf"&&Pe.isInteger(a.value))}get isFinite(){let a=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"&&(a===null||r.value<a)&&(a=r.value)}return Number.isFinite(i)&&Number.isFinite(a)}}Mi.create=t=>new Mi({checks:[],typeName:Me.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});class qr extends Xe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(a){if(this._def.coerce)try{a.data=BigInt(a.data)}catch{return this._getInvalidInput(a)}if(this._getType(a)!==pe.bigint)return this._getInvalidInput(a);let r;const o=new nn;for(const u of this._def.checks)u.kind==="min"?(u.inclusive?a.data<u.value:a.data<=u.value)&&(r=this._getOrReturnCtx(a,r),me(r,{code:ie.too_small,type:"bigint",minimum:u.value,inclusive:u.inclusive,message:u.message}),o.dirty()):u.kind==="max"?(u.inclusive?a.data>u.value:a.data>=u.value)&&(r=this._getOrReturnCtx(a,r),me(r,{code:ie.too_big,type:"bigint",maximum:u.value,inclusive:u.inclusive,message:u.message}),o.dirty()):u.kind==="multipleOf"?a.data%u.value!==BigInt(0)&&(r=this._getOrReturnCtx(a,r),me(r,{code:ie.not_multiple_of,multipleOf:u.value,message:u.message}),o.dirty()):Pe.assertNever(u);return{status:o.value,value:a.data}}_getInvalidInput(a){const i=this._getOrReturnCtx(a);return me(i,{code:ie.invalid_type,expected:pe.bigint,received:i.parsedType}),je}gte(a,i){return this.setLimit("min",a,!0,Se.toString(i))}gt(a,i){return this.setLimit("min",a,!1,Se.toString(i))}lte(a,i){return this.setLimit("max",a,!0,Se.toString(i))}lt(a,i){return this.setLimit("max",a,!1,Se.toString(i))}setLimit(a,i,r,o){return new qr({...this._def,checks:[...this._def.checks,{kind:a,value:i,inclusive:r,message:Se.toString(o)}]})}_addCheck(a){return new qr({...this._def,checks:[...this._def.checks,a]})}positive(a){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Se.toString(a)})}negative(a){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Se.toString(a)})}nonpositive(a){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Se.toString(a)})}nonnegative(a){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Se.toString(a)})}multipleOf(a,i){return this._addCheck({kind:"multipleOf",value:a,message:Se.toString(i)})}get minValue(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a}get maxValue(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a}}qr.create=t=>new qr({checks:[],typeName:Me.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...Be(t)});class ed extends Xe{_parse(a){if(this._def.coerce&&(a.data=!!a.data),this._getType(a)!==pe.boolean){const r=this._getOrReturnCtx(a);return me(r,{code:ie.invalid_type,expected:pe.boolean,received:r.parsedType}),je}return Vn(a.data)}}ed.create=t=>new ed({typeName:Me.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});class wo extends Xe{_parse(a){if(this._def.coerce&&(a.data=new Date(a.data)),this._getType(a)!==pe.date){const u=this._getOrReturnCtx(a);return me(u,{code:ie.invalid_type,expected:pe.date,received:u.parsedType}),je}if(Number.isNaN(a.data.getTime())){const u=this._getOrReturnCtx(a);return me(u,{code:ie.invalid_date}),je}const r=new nn;let o;for(const u of this._def.checks)u.kind==="min"?a.data.getTime()<u.value&&(o=this._getOrReturnCtx(a,o),me(o,{code:ie.too_small,message:u.message,inclusive:!0,exact:!1,minimum:u.value,type:"date"}),r.dirty()):u.kind==="max"?a.data.getTime()>u.value&&(o=this._getOrReturnCtx(a,o),me(o,{code:ie.too_big,message:u.message,inclusive:!0,exact:!1,maximum:u.value,type:"date"}),r.dirty()):Pe.assertNever(u);return{status:r.value,value:new Date(a.data.getTime())}}_addCheck(a){return new wo({...this._def,checks:[...this._def.checks,a]})}min(a,i){return this._addCheck({kind:"min",value:a.getTime(),message:Se.toString(i)})}max(a,i){return this._addCheck({kind:"max",value:a.getTime(),message:Se.toString(i)})}get minDate(){let a=null;for(const i of this._def.checks)i.kind==="min"&&(a===null||i.value>a)&&(a=i.value);return a!=null?new Date(a):null}get maxDate(){let a=null;for(const i of this._def.checks)i.kind==="max"&&(a===null||i.value<a)&&(a=i.value);return a!=null?new Date(a):null}}wo.create=t=>new wo({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Me.ZodDate,...Be(t)});class Fy extends Xe{_parse(a){if(this._getType(a)!==pe.symbol){const r=this._getOrReturnCtx(a);return me(r,{code:ie.invalid_type,expected:pe.symbol,received:r.parsedType}),je}return Vn(a.data)}}Fy.create=t=>new Fy({typeName:Me.ZodSymbol,...Be(t)});class td extends Xe{_parse(a){if(this._getType(a)!==pe.undefined){const r=this._getOrReturnCtx(a);return me(r,{code:ie.invalid_type,expected:pe.undefined,received:r.parsedType}),je}return Vn(a.data)}}td.create=t=>new td({typeName:Me.ZodUndefined,...Be(t)});class nd extends Xe{_parse(a){if(this._getType(a)!==pe.null){const r=this._getOrReturnCtx(a);return me(r,{code:ie.invalid_type,expected:pe.null,received:r.parsedType}),je}return Vn(a.data)}}nd.create=t=>new nd({typeName:Me.ZodNull,...Be(t)});class ad extends Xe{constructor(){super(...arguments),this._any=!0}_parse(a){return Vn(a.data)}}ad.create=t=>new ad({typeName:Me.ZodAny,...Be(t)});class ld extends Xe{constructor(){super(...arguments),this._unknown=!0}_parse(a){return Vn(a.data)}}ld.create=t=>new ld({typeName:Me.ZodUnknown,...Be(t)});class fl extends Xe{_parse(a){const i=this._getOrReturnCtx(a);return me(i,{code:ie.invalid_type,expected:pe.never,received:i.parsedType}),je}}fl.create=t=>new fl({typeName:Me.ZodNever,...Be(t)});class Qy extends Xe{_parse(a){if(this._getType(a)!==pe.undefined){const r=this._getOrReturnCtx(a);return me(r,{code:ie.invalid_type,expected:pe.void,received:r.parsedType}),je}return Vn(a.data)}}Qy.create=t=>new Qy({typeName:Me.ZodVoid,...Be(t)});class ia extends Xe{_parse(a){const{ctx:i,status:r}=this._processInputParams(a),o=this._def;if(i.parsedType!==pe.array)return me(i,{code:ie.invalid_type,expected:pe.array,received:i.parsedType}),je;if(o.exactLength!==null){const c=i.data.length>o.exactLength.value,h=i.data.length<o.exactLength.value;(c||h)&&(me(i,{code:c?ie.too_big:ie.too_small,minimum:h?o.exactLength.value:void 0,maximum:c?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),r.dirty())}if(o.minLength!==null&&i.data.length<o.minLength.value&&(me(i,{code:ie.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&i.data.length>o.maxLength.value&&(me(i,{code:ie.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),i.common.async)return Promise.all([...i.data].map((c,h)=>o.type._parseAsync(new ra(i,c,i.path,h)))).then(c=>nn.mergeArray(r,c));const u=[...i.data].map((c,h)=>o.type._parseSync(new ra(i,c,i.path,h)));return nn.mergeArray(r,u)}get element(){return this._def.type}min(a,i){return new ia({...this._def,minLength:{value:a,message:Se.toString(i)}})}max(a,i){return new ia({...this._def,maxLength:{value:a,message:Se.toString(i)}})}length(a,i){return new ia({...this._def,exactLength:{value:a,message:Se.toString(i)}})}nonempty(a){return this.min(1,a)}}ia.create=(t,a)=>new ia({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Me.ZodArray,...Be(a)});function Ci(t){if(t instanceof Rt){const a={};for(const i in t.shape){const r=t.shape[i];a[i]=ja.create(Ci(r))}return new Rt({...t._def,shape:()=>a})}else return t instanceof ia?new ia({...t._def,type:Ci(t.element)}):t instanceof ja?ja.create(Ci(t.unwrap())):t instanceof Ul?Ul.create(Ci(t.unwrap())):t instanceof Dl?Dl.create(t.items.map(a=>Ci(a))):t}class Rt extends Xe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const a=this._def.shape(),i=Pe.objectKeys(a);return this._cached={shape:a,keys:i},this._cached}_parse(a){if(this._getType(a)!==pe.object){const p=this._getOrReturnCtx(a);return me(p,{code:ie.invalid_type,expected:pe.object,received:p.parsedType}),je}const{status:r,ctx:o}=this._processInputParams(a),{shape:u,keys:c}=this._getCached(),h=[];if(!(this._def.catchall instanceof fl&&this._def.unknownKeys==="strip"))for(const p in o.data)c.includes(p)||h.push(p);const m=[];for(const p of c){const _=u[p],y=o.data[p];m.push({key:{status:"valid",value:p},value:_._parse(new ra(o,y,o.path,p)),alwaysSet:p in o.data})}if(this._def.catchall instanceof fl){const p=this._def.unknownKeys;if(p==="passthrough")for(const _ of h)m.push({key:{status:"valid",value:_},value:{status:"valid",value:o.data[_]}});else if(p==="strict")h.length>0&&(me(o,{code:ie.unrecognized_keys,keys:h}),r.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const _ of h){const y=o.data[_];m.push({key:{status:"valid",value:_},value:p._parse(new ra(o,y,o.path,_)),alwaysSet:_ in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const p=[];for(const _ of m){const y=await _.key,x=await _.value;p.push({key:y,value:x,alwaysSet:_.alwaysSet})}return p}).then(p=>nn.mergeObjectSync(r,p)):nn.mergeObjectSync(r,m)}get shape(){return this._def.shape()}strict(a){return Se.errToObj,new Rt({...this._def,unknownKeys:"strict",...a!==void 0?{errorMap:(i,r)=>{var u,c;const o=((c=(u=this._def).errorMap)==null?void 0:c.call(u,i,r).message)??r.defaultError;return i.code==="unrecognized_keys"?{message:Se.errToObj(a).message??o}:{message:o}}}:{}})}strip(){return new Rt({...this._def,unknownKeys:"strip"})}passthrough(){return new Rt({...this._def,unknownKeys:"passthrough"})}extend(a){return new Rt({...this._def,shape:()=>({...this._def.shape(),...a})})}merge(a){return new Rt({unknownKeys:a._def.unknownKeys,catchall:a._def.catchall,shape:()=>({...this._def.shape(),...a._def.shape()}),typeName:Me.ZodObject})}setKey(a,i){return this.augment({[a]:i})}catchall(a){return new Rt({...this._def,catchall:a})}pick(a){const i={};for(const r of Pe.objectKeys(a))a[r]&&this.shape[r]&&(i[r]=this.shape[r]);return new Rt({...this._def,shape:()=>i})}omit(a){const i={};for(const r of Pe.objectKeys(this.shape))a[r]||(i[r]=this.shape[r]);return new Rt({...this._def,shape:()=>i})}deepPartial(){return Ci(this)}partial(a){const i={};for(const r of Pe.objectKeys(this.shape)){const o=this.shape[r];a&&!a[r]?i[r]=o:i[r]=o.optional()}return new Rt({...this._def,shape:()=>i})}required(a){const i={};for(const r of Pe.objectKeys(this.shape))if(a&&!a[r])i[r]=this.shape[r];else{let u=this.shape[r];for(;u instanceof ja;)u=u._def.innerType;i[r]=u}return new Rt({...this._def,shape:()=>i})}keyof(){return m_(Pe.objectKeys(this.shape))}}Rt.create=(t,a)=>new Rt({shape:()=>t,unknownKeys:"strip",catchall:fl.create(),typeName:Me.ZodObject,...Be(a)});Rt.strictCreate=(t,a)=>new Rt({shape:()=>t,unknownKeys:"strict",catchall:fl.create(),typeName:Me.ZodObject,...Be(a)});Rt.lazycreate=(t,a)=>new Rt({shape:t,unknownKeys:"strip",catchall:fl.create(),typeName:Me.ZodObject,...Be(a)});class jo extends Xe{_parse(a){const{ctx:i}=this._processInputParams(a),r=this._def.options;function o(u){for(const h of u)if(h.result.status==="valid")return h.result;for(const h of u)if(h.result.status==="dirty")return i.common.issues.push(...h.ctx.common.issues),h.result;const c=u.map(h=>new za(h.ctx.common.issues));return me(i,{code:ie.invalid_union,unionErrors:c}),je}if(i.common.async)return Promise.all(r.map(async u=>{const c={...i,common:{...i.common,issues:[]},parent:null};return{result:await u._parseAsync({data:i.data,path:i.path,parent:c}),ctx:c}})).then(o);{let u;const c=[];for(const m of r){const p={...i,common:{...i.common,issues:[]},parent:null},_=m._parseSync({data:i.data,path:i.path,parent:p});if(_.status==="valid")return _;_.status==="dirty"&&!u&&(u={result:_,ctx:p}),p.common.issues.length&&c.push(p.common.issues)}if(u)return i.common.issues.push(...u.ctx.common.issues),u.result;const h=c.map(m=>new za(m));return me(i,{code:ie.invalid_union,unionErrors:h}),je}}get options(){return this._def.options}}jo.create=(t,a)=>new jo({options:t,typeName:Me.ZodUnion,...Be(a)});const Aa=t=>t instanceof rd?Aa(t.schema):t instanceof Bl?Aa(t.innerType()):t instanceof Ro?[t.value]:t instanceof Ll?t.options:t instanceof Oo?Pe.objectValues(t.enum):t instanceof Lo?Aa(t._def.innerType):t instanceof td?[void 0]:t instanceof nd?[null]:t instanceof ja?[void 0,...Aa(t.unwrap())]:t instanceof Ul?[null,...Aa(t.unwrap())]:t instanceof p_||t instanceof Uo?Aa(t.unwrap()):t instanceof Bo?Aa(t._def.innerType):[];class Rd extends Xe{_parse(a){const{ctx:i}=this._processInputParams(a);if(i.parsedType!==pe.object)return me(i,{code:ie.invalid_type,expected:pe.object,received:i.parsedType}),je;const r=this.discriminator,o=i.data[r],u=this.optionsMap.get(o);return u?i.common.async?u._parseAsync({data:i.data,path:i.path,parent:i}):u._parseSync({data:i.data,path:i.path,parent:i}):(me(i,{code:ie.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),je)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(a,i,r){const o=new Map;for(const u of i){const c=Aa(u.shape[a]);if(!c.length)throw new Error(`A discriminator value for key \`${a}\` could not be extracted from all schema options`);for(const h of c){if(o.has(h))throw new Error(`Discriminator property ${String(a)} has duplicate value ${String(h)}`);o.set(h,u)}}return new Rd({typeName:Me.ZodDiscriminatedUnion,discriminator:a,options:i,optionsMap:o,...Be(r)})}}function id(t,a){const i=ul(t),r=ul(a);if(t===a)return{valid:!0,data:t};if(i===pe.object&&r===pe.object){const o=Pe.objectKeys(a),u=Pe.objectKeys(t).filter(h=>o.indexOf(h)!==-1),c={...t,...a};for(const h of u){const m=id(t[h],a[h]);if(!m.valid)return{valid:!1};c[h]=m.data}return{valid:!0,data:c}}else if(i===pe.array&&r===pe.array){if(t.length!==a.length)return{valid:!1};const o=[];for(let u=0;u<t.length;u++){const c=t[u],h=a[u],m=id(c,h);if(!m.valid)return{valid:!1};o.push(m.data)}return{valid:!0,data:o}}else return i===pe.date&&r===pe.date&&+t==+a?{valid:!0,data:t}:{valid:!1}}class Mo extends Xe{_parse(a){const{status:i,ctx:r}=this._processInputParams(a),o=(u,c)=>{if($y(u)||$y(c))return je;const h=id(u.value,c.value);return h.valid?((Yy(u)||Yy(c))&&i.dirty(),{status:i.value,value:h.data}):(me(r,{code:ie.invalid_intersection_types}),je)};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(([u,c])=>o(u,c)):o(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Mo.create=(t,a,i)=>new Mo({left:t,right:a,typeName:Me.ZodIntersection,...Be(i)});class Dl extends Xe{_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.parsedType!==pe.array)return me(r,{code:ie.invalid_type,expected:pe.array,received:r.parsedType}),je;if(r.data.length<this._def.items.length)return me(r,{code:ie.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),je;!this._def.rest&&r.data.length>this._def.items.length&&(me(r,{code:ie.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const u=[...r.data].map((c,h)=>{const m=this._def.items[h]||this._def.rest;return m?m._parse(new ra(r,c,r.path,h)):null}).filter(c=>!!c);return r.common.async?Promise.all(u).then(c=>nn.mergeArray(i,c)):nn.mergeArray(i,u)}get items(){return this._def.items}rest(a){return new Dl({...this._def,rest:a})}}Dl.create=(t,a)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Dl({items:t,typeName:Me.ZodTuple,rest:null,...Be(a)})};class zo extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.parsedType!==pe.object)return me(r,{code:ie.invalid_type,expected:pe.object,received:r.parsedType}),je;const o=[],u=this._def.keyType,c=this._def.valueType;for(const h in r.data)o.push({key:u._parse(new ra(r,h,r.path,h)),value:c._parse(new ra(r,r.data[h],r.path,h)),alwaysSet:h in r.data});return r.common.async?nn.mergeObjectAsync(i,o):nn.mergeObjectSync(i,o)}get element(){return this._def.valueType}static create(a,i,r){return i instanceof Xe?new zo({keyType:a,valueType:i,typeName:Me.ZodRecord,...Be(r)}):new zo({keyType:wa.create(),valueType:a,typeName:Me.ZodRecord,...Be(i)})}}class Ky extends Xe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.parsedType!==pe.map)return me(r,{code:ie.invalid_type,expected:pe.map,received:r.parsedType}),je;const o=this._def.keyType,u=this._def.valueType,c=[...r.data.entries()].map(([h,m],p)=>({key:o._parse(new ra(r,h,r.path,[p,"key"])),value:u._parse(new ra(r,m,r.path,[p,"value"]))}));if(r.common.async){const h=new Map;return Promise.resolve().then(async()=>{for(const m of c){const p=await m.key,_=await m.value;if(p.status==="aborted"||_.status==="aborted")return je;(p.status==="dirty"||_.status==="dirty")&&i.dirty(),h.set(p.value,_.value)}return{status:i.value,value:h}})}else{const h=new Map;for(const m of c){const p=m.key,_=m.value;if(p.status==="aborted"||_.status==="aborted")return je;(p.status==="dirty"||_.status==="dirty")&&i.dirty(),h.set(p.value,_.value)}return{status:i.value,value:h}}}}Ky.create=(t,a,i)=>new Ky({valueType:a,keyType:t,typeName:Me.ZodMap,...Be(i)});class Vr extends Xe{_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.parsedType!==pe.set)return me(r,{code:ie.invalid_type,expected:pe.set,received:r.parsedType}),je;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(me(r,{code:ie.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),i.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(me(r,{code:ie.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),i.dirty());const u=this._def.valueType;function c(m){const p=new Set;for(const _ of m){if(_.status==="aborted")return je;_.status==="dirty"&&i.dirty(),p.add(_.value)}return{status:i.value,value:p}}const h=[...r.data.values()].map((m,p)=>u._parse(new ra(r,m,r.path,p)));return r.common.async?Promise.all(h).then(m=>c(m)):c(h)}min(a,i){return new Vr({...this._def,minSize:{value:a,message:Se.toString(i)}})}max(a,i){return new Vr({...this._def,maxSize:{value:a,message:Se.toString(i)}})}size(a,i){return this.min(a,i).max(a,i)}nonempty(a){return this.min(1,a)}}Vr.create=(t,a)=>new Vr({valueType:t,minSize:null,maxSize:null,typeName:Me.ZodSet,...Be(a)});class rd extends Xe{get schema(){return this._def.getter()}_parse(a){const{ctx:i}=this._processInputParams(a);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}rd.create=(t,a)=>new rd({getter:t,typeName:Me.ZodLazy,...Be(a)});class Ro extends Xe{_parse(a){if(a.data!==this._def.value){const i=this._getOrReturnCtx(a);return me(i,{received:i.data,code:ie.invalid_literal,expected:this._def.value}),je}return{status:"valid",value:a.data}}get value(){return this._def.value}}Ro.create=(t,a)=>new Ro({value:t,typeName:Me.ZodLiteral,...Be(a)});function m_(t,a){return new Ll({values:t,typeName:Me.ZodEnum,...Be(a)})}class Ll extends Xe{_parse(a){if(typeof a.data!="string"){const i=this._getOrReturnCtx(a),r=this._def.values;return me(i,{expected:Pe.joinValues(r),received:i.parsedType,code:ie.invalid_type}),je}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(a.data)){const i=this._getOrReturnCtx(a),r=this._def.values;return me(i,{received:i.data,code:ie.invalid_enum_value,options:r}),je}return Vn(a.data)}get options(){return this._def.values}get enum(){const a={};for(const i of this._def.values)a[i]=i;return a}get Values(){const a={};for(const i of this._def.values)a[i]=i;return a}get Enum(){const a={};for(const i of this._def.values)a[i]=i;return a}extract(a,i=this._def){return Ll.create(a,{...this._def,...i})}exclude(a,i=this._def){return Ll.create(this.options.filter(r=>!a.includes(r)),{...this._def,...i})}}Ll.create=m_;class Oo extends Xe{_parse(a){const i=Pe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(a);if(r.parsedType!==pe.string&&r.parsedType!==pe.number){const o=Pe.objectValues(i);return me(r,{expected:Pe.joinValues(o),received:r.parsedType,code:ie.invalid_type}),je}if(this._cache||(this._cache=new Set(Pe.getValidEnumValues(this._def.values))),!this._cache.has(a.data)){const o=Pe.objectValues(i);return me(r,{received:r.data,code:ie.invalid_enum_value,options:o}),je}return Vn(a.data)}get enum(){return this._def.values}}Oo.create=(t,a)=>new Oo({values:t,typeName:Me.ZodNativeEnum,...Be(a)});class Do extends Xe{unwrap(){return this._def.type}_parse(a){const{ctx:i}=this._processInputParams(a);if(i.parsedType!==pe.promise&&i.common.async===!1)return me(i,{code:ie.invalid_type,expected:pe.promise,received:i.parsedType}),je;const r=i.parsedType===pe.promise?i.data:Promise.resolve(i.data);return Vn(r.then(o=>this._def.type.parseAsync(o,{path:i.path,errorMap:i.common.contextualErrorMap})))}}Do.create=(t,a)=>new Do({type:t,typeName:Me.ZodPromise,...Be(a)});class Bl extends Xe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Me.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(a){const{status:i,ctx:r}=this._processInputParams(a),o=this._def.effect||null,u={addIssue:c=>{me(r,c),c.fatal?i.abort():i.dirty()},get path(){return r.path}};if(u.addIssue=u.addIssue.bind(u),o.type==="preprocess"){const c=o.transform(r.data,u);if(r.common.async)return Promise.resolve(c).then(async h=>{if(i.value==="aborted")return je;const m=await this._def.schema._parseAsync({data:h,path:r.path,parent:r});return m.status==="aborted"?je:m.status==="dirty"||i.value==="dirty"?Or(m.value):m});{if(i.value==="aborted")return je;const h=this._def.schema._parseSync({data:c,path:r.path,parent:r});return h.status==="aborted"?je:h.status==="dirty"||i.value==="dirty"?Or(h.value):h}}if(o.type==="refinement"){const c=h=>{const m=o.refinement(h,u);if(r.common.async)return Promise.resolve(m);if(m 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"?je:(h.status==="dirty"&&i.dirty(),c(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"?je:(h.status==="dirty"&&i.dirty(),c(h.value).then(()=>({status:i.value,value:h.value}))))}if(o.type==="transform")if(r.common.async===!1){const c=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ji(c))return je;const h=o.transform(c.value,u);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(c=>ji(c)?Promise.resolve(o.transform(c.value,u)).then(h=>({status:i.value,value:h})):je);Pe.assertNever(o)}}Bl.create=(t,a,i)=>new Bl({schema:t,typeName:Me.ZodEffects,effect:a,...Be(i)});Bl.createWithPreprocess=(t,a,i)=>new Bl({schema:a,effect:{type:"preprocess",transform:t},typeName:Me.ZodEffects,...Be(i)});class ja extends Xe{_parse(a){return this._getType(a)===pe.undefined?Vn(void 0):this._def.innerType._parse(a)}unwrap(){return this._def.innerType}}ja.create=(t,a)=>new ja({innerType:t,typeName:Me.ZodOptional,...Be(a)});class Ul extends Xe{_parse(a){return this._getType(a)===pe.null?Vn(null):this._def.innerType._parse(a)}unwrap(){return this._def.innerType}}Ul.create=(t,a)=>new Ul({innerType:t,typeName:Me.ZodNullable,...Be(a)});class Lo extends Xe{_parse(a){const{ctx:i}=this._processInputParams(a);let r=i.data;return i.parsedType===pe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}Lo.create=(t,a)=>new Lo({innerType:t,typeName:Me.ZodDefault,defaultValue:typeof a.default=="function"?a.default:()=>a.default,...Be(a)});class Bo extends Xe{_parse(a){const{ctx:i}=this._processInputParams(a),r={...i,common:{...i.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ao(o)?o.then(u=>({status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new za(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new za(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Bo.create=(t,a)=>new Bo({innerType:t,typeName:Me.ZodCatch,catchValue:typeof a.catch=="function"?a.catch:()=>a.catch,...Be(a)});class Jy extends Xe{_parse(a){if(this._getType(a)!==pe.nan){const r=this._getOrReturnCtx(a);return me(r,{code:ie.invalid_type,expected:pe.nan,received:r.parsedType}),je}return{status:"valid",value:a.data}}}Jy.create=t=>new Jy({typeName:Me.ZodNaN,...Be(t)});class p_ extends Xe{_parse(a){const{ctx:i}=this._processInputParams(a),r=i.data;return this._def.type._parse({data:r,path:i.path,parent:i})}unwrap(){return this._def.type}}class Od extends Xe{_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.common.async)return(async()=>{const u=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return u.status==="aborted"?je:u.status==="dirty"?(i.dirty(),Or(u.value)):this._def.out._parseAsync({data:u.value,path:r.path,parent:r})})();{const o=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?je:o.status==="dirty"?(i.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(a,i){return new Od({in:a,out:i,typeName:Me.ZodPipeline})}}class Uo extends Xe{_parse(a){const i=this._def.innerType._parse(a),r=o=>(ji(o)&&(o.value=Object.freeze(o.value)),o);return Ao(i)?i.then(o=>r(o)):r(i)}unwrap(){return this._def.innerType}}Uo.create=(t,a)=>new Uo({innerType:t,typeName:Me.ZodReadonly,...Be(a)});var Me;(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"})(Me||(Me={}));const le=wa.create,sd=Mi.create,We=ed.create,En=ad.create,Oi=ld.create;fl.create;const Jn=ia.create,nt=Rt.create,Xo=jo.create,Fo=Rd.create;Mo.create;Dl.create;const Xr=zo.create,ve=Ro.create;Ll.create;const xR=Oo.create;Do.create;ja.create;Ul.create;const bR=nt({name:le(),arguments:le()}),SR=nt({id:le(),type:ve("function"),function:bR,encryptedValue:le().optional()}),Qo=nt({id:le(),role:le(),content:le().optional(),name:le().optional(),encryptedValue:le().optional()}),kR=nt({type:ve("text"),text:le()}),TR=nt({type:ve("data"),value:le(),mimeType:le()}),NR=nt({type:ve("url"),value:le(),mimeType:le().optional()}),Ko=Fo("type",[TR,NR]),ER=nt({type:ve("image"),source:Ko,metadata:Oi().optional()}),CR=nt({type:ve("audio"),source:Ko,metadata:Oi().optional()}),AR=nt({type:ve("video"),source:Ko,metadata:Oi().optional()}),wR=nt({type:ve("document"),source:Ko,metadata:Oi().optional()}),g_=nt({type:ve("binary"),mimeType:le(),id:le().optional(),url:le().optional(),data:le().optional(),filename:le().optional()}),y_=(t,a)=>{!t.id&&!t.url&&!t.data&&a.addIssue({code:ie.custom,message:"BinaryInputContent requires at least one of id, url, or data.",path:["id"]})};g_.superRefine((t,a)=>{y_(t,a)});const jR=Fo("type",[kR,ER,CR,AR,wR,g_]),MR=jR.superRefine((t,a)=>{t.type==="binary"&&y_(t,a)}),zR=Qo.extend({role:ve("developer"),content:le()}),RR=Qo.extend({role:ve("system"),content:le()}),OR=Qo.extend({role:ve("assistant"),content:le().optional(),toolCalls:Jn(SR).optional()}),DR=Qo.extend({role:ve("user"),content:Xo([le(),Jn(MR)])}),LR=nt({id:le(),content:le(),role:ve("tool"),toolCallId:le(),error:le().optional(),encryptedValue:le().optional()}),BR=nt({id:le(),role:ve("activity"),activityType:le(),content:Xr(En())}),UR=nt({id:le(),role:ve("reasoning"),content:le(),encryptedValue:le().optional()}),__=Fo("role",[zR,RR,OR,DR,LR,BR,UR]);Xo([ve("developer"),ve("system"),ve("assistant"),ve("user"),ve("tool"),ve("activity"),ve("reasoning")]);const HR=nt({description:le(),value:le()}),v_=nt({name:le(),description:le(),parameters:En(),metadata:Xr(En()).optional()}),IR=nt({threadId:le(),runId:le(),parentRunId:le().optional(),state:En(),messages:Jn(__),tools:Jn(v_),context:Jn(HR),forwardedProps:En()}),qR=En(),VR=nt({name:le(),description:le().optional()}),GR=nt({name:le().optional(),type:le().optional(),description:le().optional(),version:le().optional(),provider:le().optional(),documentationUrl:le().optional(),metadata:Xr(Oi()).optional()}),ZR=nt({streaming:We().optional(),websocket:We().optional(),httpBinary:We().optional(),pushNotifications:We().optional(),resumable:We().optional()}),$R=nt({supported:We().optional(),items:Jn(v_).optional(),parallelCalls:We().optional(),clientProvided:We().optional()}),YR=nt({structuredOutput:We().optional(),supportedMimeTypes:Jn(le()).optional()}),XR=nt({snapshots:We().optional(),deltas:We().optional(),memory:We().optional(),persistentState:We().optional()}),FR=nt({supported:We().optional(),delegation:We().optional(),handoffs:We().optional(),subAgents:Jn(VR).optional()}),QR=nt({supported:We().optional(),streaming:We().optional(),encrypted:We().optional()}),KR=nt({image:We().optional(),audio:We().optional(),video:We().optional(),pdf:We().optional(),file:We().optional()}),JR=nt({image:We().optional(),audio:We().optional()}),PR=nt({input:KR.optional(),output:JR.optional()}),WR=nt({codeExecution:We().optional(),sandboxed:We().optional(),maxIterations:sd().optional(),maxExecutionTime:sd().optional()}),eO=nt({supported:We().optional(),approvals:We().optional(),interventions:We().optional(),feedback:We().optional()});nt({identity:GR.optional(),transport:ZR.optional(),tools:$R.optional(),output:YR.optional(),state:XR.optional(),multiAgent:FR.optional(),reasoning:QR.optional(),multimodal:PR.optional(),execution:WR.optional(),humanInTheLoop:eO.optional(),custom:Xr(Oi()).optional()});const x_=Xo([ve("developer"),ve("system"),ve("assistant"),ve("user")]);let Ve=(function(t){return t.TEXT_MESSAGE_START="TEXT_MESSAGE_START",t.TEXT_MESSAGE_CONTENT="TEXT_MESSAGE_CONTENT",t.TEXT_MESSAGE_END="TEXT_MESSAGE_END",t.TEXT_MESSAGE_CHUNK="TEXT_MESSAGE_CHUNK",t.TOOL_CALL_START="TOOL_CALL_START",t.TOOL_CALL_ARGS="TOOL_CALL_ARGS",t.TOOL_CALL_END="TOOL_CALL_END",t.TOOL_CALL_CHUNK="TOOL_CALL_CHUNK",t.TOOL_CALL_RESULT="TOOL_CALL_RESULT",t.THINKING_START="THINKING_START",t.THINKING_END="THINKING_END",t.THINKING_TEXT_MESSAGE_START="THINKING_TEXT_MESSAGE_START",t.THINKING_TEXT_MESSAGE_CONTENT="THINKING_TEXT_MESSAGE_CONTENT",t.THINKING_TEXT_MESSAGE_END="THINKING_TEXT_MESSAGE_END",t.STATE_SNAPSHOT="STATE_SNAPSHOT",t.STATE_DELTA="STATE_DELTA",t.MESSAGES_SNAPSHOT="MESSAGES_SNAPSHOT",t.ACTIVITY_SNAPSHOT="ACTIVITY_SNAPSHOT",t.ACTIVITY_DELTA="ACTIVITY_DELTA",t.RAW="RAW",t.CUSTOM="CUSTOM",t.RUN_STARTED="RUN_STARTED",t.RUN_FINISHED="RUN_FINISHED",t.RUN_ERROR="RUN_ERROR",t.STEP_STARTED="STEP_STARTED",t.STEP_FINISHED="STEP_FINISHED",t.REASONING_START="REASONING_START",t.REASONING_MESSAGE_START="REASONING_MESSAGE_START",t.REASONING_MESSAGE_CONTENT="REASONING_MESSAGE_CONTENT",t.REASONING_MESSAGE_END="REASONING_MESSAGE_END",t.REASONING_MESSAGE_CHUNK="REASONING_MESSAGE_CHUNK",t.REASONING_END="REASONING_END",t.REASONING_ENCRYPTED_VALUE="REASONING_ENCRYPTED_VALUE",t})({});const at=nt({type:xR(Ve),timestamp:sd().optional(),rawEvent:En().optional()}).passthrough(),tO=at.extend({type:ve(Ve.TEXT_MESSAGE_START),messageId:le(),role:x_.default("assistant"),name:le().optional()}),b_=at.extend({type:ve(Ve.TEXT_MESSAGE_CONTENT),messageId:le(),delta:le()}),nO=at.extend({type:ve(Ve.TEXT_MESSAGE_END),messageId:le()}),aO=at.extend({type:ve(Ve.TEXT_MESSAGE_CHUNK),messageId:le().optional(),role:x_.optional(),delta:le().optional(),name:le().optional()}),lO=at.extend({type:ve(Ve.THINKING_TEXT_MESSAGE_START)}),iO=b_.omit({messageId:!0,type:!0}).extend({type:ve(Ve.THINKING_TEXT_MESSAGE_CONTENT)}),rO=at.extend({type:ve(Ve.THINKING_TEXT_MESSAGE_END)}),sO=at.extend({type:ve(Ve.TOOL_CALL_START),toolCallId:le(),toolCallName:le(),parentMessageId:le().optional()}),oO=at.extend({type:ve(Ve.TOOL_CALL_ARGS),toolCallId:le(),delta:le()}),uO=at.extend({type:ve(Ve.TOOL_CALL_END),toolCallId:le()}),cO=at.extend({messageId:le(),type:ve(Ve.TOOL_CALL_RESULT),toolCallId:le(),content:le(),role:ve("tool").optional()}),fO=at.extend({type:ve(Ve.TOOL_CALL_CHUNK),toolCallId:le().optional(),toolCallName:le().optional(),parentMessageId:le().optional(),delta:le().optional()}),dO=at.extend({type:ve(Ve.THINKING_START),title:le().optional()}),hO=at.extend({type:ve(Ve.THINKING_END)}),mO=at.extend({type:ve(Ve.STATE_SNAPSHOT),snapshot:qR}),pO=at.extend({type:ve(Ve.STATE_DELTA),delta:Jn(En())}),gO=at.extend({type:ve(Ve.MESSAGES_SNAPSHOT),messages:Jn(__)}),yO=at.extend({type:ve(Ve.ACTIVITY_SNAPSHOT),messageId:le(),activityType:le(),content:Xr(En()),replace:We().optional().default(!0)}),_O=at.extend({type:ve(Ve.ACTIVITY_DELTA),messageId:le(),activityType:le(),patch:Jn(En())}),vO=at.extend({type:ve(Ve.RAW),event:En(),source:le().optional()}),xO=at.extend({type:ve(Ve.CUSTOM),name:le(),value:En()}),bO=at.extend({type:ve(Ve.RUN_STARTED),threadId:le(),runId:le(),parentRunId:le().optional(),input:IR.optional()}),SO=at.extend({type:ve(Ve.RUN_FINISHED),threadId:le(),runId:le(),result:En().optional()}),kO=at.extend({type:ve(Ve.RUN_ERROR),message:le(),code:le().optional()}),TO=at.extend({type:ve(Ve.STEP_STARTED),stepName:le()}),NO=at.extend({type:ve(Ve.STEP_FINISHED),stepName:le()}),EO=Xo([ve("tool-call"),ve("message")]),CO=at.extend({type:ve(Ve.REASONING_START),messageId:le()}),AO=at.extend({type:ve(Ve.REASONING_MESSAGE_START),messageId:le(),role:ve("reasoning")}),wO=at.extend({type:ve(Ve.REASONING_MESSAGE_CONTENT),messageId:le(),delta:le()}),jO=at.extend({type:ve(Ve.REASONING_MESSAGE_END),messageId:le()}),MO=at.extend({type:ve(Ve.REASONING_MESSAGE_CHUNK),messageId:le().optional(),delta:le().optional()}),zO=at.extend({type:ve(Ve.REASONING_END),messageId:le()}),RO=at.extend({type:ve(Ve.REASONING_ENCRYPTED_VALUE),subtype:EO,entityId:le(),encryptedValue:le()}),OO=Fo("type",[tO,b_,nO,aO,dO,hO,lO,iO,rO,sO,oO,uO,fO,cO,mO,pO,gO,yO,_O,vO,xO,bO,SO,kO,TO,NO,CO,AO,wO,jO,MO,zO,RO]);function DO(t){let a;try{a=JSON.parse(t)}catch{return"not-agui"}if(typeof a!="object"||a===null||!("type"in a))return"not-agui";const i=OO.safeParse(a);if(!i.success)return"not-agui";switch(i.data.type){case Ve.TEXT_MESSAGE_CONTENT:case Ve.TEXT_MESSAGE_CHUNK:return{type:"data",content:i.data.delta??""};case Ve.RUN_ERROR:return{type:"data",content:`Error: ${i.data.message??"Unknown error"}`};default:return null}}function LO(t){try{const a=JSON.parse(t);if(typeof a=="string")return{type:"data",content:a};if(a&&typeof a=="object"&&"error"in a)return{type:"data",content:`Error: ${a.error}`}}catch{}return{type:"data",content:t}}function BO(t,a){if(!t.startsWith("data: "))return null;const i=t.slice(6);if(a==="metadata")return{type:"metadata",content:i};const r=DO(i);return r!=="not-agui"?r:LO(i)}function UO(t,a,i){const[r,o]=D.useState([]),[u,c]=D.useState(!1),[h,m]=D.useState(null),p=D.useRef(null),_=async N=>{if(!(!N||u)){c(!0),o(j=>[...j,{role:"user",content:N},{role:"assistant",content:""}]);try{const j=await Nn(`${t}/invocations`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:N,...a?{agentName:a}:{},...p.current?{sessionId:p.current}:{},...i?{userId:i}:{}})});if(!j.ok){const W=await j.text();o($=>{const de=[...$];return de[de.length-1]={role:"assistant",content:W||`Error: ${j.status}`,isError:!0},de});return}const B=j.headers.get("x-session-id");if(B&&(p.current=B,m(B)),!j.body){o(W=>{const $=[...W];return $[$.length-1]={role:"assistant",content:"(empty response)"},$});return}const S=j.body.getReader(),M=new TextDecoder;let z="",F="",ae=!1,U="",ee=null;const he=()=>{ee=null,o(W=>{const $=[...W];return $[$.length-1]={role:"assistant",content:F},$})},ge=()=>{ee===null&&(ee=requestAnimationFrame(he))},R=W=>{if(W.startsWith("event: ")||W.startsWith("event:")){U=W.slice(W.indexOf(":")+1).trim();return}if(W===""){U="";return}const $=BO(W,U);$!==null&&($.type==="metadata"||(ae=!0,F+=$.content))};for(;;){const{done:W,value:$}=await S.read();if(W)break;z+=M.decode($,{stream:!0});const de=z.split(`
|
|
279
|
+
`);z=de.pop()||"";for(const J of de)R(J);ae&&ge()}if(ee!==null&&cancelAnimationFrame(ee),z&&R(z),!ae){const W=F||z||M.decode();try{const $=JSON.parse(W);F=$.result!==null&&$.result!==void 0?typeof $.result=="string"?$.result:JSON.stringify($.result,null,2):JSON.stringify($,null,2)}catch{F=W}}o(W=>{const $=[...W];return $[$.length-1]={role:"assistant",content:F||"(empty response)"},$})}catch(j){const B=j instanceof Error&&j.message.includes("Failed to fetch")?"Connection failed — is the agent server running?":j instanceof Error?j.message:"Unknown error";o(S=>{const M=[...S];return M[M.length-1]={role:"assistant",content:B,isError:!0},M})}finally{c(!1)}}},y=D.useCallback((...N)=>{o(j=>[...j,...N])},[]),x=D.useCallback((N,j,B)=>{o(S=>{const M=[...S];for(let z=M.length-1;z>=0;z--)if(M[z].role==="assistant"&&!M[z].toolCalls){M[z]={...M[z],toolCalls:N,traceId:j,...B?{tokenUsage:B}:{}};break}return M})},[]);return{messages:r,isStreaming:u,sessionId:h,sendMessage:_,resetChat:()=>{o([]),m(null),p.current=null},addMessages:y,enrichLastAssistantMessage:x}}function HO(t){const a=t.filter(y=>{if(y.type!=="span")return!1;const x=y.attributes??{};return x["gen_ai.usage.input_tokens"]!==void 0||x["gen_ai.usage.output_tokens"]!==void 0});if(a.length===0)return null;const i=new Set(a.map(y=>y.spanId).filter(Boolean));let r=a.filter(y=>!y.parentSpanId||!i.has(y.parentSpanId));r.some(y=>(y.attributes??{})["gen_ai.operation.name"]!=="invoke_agent")&&(r=r.filter(y=>(y.attributes??{})["gen_ai.operation.name"]!=="invoke_agent"));let u=0,c=0,h=0,m=0,p=!1,_;for(const y of r){const x=y.attributes??{};u+=Number(x["gen_ai.usage.input_tokens"]??0),c+=Number(x["gen_ai.usage.output_tokens"]??0),h+=Number(x["gen_ai.usage.total_tokens"]??0),x["gen_ai.usage.cache_read.input_tokens"]!==void 0&&(p=!0,m+=Number(x["gen_ai.usage.cache_read.input_tokens"])),_||(_=x["gen_ai.response.model"]??x["gen_ai.request.model"])}return h===0&&(h=u+c),{inputTokens:u,outputTokens:c,totalTokens:h,...p?{cacheReadInputTokens:m}:{},model:_}}function Py(t,a){var o;const i=t.attributes;if(!Array.isArray(i))return;const r=i.find(u=>u.key===a);return(o=r==null?void 0:r.value)==null?void 0:o.stringValue}function IO(t){if(!t||!Array.isArray(t))return{};let a,i;for(const r of t){const o=r,u=o.name;u==="gen_ai.tool.message"?a=a??Py(o,"content"):u==="gen_ai.choice"&&(i=i??Py(o,"message"))}return{input:a,output:i}}function qO(t){if(t.type!=="span")return!1;const a=(t.name??"").toLowerCase(),i=t.attributes??{};return a==="tool_use"||a==="tool_call"||a.startsWith("execute_tool")||!!i["tool.name"]||!!i["gen_ai.tool.name"]}function VO(t){const a=t.filter(qO),i=new Set(a.map(r=>r.spanId).filter(Boolean));return a.filter(r=>!r.parentSpanId||!i.has(r.parentSpanId)).map(r=>{const o=r.attributes??{},u=It(r.startTimeUnixNano),c=It(r.endTimeUnixNano);let h=o["gen_ai.tool.call.arguments"],m=o["gen_ai.tool.call.result"];if(!h||!m){const p=IO(r.events);h=h??p.input,m=m??p.output}return{name:o["gen_ai.tool.name"]??o["tool.name"]??r.name??"unknown",input:h,output:m,durationMs:u&&c?c-u:void 0,spanId:r.spanId??"",traceId:r.traceId??""}})}function GO(){var Cn,hl;const{agents:t,harnesses:a,errors:i,selectedAgent:r,isConnected:o,hasConnected:u}=Uz(In),[c,h]=D.useState(void 0),[m,p]=D.useState(void 0),{isStarting:_,isReady:y,error:x,startAgent:b}=Fz(In),N=Xz(In),[j,B]=D.useState(!0),S=t.find(Ke=>Ke.name===c)??t[0],M=a.find(Ke=>Ke.name===m),z=M!==void 0,F=i.find(Ke=>Ke.name===(S==null?void 0:S.name)),ae=!z&&t.length>0&&(_||!y&&!x&&!F),U=async Ke=>{const qt=c;h(Ke),p(void 0),de(),L.resetChat(),await b(Ke)||h(qt)},ee=Ke=>{p(Ke),h(void 0),de(),L.resetChat()};D.useEffect(()=>{if(t.length>0&&!c&&!m&&!y&&!_&&!x&&!F){const Ke=t.find(qt=>qt.name===r)??t[0];b(Ke.name).then(qt=>{qt&&h(Ke.name)})}},[t,c,m,y,_,x,b,F,r]),D.useEffect(()=>{t.length===0&&a.length>0&&!c&&!m&&p(a[0].name)},[t,a,c,m]);const[he]=D.useState("default-user"),{messages:ge,isStreaming:R,sessionId:W,sendMessage:$,resetChat:de,addMessages:J,enrichLastAssistantMessage:ne}=UO(In,S==null?void 0:S.name,he),L=Vz(In,M==null?void 0:M.name,he),K=z?L.messages:ge,se=z?L.isStreaming:R,ke=z?L.sessionId:W,E=z?L.sendMessage:$,A=z?L.resetChat:de,{tools:G,isLoading:T,error:te,fetchTools:fe,callTool:Y}=$z(In,S==null?void 0:S.name,S==null?void 0:S.protocol,y),{card:xe,isLoading:Fe,error:Ge,fetchCard:Ct}=Bz(In,S==null?void 0:S.name,S==null?void 0:S.protocol,y),Jt=D.useCallback((Ke,qt,Zn)=>{J({role:"user",content:Ke},{role:"assistant",content:qt,isError:Zn})},[J]),{containerRef:Gn,forceScrollToBottom:oa}=Iz(K,se),ce=Zz(S==null?void 0:S.name),gt=D.useRef(!1);D.useEffect(()=>{gt.current&&!se&&ce.onInvocationComplete(),gt.current=se},[se,ce.onInvocationComplete]);const xt=D.useRef(new Set);return D.useEffect(()=>{xt.current.clear()},[c]),D.useEffect(()=>{if(ce.invocations.length===0)return;const Ke=ce.invocations[0];if(xt.current.has(Ke.traceId))return;const qt=VO(Ke.spans),Zn=HO(Ke.spans);(qt.length>0||Zn)&&(xt.current.add(Ke.traceId),ne(qt,Ke.traceId,Zn??void 0))},[ce.invocations,ne]),g.jsxs("div",{className:"appLayout",children:[g.jsxs("div",{className:"app",children:[g.jsx(RS,{isConnected:o,hasConnected:u,hasError:!!F||!!x,onToggleResources:()=>B(Ke=>!Ke),isResourcesOpen:j}),F&&!z&&g.jsx("div",{className:"startError",children:g.jsx(qf,{content:F.message})}),x&&!F&&!z&&g.jsx("div",{className:"startError",children:g.jsx(qf,{content:x})}),u&&!o?g.jsxs("div",{className:"disconnectedView",children:[g.jsx("div",{className:"disconnectedIcon",children:g.jsx(a1,{size:36})}),g.jsx("div",{className:"disconnectedTitle",children:"Server disconnected"}),g.jsx("p",{className:"disconnectedText",children:"Start the dev server to reconnect:"}),g.jsx("code",{className:"disconnectedCmd",children:"agentcore dev"})]}):g.jsxs(g.Fragment,{children:[g.jsx(rS,{agents:t,harnesses:a,errors:i,selectedAgentName:z||S==null?void 0:S.name,selectedHarnessName:m,isStarting:_,isReady:z?!0:y,startError:x,sessionId:ke,onSelectAgent:U,onSelectHarness:ee,onResetChat:A}),g.jsx(xw,{ref:Gn,messages:K,isStreaming:se,isStarting:z?!1:ae,agentName:z?M==null?void 0:M.name:S==null?void 0:S.name,agentBuildType:z?"Harness":S==null?void 0:S.buildType,agentProtocol:z?"Harness":S==null?void 0:S.protocol,hasAvailableTargets:t.length>0||a.length>0}),z&&g.jsx(TS,{overrides:L.harnessOverrides,onChange:L.setHarnessOverrides,tools:((hl=(Cn=N.data)==null?void 0:Cn.harnesses.find(Ke=>Ke.name===(M==null?void 0:M.name)))==null?void 0:hl.tools)??[]}),!z&&(S==null?void 0:S.protocol)==="MCP"&&(G.length>0||te)&&g.jsx(Lz,{tools:G,isLoading:T,error:te,onRefresh:fe,onCallTool:Y,onToolCallMessage:Jt}),!z&&(S==null?void 0:S.protocol)==="A2A"&&(xe||Ge||Fe)&&g.jsx(xb,{card:xe,isLoading:Fe,error:Ge,onRefresh:Ct}),(S&&S.protocol!=="MCP"&&!z||z)&&g.jsx(Nb,{isStreaming:se||!z&&ae,isStarting:z?!1:ae,onSend:Ke=>{oa(),E(Ke)}}),!z&&(S==null?void 0:S.protocol)!=="MCP"&&g.jsx(mz,{traces:ce})]})]}),j&&g.jsx(hM,{resources:N,sessionId:ke,userId:he,onClose:()=>B(!1)})]})}X0.createRoot(document.getElementById("root")).render(g.jsx(H0.StrictMode,{children:g.jsx(GO,{})}));
|