@aws/agentcore 1.0.0-preview.13 → 1.0.0-preview.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -17
- package/dist/agent-inspector/index.css +1 -1
- package/dist/agent-inspector/index.js +90 -85
- package/dist/assets/__tests__/__snapshots__/assets.snapshot.test.ts.snap +966 -106
- package/dist/assets/agents/AGENTS.md +14 -0
- package/dist/assets/cdk/bin/cdk.ts +42 -20
- package/dist/assets/cdk/lib/cdk-stack.ts +19 -14
- package/dist/assets/cdk/test/cdk.test.ts +2 -1
- package/dist/assets/container/python/Dockerfile +4 -0
- package/dist/assets/python/a2a/strands/capabilities/memory/session.py +4 -1
- package/dist/assets/python/agui/strands/capabilities/memory/session.py +4 -1
- package/dist/assets/python/http/googleadk/base/mcp_client/client.py +7 -7
- package/dist/assets/python/http/googleadk/base/pyproject.toml +1 -1
- package/dist/assets/python/http/langchain_langgraph/base/mcp_client/client.py +10 -8
- package/dist/assets/python/http/langchain_langgraph/base/pyproject.toml +1 -1
- package/dist/assets/python/http/openaiagents/base/main.py +19 -9
- package/dist/assets/python/http/openaiagents/base/mcp_client/client.py +4 -4
- package/dist/assets/python/http/openaiagents/base/pyproject.toml +1 -1
- package/dist/assets/python/http/strands/base/main.py +438 -27
- package/dist/assets/python/http/strands/base/mcp_client/client.py +45 -5
- package/dist/assets/python/http/strands/base/model/load.py +3 -3
- package/dist/assets/python/http/strands/base/pyproject.toml +5 -2
- package/dist/assets/python/http/strands/base/skills/fetcher.py +279 -0
- package/dist/assets/python/http/strands/capabilities/execution-limits/hooks/execution_limits.py +54 -0
- package/dist/assets/python/http/strands/capabilities/memory/session.py +4 -1
- package/dist/cli/index.mjs +1274 -1088
- package/dist/lib/errors/types.d.ts +18 -0
- package/dist/lib/errors/types.d.ts.map +1 -1
- package/dist/lib/errors/types.js +28 -1
- package/dist/lib/errors/types.js.map +1 -1
- package/dist/lib/schemas/io/config-io.d.ts.map +1 -1
- package/dist/lib/schemas/io/config-io.js +0 -2
- package/dist/lib/schemas/io/config-io.js.map +1 -1
- package/dist/schema/constants.d.ts +20 -0
- package/dist/schema/constants.d.ts.map +1 -1
- package/dist/schema/constants.js +25 -1
- package/dist/schema/constants.js.map +1 -1
- package/dist/schema/schemas/agent-env.d.ts +35 -0
- package/dist/schema/schemas/agent-env.d.ts.map +1 -1
- package/dist/schema/schemas/agentcore-project.d.ts +184 -25
- package/dist/schema/schemas/agentcore-project.d.ts.map +1 -1
- package/dist/schema/schemas/agentcore-project.js +81 -31
- package/dist/schema/schemas/agentcore-project.js.map +1 -1
- package/dist/schema/schemas/auth.d.ts +175 -0
- package/dist/schema/schemas/auth.d.ts.map +1 -1
- package/dist/schema/schemas/auth.js +126 -3
- package/dist/schema/schemas/auth.js.map +1 -1
- package/dist/schema/schemas/deployed-state.d.ts +140 -46
- package/dist/schema/schemas/deployed-state.d.ts.map +1 -1
- package/dist/schema/schemas/deployed-state.js +39 -14
- package/dist/schema/schemas/deployed-state.js.map +1 -1
- package/dist/schema/schemas/mcp-defs.d.ts +2 -1
- package/dist/schema/schemas/mcp-defs.d.ts.map +1 -1
- package/dist/schema/schemas/mcp-defs.js +3 -2
- package/dist/schema/schemas/mcp-defs.js.map +1 -1
- package/dist/schema/schemas/mcp.d.ts +186 -0
- package/dist/schema/schemas/mcp.d.ts.map +1 -1
- package/dist/schema/schemas/mcp.js +479 -4
- package/dist/schema/schemas/mcp.js.map +1 -1
- package/dist/schema/schemas/primitives/ab-test.d.ts +0 -6
- package/dist/schema/schemas/primitives/ab-test.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/ab-test.js +0 -2
- package/dist/schema/schemas/primitives/ab-test.js.map +1 -1
- package/dist/schema/schemas/primitives/harness.d.ts +209 -11
- package/dist/schema/schemas/primitives/harness.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/harness.js +268 -21
- package/dist/schema/schemas/primitives/harness.js.map +1 -1
- package/dist/schema/schemas/primitives/index.d.ts +6 -8
- package/dist/schema/schemas/primitives/index.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/index.js +6 -5
- package/dist/schema/schemas/primitives/index.js.map +1 -1
- package/dist/schema/schemas/primitives/knowledge-base.d.ts +104 -0
- package/dist/schema/schemas/primitives/knowledge-base.d.ts.map +1 -0
- package/dist/schema/schemas/primitives/knowledge-base.js +99 -0
- package/dist/schema/schemas/primitives/knowledge-base.js.map +1 -0
- package/dist/schema/schemas/primitives/online-eval-config.d.ts +20 -2
- package/dist/schema/schemas/primitives/online-eval-config.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/online-eval-config.js +43 -5
- package/dist/schema/schemas/primitives/online-eval-config.js.map +1 -1
- package/dist/schema/schemas/primitives/policy.d.ts +26 -0
- package/dist/schema/schemas/primitives/policy.d.ts.map +1 -1
- package/dist/schema/schemas/primitives/policy.js +5 -1
- package/dist/schema/schemas/primitives/policy.js.map +1 -1
- package/npm-shrinkwrap.json +195 -330
- package/package.json +10 -8
- package/scripts/bundle.mjs +51 -0
- package/scripts/run-e2e-local.sh +40 -8
- package/dist/schema/schemas/primitives/http-gateway.d.ts +0 -21
- package/dist/schema/schemas/primitives/http-gateway.d.ts.map +0 -1
- package/dist/schema/schemas/primitives/http-gateway.js +0 -34
- package/dist/schema/schemas/primitives/http-gateway.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function
|
|
1
|
+
(function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const u of o)if(u.type==="childList")for(const c of u.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function l(o){const u={};return o.integrity&&(u.integrity=o.integrity),o.referrerPolicy&&(u.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?u.credentials="include":o.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function r(o){if(o.ep)return;o.ep=!0;const u=l(o);fetch(o.href,u)}})();function Zo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gf={exports:{}},zr={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Dg;function Y0(){if(Dg)return zr;Dg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(r,o,u){var c=null;if(u!==void 0&&(c=""+u),o.key!==void 0&&(c=""+o.key),"key"in o){u={};for(var d in o)d!=="key"&&(u[d]=o[d])}else u=o;return o=u.ref,{$$typeof:t,type:r,key:c,ref:o!==void 0?o:null,props:u}}return zr.Fragment=a,zr.jsx=l,zr.jsxs=l,zr}var Lg;function F0(){return Lg||(Lg=1,gf.exports=Y0()),gf.exports}var p=F0(),yf={exports:{}},Be={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var Bg;function X0(){if(Bg)return Be;Bg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=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"),d=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),x=Symbol.iterator;function b(C){return C===null||typeof C!="object"?null:(C=x&&C[x]||C["@@iterator"],typeof C=="function"?C:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,D={};function k(C,$,T){this.props=C,this.context=$,this.refs=D,this.updater=T||N}k.prototype.isReactComponent={},k.prototype.setState=function(C,$){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,$,"setState")},k.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function M(){}M.prototype=k.prototype;function j(C,$,T){this.props=C,this.context=$,this.refs=D,this.updater=T||N}var K=j.prototype=new M;K.constructor=j,O(K,k.prototype),K.isPureReactComponent=!0;var Y=Array.isArray;function I(){}var U={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function le(C,$,T){var J=T.ref;return{$$typeof:t,type:C,key:$,ref:J!==void 0?J:null,props:T}}function z(C,$){return le(C.type,$,C.props)}function te(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function ae(C){var $={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(T){return $[T]})}var ge=/\/+/g;function ne(C,$){return typeof C=="object"&&C!==null&&C.key!=null?ae(""+C.key):$.toString(36)}function Z(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(I,I):(C.status="pending",C.then(function($){C.status==="pending"&&(C.status="fulfilled",C.value=$)},function($){C.status==="pending"&&(C.status="rejected",C.reason=$)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function B(C,$,T,J,me){var X=typeof C;(X==="undefined"||X==="boolean")&&(C=null);var _e=!1;if(C===null)_e=!0;else switch(X){case"bigint":case"string":case"number":_e=!0;break;case"object":switch(C.$$typeof){case t:case a:_e=!0;break;case _:return _e=C._init,B(_e(C._payload),$,T,J,me)}}if(_e)return me=me(C),_e=J===""?"."+ne(C,0):J,Y(me)?(T="",_e!=null&&(T=_e.replace(ge,"$&/")+"/"),B(me,$,T,"",function(ct){return ct})):me!=null&&(te(me)&&(me=z(me,T+(me.key==null||C&&C.key===me.key?"":(""+me.key).replace(ge,"$&/")+"/")+_e)),$.push(me)),1;_e=0;var He=J===""?".":J+":";if(Y(C))for(var fe=0;fe<C.length;fe++)J=C[fe],X=He+ne(J,fe),_e+=B(J,$,T,X,me);else if(fe=b(C),typeof fe=="function")for(C=fe.call(C),fe=0;!(J=C.next()).done;)J=J.value,X=He+ne(J,fe++),_e+=B(J,$,T,X,me);else if(X==="object"){if(typeof C.then=="function")return B(Z(C),$,T,J,me);throw $=String(C),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return _e}function W(C,$,T){if(C==null)return C;var J=[],me=0;return B(C,J,"","",function(X){return $.call(T,X,me++)}),J}function ue(C){if(C._status===-1){var $=C._result;$=$(),$.then(function(T){(C._status===0||C._status===-1)&&(C._status=1,C._result=T)},function(T){(C._status===0||C._status===-1)&&(C._status=2,C._result=T)}),C._status===-1&&(C._status=0,C._result=$)}if(C._status===1)return C._result.default;throw C._result}var Ne=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},E={map:W,forEach:function(C,$,T){W(C,function(){$.apply(this,arguments)},T)},count:function(C){var $=0;return W(C,function(){$++}),$},toArray:function(C){return W(C,function($){return $})||[]},only:function(C){if(!te(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return Be.Activity=y,Be.Children=E,Be.Component=k,Be.Fragment=l,Be.Profiler=o,Be.PureComponent=j,Be.StrictMode=r,Be.Suspense=m,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Be.__COMPILER_RUNTIME={__proto__:null,c:function(C){return U.H.useMemoCache(C)}},Be.cache=function(C){return function(){return C.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(C,$,T){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var J=O({},C.props),me=C.key;if($!=null)for(X in $.key!==void 0&&(me=""+$.key),$)!re.call($,X)||X==="key"||X==="__self"||X==="__source"||X==="ref"&&$.ref===void 0||(J[X]=$[X]);var X=arguments.length-2;if(X===1)J.children=T;else if(1<X){for(var _e=Array(X),He=0;He<X;He++)_e[He]=arguments[He+2];J.children=_e}return le(C.type,me,J)},Be.createContext=function(C){return C={$$typeof:c,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:u,_context:C},C},Be.createElement=function(C,$,T){var J,me={},X=null;if($!=null)for(J in $.key!==void 0&&(X=""+$.key),$)re.call($,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(me[J]=$[J]);var _e=arguments.length-2;if(_e===1)me.children=T;else if(1<_e){for(var He=Array(_e),fe=0;fe<_e;fe++)He[fe]=arguments[fe+2];me.children=He}if(C&&C.defaultProps)for(J in _e=C.defaultProps,_e)me[J]===void 0&&(me[J]=_e[J]);return le(C,X,me)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(C){return{$$typeof:d,render:C}},Be.isValidElement=te,Be.lazy=function(C){return{$$typeof:_,_payload:{_status:-1,_result:C},_init:ue}},Be.memo=function(C,$){return{$$typeof:g,type:C,compare:$===void 0?null:$}},Be.startTransition=function(C){var $=U.T,T={};U.T=T;try{var J=C(),me=U.S;me!==null&&me(T,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(I,Ne)}catch(X){Ne(X)}finally{$!==null&&T.types!==null&&($.types=T.types),U.T=$}},Be.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Be.use=function(C){return U.H.use(C)},Be.useActionState=function(C,$,T){return U.H.useActionState(C,$,T)},Be.useCallback=function(C,$){return U.H.useCallback(C,$)},Be.useContext=function(C){return U.H.useContext(C)},Be.useDebugValue=function(){},Be.useDeferredValue=function(C,$){return U.H.useDeferredValue(C,$)},Be.useEffect=function(C,$){return U.H.useEffect(C,$)},Be.useEffectEvent=function(C){return U.H.useEffectEvent(C)},Be.useId=function(){return U.H.useId()},Be.useImperativeHandle=function(C,$,T){return U.H.useImperativeHandle(C,$,T)},Be.useInsertionEffect=function(C,$){return U.H.useInsertionEffect(C,$)},Be.useLayoutEffect=function(C,$){return U.H.useLayoutEffect(C,$)},Be.useMemo=function(C,$){return U.H.useMemo(C,$)},Be.useOptimistic=function(C,$){return U.H.useOptimistic(C,$)},Be.useReducer=function(C,$,T){return U.H.useReducer(C,$,T)},Be.useRef=function(C){return U.H.useRef(C)},Be.useState=function(C){return U.H.useState(C)},Be.useSyncExternalStore=function(C,$,T){return U.H.useSyncExternalStore(C,$,T)},Be.useTransition=function(){return U.H.useTransition()},Be.version="19.2.4",Be}var Ig;function dd(){return Ig||(Ig=1,yf.exports=X0()),yf.exports}var R=dd();const Q0=Zo(R);var _f={exports:{}},Rr={},vf={exports:{}},xf={};/**
|
|
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 Ug;function
|
|
25
|
+
*/var Ug;function K0(){return Ug||(Ug=1,(function(t){function a(B,W){var ue=B.length;B.push(W);e:for(;0<ue;){var Ne=ue-1>>>1,E=B[Ne];if(0<o(E,W))B[Ne]=W,B[ue]=E,ue=Ne;else break e}}function l(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var W=B[0],ue=B.pop();if(ue!==W){B[0]=ue;e:for(var Ne=0,E=B.length,C=E>>>1;Ne<C;){var $=2*(Ne+1)-1,T=B[$],J=$+1,me=B[J];if(0>o(T,ue))J<E&&0>o(me,T)?(B[Ne]=me,B[J]=ue,Ne=J):(B[Ne]=T,B[$]=ue,Ne=$);else if(J<E&&0>o(me,ue))B[Ne]=me,B[J]=ue,Ne=J;else break e}}return W}function o(B,W){var ue=B.sortIndex-W.sortIndex;return ue!==0?ue:B.id-W.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,d=c.now();t.unstable_now=function(){return c.now()-d}}var m=[],g=[],_=1,y=null,x=3,b=!1,N=!1,O=!1,D=!1,k=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;function K(B){for(var W=l(g);W!==null;){if(W.callback===null)r(g);else if(W.startTime<=B)r(g),W.sortIndex=W.expirationTime,a(m,W);else break;W=l(g)}}function Y(B){if(O=!1,K(B),!N)if(l(m)!==null)N=!0,I||(I=!0,ae());else{var W=l(g);W!==null&&Z(Y,W.startTime-B)}}var I=!1,U=-1,re=5,le=-1;function z(){return D?!0:!(t.unstable_now()-le<re)}function te(){if(D=!1,I){var B=t.unstable_now();le=B;var W=!0;try{e:{N=!1,O&&(O=!1,M(U),U=-1),b=!0;var ue=x;try{t:{for(K(B),y=l(m);y!==null&&!(y.expirationTime>B&&z());){var Ne=y.callback;if(typeof Ne=="function"){y.callback=null,x=y.priorityLevel;var E=Ne(y.expirationTime<=B);if(B=t.unstable_now(),typeof E=="function"){y.callback=E,K(B),W=!0;break t}y===l(m)&&r(m),K(B)}else r(m);y=l(m)}if(y!==null)W=!0;else{var C=l(g);C!==null&&Z(Y,C.startTime-B),W=!1}}break e}finally{y=null,x=ue,b=!1}W=void 0}}finally{W?ae():I=!1}}}var ae;if(typeof j=="function")ae=function(){j(te)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,ne=ge.port2;ge.port1.onmessage=te,ae=function(){ne.postMessage(null)}}else ae=function(){k(te,0)};function Z(B,W){U=k(function(){B(t.unstable_now())},W)}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(B){B.callback=null},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(B){switch(x){case 1:case 2:case 3:var W=3;break;default:W=x}var ue=x;x=W;try{return B()}finally{x=ue}},t.unstable_requestPaint=function(){D=!0},t.unstable_runWithPriority=function(B,W){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var ue=x;x=B;try{return W()}finally{x=ue}},t.unstable_scheduleCallback=function(B,W,ue){var Ne=t.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?Ne+ue:Ne):ue=Ne,B){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=ue+E,B={id:_++,callback:W,priorityLevel:B,startTime:ue,expirationTime:E,sortIndex:-1},ue>Ne?(B.sortIndex=ue,a(g,B),l(m)===null&&B===l(g)&&(O?(M(U),U=-1):O=!0,Z(Y,ue-Ne))):(B.sortIndex=E,a(m,B),N||b||(N=!0,I||(I=!0,ae()))),B},t.unstable_shouldYield=z,t.unstable_wrapCallback=function(B){var W=x;return function(){var ue=x;x=W;try{return B.apply(this,arguments)}finally{x=ue}}}})(xf)),xf}var Hg;function J0(){return Hg||(Hg=1,vf.exports=K0()),vf.exports}var bf={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
|
|
33
|
+
*/var qg;function P0(){if(qg)return Xt;qg=1;var t=dd();function a(m){var g="https://react.dev/errors/"+m;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)g+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+m+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var r={d:{f:l,r:function(){throw Error(a(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},o=Symbol.for("react.portal");function u(m,g,_){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:m,containerInfo:g,implementation:_}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(m,g){if(m==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Xt.createPortal=function(m,g){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(a(299));return u(m,g,null,_)},Xt.flushSync=function(m){var g=c.T,_=r.p;try{if(c.T=null,r.p=2,m)return m()}finally{c.T=g,r.p=_,r.d.f()}},Xt.preconnect=function(m,g){typeof m=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,r.d.C(m,g))},Xt.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},Xt.preinit=function(m,g){if(typeof m=="string"&&g&&typeof g.as=="string"){var _=g.as,y=d(_,g.crossOrigin),x=typeof g.integrity=="string"?g.integrity:void 0,b=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;_==="style"?r.d.S(m,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:y,integrity:x,fetchPriority:b}):_==="script"&&r.d.X(m,{crossOrigin:y,integrity:x,fetchPriority:b,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Xt.preinitModule=function(m,g){if(typeof m=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var _=d(g.as,g.crossOrigin);r.d.M(m,{crossOrigin:_,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&r.d.M(m)},Xt.preload=function(m,g){if(typeof m=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var _=g.as,y=d(_,g.crossOrigin);r.d.L(m,_,{crossOrigin:y,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Xt.preloadModule=function(m,g){if(typeof m=="string")if(g){var _=d(g.as,g.crossOrigin);r.d.m(m,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:_,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else r.d.m(m)},Xt.requestFormReset=function(m){r.d.r(m)},Xt.unstable_batchedUpdates=function(m,g){return m(g)},Xt.useFormState=function(m,g,_){return c.H.useFormState(m,g,_)},Xt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Xt.version="19.2.4",Xt}var Vg;function W0(){if(Vg)return bf.exports;Vg=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(),bf.exports=P0(),bf.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,247 +38,252 @@
|
|
|
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
|
|
42
|
-
at`)?" (<anonymous>)":-1<
|
|
43
|
-
`+
|
|
44
|
-
`),
|
|
45
|
-
`);for(f=s=0;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;for(;f<
|
|
46
|
-
`+A[s].replace(" at new "," at ");return e.displayName&&
|
|
41
|
+
*/var Gg;function ex(){if(Gg)return Rr;Gg=1;var t=J0(),a=dd(),l=W0();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}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,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i: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 d(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 g(e){var n=e.alternate;if(!n){if(n=u(e),n===null)throw Error(r(188));return n!==e?null:e}for(var i=e,s=n;;){var f=i.return;if(f===null)break;var h=f.alternate;if(h===null){if(s=f.return,s!==null){i=s;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===i)return m(f),e;if(h===s)return m(f),n;h=h.sibling}throw Error(r(188))}if(i.return!==s.return)i=f,s=h;else{for(var v=!1,S=f.child;S;){if(S===i){v=!0,i=f,s=h;break}if(S===s){v=!0,s=f,i=h;break}S=S.sibling}if(!v){for(S=h.child;S;){if(S===i){v=!0,i=h,s=f;break}if(S===s){v=!0,s=h,i=f;break}S=S.sibling}if(!v)throw Error(r(189))}}if(i.alternate!==s)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?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"),O=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),M=Symbol.for("react.consumer"),j=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),re=Symbol.for("react.lazy"),le=Symbol.for("react.activity"),z=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ge?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case k:return"Profiler";case D:return"StrictMode";case Y:return"Suspense";case I:return"SuspenseList";case le:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case j:return e.displayName||"Context";case M:return(e._context.displayName||"Context")+".Consumer";case K:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return n=e.displayName||null,n!==null?n:ne(e.type)||"Memo";case re:n=e._payload,e=e._init;try{return ne(e(n))}catch{}}return null}var Z=Array.isArray,B=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},Ne=[],E=-1;function C(e){return{current:e}}function $(e){0>E||(e.current=Ne[E],Ne[E]=null,E--)}function T(e,n){E++,Ne[E]=e.current,e.current=n}var J=C(null),me=C(null),X=C(null),_e=C(null);function He(e,n){switch(T(X,n),T(me,e),T(J,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?lg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=lg(n),e=ig(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}$(J),T(J,e)}function fe(){$(J),$(me),$(X)}function ct(e){e.memoizedState!==null&&T(_e,e);var n=J.current,i=ig(n,e.type);n!==i&&(T(me,e),T(J,i))}function Bt(e){me.current===e&&($(J),$(me)),_e.current===e&&($(_e),Ar._currentValue=ue)}var an,Kn;function pe(e){if(an===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);an=n&&n[1]||"",Kn=-1<i.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+an+e+Kn}var _t=!1;function St(e,n){if(!e||_t)return"";_t=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(n){var ee=function(){throw Error()};if(Object.defineProperty(ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ee,[])}catch(G){var V=G}Reflect.construct(e,[],ee)}else{try{ee.call()}catch(G){V=G}e.call(ee.prototype)}}else{try{throw Error()}catch(G){V=G}(ee=e())&&typeof ee.catch=="function"&&ee.catch(function(){})}}catch(G){if(G&&V&&typeof G.stack=="string")return[G.stack,V.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 h=s.DetermineComponentFrameRoot(),v=h[0],S=h[1];if(v&&S){var A=v.split(`
|
|
44
|
+
`),q=S.split(`
|
|
45
|
+
`);for(f=s=0;s<A.length&&!A[s].includes("DetermineComponentFrameRoot");)s++;for(;f<q.length&&!q[f].includes("DetermineComponentFrameRoot");)f++;if(s===A.length||f===q.length)for(s=A.length-1,f=q.length-1;1<=s&&0<=f&&A[s]!==q[f];)f--;for(;1<=s&&0<=f;s--,f--)if(A[s]!==q[f]){if(s!==1||f!==1)do if(s--,f--,0>f||A[s]!==q[f]){var F=`
|
|
46
|
+
`+A[s].replace(" at new "," at ");return e.displayName&&F.includes("<anonymous>")&&(F=F.replace("<anonymous>",e.displayName)),F}while(1<=s&&0<=f);break}}}finally{_t=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?pe(i):""}function Cn(e,n){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe("Lazy");case 13:return e.child!==n&&n!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return St(e.type,!1);case 11:return St(e.type.render,!1);case 1:return St(e.type,!0);case 31:return pe("Activity");default:return""}}function pl(e){try{var n="",i=null;do n+=Cn(e,i),i=e,e=e.return;while(e);return n}catch(s){return`
|
|
47
47
|
Error generating stack: `+s.message+`
|
|
48
|
-
`+s.stack}}var Ra=Object.prototype.hasOwnProperty,Oa=t.unstable_scheduleCallback,En=t.unstable_cancelCallback,ql=t.unstable_shouldYield,hl=t.unstable_requestPaint,Bt=t.unstable_now,Vl=t.unstable_getCurrentPriorityLevel,F=t.unstable_ImmediatePriority,ee=t.unstable_UserBlockingPriority,Ne=t.unstable_NormalPriority,De=t.unstable_LowPriority,rt=t.unstable_IdlePriority,mn=t.log,sa=t.unstable_setDisableYieldValue,Jt=null,Rt=null;function nn(e){if(typeof mn=="function"&&sa(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(Jt,e)}catch{}}var ht=Math.clz32?Math.clz32:C1,Da=Math.log,Gn=Math.LN2;function C1(e){return e>>>=0,e===0?32:31-(Da(e)/Gn|0)|0}var Pr=256,Wr=262144,es=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 ts(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 S=s&134217727;return S!==0?(s=S&~d,s!==0?f=ml(s):(v&=S,v!==0?f=ml(v):l||(l=S&~e,l!==0&&(f=ml(l))))):(S=s&~d,S!==0?f=ml(S):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 Hi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function A1(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 Ud(){var e=es;return es<<=1,(es&62914560)===0&&(es=4194304),e}function nu(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function qi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function w1(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 S=e.entanglements,A=e.expirationTimes,H=e.hiddenUpdates;for(l=v&~l;0<l;){var Y=31-ht(l),W=1<<Y;S[Y]=0,A[Y]=-1;var q=H[Y];if(q!==null)for(H[Y]=null,Y=0;Y<q.length;Y++){var V=q[Y];V!==null&&(V.lane&=-536870913)}l&=~W}s!==0&&Id(e,s,0),d!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=d&~(v&~n))}function Id(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 Hd(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 qd(e,n){var l=n&-n;return l=(l&42)!==0?1:au(l),(l&(e.suspendedLanes|n))!==0?0:l}function au(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 lu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vd(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:Cg(e.type))}function Gd(e,n){var l=P.p;try{return P.p=e,n()}finally{P.p=l}}var La=Math.random().toString(36).slice(2),Vt="__reactFiber$"+La,an="__reactProps$"+La,Gl="__reactContainer$"+La,iu="__reactEvents$"+La,j1="__reactListeners$"+La,z1="__reactHandles$"+La,$d="__reactResources$"+La,Vi="__reactMarker$"+La;function ru(e){delete e[Vt],delete e[an],delete e[iu],delete e[j1],delete e[z1]}function $l(e){var n=e[Vt];if(n)return n;for(var l=e.parentNode;l;){if(n=l[Gl]||l[Vt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=fg(e);e!==null;){if(l=e[Vt])return l;e=fg(e)}return n}e=l,l=e.parentNode}return null}function Zl(e){if(e=e[Vt]||e[Gl]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Gi(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function Yl(e){var n=e[$d];return n||(n=e[$d]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ut(e){e[Vi]=!0}var Zd=new Set,Yd={};function pl(e,n){Xl(e,n),Xl(e+"Capture",n)}function Xl(e,n){for(Yd[e]=n,e=0;e<n.length;e++)Zd.add(n[e])}var M1=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]*$"),Xd={},Fd={};function R1(e){return Ra.call(Fd,e)?!0:Ra.call(Xd,e)?!1:M1.test(e)?Fd[e]=!0:(Xd[e]=!0,!1)}function ns(e,n,l){if(R1(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 as(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 oa(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 Cn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function O1(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 su(e){if(!e._valueTracker){var n=Qd(e)?"checked":"value";e._valueTracker=O1(e,n,""+e[n])}}function Kd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),s="";return e&&(s=Qd(e)?e.checked?"true":"false":e.value),e=s,e!==l?(n.setValue(e),!0):!1}function ls(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 D1=/[\n"\\]/g;function An(e){return e.replace(D1,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ou(e,n,l,s,f,d,v,S){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=""+Cn(n)):e.value!==""+Cn(n)&&(e.value=""+Cn(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?uu(e,v,Cn(n)):l!=null?uu(e,v,Cn(l)):s!=null&&e.removeAttribute("value"),f==null&&d!=null&&(e.defaultChecked=!!d),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+Cn(S):e.removeAttribute("name")}function Jd(e,n,l,s,f,d,v,S){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)){su(e);return}l=l!=null?""+Cn(l):"",n=n!=null?""+Cn(n):l,S||n===e.value||(e.value=n),e.defaultValue=n}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=S?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),su(e)}function uu(e,n,l){n==="number"&&ls(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function Fl(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=""+Cn(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 Pd(e,n,l){if(n!=null&&(n=""+Cn(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+Cn(l):""}function Wd(e,n,l,s){if(n==null){if(s!=null){if(l!=null)throw Error(r(92));if(Z(s)){if(1<s.length)throw Error(r(93));s=s[0]}l=s}l==null&&(l=""),n=l}l=Cn(n),e.defaultValue=l,s=e.textContent,s===l&&s!==""&&s!==null&&(e.value=s),su(e)}function Ql(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var L1=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 eh(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||L1.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function th(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&&eh(e,f,s)}else for(var d in n)n.hasOwnProperty(d)&&eh(e,d,n[d])}function cu(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 B1=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"]]),U1=/^[\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 is(e){return U1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ua(){}var fu=null;function du(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kl=null,Jl=null;function nh(e){var n=Zl(e);if(n&&(e=n.stateNode)){var l=e[an]||null;e:switch(e=n.stateNode,n.type){case"input":if(ou(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="'+An(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var s=l[n];if(s!==e&&s.form===e.form){var f=s[an]||null;if(!f)throw Error(r(90));ou(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&&Kd(s)}break e;case"textarea":Pd(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&Fl(e,!!l.multiple,n,!1)}}}var hu=!1;function ah(e,n,l){if(hu)return e(n,l);hu=!0;try{var s=e(n);return s}finally{if(hu=!1,(Kl!==null||Jl!==null)&&(Ys(),Kl&&(n=Kl,e=Jl,Jl=Kl=null,nh(n),e)))for(n=0;n<e.length;n++)nh(e[n])}}function $i(e,n){var l=e.stateNode;if(l===null)return null;var s=l[an]||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 ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),mu=!1;if(ca)try{var Zi={};Object.defineProperty(Zi,"passive",{get:function(){mu=!0}}),window.addEventListener("test",Zi,Zi),window.removeEventListener("test",Zi,Zi)}catch{mu=!1}var Ba=null,pu=null,rs=null;function lh(){if(rs)return rs;var e,n=pu,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 rs=f.slice(e,1<s?1-s:void 0)}function ss(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 os(){return!0}function ih(){return!1}function ln(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 S in e)e.hasOwnProperty(S)&&(l=e[S],this[S]=l?l(d):d[S]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?os:ih,this.isPropagationStopped=ih,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=os)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=os)},persist:function(){},isPersistent:os}),n}var gl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},us=ln(gl),Yi=_({},gl,{view:0,detail:0}),I1=ln(Yi),gu,yu,Xi,cs=_({},Yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vu,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!==Xi&&(Xi&&e.type==="mousemove"?(gu=e.screenX-Xi.screenX,yu=e.screenY-Xi.screenY):yu=gu=0,Xi=e),gu)},movementY:function(e){return"movementY"in e?e.movementY:yu}}),rh=ln(cs),H1=_({},cs,{dataTransfer:0}),q1=ln(H1),V1=_({},Yi,{relatedTarget:0}),_u=ln(V1),G1=_({},gl,{animationName:0,elapsedTime:0,pseudoElement:0}),$1=ln(G1),Z1=_({},gl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Y1=ln(Z1),X1=_({},gl,{data:0}),sh=ln(X1),F1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Q1={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"},K1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function J1(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=K1[e])?!!n[e]:!1}function vu(){return J1}var P1=_({},Yi,{key:function(e){if(e.key){var n=F1[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=ss(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Q1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vu,charCode:function(e){return e.type==="keypress"?ss(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ss(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),W1=ln(P1),ev=_({},cs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oh=ln(ev),tv=_({},Yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vu}),nv=ln(tv),av=_({},gl,{propertyName:0,elapsedTime:0,pseudoElement:0}),lv=ln(av),iv=_({},cs,{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}),rv=ln(iv),sv=_({},gl,{newState:0,oldState:0}),ov=ln(sv),uv=[9,13,27,32],xu=ca&&"CompositionEvent"in window,Fi=null;ca&&"documentMode"in document&&(Fi=document.documentMode);var cv=ca&&"TextEvent"in window&&!Fi,uh=ca&&(!xu||Fi&&8<Fi&&11>=Fi),ch=" ",fh=!1;function dh(e,n){switch(e){case"keyup":return uv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Pl=!1;function fv(e,n){switch(e){case"compositionend":return hh(n);case"keypress":return n.which!==32?null:(fh=!0,ch);case"textInput":return e=n.data,e===ch&&fh?null:e;default:return null}}function dv(e,n){if(Pl)return e==="compositionend"||!xu&&dh(e,n)?(e=lh(),rs=pu=Ba=null,Pl=!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 uh&&n.locale!=="ko"?null:n.data;default:return null}}var hv={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 mh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!hv[e.type]:n==="textarea"}function ph(e,n,l,s){Kl?Jl?Jl.push(s):Jl=[s]:Kl=s,n=Ws(n,"onChange"),0<n.length&&(l=new us("onChange","change",null,l,s),e.push({event:l,listeners:n}))}var Qi=null,Ki=null;function mv(e){Jp(e,0)}function fs(e){var n=Gi(e);if(Kd(n))return e}function gh(e,n){if(e==="change")return n}var yh=!1;if(ca){var bu;if(ca){var Su="oninput"in document;if(!Su){var _h=document.createElement("div");_h.setAttribute("oninput","return;"),Su=typeof _h.oninput=="function"}bu=Su}else bu=!1;yh=bu&&(!document.documentMode||9<document.documentMode)}function vh(){Qi&&(Qi.detachEvent("onpropertychange",xh),Ki=Qi=null)}function xh(e){if(e.propertyName==="value"&&fs(Ki)){var n=[];ph(n,Ki,e,du(e)),ah(mv,n)}}function pv(e,n,l){e==="focusin"?(vh(),Qi=n,Ki=l,Qi.attachEvent("onpropertychange",xh)):e==="focusout"&&vh()}function gv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fs(Ki)}function yv(e,n){if(e==="click")return fs(n)}function _v(e,n){if(e==="input"||e==="change")return fs(n)}function vv(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var pn=typeof Object.is=="function"?Object.is:vv;function Ji(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(!Ra.call(n,f)||!pn(e[f],n[f]))return!1}return!0}function bh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sh(e,n){var l=bh(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=bh(l)}}function kh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?kh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Th(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=ls(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=ls(e.document)}return n}function ku(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 xv=ca&&"documentMode"in document&&11>=document.documentMode,Wl=null,Tu=null,Pi=null,Nu=!1;function Nh(e,n,l){var s=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Nu||Wl==null||Wl!==ls(s)||(s=Wl,"selectionStart"in s&&ku(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}),Pi&&Ji(Pi,s)||(Pi=s,s=Ws(Tu,"onSelect"),0<s.length&&(n=new us("onSelect","select",null,n,l),e.push({event:n,listeners:s}),n.target=Wl)))}function yl(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var ei={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")},Eu={},Eh={};ca&&(Eh=document.createElement("div").style,"AnimationEvent"in window||(delete ei.animationend.animation,delete ei.animationiteration.animation,delete ei.animationstart.animation),"TransitionEvent"in window||delete ei.transitionend.transition);function _l(e){if(Eu[e])return Eu[e];if(!ei[e])return e;var n=ei[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in Eh)return Eu[e]=n[l];return e}var Ch=_l("animationend"),Ah=_l("animationiteration"),wh=_l("animationstart"),bv=_l("transitionrun"),Sv=_l("transitionstart"),kv=_l("transitioncancel"),jh=_l("transitionend"),zh=new Map,Cu="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(" ");Cu.push("scrollEnd");function $n(e,n){zh.set(e,n),pl(n,[e])}var ds=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)},wn=[],ti=0,Au=0;function hs(){for(var e=ti,n=Au=ti=0;n<e;){var l=wn[n];wn[n++]=null;var s=wn[n];wn[n++]=null;var f=wn[n];wn[n++]=null;var d=wn[n];if(wn[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&&Mh(l,f,d)}}function ms(e,n,l,s){wn[ti++]=e,wn[ti++]=n,wn[ti++]=l,wn[ti++]=s,Au|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function wu(e,n,l,s){return ms(e,n,l,s),ps(e)}function vl(e,n){return ms(e,null,null,n),ps(e)}function Mh(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 ps(e){if(50<xr)throw xr=0,Uc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ni={};function Tv(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 Tv(e,n,l,s)}function ju(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fa(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 Rh(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 gs(e,n,l,s,f,d){var v=0;if(s=e,typeof e=="function")ju(e)&&(v=1);else if(typeof e=="string")v=w0(e,l,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case he:return e=gn(31,l,n,f),e.elementType=he,e.lanes=d,e;case L:return xl(l.children,f,d,n);case O:v=8,f|=24;break;case k:return e=gn(12,l,n,f|2),e.elementType=k,e.lanes=d,e;case $:return e=gn(13,l,n,f),e.elementType=$,e.lanes=d,e;case B:return e=gn(19,l,n,f),e.elementType=B,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case w:v=10;break e;case z:v=9;break e;case Q:v=11;break e;case J: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 zu(e,n,l){return e=gn(6,e,null,n),e.lanes=l,e}function Oh(e){var n=gn(18,null,null,0);return n.stateNode=e,n}function Mu(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 Dh=new WeakMap;function jn(e,n){if(typeof e=="object"&&e!==null){var l=Dh.get(e);return l!==void 0?l:(n={value:e,source:n,stack:Hl(n)},Dh.set(e,n),n)}return{value:e,source:n,stack:Hl(n)}}var ai=[],li=0,ys=null,Wi=0,zn=[],Mn=0,Ua=null,Kn=1,Jn="";function da(e,n){ai[li++]=Wi,ai[li++]=ys,ys=e,Wi=n}function Lh(e,n,l){zn[Mn++]=Kn,zn[Mn++]=Jn,zn[Mn++]=Ua,Ua=e;var s=Kn;e=Jn;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,Kn=1<<32-ht(n)+f|l<<f|s,Jn=d+e}else Kn=1<<d|l<<f|s,Jn=e}function Ru(e){e.return!==null&&(da(e,1),Lh(e,1,0))}function Ou(e){for(;e===ys;)ys=ai[--li],ai[li]=null,Wi=ai[--li],ai[li]=null;for(;e===Ua;)Ua=zn[--Mn],zn[Mn]=null,Jn=zn[--Mn],zn[Mn]=null,Kn=zn[--Mn],zn[Mn]=null}function Bh(e,n){zn[Mn++]=Kn,zn[Mn++]=Jn,zn[Mn++]=Ua,Kn=n.id,Jn=n.overflow,Ua=e}var Gt=null,_t=null,Qe=!1,Ia=null,Rn=!1,Du=Error(r(519));function Ha(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw er(jn(n,e)),Du}function Uh(e){var n=e.stateNode,l=e.type,s=e.memoizedProps;switch(n[Vt]=e,n[an]=s,l){case"dialog":Ge("cancel",n),Ge("close",n);break;case"iframe":case"object":case"embed":Ge("load",n);break;case"video":case"audio":for(l=0;l<Sr.length;l++)Ge(Sr[l],n);break;case"source":Ge("error",n);break;case"img":case"image":case"link":Ge("error",n),Ge("load",n);break;case"details":Ge("toggle",n);break;case"input":Ge("invalid",n),Jd(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ge("invalid",n);break;case"textarea":Ge("invalid",n),Wd(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||tg(n.textContent,l)?(s.popover!=null&&(Ge("beforetoggle",n),Ge("toggle",n)),s.onScroll!=null&&Ge("scroll",n),s.onScrollEnd!=null&&Ge("scrollend",n),s.onClick!=null&&(n.onclick=ua),n=!0):n=!1,n||Ha(e,!0)}function Ih(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Gt=Gt.return}}function ii(e){if(e!==Gt)return!1;if(!Qe)return Ih(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")||Wc(e.type,e.memoizedProps)),l=!l),l&&_t&&Ha(e),Ih(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));_t=cg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));_t=cg(e)}else n===27?(n=_t,el(e.type)?(e=lf,lf=null,_t=e):_t=n):_t=Gt?Dn(e.stateNode.nextSibling):null;return!0}function bl(){_t=Gt=null,Qe=!1}function Lu(){var e=Ia;return e!==null&&(un===null?un=e:un.push.apply(un,e),Ia=null),e}function er(e){Ia===null?Ia=[e]:Ia.push(e)}var Bu=C(null),Sl=null,ha=null;function qa(e,n,l){T(Bu,n._currentValue),n._currentValue=l}function ma(e){e._currentValue=Bu.current,G(Bu)}function Uu(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 Iu(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 S=d;d=f;for(var A=0;A<n.length;A++)if(S.context===n[A]){d.lanes|=l,S=d.alternate,S!==null&&(S.lanes|=l),Uu(d.return,l,e),s||(v=null);break e}d=S.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),Uu(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 ri(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 S=f.type;pn(f.pendingProps.value,v.value)||(e!==null?e.push(S):e=[S])}}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(Cr):e=[Cr])}f=f.return}e!==null&&Iu(n,e,l,s),n.flags|=262144}function _s(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,ha=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $t(e){return Hh(Sl,e)}function vs(e,n){return Sl===null&&kl(e),Hh(e,n)}function Hh(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},ha===null){if(e===null)throw Error(r(308));ha=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else ha=ha.next=n;return l}var Nv=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()})}},Ev=t.unstable_scheduleCallback,Cv=t.unstable_NormalPriority,Ct={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Hu(){return{controller:new Nv,data:new Map,refCount:0}}function tr(e){e.refCount--,e.refCount===0&&Ev(Cv,function(){e.controller.abort()})}var nr=null,qu=0,si=0,oi=null;function Av(e,n){if(nr===null){var l=nr=[];qu=0,si=$c(),oi={status:"pending",value:void 0,then:function(s){l.push(s)}}}return qu++,n.then(qh,qh),n}function qh(){if(--qu===0&&nr!==null){oi!==null&&(oi.status="fulfilled");var e=nr;nr=null,si=0,oi=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function wv(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 Vh=U.S;U.S=function(e,n){Np=Bt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Av(e,n),Vh!==null&&Vh(e,n)};var Tl=C(null);function Vu(){var e=Tl.current;return e!==null?e:mt.pooledCache}function xs(e,n){n===null?T(Tl,Tl.current):T(Tl,n.pool)}function Gh(){var e=Vu();return e===null?null:{parent:Ct._currentValue,pool:e}}var ui=Error(r(460)),Gu=Error(r(474)),bs=Error(r(542)),Ss={then:function(){}};function $h(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zh(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(ua,ua),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Xh(e),e;default:if(typeof n.status=="string")n.then(ua,ua);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,Xh(e),e}throw El=n,ui}}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,ui):l}}var El=null;function Yh(){if(El===null)throw Error(r(459));var e=El;return El=null,e}function Xh(e){if(e===ui||e===bs)throw Error(r(483))}var ci=null,ar=0;function ks(e){var n=ar;return ar+=1,ci===null&&(ci=[]),Zh(ci,e,n)}function lr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Ts(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 Fh(e){function n(D,j){if(e){var I=D.deletions;I===null?(D.deletions=[j],D.flags|=16):I.push(j)}}function l(D,j){if(!e)return null;for(;j!==null;)n(D,j),j=j.sibling;return null}function s(D){for(var j=new Map;D!==null;)D.key!==null?j.set(D.key,D):j.set(D.index,D),D=D.sibling;return j}function f(D,j){return D=fa(D,j),D.index=0,D.sibling=null,D}function d(D,j,I){return D.index=I,e?(I=D.alternate,I!==null?(I=I.index,I<j?(D.flags|=67108866,j):I):(D.flags|=67108866,j)):(D.flags|=1048576,j)}function v(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function S(D,j,I,K){return j===null||j.tag!==6?(j=zu(I,D.mode,K),j.return=D,j):(j=f(j,I),j.return=D,j)}function A(D,j,I,K){var Ee=I.type;return Ee===L?Y(D,j,I.props.children,K,I.key):j!==null&&(j.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===de&&Nl(Ee)===j.type)?(j=f(j,I.props),lr(j,I),j.return=D,j):(j=gs(I.type,I.key,I.props,null,D.mode,K),lr(j,I),j.return=D,j)}function H(D,j,I,K){return j===null||j.tag!==4||j.stateNode.containerInfo!==I.containerInfo||j.stateNode.implementation!==I.implementation?(j=Mu(I,D.mode,K),j.return=D,j):(j=f(j,I.children||[]),j.return=D,j)}function Y(D,j,I,K,Ee){return j===null||j.tag!==7?(j=xl(I,D.mode,K,Ee),j.return=D,j):(j=f(j,I),j.return=D,j)}function W(D,j,I){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=zu(""+j,D.mode,I),j.return=D,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case b:return I=gs(j.type,j.key,j.props,null,D.mode,I),lr(I,j),I.return=D,I;case N:return j=Mu(j,D.mode,I),j.return=D,j;case de:return j=Nl(j),W(D,j,I)}if(Z(j)||le(j))return j=xl(j,D.mode,I,null),j.return=D,j;if(typeof j.then=="function")return W(D,ks(j),I);if(j.$$typeof===w)return W(D,vs(D,j),I);Ts(D,j)}return null}function q(D,j,I,K){var Ee=j!==null?j.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return Ee!==null?null:S(D,j,""+I,K);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case b:return I.key===Ee?A(D,j,I,K):null;case N:return I.key===Ee?H(D,j,I,K):null;case de:return I=Nl(I),q(D,j,I,K)}if(Z(I)||le(I))return Ee!==null?null:Y(D,j,I,K,null);if(typeof I.then=="function")return q(D,j,ks(I),K);if(I.$$typeof===w)return q(D,j,vs(D,I),K);Ts(D,I)}return null}function V(D,j,I,K,Ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return D=D.get(I)||null,S(j,D,""+K,Ee);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return D=D.get(K.key===null?I:K.key)||null,A(j,D,K,Ee);case N:return D=D.get(K.key===null?I:K.key)||null,H(j,D,K,Ee);case de:return K=Nl(K),V(D,j,I,K,Ee)}if(Z(K)||le(K))return D=D.get(I)||null,Y(j,D,K,Ee,null);if(typeof K.then=="function")return V(D,j,I,ks(K),Ee);if(K.$$typeof===w)return V(D,j,I,vs(j,K),Ee);Ts(j,K)}return null}function _e(D,j,I,K){for(var Ee=null,We=null,ke=j,Ue=j=0,Xe=null;ke!==null&&Ue<I.length;Ue++){ke.index>Ue?(Xe=ke,ke=null):Xe=ke.sibling;var et=q(D,ke,I[Ue],K);if(et===null){ke===null&&(ke=Xe);break}e&&ke&&et.alternate===null&&n(D,ke),j=d(et,j,Ue),We===null?Ee=et:We.sibling=et,We=et,ke=Xe}if(Ue===I.length)return l(D,ke),Qe&&da(D,Ue),Ee;if(ke===null){for(;Ue<I.length;Ue++)ke=W(D,I[Ue],K),ke!==null&&(j=d(ke,j,Ue),We===null?Ee=ke:We.sibling=ke,We=ke);return Qe&&da(D,Ue),Ee}for(ke=s(ke);Ue<I.length;Ue++)Xe=V(ke,D,Ue,I[Ue],K),Xe!==null&&(e&&Xe.alternate!==null&&ke.delete(Xe.key===null?Ue:Xe.key),j=d(Xe,j,Ue),We===null?Ee=Xe:We.sibling=Xe,We=Xe);return e&&ke.forEach(function(il){return n(D,il)}),Qe&&da(D,Ue),Ee}function Ae(D,j,I,K){if(I==null)throw Error(r(151));for(var Ee=null,We=null,ke=j,Ue=j=0,Xe=null,et=I.next();ke!==null&&!et.done;Ue++,et=I.next()){ke.index>Ue?(Xe=ke,ke=null):Xe=ke.sibling;var il=q(D,ke,et.value,K);if(il===null){ke===null&&(ke=Xe);break}e&&ke&&il.alternate===null&&n(D,ke),j=d(il,j,Ue),We===null?Ee=il:We.sibling=il,We=il,ke=Xe}if(et.done)return l(D,ke),Qe&&da(D,Ue),Ee;if(ke===null){for(;!et.done;Ue++,et=I.next())et=W(D,et.value,K),et!==null&&(j=d(et,j,Ue),We===null?Ee=et:We.sibling=et,We=et);return Qe&&da(D,Ue),Ee}for(ke=s(ke);!et.done;Ue++,et=I.next())et=V(ke,D,Ue,et.value,K),et!==null&&(e&&et.alternate!==null&&ke.delete(et.key===null?Ue:et.key),j=d(et,j,Ue),We===null?Ee=et:We.sibling=et,We=et);return e&&ke.forEach(function(H0){return n(D,H0)}),Qe&&da(D,Ue),Ee}function dt(D,j,I,K){if(typeof I=="object"&&I!==null&&I.type===L&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case b:e:{for(var Ee=I.key;j!==null;){if(j.key===Ee){if(Ee=I.type,Ee===L){if(j.tag===7){l(D,j.sibling),K=f(j,I.props.children),K.return=D,D=K;break e}}else if(j.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===de&&Nl(Ee)===j.type){l(D,j.sibling),K=f(j,I.props),lr(K,I),K.return=D,D=K;break e}l(D,j);break}else n(D,j);j=j.sibling}I.type===L?(K=xl(I.props.children,D.mode,K,I.key),K.return=D,D=K):(K=gs(I.type,I.key,I.props,null,D.mode,K),lr(K,I),K.return=D,D=K)}return v(D);case N:e:{for(Ee=I.key;j!==null;){if(j.key===Ee)if(j.tag===4&&j.stateNode.containerInfo===I.containerInfo&&j.stateNode.implementation===I.implementation){l(D,j.sibling),K=f(j,I.children||[]),K.return=D,D=K;break e}else{l(D,j);break}else n(D,j);j=j.sibling}K=Mu(I,D.mode,K),K.return=D,D=K}return v(D);case de:return I=Nl(I),dt(D,j,I,K)}if(Z(I))return _e(D,j,I,K);if(le(I)){if(Ee=le(I),typeof Ee!="function")throw Error(r(150));return I=Ee.call(I),Ae(D,j,I,K)}if(typeof I.then=="function")return dt(D,j,ks(I),K);if(I.$$typeof===w)return dt(D,j,vs(D,I),K);Ts(D,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,j!==null&&j.tag===6?(l(D,j.sibling),K=f(j,I),K.return=D,D=K):(l(D,j),K=zu(I,D.mode,K),K.return=D,D=K),v(D)):l(D,j)}return function(D,j,I,K){try{ar=0;var Ee=dt(D,j,I,K);return ci=null,Ee}catch(ke){if(ke===ui||ke===bs)throw ke;var We=gn(29,ke,null,D.mode);return We.lanes=K,We.return=D,We}finally{}}}var Cl=Fh(!0),Qh=Fh(!1),Va=!1;function $u(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zu(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 $a(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=ps(e),Mh(e,null,l),n}return ms(e,s,n,l),ps(e)}function ir(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,Hd(e,l)}}function Yu(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 Xu=!1;function rr(){if(Xu){var e=oi;if(e!==null)throw e}}function sr(e,n,l,s){Xu=!1;var f=e.updateQueue;Va=!1;var d=f.firstBaseUpdate,v=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var A=S,H=A.next;A.next=null,v===null?d=H:v.next=H,v=A;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==v&&(S===null?Y.firstBaseUpdate=H:S.next=H,Y.lastBaseUpdate=A))}if(d!==null){var W=f.baseState;v=0,Y=H=A=null,S=d;do{var q=S.lane&-536870913,V=q!==S.lane;if(V?(Ye&q)===q:(s&q)===q){q!==0&&q===si&&(Xu=!0),Y!==null&&(Y=Y.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var _e=e,Ae=S;q=n;var dt=l;switch(Ae.tag){case 1:if(_e=Ae.payload,typeof _e=="function"){W=_e.call(dt,W,q);break e}W=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Ae.payload,q=typeof _e=="function"?_e.call(dt,W,q):_e,q==null)break e;W=_({},W,q);break e;case 2:Va=!0}}q=S.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:S.tag,payload:S.payload,callback:S.callback,next:null},Y===null?(H=Y=V,A=W):Y=Y.next=V,v|=q;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;V=S,S=V.next,V.next=null,f.lastBaseUpdate=V,f.shared.pending=null}}while(!0);Y===null&&(A=W),f.baseState=A,f.firstBaseUpdate=H,f.lastBaseUpdate=Y,d===null&&(f.shared.lanes=0),Qa|=v,e.lanes=v,e.memoizedState=W}}function Kh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Jh(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Kh(l[e],n)}var fi=C(null),Ns=C(0);function Ph(e,n){e=ka,T(Ns,e),T(fi,n),ka=e|n.baseLanes}function Fu(){T(Ns,ka),T(fi,fi.current)}function Qu(){ka=Ns.current,G(fi),G(Ns)}var yn=C(null),On=null;function Za(e){var n=e.alternate;T(Tt,Tt.current&1),T(yn,e),On===null&&(n===null||fi.current!==null||n.memoizedState!==null)&&(On=e)}function Ku(e){T(Tt,Tt.current),T(yn,e),On===null&&(On=e)}function Wh(e){e.tag===22?(T(Tt,Tt.current),T(yn,e),On===null&&(On=e)):Ya()}function Ya(){T(Tt,Tt.current),T(yn,yn.current)}function _n(e){G(yn),On===e&&(On=null),G(Tt)}var Tt=C(0);function Es(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||nf(l)||af(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 pa=0,Le=null,ct=null,At=null,Cs=!1,di=!1,Al=!1,As=0,or=0,hi=null,jv=0;function St(){throw Error(r(321))}function Ju(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 Pu(e,n,l,s,f,d){return pa=d,Le=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=e===null||e.memoizedState===null?Lm:hc,Al=!1,d=l(s,f),Al=!1,di&&(d=tm(n,l,s,f)),em(e),d}function em(e){U.H=fr;var n=ct!==null&&ct.next!==null;if(pa=0,At=ct=Le=null,Cs=!1,or=0,hi=null,n)throw Error(r(300));e===null||wt||(e=e.dependencies,e!==null&&_s(e)&&(wt=!0))}function tm(e,n,l,s){Le=e;var f=0;do{if(di&&(hi=null),or=0,di=!1,25<=f)throw Error(r(301));if(f+=1,At=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)}U.H=Bm,d=n(l,s)}while(di);return d}function zv(){var e=U.H,n=e.useState()[0];return n=typeof n.then=="function"?ur(n):n,e=e.useState()[0],(ct!==null?ct.memoizedState:null)!==e&&(Le.flags|=1024),n}function Wu(){var e=As!==0;return As=0,e}function ec(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function tc(e){if(Cs){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Cs=!1}pa=0,At=ct=Le=null,di=!1,or=As=0,hi=null}function Pt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?Le.memoizedState=At=e:At=At.next=e,At}function Nt(){if(ct===null){var e=Le.alternate;e=e!==null?e.memoizedState:null}else e=ct.next;var n=At===null?Le.memoizedState:At.next;if(n!==null)At=n,ct=e;else{if(e===null)throw Le.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},At===null?Le.memoizedState=At=e:At=At.next=e}return At}function ws(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ur(e){var n=or;return or+=1,hi===null&&(hi=[]),e=Zh(hi,e,n),n=Le,(At===null?n.memoizedState:At.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Lm:hc),e}function js(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ur(e);if(e.$$typeof===w)return $t(e)}throw Error(r(438,String(e)))}function nc(e){var n=null,l=Le.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var s=Le.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=ws(),Le.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]=M;return n.index++,l}function ga(e,n){return typeof n=="function"?n(e):n}function zs(e){var n=Nt();return ac(n,ct,e)}function ac(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 S=v=null,A=null,H=n,Y=!1;do{var W=H.lane&-536870913;if(W!==H.lane?(Ye&W)===W:(pa&W)===W){var q=H.revertLane;if(q===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),W===si&&(Y=!0);else if((pa&q)===q){H=H.next,q===si&&(Y=!0);continue}else W={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},A===null?(S=A=W,v=d):A=A.next=W,Le.lanes|=q,Qa|=q;W=H.action,Al&&l(d,W),d=H.hasEagerState?H.eagerState:l(d,W)}else q={lane:W,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},A===null?(S=A=q,v=d):A=A.next=q,Le.lanes|=W,Qa|=W;H=H.next}while(H!==null&&H!==n);if(A===null?v=d:A.next=S,!pn(d,e.memoizedState)&&(wt=!0,Y&&(l=oi,l!==null)))throw l;e.memoizedState=d,e.baseState=v,e.baseQueue=A,s.lastRenderedState=d}return f===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function lc(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)||(wt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),l.lastRenderedState=d}return[d,s]}function nm(e,n,l){var s=Le,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,wt=!0),f=f.queue,sc(im.bind(null,s,f,e),[e]),f.getSnapshot!==n||v||At!==null&&At.memoizedState.tag&1){if(s.flags|=2048,mi(9,{destroy:void 0},lm.bind(null,s,f,l,n),null),mt===null)throw Error(r(349));d||(pa&127)!==0||am(s,n,l)}return l}function am(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Le.updateQueue,n===null?(n=ws(),Le.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function lm(e,n,l,s){n.value=l,n.getSnapshot=s,rm(n)&&sm(e)}function im(e,n,l){return l(function(){rm(n)&&sm(e)})}function rm(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!pn(e,l)}catch{return!0}}function sm(e){var n=vl(e,2);n!==null&&cn(n,e,2)}function ic(e){var n=Pt();if(typeof e=="function"){var l=e;if(e=l(),Al){nn(!0);try{l()}finally{nn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:e},n}function om(e,n,l,s){return e.baseState=l,ac(e,ct,typeof s=="function"?s:ga)}function Mv(e,n,l,s,f){if(Os(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)}};U.T!==null?l(!0):d.isTransition=!1,s(d),l=n.pending,l===null?(d.next=n.pending=d,um(n,d)):(d.next=l.next,n.pending=l.next=d)}}function um(e,n){var l=n.action,s=n.payload,f=e.state;if(n.isTransition){var d=U.T,v={};U.T=v;try{var S=l(f,s),A=U.S;A!==null&&A(v,S),cm(e,n,S)}catch(H){rc(e,n,H)}finally{d!==null&&v.types!==null&&(d.types=v.types),U.T=d}}else try{d=l(f,s),cm(e,n,d)}catch(H){rc(e,n,H)}}function cm(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(s){fm(e,n,s)},function(s){return rc(e,n,s)}):fm(e,n,l)}function fm(e,n,l){n.status="fulfilled",n.value=l,dm(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,um(e,l)))}function rc(e,n,l){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=l,dm(n),n=n.next;while(n!==s)}e.action=null}function dm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function hm(e,n){return n}function mm(e,n){if(Qe){var l=mt.formState;if(l!==null){e:{var s=Le;if(Qe){if(_t){t:{for(var f=_t,d=Rn;f.nodeType!==8;){if(!d){f=null;break t}if(f=Dn(f.nextSibling),f===null){f=null;break t}}d=f.data,f=d==="F!"||d==="F"?f:null}if(f){_t=Dn(f.nextSibling),s=f.data==="F!";break e}}Ha(s)}s=!1}s&&(n=l[0])}}return l=Pt(),l.memoizedState=l.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hm,lastRenderedState:n},l.queue=s,l=Rm.bind(null,Le,s),s.dispatch=l,s=ic(!1),d=dc.bind(null,Le,!1,s.queue),s=Pt(),f={state:n,dispatch:null,action:e,pending:null},s.queue=f,l=Mv.bind(null,Le,f,d,l),f.dispatch=l,s.memoizedState=e,[n,l,!1]}function pm(e){var n=Nt();return gm(n,ct,e)}function gm(e,n,l){if(n=ac(e,n,hm)[0],e=zs(ga)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=ur(n)}catch(v){throw v===ui?bs:v}else s=n;n=Nt();var f=n.queue,d=f.dispatch;return l!==n.memoizedState&&(Le.flags|=2048,mi(9,{destroy:void 0},Rv.bind(null,f,l),null)),[s,d,e]}function Rv(e,n){e.action=n}function ym(e){var n=Nt(),l=ct;if(l!==null)return gm(n,l,e);Nt(),n=n.memoizedState,l=Nt();var s=l.queue.dispatch;return l.memoizedState=e,[n,s,!1]}function mi(e,n,l,s){return e={tag:e,create:l,deps:s,inst:n,next:null},n=Le.updateQueue,n===null&&(n=ws(),Le.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 _m(){return Nt().memoizedState}function Ms(e,n,l,s){var f=Pt();Le.flags|=e,f.memoizedState=mi(1|n,{destroy:void 0},l,s===void 0?null:s)}function Rs(e,n,l,s){var f=Nt();s=s===void 0?null:s;var d=f.memoizedState.inst;ct!==null&&s!==null&&Ju(s,ct.memoizedState.deps)?f.memoizedState=mi(n,d,l,s):(Le.flags|=e,f.memoizedState=mi(1|n,d,l,s))}function vm(e,n){Ms(8390656,8,e,n)}function sc(e,n){Rs(2048,8,e,n)}function Ov(e){Le.flags|=4;var n=Le.updateQueue;if(n===null)n=ws(),Le.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function xm(e){var n=Nt().memoizedState;return Ov({ref:n,nextImpl:e}),function(){if((lt&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function bm(e,n){return Rs(4,2,e,n)}function Sm(e,n){return Rs(4,4,e,n)}function km(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 Tm(e,n,l){l=l!=null?l.concat([e]):null,Rs(4,4,km.bind(null,n,e),l)}function oc(){}function Nm(e,n){var l=Nt();n=n===void 0?null:n;var s=l.memoizedState;return n!==null&&Ju(n,s[1])?s[0]:(l.memoizedState=[e,n],e)}function Em(e,n){var l=Nt();n=n===void 0?null:n;var s=l.memoizedState;if(n!==null&&Ju(n,s[1]))return s[0];if(s=e(),Al){nn(!0);try{e()}finally{nn(!1)}}return l.memoizedState=[s,n],s}function uc(e,n,l){return l===void 0||(pa&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=Cp(),Le.lanes|=e,Qa|=e,l)}function Cm(e,n,l,s){return pn(l,n)?l:fi.current!==null?(e=uc(e,l,s),pn(e,n)||(wt=!0),e):(pa&42)===0||(pa&1073741824)!==0&&(Ye&261930)===0?(wt=!0,e.memoizedState=l):(e=Cp(),Le.lanes|=e,Qa|=e,n)}function Am(e,n,l,s,f){var d=P.p;P.p=d!==0&&8>d?d:8;var v=U.T,S={};U.T=S,dc(e,!1,n,l);try{var A=f(),H=U.S;if(H!==null&&H(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var Y=wv(A,s);cr(e,n,Y,bn(e))}else cr(e,n,s,bn(e))}catch(W){cr(e,n,{then:function(){},status:"rejected",reason:W},bn())}finally{P.p=d,v!==null&&S.types!==null&&(v.types=S.types),U.T=v}}function Dv(){}function cc(e,n,l,s){if(e.tag!==5)throw Error(r(476));var f=wm(e).queue;Am(e,f,n,oe,l===null?Dv:function(){return jm(e),l(s)})}function wm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:oe},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function jm(e){var n=wm(e);n.next===null&&(n=e.alternate.memoizedState),cr(e,n.next.queue,{},bn())}function fc(){return $t(Cr)}function zm(){return Nt().memoizedState}function Mm(){return Nt().memoizedState}function Lv(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=bn();e=Ga(l);var s=$a(n,e,l);s!==null&&(cn(s,n,l),ir(s,n,l)),n={cache:Hu()},e.payload=n;return}n=n.return}}function Bv(e,n,l){var s=bn();l={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Os(e)?Om(n,l):(l=wu(e,n,l,s),l!==null&&(cn(l,e,s),Dm(l,n,s)))}function Rm(e,n,l){var s=bn();cr(e,n,l,s)}function cr(e,n,l,s){var f={lane:s,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Os(e))Om(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,S=d(v,l);if(f.hasEagerState=!0,f.eagerState=S,pn(S,v))return ms(e,n,f,0),mt===null&&hs(),!1}catch{}finally{}if(l=wu(e,n,f,s),l!==null)return cn(l,e,s),Dm(l,n,s),!0}return!1}function dc(e,n,l,s){if(s={lane:2,revertLane:$c(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Os(e)){if(n)throw Error(r(479))}else n=wu(e,l,s,2),n!==null&&cn(n,e,2)}function Os(e){var n=e.alternate;return e===Le||n!==null&&n===Le}function Om(e,n){di=Cs=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function Dm(e,n,l){if((l&4194048)!==0){var s=n.lanes;s&=e.pendingLanes,l|=s,n.lanes=l,Hd(e,l)}}var fr={readContext:$t,use:js,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};fr.useEffectEvent=St;var Lm={readContext:$t,use:js,useCallback:function(e,n){return Pt().memoizedState=[e,n===void 0?null:n],e},useContext:$t,useEffect:vm,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,Ms(4194308,4,km.bind(null,n,e),l)},useLayoutEffect:function(e,n){return Ms(4194308,4,e,n)},useInsertionEffect:function(e,n){Ms(4,2,e,n)},useMemo:function(e,n){var l=Pt();n=n===void 0?null:n;var s=e();if(Al){nn(!0);try{e()}finally{nn(!1)}}return l.memoizedState=[s,n],s},useReducer:function(e,n,l){var s=Pt();if(l!==void 0){var f=l(n);if(Al){nn(!0);try{l(n)}finally{nn(!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=Bv.bind(null,Le,e),[s.memoizedState,e]},useRef:function(e){var n=Pt();return e={current:e},n.memoizedState=e},useState:function(e){e=ic(e);var n=e.queue,l=Rm.bind(null,Le,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:oc,useDeferredValue:function(e,n){var l=Pt();return uc(l,e,n)},useTransition:function(){var e=ic(!1);return e=Am.bind(null,Le,e.queue,!0,!1),Pt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var s=Le,f=Pt();if(Qe){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),mt===null)throw Error(r(349));(Ye&127)!==0||am(s,n,l)}f.memoizedState=l;var d={value:l,getSnapshot:n};return f.queue=d,vm(im.bind(null,s,d,e),[e]),s.flags|=2048,mi(9,{destroy:void 0},lm.bind(null,s,d,l,n),null),l},useId:function(){var e=Pt(),n=mt.identifierPrefix;if(Qe){var l=Jn,s=Kn;l=(s&~(1<<32-ht(s)-1)).toString(32)+l,n="_"+n+"R_"+l,l=As++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=jv++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:fc,useFormState:mm,useActionState:mm,useOptimistic:function(e){var n=Pt();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=dc.bind(null,Le,!0,l),l.dispatch=n,[e,n]},useMemoCache:nc,useCacheRefresh:function(){return Pt().memoizedState=Lv.bind(null,Le)},useEffectEvent:function(e){var n=Pt(),l={impl:e};return n.memoizedState=l,function(){if((lt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},hc={readContext:$t,use:js,useCallback:Nm,useContext:$t,useEffect:sc,useImperativeHandle:Tm,useInsertionEffect:bm,useLayoutEffect:Sm,useMemo:Em,useReducer:zs,useRef:_m,useState:function(){return zs(ga)},useDebugValue:oc,useDeferredValue:function(e,n){var l=Nt();return Cm(l,ct.memoizedState,e,n)},useTransition:function(){var e=zs(ga)[0],n=Nt().memoizedState;return[typeof e=="boolean"?e:ur(e),n]},useSyncExternalStore:nm,useId:zm,useHostTransitionStatus:fc,useFormState:pm,useActionState:pm,useOptimistic:function(e,n){var l=Nt();return om(l,ct,e,n)},useMemoCache:nc,useCacheRefresh:Mm};hc.useEffectEvent=xm;var Bm={readContext:$t,use:js,useCallback:Nm,useContext:$t,useEffect:sc,useImperativeHandle:Tm,useInsertionEffect:bm,useLayoutEffect:Sm,useMemo:Em,useReducer:lc,useRef:_m,useState:function(){return lc(ga)},useDebugValue:oc,useDeferredValue:function(e,n){var l=Nt();return ct===null?uc(l,e,n):Cm(l,ct.memoizedState,e,n)},useTransition:function(){var e=lc(ga)[0],n=Nt().memoizedState;return[typeof e=="boolean"?e:ur(e),n]},useSyncExternalStore:nm,useId:zm,useHostTransitionStatus:fc,useFormState:ym,useActionState:ym,useOptimistic:function(e,n){var l=Nt();return ct!==null?om(l,ct,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:nc,useCacheRefresh:Mm};Bm.useEffectEvent=xm;function mc(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 pc={enqueueSetState:function(e,n,l){e=e._reactInternals;var s=bn(),f=Ga(s);f.payload=n,l!=null&&(f.callback=l),n=$a(e,f,s),n!==null&&(cn(n,e,s),ir(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=$a(e,f,s),n!==null&&(cn(n,e,s),ir(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=$a(e,s,l),n!==null&&(cn(n,e,l),ir(n,e,l))}};function Um(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?!Ji(l,s)||!Ji(f,d):!0}function Im(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&&pc.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 Hm(e){ds(e)}function qm(e){console.error(e)}function Vm(e){ds(e)}function Ds(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function Gm(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 gc(e,n,l){return l=Ga(l),l.tag=3,l.payload={element:null},l.callback=function(){Ds(e,n)},l}function $m(e){return e=Ga(e),e.tag=3,e}function Zm(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(){Gm(n,l,s)}}var v=l.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){Gm(n,l,s),typeof f!="function"&&(Ka===null?Ka=new Set([this]):Ka.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})})}function Uv(e,n,l,s,f){if(l.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=l.alternate,n!==null&&ri(n,l,f,!0),l=yn.current,l!==null){switch(l.tag){case 31:case 13:return On===null?Xs():l.alternate===null&&kt===0&&(kt=3),l.flags&=-257,l.flags|=65536,l.lanes=f,s===Ss?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([s]):n.add(s),qc(e,s,f)),!1;case 22:return l.flags|=65536,s===Ss?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)),qc(e,s,f)),!1}throw Error(r(435,l.tag))}return qc(e,s,f),Xs(),!1}if(Qe)return n=yn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,s!==Du&&(e=Error(r(422),{cause:s}),er(jn(e,l)))):(s!==Du&&(n=Error(r(423),{cause:s}),er(jn(n,l))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,s=jn(s,l),f=gc(e.stateNode,s,f),Yu(e,f),kt!==4&&(kt=2)),!1;var d=Error(r(520),{cause:s});if(d=jn(d,l),vr===null?vr=[d]:vr.push(d),kt!==4&&(kt=2),n===null)return!0;s=jn(s,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=f&-f,l.lanes|=e,e=gc(l.stateNode,s,e),Yu(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=$m(f),Zm(f,e,l,s),Yu(l,f),!1}l=l.return}while(l!==null);return!1}var yc=Error(r(461)),wt=!1;function Zt(e,n,l,s){n.child=e===null?Qh(n,null,l,s):Cl(n,e.child,l,s)}function Ym(e,n,l,s,f){l=l.render;var d=n.ref;if("ref"in s){var v={};for(var S in s)S!=="ref"&&(v[S]=s[S])}else v=s;return kl(n),s=Pu(e,n,l,v,d,f),S=Wu(),e!==null&&!wt?(ec(e,n,f),ya(e,n,f)):(Qe&&S&&Ru(n),n.flags|=1,Zt(e,n,s,f),n.child)}function Xm(e,n,l,s,f){if(e===null){var d=l.type;return typeof d=="function"&&!ju(d)&&d.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=d,Fm(e,n,d,s,f)):(e=gs(l.type,null,s,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!Nc(e,f)){var v=d.memoizedProps;if(l=l.compare,l=l!==null?l:Ji,l(v,s)&&e.ref===n.ref)return ya(e,n,f)}return n.flags|=1,e=fa(d,s),e.ref=n.ref,e.return=n,n.child=e}function Fm(e,n,l,s,f){if(e!==null){var d=e.memoizedProps;if(Ji(d,s)&&e.ref===n.ref)if(wt=!1,n.pendingProps=s=d,Nc(e,f))(e.flags&131072)!==0&&(wt=!0);else return n.lanes=e.lanes,ya(e,n,f)}return _c(e,n,l,s,f)}function Qm(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 Km(e,n,d,l,s)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&xs(n,d!==null?d.cachePool:null),d!==null?Ph(n,d):Fu(),Wh(n);else return s=n.lanes=536870912,Km(e,n,d!==null?d.baseLanes|l:l,l,s)}else d!==null?(xs(n,d.cachePool),Ph(n,d),Ya(),n.memoizedState=null):(e!==null&&xs(n,null),Fu(),Ya());return Zt(e,n,f,l),n.child}function dr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Km(e,n,l,s,f){var d=Vu();return d=d===null?null:{parent:Ct._currentValue,pool:d},n.memoizedState={baseLanes:l,cachePool:d},e!==null&&xs(n,null),Fu(),Wh(n),e!==null&&ri(e,n,s,!0),n.childLanes=f,null}function Ls(e,n){return n=Us({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Jm(e,n,l){return Cl(n,e.child,null,l),e=Ls(n,n.pendingProps),e.flags|=2,_n(n),n.memoizedState=null,e}function Iv(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=Ls(n,s),n.lanes=536870912,dr(null,e);if(Ku(n),(e=_t)?(e=ug(e,Rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ua!==null?{id:Kn,overflow:Jn}:null,retryLane:536870912,hydrationErrors:null},l=Oh(e),l.return=n,n.child=l,Gt=n,_t=null)):e=null,e===null)throw Ha(n);return n.lanes=536870912,null}return Ls(n,s)}var d=e.memoizedState;if(d!==null){var v=d.dehydrated;if(Ku(n),f)if(n.flags&256)n.flags&=-257,n=Jm(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(wt||ri(e,n,l,!1),f=(l&e.childLanes)!==0,wt||f){if(s=mt,s!==null&&(v=qd(s,l),v!==0&&v!==d.retryLane))throw d.retryLane=v,vl(e,v),cn(s,e,v),yc;Xs(),n=Jm(e,n,l)}else e=d.treeContext,_t=Dn(v.nextSibling),Gt=n,Qe=!0,Ia=null,Rn=!1,e!==null&&Bh(n,e),n=Ls(n,s),n.flags|=4096;return n}return e=fa(e.child,{mode:s.mode,children:s.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Bs(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 _c(e,n,l,s,f){return kl(n),l=Pu(e,n,l,s,void 0,f),s=Wu(),e!==null&&!wt?(ec(e,n,f),ya(e,n,f)):(Qe&&s&&Ru(n),n.flags|=1,Zt(e,n,l,f),n.child)}function Pm(e,n,l,s,f,d){return kl(n),n.updateQueue=null,l=tm(n,s,l,f),em(e),s=Wu(),e!==null&&!wt?(ec(e,n,d),ya(e,n,d)):(Qe&&s&&Ru(n),n.flags|=1,Zt(e,n,l,d),n.child)}function Wm(e,n,l,s,f){if(kl(n),n.stateNode===null){var d=ni,v=l.contextType;typeof v=="object"&&v!==null&&(d=$t(v)),d=new l(s,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=pc,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=s,d.state=n.memoizedState,d.refs={},$u(n),v=l.contextType,d.context=typeof v=="object"&&v!==null?$t(v):ni,d.state=n.memoizedState,v=l.getDerivedStateFromProps,typeof v=="function"&&(mc(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&&pc.enqueueReplaceState(d,d.state,null),sr(n,s,d,f),rr(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(e===null){d=n.stateNode;var S=n.memoizedProps,A=wl(l,S);d.props=A;var H=d.context,Y=l.contextType;v=ni,typeof Y=="object"&&Y!==null&&(v=$t(Y));var W=l.getDerivedStateFromProps;Y=typeof W=="function"||typeof d.getSnapshotBeforeUpdate=="function",S=n.pendingProps!==S,Y||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(S||H!==v)&&Im(n,d,s,v),Va=!1;var q=n.memoizedState;d.state=q,sr(n,s,d,f),rr(),H=n.memoizedState,S||q!==H||Va?(typeof W=="function"&&(mc(n,l,W,s),H=n.memoizedState),(A=Va||Um(n,l,A,s,q,H,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=H),d.props=s,d.state=H,d.context=v,s=A):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{d=n.stateNode,Zu(e,n),v=n.memoizedProps,Y=wl(l,v),d.props=Y,W=n.pendingProps,q=d.context,H=l.contextType,A=ni,typeof H=="object"&&H!==null&&(A=$t(H)),S=l.getDerivedStateFromProps,(H=typeof S=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==W||q!==A)&&Im(n,d,s,A),Va=!1,q=n.memoizedState,d.state=q,sr(n,s,d,f),rr();var V=n.memoizedState;v!==W||q!==V||Va||e!==null&&e.dependencies!==null&&_s(e.dependencies)?(typeof S=="function"&&(mc(n,l,S,s),V=n.memoizedState),(Y=Va||Um(n,l,Y,s,q,V,A)||e!==null&&e.dependencies!==null&&_s(e.dependencies))?(H||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,V,A),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,V,A)),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=A,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,Bs(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)):Zt(e,n,l,f),n.memoizedState=d.state,e=n.child):e=ya(e,n,f),e}function ep(e,n,l,s){return bl(),n.flags|=256,Zt(e,n,l,s),n.child}var vc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function xc(e){return{baseLanes:e,cachePool:Gh()}}function bc(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=xn),e}function tp(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?Za(n):Ya(),(e=_t)?(e=ug(e,Rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ua!==null?{id:Kn,overflow:Jn}:null,retryLane:536870912,hydrationErrors:null},l=Oh(e),l.return=n,n.child=l,Gt=n,_t=null)):e=null,e===null)throw Ha(n);return af(e)?n.lanes=32:n.lanes=536870912,null}var S=s.children;return s=s.fallback,f?(Ya(),f=n.mode,S=Us({mode:"hidden",children:S},f),s=xl(s,f,l,null),S.return=n,s.return=n,S.sibling=s,n.child=S,s=n.child,s.memoizedState=xc(l),s.childLanes=bc(e,v,l),n.memoizedState=vc,dr(null,s)):(Za(n),Sc(n,S))}var A=e.memoizedState;if(A!==null&&(S=A.dehydrated,S!==null)){if(d)n.flags&256?(Za(n),n.flags&=-257,n=kc(e,n,l)):n.memoizedState!==null?(Ya(),n.child=e.child,n.flags|=128,n=null):(Ya(),S=s.fallback,f=n.mode,s=Us({mode:"visible",children:s.children},f),S=xl(S,f,l,null),S.flags|=2,s.return=n,S.return=n,s.sibling=S,n.child=s,Cl(n,e.child,null,l),s=n.child,s.memoizedState=xc(l),s.childLanes=bc(e,v,l),n.memoizedState=vc,n=dr(null,s));else if(Za(n),af(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var H=v.dgst;v=H,s=Error(r(419)),s.stack="",s.digest=v,er({value:s,source:null,stack:null}),n=kc(e,n,l)}else if(wt||ri(e,n,l,!1),v=(l&e.childLanes)!==0,wt||v){if(v=mt,v!==null&&(s=qd(v,l),s!==0&&s!==A.retryLane))throw A.retryLane=s,vl(e,s),cn(v,e,s),yc;nf(S)||Xs(),n=kc(e,n,l)}else nf(S)?(n.flags|=192,n.child=e.child,n=null):(e=A.treeContext,_t=Dn(S.nextSibling),Gt=n,Qe=!0,Ia=null,Rn=!1,e!==null&&Bh(n,e),n=Sc(n,s.children),n.flags|=4096);return n}return f?(Ya(),S=s.fallback,f=n.mode,A=e.child,H=A.sibling,s=fa(A,{mode:"hidden",children:s.children}),s.subtreeFlags=A.subtreeFlags&65011712,H!==null?S=fa(H,S):(S=xl(S,f,l,null),S.flags|=2),S.return=n,s.return=n,s.sibling=S,n.child=s,dr(null,s),s=n.child,S=e.child.memoizedState,S===null?S=xc(l):(f=S.cachePool,f!==null?(A=Ct._currentValue,f=f.parent!==A?{parent:A,pool:A}:f):f=Gh(),S={baseLanes:S.baseLanes|l,cachePool:f}),s.memoizedState=S,s.childLanes=bc(e,v,l),n.memoizedState=vc,dr(e.child,s)):(Za(n),l=e.child,e=l.sibling,l=fa(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 Sc(e,n){return n=Us({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Us(e,n){return e=gn(22,e,null,n),e.lanes=0,e}function kc(e,n,l){return Cl(n,e.child,null,l),e=Sc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function np(e,n,l){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),Uu(e.return,n,l)}function Tc(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 ap(e,n,l){var s=n.pendingProps,f=s.revealOrder,d=s.tail;s=s.children;var v=Tt.current,S=(v&2)!==0;if(S?(v=v&1|2,n.flags|=128):v&=1,T(Tt,v),Zt(e,n,s,l),s=Qe?Wi:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&np(e,l,n);else if(e.tag===19)np(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&&Es(e)===null&&(f=l),l=l.sibling;l=f,l===null?(f=n.child,n.child=null):(f=l.sibling,l.sibling=null),Tc(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&&Es(e)===null){n.child=f;break}e=f.sibling,f.sibling=l,l=f,f=e}Tc(n,!0,l,null,d,s);break;case"together":Tc(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function ya(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),Qa|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(ri(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=fa(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=fa(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function Nc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&_s(e)))}function Hv(e,n,l){switch(n.tag){case 3:qe(n,n.stateNode.containerInfo),qa(n,Ct,e.memoizedState.cache),bl();break;case 27:case 5:ut(n);break;case 4:qe(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,Ku(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(Za(n),n.flags|=128,null):(l&n.child.childLanes)!==0?tp(e,n,l):(Za(n),e=ya(e,n,l),e!==null?e.sibling:null);Za(n);break;case 19:var f=(e.flags&128)!==0;if(s=(l&n.childLanes)!==0,s||(ri(e,n,l,!1),s=(l&n.childLanes)!==0),f){if(s)return ap(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,Qm(e,n,l,n.pendingProps);case 24:qa(n,Ct,e.memoizedState.cache)}return ya(e,n,l)}function lp(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)wt=!0;else{if(!Nc(e,l)&&(n.flags&128)===0)return wt=!1,Hv(e,n,l);wt=(e.flags&131072)!==0}else wt=!1,Qe&&(n.flags&1048576)!==0&&Lh(n,Wi,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")ju(e)?(s=wl(e,s),n.tag=1,n=Wm(null,n,e,s,l)):(n.tag=0,n=_c(null,n,e,s,l));else{if(e!=null){var f=e.$$typeof;if(f===Q){n.tag=11,n=Ym(null,n,e,s,l);break e}else if(f===J){n.tag=14,n=Xm(null,n,e,s,l);break e}}throw n=ne(e)||e,Error(r(306,n,""))}}return n;case 0:return _c(e,n,n.type,n.pendingProps,l);case 1:return s=n.type,f=wl(s,n.pendingProps),Wm(e,n,s,f,l);case 3:e:{if(qe(n,n.stateNode.containerInfo),e===null)throw Error(r(387));s=n.pendingProps;var d=n.memoizedState;f=d.element,Zu(e,n),sr(n,s,null,l);var v=n.memoizedState;if(s=v.cache,qa(n,Ct,s),s!==d.cache&&Iu(n,[Ct],l,!0),rr(),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=ep(e,n,s,l);break e}else if(s!==f){f=jn(Error(r(424)),n),er(f),n=ep(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=Dn(e.firstChild),Gt=n,Qe=!0,Ia=null,Rn=!0,l=Qh(n,null,s,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(bl(),s===f){n=ya(e,n,l);break e}Zt(e,n,s,l)}n=n.child}return n;case 26:return Bs(e,n),e===null?(l=pg(n.type,null,n.pendingProps,null))?n.memoizedState=l:Qe||(l=n.type,e=n.pendingProps,s=eo(X.current).createElement(l),s[Vt]=n,s[an]=e,Yt(s,l,e),Ut(s),n.stateNode=s):n.memoizedState=pg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return ut(n),e===null&&Qe&&(s=n.stateNode=dg(n.type,n.pendingProps,X.current),Gt=n,Rn=!0,f=_t,el(n.type)?(lf=f,_t=Dn(s.firstChild)):_t=f),Zt(e,n,n.pendingProps.children,l),Bs(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Qe&&((f=s=_t)&&(s=g0(s,n.type,n.pendingProps,Rn),s!==null?(n.stateNode=s,Gt=n,_t=Dn(s.firstChild),Rn=!1,f=!0):f=!1),f||Ha(n)),ut(n),f=n.type,d=n.pendingProps,v=e!==null?e.memoizedProps:null,s=d.children,Wc(f,d)?s=null:v!==null&&Wc(f,v)&&(n.flags|=32),n.memoizedState!==null&&(f=Pu(e,n,zv,null,null,l),Cr._currentValue=f),Bs(e,n),Zt(e,n,s,l),n.child;case 6:return e===null&&Qe&&((e=l=_t)&&(l=y0(l,n.pendingProps,Rn),l!==null?(n.stateNode=l,Gt=n,_t=null,e=!0):e=!1),e||Ha(n)),null;case 13:return tp(e,n,l);case 4:return qe(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=Cl(n,null,s,l):Zt(e,n,s,l),n.child;case 11:return Ym(e,n,n.type,n.pendingProps,l);case 7:return Zt(e,n,n.pendingProps,l),n.child;case 8:return Zt(e,n,n.pendingProps.children,l),n.child;case 12:return Zt(e,n,n.pendingProps.children,l),n.child;case 10:return s=n.pendingProps,qa(n,n.type,s.value),Zt(e,n,s.children,l),n.child;case 9:return f=n.type._context,s=n.pendingProps.children,kl(n),f=$t(f),s=s(f),n.flags|=1,Zt(e,n,s,l),n.child;case 14:return Xm(e,n,n.type,n.pendingProps,l);case 15:return Fm(e,n,n.type,n.pendingProps,l);case 19:return ap(e,n,l);case 31:return Iv(e,n,l);case 22:return Qm(e,n,l,n.pendingProps);case 24:return kl(n),s=$t(Ct),e===null?(f=Vu(),f===null&&(f=mt,d=Hu(),f.pooledCache=d,d.refCount++,d!==null&&(f.pooledCacheLanes|=l),f=d),n.memoizedState={parent:s,cache:f},$u(n),qa(n,Ct,f)):((e.lanes&l)!==0&&(Zu(e,n),sr(n,null,null,l),rr()),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,Ct,s)):(s=d.cache,qa(n,Ct,s),s!==f.cache&&Iu(n,[Ct],l,!0))),Zt(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function _a(e){e.flags|=4}function Ec(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(zp())e.flags|=8192;else throw El=Ss,Gu}else e.flags&=-16777217}function ip(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!xg(n))if(zp())e.flags|=8192;else throw El=Ss,Gu}function Is(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Ud():536870912,e.lanes|=n,_i|=n)}function hr(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 qv(e,n,l){var s=n.pendingProps;switch(Ou(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),ma(Ct),ce(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ii(n)?_a(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Lu())),vt(n),null;case 26:var f=n.type,d=n.memoizedState;return e===null?(_a(n),d!==null?(vt(n),ip(n,d)):(vt(n),Ec(n,f,null,s,l))):d?d!==e.memoizedState?(_a(n),vt(n),ip(n,d)):(vt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==s&&_a(n),vt(n),Ec(n,f,e,s,l)),null;case 27:if(Lt(n),l=X.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&_a(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return vt(n),null}e=te.current,ii(n)?Uh(n):(e=dg(f,s,l),n.stateNode=e,_a(n))}return vt(n),null;case 5:if(Lt(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&_a(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return vt(n),null}if(d=te.current,ii(n))Uh(n);else{var v=eo(X.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[an]=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&&_a(n)}}return vt(n),Ec(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==s&&_a(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(r(166));if(e=X.current,ii(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||tg(e.nodeValue,l)),e||Ha(n,!0)}else e=eo(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=ii(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=Lu(),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=ii(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=Lu(),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),Is(n,n.updateQueue),vt(n),null);case 4:return ce(),e===null&&Fc(n.stateNode.containerInfo),vt(n),null;case 10:return ma(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)hr(s,!1);else{if(kt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=Es(e),d!==null){for(n.flags|=128,hr(s,!1),e=d.updateQueue,n.updateQueue=e,Is(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)Rh(l,e),l=l.sibling;return T(Tt,Tt.current&1|2),Qe&&da(n,s.treeForkCount),n.child}e=e.sibling}s.tail!==null&&Bt()>$s&&(n.flags|=128,f=!0,hr(s,!1),n.lanes=4194304)}else{if(!f)if(e=Es(d),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Is(n,e),hr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!Qe)return vt(n),null}else 2*Bt()-s.renderingStartTime>$s&&l!==536870912&&(n.flags|=128,f=!0,hr(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=Bt(),e.sibling=null,l=Tt.current,T(Tt,f?l&1|2:l&1),Qe&&da(n,s.treeForkCount),e):(vt(n),null);case 22:case 23:return _n(n),Qu(),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&&Is(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),ma(Ct),vt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Vv(e,n){switch(Ou(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ma(Ct),ce(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Lt(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 ce(),null;case 10:return ma(n.type),null;case 22:case 23:return _n(n),Qu(),e!==null&&G(Tl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ma(Ct),null;case 25:return null;default:return null}}function rp(e,n){switch(Ou(n),n.tag){case 3:ma(Ct),ce();break;case 26:case 27:case 5:Lt(n);break;case 4:ce();break;case 31:n.memoizedState!==null&&_n(n);break;case 13:_n(n);break;case 19:G(Tt);break;case 10:ma(n.type);break;case 22:case 23:_n(n),Qu(),e!==null&&G(Tl);break;case 24:ma(Ct)}}function mr(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(S){ot(n,n.return,S)}}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,S=v.destroy;if(S!==void 0){v.destroy=void 0,f=n;var A=l,H=S;try{H()}catch(Y){ot(f,A,Y)}}}s=s.next}while(s!==d)}}catch(Y){ot(n,n.return,Y)}}function sp(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{Jh(n,l)}catch(s){ot(e,e.return,s)}}}function op(e,n,l){l.props=wl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(s){ot(e,n,s)}}function pr(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 Pn(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 up(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 Cc(e,n,l){try{var s=e.stateNode;c0(s,e.type,l,n),s[an]=n}catch(f){ot(e,e.return,f)}}function cp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&el(e.type)||e.tag===4}function Ac(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cp(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 wc(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=ua));else if(s!==4&&(s===27&&el(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(wc(e,n,l),e=e.sibling;e!==null;)wc(e,n,l),e=e.sibling}function Hs(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(Hs(e,n,l),e=e.sibling;e!==null;)Hs(e,n,l),e=e.sibling}function fp(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[an]=l}catch(d){ot(e,e.return,d)}}var va=!1,jt=!1,jc=!1,dp=typeof WeakSet=="function"?WeakSet:Set,It=null;function Gv(e,n){if(e=e.containerInfo,Jc=so,e=Th(e),ku(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,S=-1,A=-1,H=0,Y=0,W=e,q=null;t:for(;;){for(var V;W!==l||f!==0&&W.nodeType!==3||(S=v+f),W!==d||s!==0&&W.nodeType!==3||(A=v+s),W.nodeType===3&&(v+=W.nodeValue.length),(V=W.firstChild)!==null;)q=W,W=V;for(;;){if(W===e)break t;if(q===l&&++H===f&&(S=v),q===d&&++Y===s&&(A=v),(V=W.nextSibling)!==null)break;W=q,q=W.parentNode}W=V}l=S===-1||A===-1?null:{start:S,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(Pc={focusedElem:e,selectionRange:l},so=!1,It=n;It!==null;)if(n=It,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,It=e;else for(;It!==null;){switch(n=It,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 _e=wl(l.type,f);e=s.getSnapshotBeforeUpdate(_e,d),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){ot(l,l.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)tf(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":tf(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,It=e;break}It=n.return}}function hp(e,n,l){var s=l.flags;switch(l.tag){case 0:case 11:case 15:ba(e,l),s&4&&mr(5,l);break;case 1:if(ba(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&&sp(l),s&512&&pr(l,l.return);break;case 3:if(ba(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{Jh(e,n)}catch(v){ot(l,l.return,v)}}break;case 27:n===null&&s&4&&fp(l);case 26:case 5:ba(e,l),n===null&&s&4&&up(l),s&512&&pr(l,l.return);break;case 12:ba(e,l);break;case 31:ba(e,l),s&4&&gp(e,l);break;case 13:ba(e,l),s&4&&yp(e,l),s&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Pv.bind(null,l),_0(e,l))));break;case 22:if(s=l.memoizedState!==null||va,!s){n=n!==null&&n.memoizedState!==null||jt,f=va;var d=jt;va=s,(jt=n)&&!d?Sa(e,l,(l.subtreeFlags&8772)!==0):ba(e,l),va=f,jt=d}break;case 30:break;default:ba(e,l)}}function mp(e){var n=e.alternate;n!==null&&(e.alternate=null,mp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&ru(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 xt=null,rn=!1;function xa(e,n,l){for(l=l.child;l!==null;)pp(e,n,l),l=l.sibling}function pp(e,n,l){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(Jt,l)}catch{}switch(l.tag){case 26:jt||Pn(l,n),xa(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:jt||Pn(l,n);var s=xt,f=rn;el(l.type)&&(xt=l.stateNode,rn=!1),xa(e,n,l),Tr(l.stateNode),xt=s,rn=f;break;case 5:jt||Pn(l,n);case 6:if(s=xt,f=rn,xt=null,xa(e,n,l),xt=s,rn=f,xt!==null)if(rn)try{(xt.nodeType===9?xt.body:xt.nodeName==="HTML"?xt.ownerDocument.body:xt).removeChild(l.stateNode)}catch(d){ot(l,n,d)}else try{xt.removeChild(l.stateNode)}catch(d){ot(l,n,d)}break;case 18:xt!==null&&(rn?(e=xt,sg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Ei(e)):sg(xt,l.stateNode));break;case 4:s=xt,f=rn,xt=l.stateNode.containerInfo,rn=!0,xa(e,n,l),xt=s,rn=f;break;case 0:case 11:case 14:case 15:Xa(2,l,n),jt||Xa(4,l,n),xa(e,n,l);break;case 1:jt||(Pn(l,n),s=l.stateNode,typeof s.componentWillUnmount=="function"&&op(l,n,s)),xa(e,n,l);break;case 21:xa(e,n,l);break;case 22:jt=(s=jt)||l.memoizedState!==null,xa(e,n,l),jt=s;break;default:xa(e,n,l)}}function gp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ei(e)}catch(l){ot(n,n.return,l)}}}function yp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ei(e)}catch(l){ot(n,n.return,l)}}function $v(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new dp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new dp),n;default:throw Error(r(435,e.tag))}}function qs(e,n){var l=$v(e);n.forEach(function(s){if(!l.has(s)){l.add(s);var f=Wv.bind(null,e,s);s.then(f,f)}})}function sn(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,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(el(S.type)){xt=S.stateNode,rn=!1;break e}break;case 5:xt=S.stateNode,rn=!1;break e;case 3:case 4:xt=S.stateNode.containerInfo,rn=!0;break e}S=S.return}if(xt===null)throw Error(r(160));pp(d,v,f),xt=null,rn=!1,d=f.alternate,d!==null&&(d.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)_p(n,e),n=n.sibling}var Zn=null;function _p(e,n){var l=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sn(n,e),on(e),s&4&&(Xa(3,e,e.return),mr(3,e),Xa(5,e,e.return));break;case 1:sn(n,e),on(e),s&512&&(jt||l===null||Pn(l,l.return)),s&64&&va&&(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=Zn;if(sn(n,e),on(e),s&512&&(jt||l===null||Pn(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[Vi]||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,Ut(d),s=d;break e;case"link":var v=_g("link","href",f).get(s+(l.href||""));if(v){for(var S=0;S<v.length;S++)if(d=v[S],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(S,1);break t}}d=f.createElement(s),Yt(d,s,l),f.head.appendChild(d);break;case"meta":if(v=_g("meta","content",f).get(s+(l.content||""))){for(S=0;S<v.length;S++)if(d=v[S],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(S,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,Ut(d),s=d}e.stateNode=s}else vg(f,e.type,e.stateNode);else e.stateNode=yg(f,s,e.memoizedProps);else d!==s?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,s===null?vg(f,e.type,e.stateNode):yg(f,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Cc(e,e.memoizedProps,l.memoizedProps)}break;case 27:sn(n,e),on(e),s&512&&(jt||l===null||Pn(l,l.return)),l!==null&&s&4&&Cc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(sn(n,e),on(e),s&512&&(jt||l===null||Pn(l,l.return)),e.flags&32){f=e.stateNode;try{Ql(f,"")}catch(_e){ot(e,e.return,_e)}}s&4&&e.stateNode!=null&&(f=e.memoizedProps,Cc(e,f,l!==null?l.memoizedProps:f)),s&1024&&(jc=!0);break;case 6:if(sn(n,e),on(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,l=e.stateNode;try{l.nodeValue=s}catch(_e){ot(e,e.return,_e)}}break;case 3:if(ao=null,f=Zn,Zn=to(n.containerInfo),sn(n,e),Zn=f,on(e),s&4&&l!==null&&l.memoizedState.isDehydrated)try{Ei(n.containerInfo)}catch(_e){ot(e,e.return,_e)}jc&&(jc=!1,vp(e));break;case 4:s=Zn,Zn=to(e.stateNode.containerInfo),sn(n,e),on(e),Zn=s;break;case 12:sn(n,e),on(e);break;case 31:sn(n,e),on(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,qs(e,s)));break;case 13:sn(n,e),on(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Gs=Bt()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,qs(e,s)));break;case 22:f=e.memoizedState!==null;var A=l!==null&&l.memoizedState!==null,H=va,Y=jt;if(va=H||f,jt=Y||A,sn(n,e),jt=Y,va=H,on(e),s&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(l===null||A||va||jt||jl(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){A=l=n;try{if(d=A.stateNode,f)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=A.stateNode;var W=A.memoizedProps.style,q=W!=null&&W.hasOwnProperty("display")?W.display:null;S.style.display=q==null||typeof q=="boolean"?"":(""+q).trim()}}catch(_e){ot(A,A.return,_e)}}}else if(n.tag===6){if(l===null){A=n;try{A.stateNode.nodeValue=f?"":A.memoizedProps}catch(_e){ot(A,A.return,_e)}}}else if(n.tag===18){if(l===null){A=n;try{var V=A.stateNode;f?og(V,!0):og(A.stateNode,!1)}catch(_e){ot(A,A.return,_e)}}}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,qs(e,l))));break;case 19:sn(n,e),on(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,qs(e,s)));break;case 30:break;case 21:break;default:sn(n,e),on(e)}}function on(e){var n=e.flags;if(n&2){try{for(var l,s=e.return;s!==null;){if(cp(s)){l=s;break}s=s.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var f=l.stateNode,d=Ac(e);Hs(e,d,f);break;case 5:var v=l.stateNode;l.flags&32&&(Ql(v,""),l.flags&=-33);var S=Ac(e);Hs(e,S,v);break;case 3:case 4:var A=l.stateNode.containerInfo,H=Ac(e);wc(e,H,A);break;default:throw Error(r(161))}}catch(Y){ot(e,e.return,Y)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function vp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;vp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function ba(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)hp(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:Pn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&op(n,n.return,l),jl(n);break;case 27:Tr(n.stateNode);case 26:case 5:Pn(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 Sa(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:Sa(f,d,l),mr(4,d);break;case 1:if(Sa(f,d,l),s=d,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(H){ot(s,s.return,H)}if(s=d,f=s.updateQueue,f!==null){var S=s.stateNode;try{var A=f.shared.hiddenCallbacks;if(A!==null)for(f.shared.hiddenCallbacks=null,f=0;f<A.length;f++)Kh(A[f],S)}catch(H){ot(s,s.return,H)}}l&&v&64&&sp(d),pr(d,d.return);break;case 27:fp(d);case 26:case 5:Sa(f,d,l),l&&s===null&&v&4&&up(d),pr(d,d.return);break;case 12:Sa(f,d,l);break;case 31:Sa(f,d,l),l&&v&4&&gp(f,d);break;case 13:Sa(f,d,l),l&&v&4&&yp(f,d);break;case 22:d.memoizedState===null&&Sa(f,d,l),pr(d,d.return);break;case 30:break;default:Sa(f,d,l)}n=n.sibling}}function zc(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&&tr(l))}function Mc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&tr(e))}function Yn(e,n,l,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)xp(e,n,l,s),n=n.sibling}function xp(e,n,l,s){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Yn(e,n,l,s),f&2048&&mr(9,n);break;case 1:Yn(e,n,l,s);break;case 3:Yn(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&&tr(e)));break;case 12:if(f&2048){Yn(e,n,l,s),e=n.stateNode;try{var d=n.memoizedProps,v=d.id,S=d.onPostCommit;typeof S=="function"&&S(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){ot(n,n.return,A)}}else Yn(e,n,l,s);break;case 31:Yn(e,n,l,s);break;case 13:Yn(e,n,l,s);break;case 23:break;case 22:d=n.stateNode,v=n.alternate,n.memoizedState!==null?d._visibility&2?Yn(e,n,l,s):gr(e,n):d._visibility&2?Yn(e,n,l,s):(d._visibility|=2,pi(e,n,l,s,(n.subtreeFlags&10256)!==0||!1)),f&2048&&zc(v,n);break;case 24:Yn(e,n,l,s),f&2048&&Mc(n.alternate,n);break;default:Yn(e,n,l,s)}}function pi(e,n,l,s,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,v=n,S=l,A=s,H=v.flags;switch(v.tag){case 0:case 11:case 15:pi(d,v,S,A,f),mr(8,v);break;case 23:break;case 22:var Y=v.stateNode;v.memoizedState!==null?Y._visibility&2?pi(d,v,S,A,f):gr(d,v):(Y._visibility|=2,pi(d,v,S,A,f)),f&&H&2048&&zc(v.alternate,v);break;case 24:pi(d,v,S,A,f),f&&H&2048&&Mc(v.alternate,v);break;default:pi(d,v,S,A,f)}n=n.sibling}}function gr(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:gr(l,s),f&2048&&zc(s.alternate,s);break;case 24:gr(l,s),f&2048&&Mc(s.alternate,s);break;default:gr(l,s)}n=n.sibling}}var yr=8192;function gi(e,n,l){if(e.subtreeFlags&yr)for(e=e.child;e!==null;)bp(e,n,l),e=e.sibling}function bp(e,n,l){switch(e.tag){case 26:gi(e,n,l),e.flags&yr&&e.memoizedState!==null&&j0(l,Zn,e.memoizedState,e.memoizedProps);break;case 5:gi(e,n,l);break;case 3:case 4:var s=Zn;Zn=to(e.stateNode.containerInfo),gi(e,n,l),Zn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=yr,yr=16777216,gi(e,n,l),yr=s):gi(e,n,l));break;default:gi(e,n,l)}}function Sp(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 _r(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];It=s,Tp(s,e)}Sp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)kp(e),e=e.sibling}function kp(e){switch(e.tag){case 0:case 11:case 15:_r(e),e.flags&2048&&Xa(9,e,e.return);break;case 3:_r(e);break;case 12:_r(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Vs(e)):_r(e);break;default:_r(e)}}function Vs(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];It=s,Tp(s,e)}Sp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Xa(8,n,n.return),Vs(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Vs(n));break;default:Vs(n)}e=e.sibling}}function Tp(e,n){for(;It!==null;){var l=It;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:tr(l.memoizedState.cache)}if(s=l.child,s!==null)s.return=l,It=s;else e:for(l=e;It!==null;){s=It;var f=s.sibling,d=s.return;if(mp(s),s===l){It=null;break e}if(f!==null){f.return=d,It=f;break e}It=d}}}var Zv={getCacheForType:function(e){var n=$t(Ct),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return $t(Ct).controller.signal}},Yv=typeof WeakMap=="function"?WeakMap:Map,lt=0,mt=null,Ve=null,Ye=0,st=0,vn=null,Fa=!1,yi=!1,Rc=!1,ka=0,kt=0,Qa=0,zl=0,Oc=0,xn=0,_i=0,vr=null,un=null,Dc=!1,Gs=0,Np=0,$s=1/0,Zs=null,Ka=null,Ot=0,Ja=null,vi=null,Ta=0,Lc=0,Bc=null,Ep=null,xr=0,Uc=null;function bn(){return(lt&2)!==0&&Ye!==0?Ye&-Ye:U.T!==null?$c():Vd()}function Cp(){if(xn===0)if((Ye&536870912)===0||Qe){var e=Wr;Wr<<=1,(Wr&3932160)===0&&(Wr=262144),xn=e}else xn=536870912;return e=yn.current,e!==null&&(e.flags|=32),xn}function cn(e,n,l){(e===mt&&(st===2||st===9)||e.cancelPendingCommit!==null)&&(xi(e,0),Pa(e,Ye,xn,!1)),qi(e,l),((lt&2)===0||e!==mt)&&(e===mt&&((lt&2)===0&&(zl|=l),kt===4&&Pa(e,Ye,xn,!1)),Wn(e))}function Ap(e,n,l){if((lt&6)!==0)throw Error(r(327));var s=!l&&(n&127)===0&&(n&e.expiredLanes)===0||Hi(e,n),f=s?Qv(e,n):Hc(e,n,!0),d=s;do{if(f===0){yi&&!s&&Pa(e,n,0,!1);break}else{if(l=e.current.alternate,d&&!Xv(l)){f=Hc(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 S=e;f=vr;var A=S.current.memoizedState.isDehydrated;if(A&&(xi(S,v).flags|=256),v=Hc(S,v,!1),v!==2){if(Rc&&!A){S.errorRecoveryDisabledLanes|=d,zl|=d,f=4;break e}d=un,un=f,d!==null&&(un===null?un=d:un.push.apply(un,d))}f=v}if(d=!1,f!==2)continue}}if(f===1){xi(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:un=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=Gs+300-Bt(),10<f)){if(Pa(s,n,xn,!Fa),ts(s,0,!0)!==0)break e;Ta=n,s.timeoutHandle=ig(wp.bind(null,s,l,un,Zs,Dc,n,xn,zl,_i,Fa,d,"Throttled",-0,0),f);break e}wp(s,l,un,Zs,Dc,n,xn,zl,_i,Fa,d,null,-0,0)}}break}while(!0);Wn(e)}function wp(e,n,l,s,f,d,v,S,A,H,Y,W,q,V){if(e.timeoutHandle=-1,W=n.subtreeFlags,W&8192||(W&16785408)===16785408){W={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ua},bp(n,d,W);var _e=(d&62914560)===d?Gs-Bt():(d&4194048)===d?Np-Bt():0;if(_e=z0(W,_e),_e!==null){Ta=d,e.cancelPendingCommit=_e(Bp.bind(null,e,n,d,l,s,f,v,S,A,Y,W,null,q,V)),Pa(e,d,v,!H);return}}Bp(e,n,d,l,s,f,v,S,A)}function Xv(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&=~Oc,n&=~zl,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&&Id(e,l,n)}function Ys(){return(lt&6)===0?(br(0),!1):!0}function Ic(){if(Ve!==null){if(st===0)var e=Ve.return;else e=Ve,ha=Sl=null,tc(e),ci=null,ar=0,e=Ve;for(;e!==null;)rp(e.alternate,e),e=e.return;Ve=null}}function xi(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,h0(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),Ta=0,Ic(),mt=e,Ve=l=fa(e.current,null),Ye=n,st=0,vn=null,Fa=!1,yi=Hi(e,n),Rc=!1,_i=xn=Oc=zl=Qa=kt=0,un=vr=null,Dc=!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 ka=n,hs(),l}function jp(e,n){Le=null,U.H=fr,n===ui||n===bs?(n=Yh(),st=3):n===Gu?(n=Yh(),st=4):st=n===yc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,vn=n,Ve===null&&(kt=1,Ds(e,jn(n,e.current)))}function zp(){var e=yn.current;return e===null?!0:(Ye&4194048)===Ye?On===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===On:!1}function Mp(){var e=U.H;return U.H=fr,e===null?fr:e}function Rp(){var e=U.A;return U.A=Zv,e}function Xs(){kt=4,Fa||(Ye&4194048)!==Ye&&yn.current!==null||(yi=!0),(Qa&134217727)===0&&(zl&134217727)===0||mt===null||Pa(mt,Ye,xn,!1)}function Hc(e,n,l){var s=lt;lt|=2;var f=Mp(),d=Rp();(mt!==e||Ye!==n)&&(Zs=null,xi(e,n)),n=!1;var v=kt;e:do try{if(st!==0&&Ve!==null){var S=Ve,A=vn;switch(st){case 8:Ic(),v=6;break e;case 3:case 2:case 9:case 6:yn.current===null&&(n=!0);var H=st;if(st=0,vn=null,bi(e,S,A,H),l&&yi){v=0;break e}break;default:H=st,st=0,vn=null,bi(e,S,A,H)}}Fv(),v=kt;break}catch(Y){jp(e,Y)}while(!0);return n&&e.shellSuspendCounter++,ha=Sl=null,lt=s,U.H=f,U.A=d,Ve===null&&(mt=null,Ye=0,hs()),v}function Fv(){for(;Ve!==null;)Op(Ve)}function Qv(e,n){var l=lt;lt|=2;var s=Mp(),f=Rp();mt!==e||Ye!==n?(Zs=null,$s=Bt()+500,xi(e,n)):yi=Hi(e,n);e:do try{if(st!==0&&Ve!==null){n=Ve;var d=vn;t:switch(st){case 1:st=0,vn=null,bi(e,n,d,1);break;case 2:case 9:if($h(d)){st=0,vn=null,Dp(n);break}n=function(){st!==2&&st!==9||mt!==e||(st=7),Wn(e)},d.then(n,n);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:$h(d)?(st=0,vn=null,Dp(n)):(st=0,vn=null,bi(e,n,d,7));break;case 5:var v=null;switch(Ve.tag){case 26:v=Ve.memoizedState;case 5:case 27:var S=Ve;if(v?xg(v):S.stateNode.complete){st=0,vn=null;var A=S.sibling;if(A!==null)Ve=A;else{var H=S.return;H!==null?(Ve=H,Fs(H)):Ve=null}break t}}st=0,vn=null,bi(e,n,d,5);break;case 6:st=0,vn=null,bi(e,n,d,6);break;case 8:Ic(),kt=6;break e;default:throw Error(r(462))}}Kv();break}catch(Y){jp(e,Y)}while(!0);return ha=Sl=null,U.H=s,U.A=f,lt=l,Ve!==null?0:(mt=null,Ye=0,hs(),kt)}function Kv(){for(;Ve!==null&&!ql();)Op(Ve)}function Op(e){var n=lp(e.alternate,e,ka);e.memoizedProps=e.pendingProps,n===null?Fs(e):Ve=n}function Dp(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=Pm(l,n,n.pendingProps,n.type,void 0,Ye);break;case 11:n=Pm(l,n,n.pendingProps,n.type.render,n.ref,Ye);break;case 5:tc(n);default:rp(l,n),n=Ve=Rh(n,ka),n=lp(l,n,ka)}e.memoizedProps=e.pendingProps,n===null?Fs(e):Ve=n}function bi(e,n,l,s){ha=Sl=null,tc(n),ci=null,ar=0;var f=n.return;try{if(Uv(e,f,n,l,Ye)){kt=1,Ds(e,jn(l,e.current)),Ve=null;return}}catch(d){if(f!==null)throw Ve=f,d;kt=1,Ds(e,jn(l,e.current)),Ve=null;return}n.flags&32768?(Qe||s===1?e=!0:yi||(Ye&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))),Lp(n,e)):Fs(n)}function Fs(e){var n=e;do{if((n.flags&32768)!==0){Lp(n,Fa);return}e=n.return;var l=qv(n.alternate,n,ka);if(l!==null){Ve=l;return}if(n=n.sibling,n!==null){Ve=n;return}Ve=n=e}while(n!==null);kt===0&&(kt=5)}function Lp(e,n){do{var l=Vv(e.alternate,e);if(l!==null){l.flags&=32767,Ve=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=l}while(e!==null);kt=6,Ve=null}function Bp(e,n,l,s,f,d,v,S,A){e.cancelPendingCommit=null;do Qs();while(Ot!==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|=Au,w1(e,l,d,v,S,A),e===mt&&(Ve=mt=null,Ye=0),vi=n,Ja=e,Ta=l,Lc=d,Bc=f,Ep=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,e0(Ne,function(){return Vp(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,f=P.p,P.p=2,v=lt,lt|=4;try{Gv(e,n,l)}finally{lt=v,P.p=f,U.T=s}}Ot=1,Up(),Ip(),Hp()}}function Up(){if(Ot===1){Ot=0;var e=Ja,n=vi,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=U.T,U.T=null;var s=P.p;P.p=2;var f=lt;lt|=4;try{_p(n,e);var d=Pc,v=Th(e.containerInfo),S=d.focusedElem,A=d.selectionRange;if(v!==S&&S&&S.ownerDocument&&kh(S.ownerDocument.documentElement,S)){if(A!==null&&ku(S)){var H=A.start,Y=A.end;if(Y===void 0&&(Y=H),"selectionStart"in S)S.selectionStart=H,S.selectionEnd=Math.min(Y,S.value.length);else{var W=S.ownerDocument||document,q=W&&W.defaultView||window;if(q.getSelection){var V=q.getSelection(),_e=S.textContent.length,Ae=Math.min(A.start,_e),dt=A.end===void 0?Ae:Math.min(A.end,_e);!V.extend&&Ae>dt&&(v=dt,dt=Ae,Ae=v);var D=Sh(S,Ae),j=Sh(S,dt);if(D&&j&&(V.rangeCount!==1||V.anchorNode!==D.node||V.anchorOffset!==D.offset||V.focusNode!==j.node||V.focusOffset!==j.offset)){var I=W.createRange();I.setStart(D.node,D.offset),V.removeAllRanges(),Ae>dt?(V.addRange(I),V.extend(j.node,j.offset)):(I.setEnd(j.node,j.offset),V.addRange(I))}}}}for(W=[],V=S;V=V.parentNode;)V.nodeType===1&&W.push({element:V,left:V.scrollLeft,top:V.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<W.length;S++){var K=W[S];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}so=!!Jc,Pc=Jc=null}finally{lt=f,P.p=s,U.T=l}}e.current=n,Ot=2}}function Ip(){if(Ot===2){Ot=0;var e=Ja,n=vi,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=U.T,U.T=null;var s=P.p;P.p=2;var f=lt;lt|=4;try{hp(e,n.alternate,n)}finally{lt=f,P.p=s,U.T=l}}Ot=3}}function Hp(){if(Ot===4||Ot===3){Ot=0,hl();var e=Ja,n=vi,l=Ta,s=Ep;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Ot=5:(Ot=0,vi=Ja=null,qp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Ka=null),lu(l),n=n.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(Jt,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=U.T,f=P.p,P.p=2,U.T=null;try{for(var d=e.onRecoverableError,v=0;v<s.length;v++){var S=s[v];d(S.value,{componentStack:S.stack})}}finally{U.T=n,P.p=f}}(Ta&3)!==0&&Qs(),Wn(e),f=e.pendingLanes,(l&261930)!==0&&(f&42)!==0?e===Uc?xr++:(xr=0,Uc=e):xr=0,br(0)}}function qp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,tr(n)))}function Qs(){return Up(),Ip(),Hp(),Vp()}function Vp(){if(Ot!==5)return!1;var e=Ja,n=Lc;Lc=0;var l=lu(Ta),s=U.T,f=P.p;try{P.p=32>l?32:l,U.T=null,l=Bc,Bc=null;var d=Ja,v=Ta;if(Ot=0,vi=Ja=null,Ta=0,(lt&6)!==0)throw Error(r(331));var S=lt;if(lt|=4,kp(d.current),xp(d,d.current,v,l),lt=S,br(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(Jt,d)}catch{}return!0}finally{P.p=f,U.T=s,qp(e,n)}}function Gp(e,n,l){n=jn(l,n),n=gc(e.stateNode,n,2),e=$a(e,n,2),e!==null&&(qi(e,2),Wn(e))}function ot(e,n,l){if(e.tag===3)Gp(e,e,l);else for(;n!==null;){if(n.tag===3){Gp(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=jn(l,e),l=$m(2),s=$a(n,l,2),s!==null&&(Zm(l,s,n,e),qi(s,2),Wn(s));break}}n=n.return}}function qc(e,n,l){var s=e.pingCache;if(s===null){s=e.pingCache=new Yv;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)||(Rc=!0,f.add(l),e=Jv.bind(null,e,n,l),n.then(e,e))}function Jv(e,n,l){var s=e.pingCache;s!==null&&s.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,mt===e&&(Ye&l)===l&&(kt===4||kt===3&&(Ye&62914560)===Ye&&300>Bt()-Gs?(lt&2)===0&&xi(e,0):Oc|=l,_i===Ye&&(_i=0)),Wn(e)}function $p(e,n){n===0&&(n=Ud()),e=vl(e,n),e!==null&&(qi(e,n),Wn(e))}function Pv(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),$p(e,l)}function Wv(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),$p(e,l)}function e0(e,n){return Oa(e,n)}var Ks=null,Si=null,Vc=!1,Js=!1,Gc=!1,Wa=0;function Wn(e){e!==Si&&e.next===null&&(Si===null?Ks=Si=e:Si=Si.next=e),Js=!0,Vc||(Vc=!0,n0())}function br(e,n){if(!Gc&&Js){Gc=!0;do for(var l=!1,s=Ks;s!==null;){if(e!==0){var f=s.pendingLanes;if(f===0)var d=0;else{var v=s.suspendedLanes,S=s.pingedLanes;d=(1<<31-ht(42|e)+1)-1,d&=f&~(v&~S),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,Fp(s,d))}else d=Ye,d=ts(s,s===mt?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||Hi(s,d)||(l=!0,Fp(s,d));s=s.next}while(l);Gc=!1}}function t0(){Zp()}function Zp(){Js=Vc=!1;var e=0;Wa!==0&&d0()&&(e=Wa);for(var n=Bt(),l=null,s=Ks;s!==null;){var f=s.next,d=Yp(s,n);d===0?(s.next=null,l===null?Ks=f:l.next=f,f===null&&(Si=l)):(l=s,(e!==0||(d&3)!==0)&&(Js=!0)),s=f}Ot!==0&&Ot!==5||br(e),Wa!==0&&(Wa=0)}function Yp(e,n){for(var l=e.suspendedLanes,s=e.pingedLanes,f=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var v=31-ht(d),S=1<<v,A=f[v];A===-1?((S&l)===0||(S&s)!==0)&&(f[v]=A1(S,n)):A<=n&&(e.expiredLanes|=S),d&=~S}if(n=mt,l=Ye,l=ts(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&&En(s),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Hi(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(s!==null&&En(s),lu(l)){case 2:case 8:l=ee;break;case 32:l=Ne;break;case 268435456:l=rt;break;default:l=Ne}return s=Xp.bind(null,e),l=Oa(l,s),e.callbackPriority=n,e.callbackNode=l,n}return s!==null&&s!==null&&En(s),e.callbackPriority=2,e.callbackNode=null,2}function Xp(e,n){if(Ot!==0&&Ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Qs()&&e.callbackNode!==l)return null;var s=Ye;return s=ts(e,e===mt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(Ap(e,s,n),Yp(e,Bt()),e.callbackNode!=null&&e.callbackNode===l?Xp.bind(null,e):null)}function Fp(e,n){if(Qs())return null;Ap(e,n,!0)}function n0(){m0(function(){(lt&6)!==0?Oa(F,t0):Zp()})}function $c(){if(Wa===0){var e=si;e===0&&(e=Pr,Pr<<=1,(Pr&261888)===0&&(Pr=256)),Wa=e}return Wa}function Qp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:is(""+e)}function Kp(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 a0(e,n,l,s,f){if(n==="submit"&&l&&l.stateNode===f){var d=Qp((f[an]||null).action),v=s.submitter;v&&(n=(n=v[an]||null)?Qp(n.formAction):v.getAttribute("formAction"),n!==null&&(d=n,v=null));var S=new us("action","action",null,s,f);e.push({event:S,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Wa!==0){var A=v?Kp(f,v):new FormData(f);cc(l,{pending:!0,data:A,method:f.method,action:d},null,A)}}else typeof d=="function"&&(S.preventDefault(),A=v?Kp(f,v):new FormData(f),cc(l,{pending:!0,data:A,method:f.method,action:d},d,A))},currentTarget:f}]})}}for(var Zc=0;Zc<Cu.length;Zc++){var Yc=Cu[Zc],l0=Yc.toLowerCase(),i0=Yc[0].toUpperCase()+Yc.slice(1);$n(l0,"on"+i0)}$n(Ch,"onAnimationEnd"),$n(Ah,"onAnimationIteration"),$n(wh,"onAnimationStart"),$n("dblclick","onDoubleClick"),$n("focusin","onFocus"),$n("focusout","onBlur"),$n(bv,"onTransitionRun"),$n(Sv,"onTransitionStart"),$n(kv,"onTransitionCancel"),$n(jh,"onTransitionEnd"),Xl("onMouseEnter",["mouseout","mouseover"]),Xl("onMouseLeave",["mouseout","mouseover"]),Xl("onPointerEnter",["pointerout","pointerover"]),Xl("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 Sr="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(" "),r0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Sr));function Jp(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 S=s[v],A=S.instance,H=S.currentTarget;if(S=S.listener,A!==d&&f.isPropagationStopped())break e;d=S,f.currentTarget=H;try{d(f)}catch(Y){ds(Y)}f.currentTarget=null,d=A}else for(v=0;v<s.length;v++){if(S=s[v],A=S.instance,H=S.currentTarget,S=S.listener,A!==d&&f.isPropagationStopped())break e;d=S,f.currentTarget=H;try{d(f)}catch(Y){ds(Y)}f.currentTarget=null,d=A}}}}function Ge(e,n){var l=n[iu];l===void 0&&(l=n[iu]=new Set);var s=e+"__bubble";l.has(s)||(Pp(n,e,2,!1),l.add(s))}function Xc(e,n,l){var s=0;n&&(s|=4),Pp(l,e,s,n)}var Ps="_reactListening"+Math.random().toString(36).slice(2);function Fc(e){if(!e[Ps]){e[Ps]=!0,Zd.forEach(function(l){l!=="selectionchange"&&(r0.has(l)||Xc(l,!1,e),Xc(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ps]||(n[Ps]=!0,Xc("selectionchange",!1,n))}}function Pp(e,n,l,s){switch(Cg(n)){case 2:var f=O0;break;case 8:f=D0;break;default:f=cf}l=f.bind(null,n,l,e),f=void 0,!mu||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 Qc(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 S=s.stateNode.containerInfo;if(S===f)break;if(v===4)for(v=s.return;v!==null;){var A=v.tag;if((A===3||A===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;S!==null;){if(v=$l(S),v===null)return;if(A=v.tag,A===5||A===6||A===26||A===27){s=d=v;continue e}S=S.parentNode}}s=s.return}ah(function(){var H=d,Y=du(l),W=[];e:{var q=zh.get(e);if(q!==void 0){var V=us,_e=e;switch(e){case"keypress":if(ss(l)===0)break e;case"keydown":case"keyup":V=W1;break;case"focusin":_e="focus",V=_u;break;case"focusout":_e="blur",V=_u;break;case"beforeblur":case"afterblur":V=_u;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=rh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":V=q1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":V=nv;break;case Ch:case Ah:case wh:V=$1;break;case jh:V=lv;break;case"scroll":case"scrollend":V=I1;break;case"wheel":V=rv;break;case"copy":case"cut":case"paste":V=Y1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":V=oh;break;case"toggle":case"beforetoggle":V=ov}var Ae=(n&4)!==0,dt=!Ae&&(e==="scroll"||e==="scrollend"),D=Ae?q!==null?q+"Capture":null:q;Ae=[];for(var j=H,I;j!==null;){var K=j;if(I=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||I===null||D===null||(K=$i(j,D),K!=null&&Ae.push(kr(j,K,I))),dt)break;j=j.return}0<Ae.length&&(q=new V(q,_e,null,l,Y),W.push({event:q,listeners:Ae}))}}if((n&7)===0){e:{if(q=e==="mouseover"||e==="pointerover",V=e==="mouseout"||e==="pointerout",q&&l!==fu&&(_e=l.relatedTarget||l.fromElement)&&($l(_e)||_e[Gl]))break e;if((V||q)&&(q=Y.window===Y?Y:(q=Y.ownerDocument)?q.defaultView||q.parentWindow:window,V?(_e=l.relatedTarget||l.toElement,V=H,_e=_e?$l(_e):null,_e!==null&&(dt=u(_e),Ae=_e.tag,_e!==dt||Ae!==5&&Ae!==27&&Ae!==6)&&(_e=null)):(V=null,_e=H),V!==_e)){if(Ae=rh,K="onMouseLeave",D="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=oh,K="onPointerLeave",D="onPointerEnter",j="pointer"),dt=V==null?q:Gi(V),I=_e==null?q:Gi(_e),q=new Ae(K,j+"leave",V,l,Y),q.target=dt,q.relatedTarget=I,K=null,$l(Y)===H&&(Ae=new Ae(D,j+"enter",_e,l,Y),Ae.target=I,Ae.relatedTarget=dt,K=Ae),dt=K,V&&_e)t:{for(Ae=s0,D=V,j=_e,I=0,K=D;K;K=Ae(K))I++;K=0;for(var Ee=j;Ee;Ee=Ae(Ee))K++;for(;0<I-K;)D=Ae(D),I--;for(;0<K-I;)j=Ae(j),K--;for(;I--;){if(D===j||j!==null&&D===j.alternate){Ae=D;break t}D=Ae(D),j=Ae(j)}Ae=null}else Ae=null;V!==null&&Wp(W,q,V,Ae,!1),_e!==null&&dt!==null&&Wp(W,dt,_e,Ae,!0)}}e:{if(q=H?Gi(H):window,V=q.nodeName&&q.nodeName.toLowerCase(),V==="select"||V==="input"&&q.type==="file")var We=gh;else if(mh(q))if(yh)We=_v;else{We=gv;var ke=pv}else V=q.nodeName,!V||V.toLowerCase()!=="input"||q.type!=="checkbox"&&q.type!=="radio"?H&&cu(H.elementType)&&(We=gh):We=yv;if(We&&(We=We(e,H))){ph(W,We,l,Y);break e}ke&&ke(e,q,H),e==="focusout"&&H&&q.type==="number"&&H.memoizedProps.value!=null&&uu(q,"number",q.value)}switch(ke=H?Gi(H):window,e){case"focusin":(mh(ke)||ke.contentEditable==="true")&&(Wl=ke,Tu=H,Pi=null);break;case"focusout":Pi=Tu=Wl=null;break;case"mousedown":Nu=!0;break;case"contextmenu":case"mouseup":case"dragend":Nu=!1,Nh(W,l,Y);break;case"selectionchange":if(xv)break;case"keydown":case"keyup":Nh(W,l,Y)}var Ue;if(xu)e:{switch(e){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else Pl?dh(e,l)&&(Xe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Xe="onCompositionStart");Xe&&(uh&&l.locale!=="ko"&&(Pl||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&Pl&&(Ue=lh()):(Ba=Y,pu="value"in Ba?Ba.value:Ba.textContent,Pl=!0)),ke=Ws(H,Xe),0<ke.length&&(Xe=new sh(Xe,e,null,l,Y),W.push({event:Xe,listeners:ke}),Ue?Xe.data=Ue:(Ue=hh(l),Ue!==null&&(Xe.data=Ue)))),(Ue=cv?fv(e,l):dv(e,l))&&(Xe=Ws(H,"onBeforeInput"),0<Xe.length&&(ke=new sh("onBeforeInput","beforeinput",null,l,Y),W.push({event:ke,listeners:Xe}),ke.data=Ue)),a0(W,e,H,l,Y)}Jp(W,n)})}function kr(e,n,l){return{instance:e,listener:n,currentTarget:l}}function Ws(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=$i(e,l),f!=null&&s.unshift(kr(e,f,d)),f=$i(e,n),f!=null&&s.push(kr(e,f,d))),e.tag===3)return s;e=e.return}return[]}function s0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wp(e,n,l,s,f){for(var d=n._reactName,v=[];l!==null&&l!==s;){var S=l,A=S.alternate,H=S.stateNode;if(S=S.tag,A!==null&&A===s)break;S!==5&&S!==26&&S!==27||H===null||(A=H,f?(H=$i(l,d),H!=null&&v.unshift(kr(l,H,A))):f||(H=$i(l,d),H!=null&&v.push(kr(l,H,A)))),l=l.return}v.length!==0&&e.push({event:n,listeners:v})}var o0=/\r\n?/g,u0=/\u0000|\uFFFD/g;function eg(e){return(typeof e=="string"?e:""+e).replace(o0,`
|
|
49
|
-
`).replace(u0,"")}function tg(e,n){return n=eg(n),eg(e)===n}function ft(e,n,l,s,f,d){switch(l){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||Ql(e,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&Ql(e,""+s);break;case"className":as(e,"class",s);break;case"tabIndex":as(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":as(e,l,s);break;case"style":th(e,s,d);break;case"data":if(n!=="object"){as(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=is(""+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=is(""+s),e.setAttribute(l,s);break;case"onClick":s!=null&&(e.onclick=ua);break;case"onScroll":s!=null&&Ge("scroll",e);break;case"onScrollEnd":s!=null&&Ge("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=is(""+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":Ge("beforetoggle",e),Ge("toggle",e),ns(e,"popover",s);break;case"xlinkActuate":oa(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":oa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":oa(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":oa(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":oa(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":oa(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":oa(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":oa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":oa(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":ns(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=B1.get(l)||l,ns(e,l,s))}}function Kc(e,n,l,s,f,d){switch(l){case"style":th(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"?Ql(e,s):(typeof s=="number"||typeof s=="bigint")&&Ql(e,""+s);break;case"onScroll":s!=null&&Ge("scroll",e);break;case"onScrollEnd":s!=null&&Ge("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ua);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yd.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[an]||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,""):ns(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":Ge("error",e),Ge("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":Ge("invalid",e);var S=d=v=f=null,A=null,H=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":A=Y;break;case"defaultChecked":H=Y;break;case"value":d=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(137,n));break;default:ft(e,n,s,Y,l,null)}}Jd(e,d,S,A,H,v,f,!1);return;case"select":Ge("invalid",e),s=v=d=null;for(f in l)if(l.hasOwnProperty(f)&&(S=l[f],S!=null))switch(f){case"value":d=S;break;case"defaultValue":v=S;break;case"multiple":s=S;default:ft(e,n,f,S,l,null)}n=d,l=v,e.multiple=!!s,n!=null?Fl(e,!!s,n,!1):l!=null&&Fl(e,!!s,l,!0);return;case"textarea":Ge("invalid",e),d=f=s=null;for(v in l)if(l.hasOwnProperty(v)&&(S=l[v],S!=null))switch(v){case"value":s=S;break;case"defaultValue":f=S;break;case"children":d=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:ft(e,n,v,S,l,null)}Wd(e,s,f,d);return;case"option":for(A in l)if(l.hasOwnProperty(A)&&(s=l[A],s!=null))switch(A){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:ft(e,n,A,s,l,null)}return;case"dialog":Ge("beforetoggle",e),Ge("toggle",e),Ge("cancel",e),Ge("close",e);break;case"iframe":case"object":Ge("load",e);break;case"video":case"audio":for(s=0;s<Sr.length;s++)Ge(Sr[s],e);break;case"image":Ge("error",e),Ge("load",e);break;case"details":Ge("toggle",e);break;case"embed":case"source":case"link":Ge("error",e),Ge("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(H in l)if(l.hasOwnProperty(H)&&(s=l[H],s!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:ft(e,n,H,s,l,null)}return;default:if(cu(n)){for(Y in l)l.hasOwnProperty(Y)&&(s=l[Y],s!==void 0&&Kc(e,n,Y,s,l,void 0));return}}for(S in l)l.hasOwnProperty(S)&&(s=l[S],s!=null&&ft(e,n,S,s,l,null))}function c0(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,S=null,A=null,H=null,Y=null;for(V in l){var W=l[V];if(l.hasOwnProperty(V)&&W!=null)switch(V){case"checked":break;case"value":break;case"defaultValue":A=W;default:s.hasOwnProperty(V)||ft(e,n,V,null,s,W)}}for(var q in s){var V=s[q];if(W=l[q],s.hasOwnProperty(q)&&(V!=null||W!=null))switch(q){case"type":d=V;break;case"name":f=V;break;case"checked":H=V;break;case"defaultChecked":Y=V;break;case"value":v=V;break;case"defaultValue":S=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,n));break;default:V!==W&&ft(e,n,q,V,s,W)}}ou(e,v,S,A,H,Y,d,f);return;case"select":V=v=S=q=null;for(d in l)if(A=l[d],l.hasOwnProperty(d)&&A!=null)switch(d){case"value":break;case"multiple":V=A;default:s.hasOwnProperty(d)||ft(e,n,d,null,s,A)}for(f in s)if(d=s[f],A=l[f],s.hasOwnProperty(f)&&(d!=null||A!=null))switch(f){case"value":q=d;break;case"defaultValue":S=d;break;case"multiple":v=d;default:d!==A&&ft(e,n,f,d,s,A)}n=S,l=v,s=V,q!=null?Fl(e,!!l,q,!1):!!s!=!!l&&(n!=null?Fl(e,!!l,n,!0):Fl(e,!!l,l?[]:"",!1));return;case"textarea":V=q=null;for(S in l)if(f=l[S],l.hasOwnProperty(S)&&f!=null&&!s.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:ft(e,n,S,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)}Pd(e,q,V);return;case"option":for(var _e in l)if(q=l[_e],l.hasOwnProperty(_e)&&q!=null&&!s.hasOwnProperty(_e))switch(_e){case"selected":e.selected=!1;break;default:ft(e,n,_e,null,s,q)}for(A in s)if(q=s[A],V=l[A],s.hasOwnProperty(A)&&q!==V&&(q!=null||V!=null))switch(A){case"selected":e.selected=q&&typeof q!="function"&&typeof q!="symbol";break;default:ft(e,n,A,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 Ae in l)q=l[Ae],l.hasOwnProperty(Ae)&&q!=null&&!s.hasOwnProperty(Ae)&&ft(e,n,Ae,null,s,q);for(H in s)if(q=s[H],V=l[H],s.hasOwnProperty(H)&&q!==V&&(q!=null||V!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(r(137,n));break;default:ft(e,n,H,q,s,V)}return;default:if(cu(n)){for(var dt in l)q=l[dt],l.hasOwnProperty(dt)&&q!==void 0&&!s.hasOwnProperty(dt)&&Kc(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||Kc(e,n,Y,q,s,V);return}}for(var D in l)q=l[D],l.hasOwnProperty(D)&&q!=null&&!s.hasOwnProperty(D)&&ft(e,n,D,null,s,q);for(W in s)q=s[W],V=l[W],!s.hasOwnProperty(W)||q===V||q==null&&V==null||ft(e,n,W,q,s,V)}function ng(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function f0(){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,S=f.duration;if(d&&S&&ng(v)){for(v=0,S=f.responseEnd,s+=1;s<l.length;s++){var A=l[s],H=A.startTime;if(H>S)break;var Y=A.transferSize,W=A.initiatorType;Y&&ng(W)&&(A=A.responseEnd,v+=Y*(A<S?1:(S-H)/(A-H)))}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 Jc=null,Pc=null;function eo(e){return e.nodeType===9?e:e.ownerDocument}function ag(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 lg(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 Wc(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 ef=null;function d0(){var e=window.event;return e&&e.type==="popstate"?e===ef?!1:(ef=e,!0):(ef=null,!1)}var ig=typeof setTimeout=="function"?setTimeout:void 0,h0=typeof clearTimeout=="function"?clearTimeout:void 0,rg=typeof Promise=="function"?Promise:void 0,m0=typeof queueMicrotask=="function"?queueMicrotask:typeof rg<"u"?function(e){return rg.resolve(null).then(e).catch(p0)}:ig;function p0(e){setTimeout(function(){throw e})}function el(e){return e==="head"}function sg(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),Ei(n);return}s--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")s++;else if(l==="html")Tr(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Tr(l);for(var d=l.firstChild;d;){var v=d.nextSibling,S=d.nodeName;d[Vi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=v}}else l==="body"&&Tr(e.ownerDocument.body);l=f}while(l);Ei(n)}function og(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 tf(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":tf(l),ru(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function g0(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[Vi])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=Dn(e.nextSibling),e===null)break}return null}function y0(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Dn(e.nextSibling),e===null))return null;return e}function ug(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Dn(e.nextSibling),e===null))return null;return e}function nf(e){return e.data==="$?"||e.data==="$~"}function af(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function _0(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 Dn(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 lf=null;function cg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return Dn(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function fg(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 dg(e,n,l){switch(n=eo(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 Tr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);ru(e)}var Ln=new Map,hg=new Set;function to(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Na=P.d;P.d={f:v0,r:x0,D:b0,C:S0,L:k0,m:T0,X:E0,S:N0,M:C0};function v0(){var e=Na.f(),n=Ys();return e||n}function x0(e){var n=Zl(e);n!==null&&n.tag===5&&n.type==="form"?jm(n):Na.r(e)}var ki=typeof document>"u"?null:document;function mg(e,n,l){var s=ki;if(s&&typeof n=="string"&&n){var f=An(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof l=="string"&&(f+='[crossorigin="'+l+'"]'),hg.has(f)||(hg.add(f),e={rel:e,crossOrigin:l,href:n},s.querySelector(f)===null&&(n=s.createElement("link"),Yt(n,"link",e),Ut(n),s.head.appendChild(n)))}}function b0(e){Na.D(e),mg("dns-prefetch",e,null)}function S0(e,n){Na.C(e,n),mg("preconnect",e,n)}function k0(e,n,l){Na.L(e,n,l);var s=ki;if(s&&e&&n){var f='link[rel="preload"][as="'+An(n)+'"]';n==="image"&&l&&l.imageSrcSet?(f+='[imagesrcset="'+An(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(f+='[imagesizes="'+An(l.imageSizes)+'"]')):f+='[href="'+An(e)+'"]';var d=f;switch(n){case"style":d=Ti(e);break;case"script":d=Ni(e)}Ln.has(d)||(e=_({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),Ln.set(d,e),s.querySelector(f)!==null||n==="style"&&s.querySelector(Nr(d))||n==="script"&&s.querySelector(Er(d))||(n=s.createElement("link"),Yt(n,"link",e),Ut(n),s.head.appendChild(n)))}}function T0(e,n){Na.m(e,n);var l=ki;if(l&&e){var s=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+An(s)+'"][href="'+An(e)+'"]',d=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Ni(e)}if(!Ln.has(d)&&(e=_({rel:"modulepreload",href:e},n),Ln.set(d,e),l.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Er(d)))return}s=l.createElement("link"),Yt(s,"link",e),Ut(s),l.head.appendChild(s)}}}function N0(e,n,l){Na.S(e,n,l);var s=ki;if(s&&e){var f=Yl(s).hoistableStyles,d=Ti(e);n=n||"default";var v=f.get(d);if(!v){var S={loading:0,preload:null};if(v=s.querySelector(Nr(d)))S.loading=5;else{e=_({rel:"stylesheet",href:e,"data-precedence":n},l),(l=Ln.get(d))&&rf(e,l);var A=v=s.createElement("link");Ut(A),Yt(A,"link",e),A._p=new Promise(function(H,Y){A.onload=H,A.onerror=Y}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,no(v,n,s)}v={type:"stylesheet",instance:v,count:1,state:S},f.set(d,v)}}}function E0(e,n){Na.X(e,n);var l=ki;if(l&&e){var s=Yl(l).hoistableScripts,f=Ni(e),d=s.get(f);d||(d=l.querySelector(Er(f)),d||(e=_({src:e,async:!0},n),(n=Ln.get(f))&&sf(e,n),d=l.createElement("script"),Ut(d),Yt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(f,d))}}function C0(e,n){Na.M(e,n);var l=ki;if(l&&e){var s=Yl(l).hoistableScripts,f=Ni(e),d=s.get(f);d||(d=l.querySelector(Er(f)),d||(e=_({src:e,async:!0,type:"module"},n),(n=Ln.get(f))&&sf(e,n),d=l.createElement("script"),Ut(d),Yt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(f,d))}}function pg(e,n,l,s){var f=(f=X.current)?to(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=Ti(l.href),l=Yl(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=Ti(l.href);var d=Yl(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(Nr(e)))&&!d._p&&(v.instance=d,v.state.loading=5),Ln.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},Ln.set(e,l),d||A0(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=Ni(l),l=Yl(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 Ti(e){return'href="'+An(e)+'"'}function Nr(e){return'link[rel="stylesheet"]['+e+"]"}function gg(e){return _({},e,{"data-precedence":e.precedence,precedence:null})}function A0(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),Ut(n),e.head.appendChild(n))}function Ni(e){return'[src="'+An(e)+'"]'}function Er(e){return"script[async]"+e}function yg(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var s=e.querySelector('style[data-href~="'+An(l.href)+'"]');if(s)return n.instance=s,Ut(s),s;var f=_({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Ut(s),Yt(s,"style",f),no(s,l.precedence,e),n.instance=s;case"stylesheet":f=Ti(l.href);var d=e.querySelector(Nr(f));if(d)return n.state.loading|=4,n.instance=d,Ut(d),d;s=gg(l),(f=Ln.get(f))&&rf(s,f),d=(e.ownerDocument||e).createElement("link"),Ut(d);var v=d;return v._p=new Promise(function(S,A){v.onload=S,v.onerror=A}),Yt(d,"link",s),n.state.loading|=4,no(d,l.precedence,e),n.instance=d;case"script":return d=Ni(l.src),(f=e.querySelector(Er(d)))?(n.instance=f,Ut(f),f):(s=l,(f=Ln.get(d))&&(s=_({},l),sf(s,f)),e=e.ownerDocument||e,f=e.createElement("script"),Ut(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,no(s,l.precedence,e));return n.instance}function no(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 S=s[v];if(S.dataset.precedence===n)d=S;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 rf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function sf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var ao=null;function _g(e,n,l){if(ao===null){var s=new Map,f=ao=new Map;f.set(l,s)}else f=ao,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[Vi]||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 S=s.get(v);S?S.push(d):s.set(v,[d])}}return s}function vg(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function w0(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 xg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function j0(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=Ti(s.href),d=n.querySelector(Nr(f));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=lo.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=d,Ut(d);return}d=n.ownerDocument||n,s=gg(s),(f=Ln.get(f))&&rf(s,f),d=d.createElement("link"),Ut(d);var v=d;v._p=new Promise(function(S,A){v.onload=S,v.onerror=A}),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=lo.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var of=0;function z0(e,n){return e.stylesheets&&e.count===0&&ro(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var s=setTimeout(function(){if(e.stylesheets&&ro(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&of===0&&(of=62500*f0());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ro(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>of?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function lo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ro(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var io=null;function ro(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,io=new Map,n.forEach(M0,e),io=null,lo.call(e))}function M0(e,n){if(!(n.state.loading&4)){var l=io.get(e);if(l)var s=l.get(null);else{l=new Map,io.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=lo.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 Cr={$$typeof:w,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_threadCount:0};function R0(e,n,l,s,f,d,v,S,A){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=nu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nu(0),this.hiddenUpdates=nu(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function bg(e,n,l,s,f,d,v,S,A,H,Y,W){return e=new R0(e,n,l,v,A,H,Y,W,S),n=1,d===!0&&(n|=24),d=gn(3,null,null,n),e.current=d,d.stateNode=e,n=Hu(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:s,isDehydrated:l,cache:n},$u(d),e}function Sg(e){return e?(e=ni,e):ni}function kg(e,n,l,s,f,d){f=Sg(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=$a(e,s,n),l!==null&&(cn(l,e,n),ir(l,e,n))}function Tg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function uf(e,n){Tg(e,n),(e=e.alternate)&&Tg(e,n)}function Ng(e){if(e.tag===13||e.tag===31){var n=vl(e,67108864);n!==null&&cn(n,e,67108864),uf(e,67108864)}}function Eg(e){if(e.tag===13||e.tag===31){var n=bn();n=au(n);var l=vl(e,n);l!==null&&cn(l,e,n),uf(e,n)}}var so=!0;function O0(e,n,l,s){var f=U.T;U.T=null;var d=P.p;try{P.p=2,cf(e,n,l,s)}finally{P.p=d,U.T=f}}function D0(e,n,l,s){var f=U.T;U.T=null;var d=P.p;try{P.p=8,cf(e,n,l,s)}finally{P.p=d,U.T=f}}function cf(e,n,l,s){if(so){var f=ff(s);if(f===null)Qc(e,n,s,oo,l),Ag(e,s);else if(B0(f,e,n,l,s))s.stopPropagation();else if(Ag(e,s),n&4&&-1<L0.indexOf(e)){for(;f!==null;){var d=Zl(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 S=d;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var A=1<<31-ht(v);S.entanglements[1]|=A,v&=~A}Wn(d),(lt&6)===0&&($s=Bt()+500,br(0))}}break;case 31:case 13:S=vl(d,2),S!==null&&cn(S,d,2),Ys(),uf(d,2)}if(d=ff(s),d===null&&Qc(e,n,s,oo,l),d===f)break;f=d}f!==null&&s.stopPropagation()}else Qc(e,n,s,null,l)}}function ff(e){return e=du(e),df(e)}var oo=null;function df(e){if(oo=null,e=$l(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 oo=e,null}function Cg(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(Vl()){case F:return 2;case ee:return 8;case Ne:case De:return 32;case rt:return 268435456;default:return 32}default:return 32}}var hf=!1,tl=null,nl=null,al=null,Ar=new Map,wr=new Map,ll=[],L0="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 Ag(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":Ar.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":wr.delete(n.pointerId)}}function jr(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=Zl(n),n!==null&&Ng(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function B0(e,n,l,s,f){switch(n){case"focusin":return tl=jr(tl,e,n,l,s,f),!0;case"dragenter":return nl=jr(nl,e,n,l,s,f),!0;case"mouseover":return al=jr(al,e,n,l,s,f),!0;case"pointerover":var d=f.pointerId;return Ar.set(d,jr(Ar.get(d)||null,e,n,l,s,f)),!0;case"gotpointercapture":return d=f.pointerId,wr.set(d,jr(wr.get(d)||null,e,n,l,s,f)),!0}return!1}function wg(e){var n=$l(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,Gd(e.priority,function(){Eg(l)});return}}else if(n===31){if(n=h(l),n!==null){e.blockedOn=n,Gd(e.priority,function(){Eg(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 uo(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=ff(e.nativeEvent);if(l===null){l=e.nativeEvent;var s=new l.constructor(l.type,l);fu=s,l.target.dispatchEvent(s),fu=null}else return n=Zl(l),n!==null&&Ng(n),e.blockedOn=l,!1;n.shift()}return!0}function jg(e,n,l){uo(e)&&l.delete(n)}function U0(){hf=!1,tl!==null&&uo(tl)&&(tl=null),nl!==null&&uo(nl)&&(nl=null),al!==null&&uo(al)&&(al=null),Ar.forEach(jg),wr.forEach(jg)}function co(e,n){e.blockedOn===n&&(e.blockedOn=null,hf||(hf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,U0)))}var fo=null;function zg(e){fo!==e&&(fo=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){fo===e&&(fo=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(df(s||l)===null)continue;break}var d=Zl(l);d!==null&&(e.splice(n,3),n-=3,cc(d,{pending:!0,data:f,method:l.method,action:s},s,f))}}))}function Ei(e){function n(A){return co(A,e)}tl!==null&&co(tl,e),nl!==null&&co(nl,e),al!==null&&co(al,e),Ar.forEach(n),wr.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);)wg(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[an]||null;if(typeof d=="function")v||zg(l);else if(v){var S=null;if(d&&d.hasAttribute("formAction")){if(f=d,v=d[an]||null)S=v.formAction;else if(df(f)!==null)continue}else S=v.action;typeof S=="function"?l[s+1]=S:(l.splice(s,3),s-=3),zg(l)}}}function Mg(){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 mf(e){this._internalRoot=e}ho.prototype.render=mf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var l=n.current,s=bn();kg(l,s,e,n,null,null)},ho.prototype.unmount=mf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;kg(e.current,2,null,e,null,null),Ys(),n[Gl]=null}};function ho(e){this._internalRoot=e}ho.prototype.unstable_scheduleHydration=function(e){if(e){var n=Vd();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&&wg(e)}};var Rg=a.version;if(Rg!=="19.2.4")throw Error(r(527,Rg,"19.2.4"));P.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 I0={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mo.isDisabled&&mo.supportsFiber)try{Jt=mo.inject(I0),Rt=mo}catch{}}return Mr.createRoot=function(e,n){if(!o(e))throw Error(r(299));var l=!1,s="",f=Hm,d=qm,v=Vm;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=bg(e,1,!1,null,null,l,s,null,f,d,v,Mg),e[Gl]=n.current,Fc(e),new mf(n)},Mr.hydrateRoot=function(e,n,l){if(!o(e))throw Error(r(299));var s=!1,f="",d=Hm,v=qm,S=Vm,A=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&&(S=l.onRecoverableError),l.formState!==void 0&&(A=l.formState)),n=bg(e,1,!0,n,l??null,s,f,A,d,v,S,Mg),n.context=Sg(null),l=n.current,s=bn(),s=au(s),f=Ga(s),f.callback=null,$a(l,f,s),l=s,n.current.lanes=l,qi(n,l),Wn(n),e[Gl]=n.current,Fc(e),new ho(n)},Mr.version="19.2.4",Mr}var Gg;function K0(){if(Gg)return yf.exports;Gg=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(),yf.exports=Q0(),yf.exports}var J0=K0();const P0=$o(J0);/**
|
|
48
|
+
`+s.stack}}var Oa=Object.prototype.hasOwnProperty,Da=t.unstable_scheduleCallback,gl=t.unstable_cancelCallback,Hi=t.unstable_shouldYield,Jn=t.unstable_requestPaint,It=t.unstable_now,yl=t.unstable_getCurrentPriorityLevel,Q=t.unstable_ImmediatePriority,ce=t.unstable_UserBlockingPriority,de=t.unstable_NormalPriority,we=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ft=t.log,oa=t.unstable_setDisableYieldValue,Wt=null,Ot=null;function ln(e){if(typeof Ft=="function"&&oa(e),Ot&&typeof Ot.setStrictMode=="function")try{Ot.setStrictMode(Wt,e)}catch{}}var mt=Math.clz32?Math.clz32:z1,La=Math.log,Gn=Math.LN2;function z1(e){return e>>>=0,e===0?32:31-(La(e)/Gn|0)|0}var Wr=256,es=262144,ts=4194304;function _l(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 ns(e,n,i){var s=e.pendingLanes;if(s===0)return 0;var f=0,h=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var S=s&134217727;return S!==0?(s=S&~h,s!==0?f=_l(s):(v&=S,v!==0?f=_l(v):i||(i=S&~e,i!==0&&(f=_l(i))))):(S=s&~h,S!==0?f=_l(S):v!==0?f=_l(v):i||(i=s&~e,i!==0&&(f=_l(i)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,i=n&-n,h>=i||h===32&&(i&4194048)!==0)?n:f}function qi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function R1(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 Ud(){var e=ts;return ts<<=1,(ts&62914560)===0&&(ts=4194304),e}function au(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function Vi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function O1(e,n,i,s,f,h){var v=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var S=e.entanglements,A=e.expirationTimes,q=e.hiddenUpdates;for(i=v&~i;0<i;){var F=31-mt(i),ee=1<<F;S[F]=0,A[F]=-1;var V=q[F];if(V!==null)for(q[F]=null,F=0;F<V.length;F++){var G=V[F];G!==null&&(G.lane&=-536870913)}i&=~ee}s!==0&&Hd(e,s,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(v&~n))}function Hd(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var s=31-mt(n);e.entangledLanes|=n,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function qd(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var s=31-mt(i),f=1<<s;f&n|e[s]&n&&(e[s]|=n),i&=~f}}function Vd(e,n){var i=n&-n;return i=(i&42)!==0?1:lu(i),(i&(e.suspendedLanes|n))!==0?0:i}function lu(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 iu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Gd(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:Ag(e.type))}function $d(e,n){var i=W.p;try{return W.p=e,n()}finally{W.p=i}}var Ba=Math.random().toString(36).slice(2),Vt="__reactFiber$"+Ba,rn="__reactProps$"+Ba,Gl="__reactContainer$"+Ba,ru="__reactEvents$"+Ba,D1="__reactListeners$"+Ba,L1="__reactHandles$"+Ba,Zd="__reactResources$"+Ba,Gi="__reactMarker$"+Ba;function su(e){delete e[Vt],delete e[rn],delete e[ru],delete e[D1],delete e[L1]}function $l(e){var n=e[Vt];if(n)return n;for(var i=e.parentNode;i;){if(n=i[Gl]||i[Vt]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=dg(e);e!==null;){if(i=e[Vt])return i;e=dg(e)}return n}e=i,i=e.parentNode}return null}function Zl(e){if(e=e[Vt]||e[Gl]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function $i(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function Yl(e){var n=e[Zd];return n||(n=e[Zd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ut(e){e[Gi]=!0}var Yd=new Set,Fd={};function vl(e,n){Fl(e,n),Fl(e+"Capture",n)}function Fl(e,n){for(Fd[e]=n,e=0;e<n.length;e++)Yd.add(n[e])}var B1=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]*$"),Xd={},Qd={};function I1(e){return Oa.call(Qd,e)?!0:Oa.call(Xd,e)?!1:B1.test(e)?Qd[e]=!0:(Xd[e]=!0,!1)}function as(e,n,i){if(I1(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){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,""+i)}}function ls(e,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+i)}}function ua(e,n,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+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 Kd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function U1(e,n,i){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,h=s.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(v){i=""+v,h.call(this,v)}}),Object.defineProperty(e,n,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function ou(e){if(!e._valueTracker){var n=Kd(e)?"checked":"value";e._valueTracker=U1(e,n,""+e[n])}}function Jd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),s="";return e&&(s=Kd(e)?e.checked?"true":"false":e.value),e=s,e!==i?(n.setValue(e),!0):!1}function is(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 H1=/[\n"\\]/g;function jn(e){return e.replace(H1,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function uu(e,n,i,s,f,h,v,S){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?cu(e,v,An(n)):i!=null?cu(e,v,An(i)):s!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+An(S):e.removeAttribute("name")}function Pd(e,n,i,s,f,h,v,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){ou(e);return}i=i!=null?""+An(i):"",n=n!=null?""+An(n):i,S||n===e.value||(e.value=n),e.defaultValue=n}s=s??f,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=S?e.checked:!!s,e.defaultChecked=!!s,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),ou(e)}function cu(e,n,i){n==="number"&&is(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Xl(e,n,i,s){if(e=e.options,n){n={};for(var f=0;f<i.length;f++)n["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=n.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&s&&(e[i].defaultSelected=!0)}else{for(i=""+An(i),n=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,s&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function Wd(e,n,i){if(n!=null&&(n=""+An(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+An(i):""}function eh(e,n,i,s){if(n==null){if(s!=null){if(i!=null)throw Error(r(92));if(Z(s)){if(1<s.length)throw Error(r(93));s=s[0]}i=s}i==null&&(i=""),n=i}i=An(n),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),ou(e)}function Ql(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var q1=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 th(e,n,i){var s=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":s?e.setProperty(n,i):typeof i!="number"||i===0||q1.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function nh(e,n,i){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,i!=null){for(var s in i)!i.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)&&i[f]!==s&&th(e,f,s)}else for(var h in n)n.hasOwnProperty(h)&&th(e,h,n[h])}function fu(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 V1=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"]]),G1=/^[\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 rs(e){return G1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ca(){}var du=null;function hu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Kl=null,Jl=null;function ah(e){var n=Zl(e);if(n&&(e=n.stateNode)){var i=e[rn]||null;e:switch(e=n.stateNode,n.type){case"input":if(uu(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+jn(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var s=i[n];if(s!==e&&s.form===e.form){var f=s[rn]||null;if(!f)throw Error(r(90));uu(s,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<i.length;n++)s=i[n],s.form===e.form&&Jd(s)}break e;case"textarea":Wd(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&Xl(e,!!i.multiple,n,!1)}}}var mu=!1;function lh(e,n,i){if(mu)return e(n,i);mu=!0;try{var s=e(n);return s}finally{if(mu=!1,(Kl!==null||Jl!==null)&&(Fs(),Kl&&(n=Kl,e=Jl,Jl=Kl=null,ah(n),e)))for(n=0;n<e.length;n++)ah(e[n])}}function Zi(e,n){var i=e.stateNode;if(i===null)return null;var s=i[rn]||null;if(s===null)return null;i=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(i&&typeof i!="function")throw Error(r(231,n,typeof i));return i}var fa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pu=!1;if(fa)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){pu=!0}}),window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{pu=!1}var Ia=null,gu=null,ss=null;function ih(){if(ss)return ss;var e,n=gu,i=n.length,s,f="value"in Ia?Ia.value:Ia.textContent,h=f.length;for(e=0;e<i&&n[e]===f[e];e++);var v=i-e;for(s=1;s<=v&&n[i-s]===f[h-s];s++);return ss=f.slice(e,1<s?1-s:void 0)}function os(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 us(){return!0}function rh(){return!1}function sn(e){function n(i,s,f,h,v){this._reactName=i,this._targetInst=f,this.type=s,this.nativeEvent=h,this.target=v,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(i=e[S],this[S]=i?i(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?us:rh,this.isPropagationStopped=rh,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=us)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=us)},persist:function(){},isPersistent:us}),n}var xl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cs=sn(xl),Fi=y({},xl,{view:0,detail:0}),$1=sn(Fi),yu,_u,Xi,fs=y({},Fi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xu,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!==Xi&&(Xi&&e.type==="mousemove"?(yu=e.screenX-Xi.screenX,_u=e.screenY-Xi.screenY):_u=yu=0,Xi=e),yu)},movementY:function(e){return"movementY"in e?e.movementY:_u}}),sh=sn(fs),Z1=y({},fs,{dataTransfer:0}),Y1=sn(Z1),F1=y({},Fi,{relatedTarget:0}),vu=sn(F1),X1=y({},xl,{animationName:0,elapsedTime:0,pseudoElement:0}),Q1=sn(X1),K1=y({},xl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),J1=sn(K1),P1=y({},xl,{data:0}),oh=sn(P1),W1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ev={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"},tv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nv(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=tv[e])?!!n[e]:!1}function xu(){return nv}var av=y({},Fi,{key:function(e){if(e.key){var n=W1[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=os(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ev[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xu,charCode:function(e){return e.type==="keypress"?os(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?os(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),lv=sn(av),iv=y({},fs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uh=sn(iv),rv=y({},Fi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xu}),sv=sn(rv),ov=y({},xl,{propertyName:0,elapsedTime:0,pseudoElement:0}),uv=sn(ov),cv=y({},fs,{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}),fv=sn(cv),dv=y({},xl,{newState:0,oldState:0}),hv=sn(dv),mv=[9,13,27,32],bu=fa&&"CompositionEvent"in window,Qi=null;fa&&"documentMode"in document&&(Qi=document.documentMode);var pv=fa&&"TextEvent"in window&&!Qi,ch=fa&&(!bu||Qi&&8<Qi&&11>=Qi),fh=" ",dh=!1;function hh(e,n){switch(e){case"keyup":return mv.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Pl=!1;function gv(e,n){switch(e){case"compositionend":return mh(n);case"keypress":return n.which!==32?null:(dh=!0,fh);case"textInput":return e=n.data,e===fh&&dh?null:e;default:return null}}function yv(e,n){if(Pl)return e==="compositionend"||!bu&&hh(e,n)?(e=ih(),ss=gu=Ia=null,Pl=!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 ch&&n.locale!=="ko"?null:n.data;default:return null}}var _v={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 ph(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!_v[e.type]:n==="textarea"}function gh(e,n,i,s){Kl?Jl?Jl.push(s):Jl=[s]:Kl=s,n=eo(n,"onChange"),0<n.length&&(i=new cs("onChange","change",null,i,s),e.push({event:i,listeners:n}))}var Ki=null,Ji=null;function vv(e){Pp(e,0)}function ds(e){var n=$i(e);if(Jd(n))return e}function yh(e,n){if(e==="change")return n}var _h=!1;if(fa){var Su;if(fa){var ku="oninput"in document;if(!ku){var vh=document.createElement("div");vh.setAttribute("oninput","return;"),ku=typeof vh.oninput=="function"}Su=ku}else Su=!1;_h=Su&&(!document.documentMode||9<document.documentMode)}function xh(){Ki&&(Ki.detachEvent("onpropertychange",bh),Ji=Ki=null)}function bh(e){if(e.propertyName==="value"&&ds(Ji)){var n=[];gh(n,Ji,e,hu(e)),lh(vv,n)}}function xv(e,n,i){e==="focusin"?(xh(),Ki=n,Ji=i,Ki.attachEvent("onpropertychange",bh)):e==="focusout"&&xh()}function bv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ds(Ji)}function Sv(e,n){if(e==="click")return ds(n)}function kv(e,n){if(e==="input"||e==="change")return ds(n)}function Tv(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var gn=typeof Object.is=="function"?Object.is:Tv;function Pi(e,n){if(gn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),s=Object.keys(n);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var f=i[s];if(!Oa.call(n,f)||!gn(e[f],n[f]))return!1}return!0}function Sh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kh(e,n){var i=Sh(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=n&&s>=n)return{node:i,offset:n-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Sh(i)}}function Th(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Th(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Nh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=is(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=is(e.document)}return n}function Tu(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 Nv=fa&&"documentMode"in document&&11>=document.documentMode,Wl=null,Nu=null,Wi=null,Eu=!1;function Eh(e,n,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Eu||Wl==null||Wl!==is(s)||(s=Wl,"selectionStart"in s&&Tu(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}),Wi&&Pi(Wi,s)||(Wi=s,s=eo(Nu,"onSelect"),0<s.length&&(n=new cs("onSelect","select",null,n,i),e.push({event:n,listeners:s}),n.target=Wl)))}function bl(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var ei={animationend:bl("Animation","AnimationEnd"),animationiteration:bl("Animation","AnimationIteration"),animationstart:bl("Animation","AnimationStart"),transitionrun:bl("Transition","TransitionRun"),transitionstart:bl("Transition","TransitionStart"),transitioncancel:bl("Transition","TransitionCancel"),transitionend:bl("Transition","TransitionEnd")},Cu={},Ch={};fa&&(Ch=document.createElement("div").style,"AnimationEvent"in window||(delete ei.animationend.animation,delete ei.animationiteration.animation,delete ei.animationstart.animation),"TransitionEvent"in window||delete ei.transitionend.transition);function Sl(e){if(Cu[e])return Cu[e];if(!ei[e])return e;var n=ei[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in Ch)return Cu[e]=n[i];return e}var Ah=Sl("animationend"),jh=Sl("animationiteration"),wh=Sl("animationstart"),Ev=Sl("transitionrun"),Cv=Sl("transitionstart"),Av=Sl("transitioncancel"),Mh=Sl("transitionend"),zh=new Map,Au="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(" ");Au.push("scrollEnd");function $n(e,n){zh.set(e,n),vl(n,[e])}var hs=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)},wn=[],ti=0,ju=0;function ms(){for(var e=ti,n=ju=ti=0;n<e;){var i=wn[n];wn[n++]=null;var s=wn[n];wn[n++]=null;var f=wn[n];wn[n++]=null;var h=wn[n];if(wn[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}h!==0&&Rh(i,f,h)}}function ps(e,n,i,s){wn[ti++]=e,wn[ti++]=n,wn[ti++]=i,wn[ti++]=s,ju|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function wu(e,n,i,s){return ps(e,n,i,s),gs(e)}function kl(e,n){return ps(e,null,null,n),gs(e)}function Rh(e,n,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var f=!1,h=e.return;h!==null;)h.childLanes|=i,s=h.alternate,s!==null&&(s.childLanes|=i),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(f=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,f&&n!==null&&(f=31-mt(i),e=h.hiddenUpdates,s=e[f],s===null?e[f]=[n]:s.push(n),n.lane=i|536870912),h):null}function gs(e){if(50<br)throw br=0,Uc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ni={};function jv(e,n,i,s){this.tag=e,this.key=i,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 yn(e,n,i,s){return new jv(e,n,i,s)}function Mu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function da(e,n){var i=e.alternate;return i===null?(i=yn(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Oh(e,n){e.flags&=65011714;var i=e.alternate;return i===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=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,n=i.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function ys(e,n,i,s,f,h){var v=0;if(s=e,typeof e=="function")Mu(e)&&(v=1);else if(typeof e=="string")v=O0(e,i,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case le:return e=yn(31,i,n,f),e.elementType=le,e.lanes=h,e;case O:return Tl(i.children,f,h,n);case D:v=8,f|=24;break;case k:return e=yn(12,i,n,f|2),e.elementType=k,e.lanes=h,e;case Y:return e=yn(13,i,n,f),e.elementType=Y,e.lanes=h,e;case I:return e=yn(19,i,n,f),e.elementType=I,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case j:v=10;break e;case M:v=9;break e;case K:v=11;break e;case U:v=14;break e;case re:v=16,s=null;break e}v=29,i=Error(r(130,e===null?"null":typeof e,"")),s=null}return n=yn(v,i,n,f),n.elementType=e,n.type=s,n.lanes=h,n}function Tl(e,n,i,s){return e=yn(7,e,s,n),e.lanes=i,e}function zu(e,n,i){return e=yn(6,e,null,n),e.lanes=i,e}function Dh(e){var n=yn(18,null,null,0);return n.stateNode=e,n}function Ru(e,n,i){return n=yn(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Lh=new WeakMap;function Mn(e,n){if(typeof e=="object"&&e!==null){var i=Lh.get(e);return i!==void 0?i:(n={value:e,source:n,stack:pl(n)},Lh.set(e,n),n)}return{value:e,source:n,stack:pl(n)}}var ai=[],li=0,_s=null,er=0,zn=[],Rn=0,Ua=null,Pn=1,Wn="";function ha(e,n){ai[li++]=er,ai[li++]=_s,_s=e,er=n}function Bh(e,n,i){zn[Rn++]=Pn,zn[Rn++]=Wn,zn[Rn++]=Ua,Ua=e;var s=Pn;e=Wn;var f=32-mt(s)-1;s&=~(1<<f),i+=1;var h=32-mt(n)+f;if(30<h){var v=f-f%5;h=(s&(1<<v)-1).toString(32),s>>=v,f-=v,Pn=1<<32-mt(n)+f|i<<f|s,Wn=h+e}else Pn=1<<h|i<<f|s,Wn=e}function Ou(e){e.return!==null&&(ha(e,1),Bh(e,1,0))}function Du(e){for(;e===_s;)_s=ai[--li],ai[li]=null,er=ai[--li],ai[li]=null;for(;e===Ua;)Ua=zn[--Rn],zn[Rn]=null,Wn=zn[--Rn],zn[Rn]=null,Pn=zn[--Rn],zn[Rn]=null}function Ih(e,n){zn[Rn++]=Pn,zn[Rn++]=Wn,zn[Rn++]=Ua,Pn=n.id,Wn=n.overflow,Ua=e}var Gt=null,vt=null,Je=!1,Ha=null,On=!1,Lu=Error(r(519));function qa(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tr(Mn(n,e)),Lu}function Uh(e){var n=e.stateNode,i=e.type,s=e.memoizedProps;switch(n[Vt]=e,n[rn]=s,i){case"dialog":Ze("cancel",n),Ze("close",n);break;case"iframe":case"object":case"embed":Ze("load",n);break;case"video":case"audio":for(i=0;i<kr.length;i++)Ze(kr[i],n);break;case"source":Ze("error",n);break;case"img":case"image":case"link":Ze("error",n),Ze("load",n);break;case"details":Ze("toggle",n);break;case"input":Ze("invalid",n),Pd(n,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ze("invalid",n);break;case"textarea":Ze("invalid",n),eh(n,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||s.suppressHydrationWarning===!0||ng(n.textContent,i)?(s.popover!=null&&(Ze("beforetoggle",n),Ze("toggle",n)),s.onScroll!=null&&Ze("scroll",n),s.onScrollEnd!=null&&Ze("scrollend",n),s.onClick!=null&&(n.onclick=ca),n=!0):n=!1,n||qa(e,!0)}function Hh(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 ii(e){if(e!==Gt)return!1;if(!Je)return Hh(e),Je=!0,!1;var n=e.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||ef(e.type,e.memoizedProps)),i=!i),i&&vt&&qa(e),Hh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));vt=fg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));vt=fg(e)}else n===27?(n=vt,tl(e.type)?(e=rf,rf=null,vt=e):vt=n):vt=Gt?Ln(e.stateNode.nextSibling):null;return!0}function Nl(){vt=Gt=null,Je=!1}function Bu(){var e=Ha;return e!==null&&(fn===null?fn=e:fn.push.apply(fn,e),Ha=null),e}function tr(e){Ha===null?Ha=[e]:Ha.push(e)}var Iu=C(null),El=null,ma=null;function Va(e,n,i){T(Iu,n._currentValue),n._currentValue=i}function pa(e){e._currentValue=Iu.current,$(Iu)}function Uu(e,n,i){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===i)break;e=e.return}}function Hu(e,n,i,s){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var h=f.dependencies;if(h!==null){var v=f.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=f;for(var A=0;A<n.length;A++)if(S.context===n[A]){h.lanes|=i,S=h.alternate,S!==null&&(S.lanes|=i),Uu(h.return,i,e),s||(v=null);break e}h=S.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(r(341));v.lanes|=i,h=v.alternate,h!==null&&(h.lanes|=i),Uu(v,i,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 ri(e,n,i,s){e=null;for(var f=n,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!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 S=f.type;gn(f.pendingProps.value,v.value)||(e!==null?e.push(S):e=[S])}}else if(f===_e.current){if(v=f.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Ar):e=[Ar])}f=f.return}e!==null&&Hu(n,e,i,s),n.flags|=262144}function vs(e){for(e=e.firstContext;e!==null;){if(!gn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Cl(e){El=e,ma=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function $t(e){return qh(El,e)}function xs(e,n){return El===null&&Cl(e),qh(e,n)}function qh(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},ma===null){if(e===null)throw Error(r(308));ma=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else ma=ma.next=n;return i}var wv=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},Mv=t.unstable_scheduleCallback,zv=t.unstable_NormalPriority,At={$$typeof:j,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qu(){return{controller:new wv,data:new Map,refCount:0}}function nr(e){e.refCount--,e.refCount===0&&Mv(zv,function(){e.controller.abort()})}var ar=null,Vu=0,si=0,oi=null;function Rv(e,n){if(ar===null){var i=ar=[];Vu=0,si=Zc(),oi={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Vu++,n.then(Vh,Vh),n}function Vh(){if(--Vu===0&&ar!==null){oi!==null&&(oi.status="fulfilled");var e=ar;ar=null,si=0,oi=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Ov(e,n){var i=[],s={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){s.status="fulfilled",s.value=n;for(var f=0;f<i.length;f++)(0,i[f])(n)},function(f){for(s.status="rejected",s.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),s}var Gh=B.S;B.S=function(e,n){Ep=It(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Rv(e,n),Gh!==null&&Gh(e,n)};var Al=C(null);function Gu(){var e=Al.current;return e!==null?e:pt.pooledCache}function bs(e,n){n===null?T(Al,Al.current):T(Al,n.pool)}function $h(){var e=Gu();return e===null?null:{parent:At._currentValue,pool:e}}var ui=Error(r(460)),$u=Error(r(474)),Ss=Error(r(542)),ks={then:function(){}};function Zh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yh(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then(ca,ca),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Xh(e),e;default:if(typeof n.status=="string")n.then(ca,ca);else{if(e=pt,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,Xh(e),e}throw wl=n,ui}}function jl(e){try{var n=e._init;return n(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(wl=i,ui):i}}var wl=null;function Fh(){if(wl===null)throw Error(r(459));var e=wl;return wl=null,e}function Xh(e){if(e===ui||e===Ss)throw Error(r(483))}var ci=null,lr=0;function Ts(e){var n=lr;return lr+=1,ci===null&&(ci=[]),Yh(ci,e,n)}function ir(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Ns(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 Qh(e){function n(L,w){if(e){var H=L.deletions;H===null?(L.deletions=[w],L.flags|=16):H.push(w)}}function i(L,w){if(!e)return null;for(;w!==null;)n(L,w),w=w.sibling;return null}function s(L){for(var w=new Map;L!==null;)L.key!==null?w.set(L.key,L):w.set(L.index,L),L=L.sibling;return w}function f(L,w){return L=da(L,w),L.index=0,L.sibling=null,L}function h(L,w,H){return L.index=H,e?(H=L.alternate,H!==null?(H=H.index,H<w?(L.flags|=67108866,w):H):(L.flags|=67108866,w)):(L.flags|=1048576,w)}function v(L){return e&&L.alternate===null&&(L.flags|=67108866),L}function S(L,w,H,P){return w===null||w.tag!==6?(w=zu(H,L.mode,P),w.return=L,w):(w=f(w,H),w.return=L,w)}function A(L,w,H,P){var Ee=H.type;return Ee===O?F(L,w,H.props.children,P,H.key):w!==null&&(w.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===re&&jl(Ee)===w.type)?(w=f(w,H.props),ir(w,H),w.return=L,w):(w=ys(H.type,H.key,H.props,null,L.mode,P),ir(w,H),w.return=L,w)}function q(L,w,H,P){return w===null||w.tag!==4||w.stateNode.containerInfo!==H.containerInfo||w.stateNode.implementation!==H.implementation?(w=Ru(H,L.mode,P),w.return=L,w):(w=f(w,H.children||[]),w.return=L,w)}function F(L,w,H,P,Ee){return w===null||w.tag!==7?(w=Tl(H,L.mode,P,Ee),w.return=L,w):(w=f(w,H),w.return=L,w)}function ee(L,w,H){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return w=zu(""+w,L.mode,H),w.return=L,w;if(typeof w=="object"&&w!==null){switch(w.$$typeof){case b:return H=ys(w.type,w.key,w.props,null,L.mode,H),ir(H,w),H.return=L,H;case N:return w=Ru(w,L.mode,H),w.return=L,w;case re:return w=jl(w),ee(L,w,H)}if(Z(w)||ae(w))return w=Tl(w,L.mode,H,null),w.return=L,w;if(typeof w.then=="function")return ee(L,Ts(w),H);if(w.$$typeof===j)return ee(L,xs(L,w),H);Ns(L,w)}return null}function V(L,w,H,P){var Ee=w!==null?w.key:null;if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return Ee!==null?null:S(L,w,""+H,P);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case b:return H.key===Ee?A(L,w,H,P):null;case N:return H.key===Ee?q(L,w,H,P):null;case re:return H=jl(H),V(L,w,H,P)}if(Z(H)||ae(H))return Ee!==null?null:F(L,w,H,P,null);if(typeof H.then=="function")return V(L,w,Ts(H),P);if(H.$$typeof===j)return V(L,w,xs(L,H),P);Ns(L,H)}return null}function G(L,w,H,P,Ee){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return L=L.get(H)||null,S(w,L,""+P,Ee);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case b:return L=L.get(P.key===null?H:P.key)||null,A(w,L,P,Ee);case N:return L=L.get(P.key===null?H:P.key)||null,q(w,L,P,Ee);case re:return P=jl(P),G(L,w,H,P,Ee)}if(Z(P)||ae(P))return L=L.get(H)||null,F(w,L,P,Ee,null);if(typeof P.then=="function")return G(L,w,H,Ts(P),Ee);if(P.$$typeof===j)return G(L,w,H,xs(w,P),Ee);Ns(w,P)}return null}function xe(L,w,H,P){for(var Ee=null,tt=null,ke=w,qe=w=0,Qe=null;ke!==null&&qe<H.length;qe++){ke.index>qe?(Qe=ke,ke=null):Qe=ke.sibling;var nt=V(L,ke,H[qe],P);if(nt===null){ke===null&&(ke=Qe);break}e&&ke&&nt.alternate===null&&n(L,ke),w=h(nt,w,qe),tt===null?Ee=nt:tt.sibling=nt,tt=nt,ke=Qe}if(qe===H.length)return i(L,ke),Je&&ha(L,qe),Ee;if(ke===null){for(;qe<H.length;qe++)ke=ee(L,H[qe],P),ke!==null&&(w=h(ke,w,qe),tt===null?Ee=ke:tt.sibling=ke,tt=ke);return Je&&ha(L,qe),Ee}for(ke=s(ke);qe<H.length;qe++)Qe=G(ke,L,qe,H[qe],P),Qe!==null&&(e&&Qe.alternate!==null&&ke.delete(Qe.key===null?qe:Qe.key),w=h(Qe,w,qe),tt===null?Ee=Qe:tt.sibling=Qe,tt=Qe);return e&&ke.forEach(function(rl){return n(L,rl)}),Je&&ha(L,qe),Ee}function je(L,w,H,P){if(H==null)throw Error(r(151));for(var Ee=null,tt=null,ke=w,qe=w=0,Qe=null,nt=H.next();ke!==null&&!nt.done;qe++,nt=H.next()){ke.index>qe?(Qe=ke,ke=null):Qe=ke.sibling;var rl=V(L,ke,nt.value,P);if(rl===null){ke===null&&(ke=Qe);break}e&&ke&&rl.alternate===null&&n(L,ke),w=h(rl,w,qe),tt===null?Ee=rl:tt.sibling=rl,tt=rl,ke=Qe}if(nt.done)return i(L,ke),Je&&ha(L,qe),Ee;if(ke===null){for(;!nt.done;qe++,nt=H.next())nt=ee(L,nt.value,P),nt!==null&&(w=h(nt,w,qe),tt===null?Ee=nt:tt.sibling=nt,tt=nt);return Je&&ha(L,qe),Ee}for(ke=s(ke);!nt.done;qe++,nt=H.next())nt=G(ke,L,qe,nt.value,P),nt!==null&&(e&&nt.alternate!==null&&ke.delete(nt.key===null?qe:nt.key),w=h(nt,w,qe),tt===null?Ee=nt:tt.sibling=nt,tt=nt);return e&&ke.forEach(function(Z0){return n(L,Z0)}),Je&&ha(L,qe),Ee}function ht(L,w,H,P){if(typeof H=="object"&&H!==null&&H.type===O&&H.key===null&&(H=H.props.children),typeof H=="object"&&H!==null){switch(H.$$typeof){case b:e:{for(var Ee=H.key;w!==null;){if(w.key===Ee){if(Ee=H.type,Ee===O){if(w.tag===7){i(L,w.sibling),P=f(w,H.props.children),P.return=L,L=P;break e}}else if(w.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===re&&jl(Ee)===w.type){i(L,w.sibling),P=f(w,H.props),ir(P,H),P.return=L,L=P;break e}i(L,w);break}else n(L,w);w=w.sibling}H.type===O?(P=Tl(H.props.children,L.mode,P,H.key),P.return=L,L=P):(P=ys(H.type,H.key,H.props,null,L.mode,P),ir(P,H),P.return=L,L=P)}return v(L);case N:e:{for(Ee=H.key;w!==null;){if(w.key===Ee)if(w.tag===4&&w.stateNode.containerInfo===H.containerInfo&&w.stateNode.implementation===H.implementation){i(L,w.sibling),P=f(w,H.children||[]),P.return=L,L=P;break e}else{i(L,w);break}else n(L,w);w=w.sibling}P=Ru(H,L.mode,P),P.return=L,L=P}return v(L);case re:return H=jl(H),ht(L,w,H,P)}if(Z(H))return xe(L,w,H,P);if(ae(H)){if(Ee=ae(H),typeof Ee!="function")throw Error(r(150));return H=Ee.call(H),je(L,w,H,P)}if(typeof H.then=="function")return ht(L,w,Ts(H),P);if(H.$$typeof===j)return ht(L,w,xs(L,H),P);Ns(L,H)}return typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint"?(H=""+H,w!==null&&w.tag===6?(i(L,w.sibling),P=f(w,H),P.return=L,L=P):(i(L,w),P=zu(H,L.mode,P),P.return=L,L=P),v(L)):i(L,w)}return function(L,w,H,P){try{lr=0;var Ee=ht(L,w,H,P);return ci=null,Ee}catch(ke){if(ke===ui||ke===Ss)throw ke;var tt=yn(29,ke,null,L.mode);return tt.lanes=P,tt.return=L,tt}finally{}}}var Ml=Qh(!0),Kh=Qh(!1),Ga=!1;function Zu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yu(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 $a(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Za(e,n,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(st&2)!==0){var f=s.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),s.pending=n,n=gs(e),Rh(e,null,i),n}return ps(e,s,n,i),gs(e)}function rr(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var s=n.lanes;s&=e.pendingLanes,i|=s,n.lanes=i,qd(e,i)}}function Fu(e,n){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var f=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?f=h=v:h=h.next=v,i=i.next}while(i!==null);h===null?f=h=n:h=h.next=n}else f=h=n;i={baseState:s.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var Xu=!1;function sr(){if(Xu){var e=oi;if(e!==null)throw e}}function or(e,n,i,s){Xu=!1;var f=e.updateQueue;Ga=!1;var h=f.firstBaseUpdate,v=f.lastBaseUpdate,S=f.shared.pending;if(S!==null){f.shared.pending=null;var A=S,q=A.next;A.next=null,v===null?h=q:v.next=q,v=A;var F=e.alternate;F!==null&&(F=F.updateQueue,S=F.lastBaseUpdate,S!==v&&(S===null?F.firstBaseUpdate=q:S.next=q,F.lastBaseUpdate=A))}if(h!==null){var ee=f.baseState;v=0,F=q=A=null,S=h;do{var V=S.lane&-536870913,G=V!==S.lane;if(G?(Xe&V)===V:(s&V)===V){V!==0&&V===si&&(Xu=!0),F!==null&&(F=F.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var xe=e,je=S;V=n;var ht=i;switch(je.tag){case 1:if(xe=je.payload,typeof xe=="function"){ee=xe.call(ht,ee,V);break e}ee=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=je.payload,V=typeof xe=="function"?xe.call(ht,ee,V):xe,V==null)break e;ee=y({},ee,V);break e;case 2:Ga=!0}}V=S.callback,V!==null&&(e.flags|=64,G&&(e.flags|=8192),G=f.callbacks,G===null?f.callbacks=[V]:G.push(V))}else G={lane:V,tag:S.tag,payload:S.payload,callback:S.callback,next:null},F===null?(q=F=G,A=ee):F=F.next=G,v|=V;if(S=S.next,S===null){if(S=f.shared.pending,S===null)break;G=S,S=G.next,G.next=null,f.lastBaseUpdate=G,f.shared.pending=null}}while(!0);F===null&&(A=ee),f.baseState=A,f.firstBaseUpdate=q,f.lastBaseUpdate=F,h===null&&(f.shared.lanes=0),Ka|=v,e.lanes=v,e.memoizedState=ee}}function Jh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Ph(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Jh(i[e],n)}var fi=C(null),Es=C(0);function Wh(e,n){e=Ta,T(Es,e),T(fi,n),Ta=e|n.baseLanes}function Qu(){T(Es,Ta),T(fi,fi.current)}function Ku(){Ta=Es.current,$(fi),$(Es)}var _n=C(null),Dn=null;function Ya(e){var n=e.alternate;T(Nt,Nt.current&1),T(_n,e),Dn===null&&(n===null||fi.current!==null||n.memoizedState!==null)&&(Dn=e)}function Ju(e){T(Nt,Nt.current),T(_n,e),Dn===null&&(Dn=e)}function em(e){e.tag===22?(T(Nt,Nt.current),T(_n,e),Dn===null&&(Dn=e)):Fa()}function Fa(){T(Nt,Nt.current),T(_n,_n.current)}function vn(e){$(_n),Dn===e&&(Dn=null),$(Nt)}var Nt=C(0);function Cs(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||af(i)||lf(i)))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 ga=0,Ie=null,ft=null,jt=null,As=!1,di=!1,zl=!1,js=0,ur=0,hi=null,Dv=0;function kt(){throw Error(r(321))}function Pu(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!gn(e[i],n[i]))return!1;return!0}function Wu(e,n,i,s,f,h){return ga=h,Ie=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,B.H=e===null||e.memoizedState===null?Bm:mc,zl=!1,h=i(s,f),zl=!1,di&&(h=nm(n,i,s,f)),tm(e),h}function tm(e){B.H=dr;var n=ft!==null&&ft.next!==null;if(ga=0,jt=ft=Ie=null,As=!1,ur=0,hi=null,n)throw Error(r(300));e===null||wt||(e=e.dependencies,e!==null&&vs(e)&&(wt=!0))}function nm(e,n,i,s){Ie=e;var f=0;do{if(di&&(hi=null),ur=0,di=!1,25<=f)throw Error(r(301));if(f+=1,jt=ft=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}B.H=Im,h=n(i,s)}while(di);return h}function Lv(){var e=B.H,n=e.useState()[0];return n=typeof n.then=="function"?cr(n):n,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(Ie.flags|=1024),n}function ec(){var e=js!==0;return js=0,e}function tc(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function nc(e){if(As){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}As=!1}ga=0,jt=ft=Ie=null,di=!1,ur=js=0,hi=null}function en(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ie.memoizedState=jt=e:jt=jt.next=e,jt}function Et(){if(ft===null){var e=Ie.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var n=jt===null?Ie.memoizedState:jt.next;if(n!==null)jt=n,ft=e;else{if(e===null)throw Ie.alternate===null?Error(r(467)):Error(r(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},jt===null?Ie.memoizedState=jt=e:jt=jt.next=e}return jt}function ws(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cr(e){var n=ur;return ur+=1,hi===null&&(hi=[]),e=Yh(hi,e,n),n=Ie,(jt===null?n.memoizedState:jt.next)===null&&(n=n.alternate,B.H=n===null||n.memoizedState===null?Bm:mc),e}function Ms(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return cr(e);if(e.$$typeof===j)return $t(e)}throw Error(r(438,String(e)))}function ac(e){var n=null,i=Ie.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var s=Ie.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}),i===null&&(i=ws(),Ie.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),s=0;s<e;s++)i[s]=z;return n.index++,i}function ya(e,n){return typeof n=="function"?n(e):n}function zs(e){var n=Et();return lc(n,ft,e)}function lc(e,n,i){var s=e.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=i;var f=e.baseQueue,h=s.pending;if(h!==null){if(f!==null){var v=f.next;f.next=h.next,h.next=v}n.baseQueue=f=h,s.pending=null}if(h=e.baseState,f===null)e.memoizedState=h;else{n=f.next;var S=v=null,A=null,q=n,F=!1;do{var ee=q.lane&-536870913;if(ee!==q.lane?(Xe&ee)===ee:(ga&ee)===ee){var V=q.revertLane;if(V===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null}),ee===si&&(F=!0);else if((ga&V)===V){q=q.next,V===si&&(F=!0);continue}else ee={lane:0,revertLane:q.revertLane,gesture:null,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},A===null?(S=A=ee,v=h):A=A.next=ee,Ie.lanes|=V,Ka|=V;ee=q.action,zl&&i(h,ee),h=q.hasEagerState?q.eagerState:i(h,ee)}else V={lane:ee,revertLane:q.revertLane,gesture:q.gesture,action:q.action,hasEagerState:q.hasEagerState,eagerState:q.eagerState,next:null},A===null?(S=A=V,v=h):A=A.next=V,Ie.lanes|=ee,Ka|=ee;q=q.next}while(q!==null&&q!==n);if(A===null?v=h:A.next=S,!gn(h,e.memoizedState)&&(wt=!0,F&&(i=oi,i!==null)))throw i;e.memoizedState=h,e.baseState=v,e.baseQueue=A,s.lastRenderedState=h}return f===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function ic(e){var n=Et(),i=n.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var s=i.dispatch,f=i.pending,h=n.memoizedState;if(f!==null){i.pending=null;var v=f=f.next;do h=e(h,v.action),v=v.next;while(v!==f);gn(h,n.memoizedState)||(wt=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),i.lastRenderedState=h}return[h,s]}function am(e,n,i){var s=Ie,f=Et(),h=Je;if(h){if(i===void 0)throw Error(r(407));i=i()}else i=n();var v=!gn((ft||f).memoizedState,i);if(v&&(f.memoizedState=i,wt=!0),f=f.queue,oc(rm.bind(null,s,f,e),[e]),f.getSnapshot!==n||v||jt!==null&&jt.memoizedState.tag&1){if(s.flags|=2048,mi(9,{destroy:void 0},im.bind(null,s,f,i,n),null),pt===null)throw Error(r(349));h||(ga&127)!==0||lm(s,n,i)}return i}function lm(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=Ie.updateQueue,n===null?(n=ws(),Ie.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function im(e,n,i,s){n.value=i,n.getSnapshot=s,sm(n)&&om(e)}function rm(e,n,i){return i(function(){sm(n)&&om(e)})}function sm(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!gn(e,i)}catch{return!0}}function om(e){var n=kl(e,2);n!==null&&dn(n,e,2)}function rc(e){var n=en();if(typeof e=="function"){var i=e;if(e=i(),zl){ln(!0);try{i()}finally{ln(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ya,lastRenderedState:e},n}function um(e,n,i,s){return e.baseState=i,lc(e,ft,typeof s=="function"?s:ya)}function Bv(e,n,i,s,f){if(Ds(e))throw Error(r(485));if(e=n.action,e!==null){var h={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){h.listeners.push(v)}};B.T!==null?i(!0):h.isTransition=!1,s(h),i=n.pending,i===null?(h.next=n.pending=h,cm(n,h)):(h.next=i.next,n.pending=i.next=h)}}function cm(e,n){var i=n.action,s=n.payload,f=e.state;if(n.isTransition){var h=B.T,v={};B.T=v;try{var S=i(f,s),A=B.S;A!==null&&A(v,S),fm(e,n,S)}catch(q){sc(e,n,q)}finally{h!==null&&v.types!==null&&(h.types=v.types),B.T=h}}else try{h=i(f,s),fm(e,n,h)}catch(q){sc(e,n,q)}}function fm(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){dm(e,n,s)},function(s){return sc(e,n,s)}):dm(e,n,i)}function dm(e,n,i){n.status="fulfilled",n.value=i,hm(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,cm(e,i)))}function sc(e,n,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do n.status="rejected",n.reason=i,hm(n),n=n.next;while(n!==s)}e.action=null}function hm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function mm(e,n){return n}function pm(e,n){if(Je){var i=pt.formState;if(i!==null){e:{var s=Ie;if(Je){if(vt){t:{for(var f=vt,h=On;f.nodeType!==8;){if(!h){f=null;break t}if(f=Ln(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){vt=Ln(f.nextSibling),s=f.data==="F!";break e}}qa(s)}s=!1}s&&(n=i[0])}}return i=en(),i.memoizedState=i.baseState=n,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mm,lastRenderedState:n},i.queue=s,i=Om.bind(null,Ie,s),s.dispatch=i,s=rc(!1),h=hc.bind(null,Ie,!1,s.queue),s=en(),f={state:n,dispatch:null,action:e,pending:null},s.queue=f,i=Bv.bind(null,Ie,f,h,i),f.dispatch=i,s.memoizedState=e,[n,i,!1]}function gm(e){var n=Et();return ym(n,ft,e)}function ym(e,n,i){if(n=lc(e,n,mm)[0],e=zs(ya)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var s=cr(n)}catch(v){throw v===ui?Ss:v}else s=n;n=Et();var f=n.queue,h=f.dispatch;return i!==n.memoizedState&&(Ie.flags|=2048,mi(9,{destroy:void 0},Iv.bind(null,f,i),null)),[s,h,e]}function Iv(e,n){e.action=n}function _m(e){var n=Et(),i=ft;if(i!==null)return ym(n,i,e);Et(),n=n.memoizedState,i=Et();var s=i.queue.dispatch;return i.memoizedState=e,[n,s,!1]}function mi(e,n,i,s){return e={tag:e,create:i,deps:s,inst:n,next:null},n=Ie.updateQueue,n===null&&(n=ws(),Ie.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,n.lastEffect=e),e}function vm(){return Et().memoizedState}function Rs(e,n,i,s){var f=en();Ie.flags|=e,f.memoizedState=mi(1|n,{destroy:void 0},i,s===void 0?null:s)}function Os(e,n,i,s){var f=Et();s=s===void 0?null:s;var h=f.memoizedState.inst;ft!==null&&s!==null&&Pu(s,ft.memoizedState.deps)?f.memoizedState=mi(n,h,i,s):(Ie.flags|=e,f.memoizedState=mi(1|n,h,i,s))}function xm(e,n){Rs(8390656,8,e,n)}function oc(e,n){Os(2048,8,e,n)}function Uv(e){Ie.flags|=4;var n=Ie.updateQueue;if(n===null)n=ws(),Ie.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function bm(e){var n=Et().memoizedState;return Uv({ref:n,nextImpl:e}),function(){if((st&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Sm(e,n){return Os(4,2,e,n)}function km(e,n){return Os(4,4,e,n)}function Tm(e,n){if(typeof n=="function"){e=e();var i=n(e);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Nm(e,n,i){i=i!=null?i.concat([e]):null,Os(4,4,Tm.bind(null,n,e),i)}function uc(){}function Em(e,n){var i=Et();n=n===void 0?null:n;var s=i.memoizedState;return n!==null&&Pu(n,s[1])?s[0]:(i.memoizedState=[e,n],e)}function Cm(e,n){var i=Et();n=n===void 0?null:n;var s=i.memoizedState;if(n!==null&&Pu(n,s[1]))return s[0];if(s=e(),zl){ln(!0);try{e()}finally{ln(!1)}}return i.memoizedState=[s,n],s}function cc(e,n,i){return i===void 0||(ga&1073741824)!==0&&(Xe&261930)===0?e.memoizedState=n:(e.memoizedState=i,e=Ap(),Ie.lanes|=e,Ka|=e,i)}function Am(e,n,i,s){return gn(i,n)?i:fi.current!==null?(e=cc(e,i,s),gn(e,n)||(wt=!0),e):(ga&42)===0||(ga&1073741824)!==0&&(Xe&261930)===0?(wt=!0,e.memoizedState=i):(e=Ap(),Ie.lanes|=e,Ka|=e,n)}function jm(e,n,i,s,f){var h=W.p;W.p=h!==0&&8>h?h:8;var v=B.T,S={};B.T=S,hc(e,!1,n,i);try{var A=f(),q=B.S;if(q!==null&&q(S,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var F=Ov(A,s);fr(e,n,F,Sn(e))}else fr(e,n,s,Sn(e))}catch(ee){fr(e,n,{then:function(){},status:"rejected",reason:ee},Sn())}finally{W.p=h,v!==null&&S.types!==null&&(v.types=S.types),B.T=v}}function Hv(){}function fc(e,n,i,s){if(e.tag!==5)throw Error(r(476));var f=wm(e).queue;jm(e,f,n,ue,i===null?Hv:function(){return Mm(e),i(s)})}function wm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ya,lastRenderedState:ue},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ya,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Mm(e){var n=wm(e);n.next===null&&(n=e.alternate.memoizedState),fr(e,n.next.queue,{},Sn())}function dc(){return $t(Ar)}function zm(){return Et().memoizedState}function Rm(){return Et().memoizedState}function qv(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=Sn();e=$a(i);var s=Za(n,e,i);s!==null&&(dn(s,n,i),rr(s,n,i)),n={cache:qu()},e.payload=n;return}n=n.return}}function Vv(e,n,i){var s=Sn();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Ds(e)?Dm(n,i):(i=wu(e,n,i,s),i!==null&&(dn(i,e,s),Lm(i,n,s)))}function Om(e,n,i){var s=Sn();fr(e,n,i,s)}function fr(e,n,i,s){var f={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Ds(e))Dm(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var v=n.lastRenderedState,S=h(v,i);if(f.hasEagerState=!0,f.eagerState=S,gn(S,v))return ps(e,n,f,0),pt===null&&ms(),!1}catch{}finally{}if(i=wu(e,n,f,s),i!==null)return dn(i,e,s),Lm(i,n,s),!0}return!1}function hc(e,n,i,s){if(s={lane:2,revertLane:Zc(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Ds(e)){if(n)throw Error(r(479))}else n=wu(e,i,s,2),n!==null&&dn(n,e,2)}function Ds(e){var n=e.alternate;return e===Ie||n!==null&&n===Ie}function Dm(e,n){di=As=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function Lm(e,n,i){if((i&4194048)!==0){var s=n.lanes;s&=e.pendingLanes,i|=s,n.lanes=i,qd(e,i)}}var dr={readContext:$t,use:Ms,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt};dr.useEffectEvent=kt;var Bm={readContext:$t,use:Ms,useCallback:function(e,n){return en().memoizedState=[e,n===void 0?null:n],e},useContext:$t,useEffect:xm,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,Rs(4194308,4,Tm.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Rs(4194308,4,e,n)},useInsertionEffect:function(e,n){Rs(4,2,e,n)},useMemo:function(e,n){var i=en();n=n===void 0?null:n;var s=e();if(zl){ln(!0);try{e()}finally{ln(!1)}}return i.memoizedState=[s,n],s},useReducer:function(e,n,i){var s=en();if(i!==void 0){var f=i(n);if(zl){ln(!0);try{i(n)}finally{ln(!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=Vv.bind(null,Ie,e),[s.memoizedState,e]},useRef:function(e){var n=en();return e={current:e},n.memoizedState=e},useState:function(e){e=rc(e);var n=e.queue,i=Om.bind(null,Ie,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:uc,useDeferredValue:function(e,n){var i=en();return cc(i,e,n)},useTransition:function(){var e=rc(!1);return e=jm.bind(null,Ie,e.queue,!0,!1),en().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var s=Ie,f=en();if(Je){if(i===void 0)throw Error(r(407));i=i()}else{if(i=n(),pt===null)throw Error(r(349));(Xe&127)!==0||lm(s,n,i)}f.memoizedState=i;var h={value:i,getSnapshot:n};return f.queue=h,xm(rm.bind(null,s,h,e),[e]),s.flags|=2048,mi(9,{destroy:void 0},im.bind(null,s,h,i,n),null),i},useId:function(){var e=en(),n=pt.identifierPrefix;if(Je){var i=Wn,s=Pn;i=(s&~(1<<32-mt(s)-1)).toString(32)+i,n="_"+n+"R_"+i,i=js++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=Dv++,n="_"+n+"r_"+i.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:dc,useFormState:pm,useActionState:pm,useOptimistic:function(e){var n=en();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=hc.bind(null,Ie,!0,i),i.dispatch=n,[e,n]},useMemoCache:ac,useCacheRefresh:function(){return en().memoizedState=qv.bind(null,Ie)},useEffectEvent:function(e){var n=en(),i={impl:e};return n.memoizedState=i,function(){if((st&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},mc={readContext:$t,use:Ms,useCallback:Em,useContext:$t,useEffect:oc,useImperativeHandle:Nm,useInsertionEffect:Sm,useLayoutEffect:km,useMemo:Cm,useReducer:zs,useRef:vm,useState:function(){return zs(ya)},useDebugValue:uc,useDeferredValue:function(e,n){var i=Et();return Am(i,ft.memoizedState,e,n)},useTransition:function(){var e=zs(ya)[0],n=Et().memoizedState;return[typeof e=="boolean"?e:cr(e),n]},useSyncExternalStore:am,useId:zm,useHostTransitionStatus:dc,useFormState:gm,useActionState:gm,useOptimistic:function(e,n){var i=Et();return um(i,ft,e,n)},useMemoCache:ac,useCacheRefresh:Rm};mc.useEffectEvent=bm;var Im={readContext:$t,use:Ms,useCallback:Em,useContext:$t,useEffect:oc,useImperativeHandle:Nm,useInsertionEffect:Sm,useLayoutEffect:km,useMemo:Cm,useReducer:ic,useRef:vm,useState:function(){return ic(ya)},useDebugValue:uc,useDeferredValue:function(e,n){var i=Et();return ft===null?cc(i,e,n):Am(i,ft.memoizedState,e,n)},useTransition:function(){var e=ic(ya)[0],n=Et().memoizedState;return[typeof e=="boolean"?e:cr(e),n]},useSyncExternalStore:am,useId:zm,useHostTransitionStatus:dc,useFormState:_m,useActionState:_m,useOptimistic:function(e,n){var i=Et();return ft!==null?um(i,ft,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:ac,useCacheRefresh:Rm};Im.useEffectEvent=bm;function pc(e,n,i,s){n=e.memoizedState,i=i(s,n),i=i==null?n:y({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var gc={enqueueSetState:function(e,n,i){e=e._reactInternals;var s=Sn(),f=$a(s);f.payload=n,i!=null&&(f.callback=i),n=Za(e,f,s),n!==null&&(dn(n,e,s),rr(n,e,s))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var s=Sn(),f=$a(s);f.tag=1,f.payload=n,i!=null&&(f.callback=i),n=Za(e,f,s),n!==null&&(dn(n,e,s),rr(n,e,s))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=Sn(),s=$a(i);s.tag=2,n!=null&&(s.callback=n),n=Za(e,s,i),n!==null&&(dn(n,e,i),rr(n,e,i))}};function Um(e,n,i,s,f,h,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,h,v):n.prototype&&n.prototype.isPureReactComponent?!Pi(i,s)||!Pi(f,h):!0}function Hm(e,n,i,s){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,s),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,s),n.state!==e&&gc.enqueueReplaceState(n,n.state,null)}function Rl(e,n){var i=n;if("ref"in n){i={};for(var s in n)s!=="ref"&&(i[s]=n[s])}if(e=e.defaultProps){i===n&&(i=y({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function qm(e){hs(e)}function Vm(e){console.error(e)}function Gm(e){hs(e)}function Ls(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(s){setTimeout(function(){throw s})}}function $m(e,n,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function yc(e,n,i){return i=$a(i),i.tag=3,i.payload={element:null},i.callback=function(){Ls(e,n)},i}function Zm(e){return e=$a(e),e.tag=3,e}function Ym(e,n,i,s){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var h=s.value;e.payload=function(){return f(h)},e.callback=function(){$m(n,i,s)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){$m(n,i,s),typeof f!="function"&&(Ja===null?Ja=new Set([this]):Ja.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})})}function Gv(e,n,i,s,f){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(n=i.alternate,n!==null&&ri(n,i,f,!0),i=_n.current,i!==null){switch(i.tag){case 31:case 13:return Dn===null?Xs():i.alternate===null&&Tt===0&&(Tt=3),i.flags&=-257,i.flags|=65536,i.lanes=f,s===ks?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([s]):n.add(s),Vc(e,s,f)),!1;case 22:return i.flags|=65536,s===ks?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([s]):i.add(s)),Vc(e,s,f)),!1}throw Error(r(435,i.tag))}return Vc(e,s,f),Xs(),!1}if(Je)return n=_n.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,s!==Lu&&(e=Error(r(422),{cause:s}),tr(Mn(e,i)))):(s!==Lu&&(n=Error(r(423),{cause:s}),tr(Mn(n,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,s=Mn(s,i),f=yc(e.stateNode,s,f),Fu(e,f),Tt!==4&&(Tt=2)),!1;var h=Error(r(520),{cause:s});if(h=Mn(h,i),xr===null?xr=[h]:xr.push(h),Tt!==4&&(Tt=2),n===null)return!0;s=Mn(s,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=yc(i.stateNode,s,e),Fu(i,e),!1;case 1:if(n=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Ja===null||!Ja.has(h))))return i.flags|=65536,f&=-f,i.lanes|=f,f=Zm(f),Ym(f,e,i,s),Fu(i,f),!1}i=i.return}while(i!==null);return!1}var _c=Error(r(461)),wt=!1;function Zt(e,n,i,s){n.child=e===null?Kh(n,null,i,s):Ml(n,e.child,i,s)}function Fm(e,n,i,s,f){i=i.render;var h=n.ref;if("ref"in s){var v={};for(var S in s)S!=="ref"&&(v[S]=s[S])}else v=s;return Cl(n),s=Wu(e,n,i,v,h,f),S=ec(),e!==null&&!wt?(tc(e,n,f),_a(e,n,f)):(Je&&S&&Ou(n),n.flags|=1,Zt(e,n,s,f),n.child)}function Xm(e,n,i,s,f){if(e===null){var h=i.type;return typeof h=="function"&&!Mu(h)&&h.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=h,Qm(e,n,h,s,f)):(e=ys(i.type,null,s,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!Ec(e,f)){var v=h.memoizedProps;if(i=i.compare,i=i!==null?i:Pi,i(v,s)&&e.ref===n.ref)return _a(e,n,f)}return n.flags|=1,e=da(h,s),e.ref=n.ref,e.return=n,n.child=e}function Qm(e,n,i,s,f){if(e!==null){var h=e.memoizedProps;if(Pi(h,s)&&e.ref===n.ref)if(wt=!1,n.pendingProps=s=h,Ec(e,f))(e.flags&131072)!==0&&(wt=!0);else return n.lanes=e.lanes,_a(e,n,f)}return vc(e,n,i,s,f)}function Km(e,n,i,s){var f=s.children,h=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(h=h!==null?h.baseLanes|i:i,e!==null){for(s=n.child=e.child,f=0;s!==null;)f=f|s.lanes|s.childLanes,s=s.sibling;s=f&~h}else s=0,n.child=null;return Jm(e,n,h,i,s)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&bs(n,h!==null?h.cachePool:null),h!==null?Wh(n,h):Qu(),em(n);else return s=n.lanes=536870912,Jm(e,n,h!==null?h.baseLanes|i:i,i,s)}else h!==null?(bs(n,h.cachePool),Wh(n,h),Fa(),n.memoizedState=null):(e!==null&&bs(n,null),Qu(),Fa());return Zt(e,n,f,i),n.child}function hr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Jm(e,n,i,s,f){var h=Gu();return h=h===null?null:{parent:At._currentValue,pool:h},n.memoizedState={baseLanes:i,cachePool:h},e!==null&&bs(n,null),Qu(),em(n),e!==null&&ri(e,n,s,!0),n.childLanes=f,null}function Bs(e,n){return n=Us({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Pm(e,n,i){return Ml(n,e.child,null,i),e=Bs(n,n.pendingProps),e.flags|=2,vn(n),n.memoizedState=null,e}function $v(e,n,i){var s=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Je){if(s.mode==="hidden")return e=Bs(n,s),n.lanes=536870912,hr(null,e);if(Ju(n),(e=vt)?(e=cg(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},i=Dh(e),i.return=n,n.child=i,Gt=n,vt=null)):e=null,e===null)throw qa(n);return n.lanes=536870912,null}return Bs(n,s)}var h=e.memoizedState;if(h!==null){var v=h.dehydrated;if(Ju(n),f)if(n.flags&256)n.flags&=-257,n=Pm(e,n,i);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(wt||ri(e,n,i,!1),f=(i&e.childLanes)!==0,wt||f){if(s=pt,s!==null&&(v=Vd(s,i),v!==0&&v!==h.retryLane))throw h.retryLane=v,kl(e,v),dn(s,e,v),_c;Xs(),n=Pm(e,n,i)}else e=h.treeContext,vt=Ln(v.nextSibling),Gt=n,Je=!0,Ha=null,On=!1,e!==null&&Ih(n,e),n=Bs(n,s),n.flags|=4096;return n}return e=da(e.child,{mode:s.mode,children:s.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Is(e,n){var i=n.ref;if(i===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(n.flags|=4194816)}}function vc(e,n,i,s,f){return Cl(n),i=Wu(e,n,i,s,void 0,f),s=ec(),e!==null&&!wt?(tc(e,n,f),_a(e,n,f)):(Je&&s&&Ou(n),n.flags|=1,Zt(e,n,i,f),n.child)}function Wm(e,n,i,s,f,h){return Cl(n),n.updateQueue=null,i=nm(n,s,i,f),tm(e),s=ec(),e!==null&&!wt?(tc(e,n,h),_a(e,n,h)):(Je&&s&&Ou(n),n.flags|=1,Zt(e,n,i,h),n.child)}function ep(e,n,i,s,f){if(Cl(n),n.stateNode===null){var h=ni,v=i.contextType;typeof v=="object"&&v!==null&&(h=$t(v)),h=new i(s,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=gc,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=s,h.state=n.memoizedState,h.refs={},Zu(n),v=i.contextType,h.context=typeof v=="object"&&v!==null?$t(v):ni,h.state=n.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(pc(n,i,v,s),h.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(v=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),v!==h.state&&gc.enqueueReplaceState(h,h.state,null),or(n,s,h,f),sr(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),s=!0}else if(e===null){h=n.stateNode;var S=n.memoizedProps,A=Rl(i,S);h.props=A;var q=h.context,F=i.contextType;v=ni,typeof F=="object"&&F!==null&&(v=$t(F));var ee=i.getDerivedStateFromProps;F=typeof ee=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=n.pendingProps!==S,F||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||q!==v)&&Hm(n,h,s,v),Ga=!1;var V=n.memoizedState;h.state=V,or(n,s,h,f),sr(),q=n.memoizedState,S||V!==q||Ga?(typeof ee=="function"&&(pc(n,i,ee,s),q=n.memoizedState),(A=Ga||Um(n,i,A,s,V,q,v))?(F||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=s,n.memoizedState=q),h.props=s,h.state=q,h.context=v,s=A):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),s=!1)}else{h=n.stateNode,Yu(e,n),v=n.memoizedProps,F=Rl(i,v),h.props=F,ee=n.pendingProps,V=h.context,q=i.contextType,A=ni,typeof q=="object"&&q!==null&&(A=$t(q)),S=i.getDerivedStateFromProps,(q=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==ee||V!==A)&&Hm(n,h,s,A),Ga=!1,V=n.memoizedState,h.state=V,or(n,s,h,f),sr();var G=n.memoizedState;v!==ee||V!==G||Ga||e!==null&&e.dependencies!==null&&vs(e.dependencies)?(typeof S=="function"&&(pc(n,i,S,s),G=n.memoizedState),(F=Ga||Um(n,i,F,s,V,G,A)||e!==null&&e.dependencies!==null&&vs(e.dependencies))?(q||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(s,G,A),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(s,G,A)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(n.flags|=1024),n.memoizedProps=s,n.memoizedState=G),h.props=s,h.state=G,h.context=A,s=F):(typeof h.componentDidUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&V===e.memoizedState||(n.flags|=1024),s=!1)}return h=s,Is(e,n),s=(n.flags&128)!==0,h||s?(h=n.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&s?(n.child=Ml(n,e.child,null,f),n.child=Ml(n,null,i,f)):Zt(e,n,i,f),n.memoizedState=h.state,e=n.child):e=_a(e,n,f),e}function tp(e,n,i,s){return Nl(),n.flags|=256,Zt(e,n,i,s),n.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bc(e){return{baseLanes:e,cachePool:$h()}}function Sc(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=bn),e}function np(e,n,i){var s=n.pendingProps,f=!1,h=(n.flags&128)!==0,v;if((v=h)||(v=e!==null&&e.memoizedState===null?!1:(Nt.current&2)!==0),v&&(f=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if(Je){if(f?Ya(n):Fa(),(e=vt)?(e=cg(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},i=Dh(e),i.return=n,n.child=i,Gt=n,vt=null)):e=null,e===null)throw qa(n);return lf(e)?n.lanes=32:n.lanes=536870912,null}var S=s.children;return s=s.fallback,f?(Fa(),f=n.mode,S=Us({mode:"hidden",children:S},f),s=Tl(s,f,i,null),S.return=n,s.return=n,S.sibling=s,n.child=S,s=n.child,s.memoizedState=bc(i),s.childLanes=Sc(e,v,i),n.memoizedState=xc,hr(null,s)):(Ya(n),kc(n,S))}var A=e.memoizedState;if(A!==null&&(S=A.dehydrated,S!==null)){if(h)n.flags&256?(Ya(n),n.flags&=-257,n=Tc(e,n,i)):n.memoizedState!==null?(Fa(),n.child=e.child,n.flags|=128,n=null):(Fa(),S=s.fallback,f=n.mode,s=Us({mode:"visible",children:s.children},f),S=Tl(S,f,i,null),S.flags|=2,s.return=n,S.return=n,s.sibling=S,n.child=s,Ml(n,e.child,null,i),s=n.child,s.memoizedState=bc(i),s.childLanes=Sc(e,v,i),n.memoizedState=xc,n=hr(null,s));else if(Ya(n),lf(S)){if(v=S.nextSibling&&S.nextSibling.dataset,v)var q=v.dgst;v=q,s=Error(r(419)),s.stack="",s.digest=v,tr({value:s,source:null,stack:null}),n=Tc(e,n,i)}else if(wt||ri(e,n,i,!1),v=(i&e.childLanes)!==0,wt||v){if(v=pt,v!==null&&(s=Vd(v,i),s!==0&&s!==A.retryLane))throw A.retryLane=s,kl(e,s),dn(v,e,s),_c;af(S)||Xs(),n=Tc(e,n,i)}else af(S)?(n.flags|=192,n.child=e.child,n=null):(e=A.treeContext,vt=Ln(S.nextSibling),Gt=n,Je=!0,Ha=null,On=!1,e!==null&&Ih(n,e),n=kc(n,s.children),n.flags|=4096);return n}return f?(Fa(),S=s.fallback,f=n.mode,A=e.child,q=A.sibling,s=da(A,{mode:"hidden",children:s.children}),s.subtreeFlags=A.subtreeFlags&65011712,q!==null?S=da(q,S):(S=Tl(S,f,i,null),S.flags|=2),S.return=n,s.return=n,s.sibling=S,n.child=s,hr(null,s),s=n.child,S=e.child.memoizedState,S===null?S=bc(i):(f=S.cachePool,f!==null?(A=At._currentValue,f=f.parent!==A?{parent:A,pool:A}:f):f=$h(),S={baseLanes:S.baseLanes|i,cachePool:f}),s.memoizedState=S,s.childLanes=Sc(e,v,i),n.memoizedState=xc,hr(e.child,s)):(Ya(n),i=e.child,e=i.sibling,i=da(i,{mode:"visible",children:s.children}),i.return=n,i.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=i,n.memoizedState=null,i)}function kc(e,n){return n=Us({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Us(e,n){return e=yn(22,e,null,n),e.lanes=0,e}function Tc(e,n,i){return Ml(n,e.child,null,i),e=kc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function ap(e,n,i){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n),Uu(e.return,n,i)}function Nc(e,n,i,s,f,h){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:f,treeForkCount:h}:(v.isBackwards=n,v.rendering=null,v.renderingStartTime=0,v.last=s,v.tail=i,v.tailMode=f,v.treeForkCount=h)}function lp(e,n,i){var s=n.pendingProps,f=s.revealOrder,h=s.tail;s=s.children;var v=Nt.current,S=(v&2)!==0;if(S?(v=v&1|2,n.flags|=128):v&=1,T(Nt,v),Zt(e,n,s,i),s=Je?er:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ap(e,i,n);else if(e.tag===19)ap(e,i,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(i=n.child,f=null;i!==null;)e=i.alternate,e!==null&&Cs(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=n.child,n.child=null):(f=i.sibling,i.sibling=null),Nc(n,!1,f,i,h,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Cs(e)===null){n.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}Nc(n,!0,i,null,h,s);break;case"together":Nc(n,!1,null,null,void 0,s);break;default:n.memoizedState=null}return n.child}function _a(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),Ka|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(ri(e,n,i,!1),(i&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,i=da(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=da(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function Ec(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&vs(e)))}function Zv(e,n,i){switch(n.tag){case 3:He(n,n.stateNode.containerInfo),Va(n,At,e.memoizedState.cache),Nl();break;case 27:case 5:ct(n);break;case 4:He(n,n.stateNode.containerInfo);break;case 10:Va(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Ju(n),null;break;case 13:var s=n.memoizedState;if(s!==null)return s.dehydrated!==null?(Ya(n),n.flags|=128,null):(i&n.child.childLanes)!==0?np(e,n,i):(Ya(n),e=_a(e,n,i),e!==null?e.sibling:null);Ya(n);break;case 19:var f=(e.flags&128)!==0;if(s=(i&n.childLanes)!==0,s||(ri(e,n,i,!1),s=(i&n.childLanes)!==0),f){if(s)return lp(e,n,i);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),T(Nt,Nt.current),s)break;return null;case 22:return n.lanes=0,Km(e,n,i,n.pendingProps);case 24:Va(n,At,e.memoizedState.cache)}return _a(e,n,i)}function ip(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)wt=!0;else{if(!Ec(e,i)&&(n.flags&128)===0)return wt=!1,Zv(e,n,i);wt=(e.flags&131072)!==0}else wt=!1,Je&&(n.flags&1048576)!==0&&Bh(n,er,n.index);switch(n.lanes=0,n.tag){case 16:e:{var s=n.pendingProps;if(e=jl(n.elementType),n.type=e,typeof e=="function")Mu(e)?(s=Rl(e,s),n.tag=1,n=ep(null,n,e,s,i)):(n.tag=0,n=vc(null,n,e,s,i));else{if(e!=null){var f=e.$$typeof;if(f===K){n.tag=11,n=Fm(null,n,e,s,i);break e}else if(f===U){n.tag=14,n=Xm(null,n,e,s,i);break e}}throw n=ne(e)||e,Error(r(306,n,""))}}return n;case 0:return vc(e,n,n.type,n.pendingProps,i);case 1:return s=n.type,f=Rl(s,n.pendingProps),ep(e,n,s,f,i);case 3:e:{if(He(n,n.stateNode.containerInfo),e===null)throw Error(r(387));s=n.pendingProps;var h=n.memoizedState;f=h.element,Yu(e,n),or(n,s,null,i);var v=n.memoizedState;if(s=v.cache,Va(n,At,s),s!==h.cache&&Hu(n,[At],i,!0),sr(),s=v.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=tp(e,n,s,i);break e}else if(s!==f){f=Mn(Error(r(424)),n),tr(f),n=tp(e,n,s,i);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(vt=Ln(e.firstChild),Gt=n,Je=!0,Ha=null,On=!0,i=Kh(n,null,s,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(Nl(),s===f){n=_a(e,n,i);break e}Zt(e,n,s,i)}n=n.child}return n;case 26:return Is(e,n),e===null?(i=gg(n.type,null,n.pendingProps,null))?n.memoizedState=i:Je||(i=n.type,e=n.pendingProps,s=to(X.current).createElement(i),s[Vt]=n,s[rn]=e,Yt(s,i,e),Ut(s),n.stateNode=s):n.memoizedState=gg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return ct(n),e===null&&Je&&(s=n.stateNode=hg(n.type,n.pendingProps,X.current),Gt=n,On=!0,f=vt,tl(n.type)?(rf=f,vt=Ln(s.firstChild)):vt=f),Zt(e,n,n.pendingProps.children,i),Is(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Je&&((f=s=vt)&&(s=b0(s,n.type,n.pendingProps,On),s!==null?(n.stateNode=s,Gt=n,vt=Ln(s.firstChild),On=!1,f=!0):f=!1),f||qa(n)),ct(n),f=n.type,h=n.pendingProps,v=e!==null?e.memoizedProps:null,s=h.children,ef(f,h)?s=null:v!==null&&ef(f,v)&&(n.flags|=32),n.memoizedState!==null&&(f=Wu(e,n,Lv,null,null,i),Ar._currentValue=f),Is(e,n),Zt(e,n,s,i),n.child;case 6:return e===null&&Je&&((e=i=vt)&&(i=S0(i,n.pendingProps,On),i!==null?(n.stateNode=i,Gt=n,vt=null,e=!0):e=!1),e||qa(n)),null;case 13:return np(e,n,i);case 4:return He(n,n.stateNode.containerInfo),s=n.pendingProps,e===null?n.child=Ml(n,null,s,i):Zt(e,n,s,i),n.child;case 11:return Fm(e,n,n.type,n.pendingProps,i);case 7:return Zt(e,n,n.pendingProps,i),n.child;case 8:return Zt(e,n,n.pendingProps.children,i),n.child;case 12:return Zt(e,n,n.pendingProps.children,i),n.child;case 10:return s=n.pendingProps,Va(n,n.type,s.value),Zt(e,n,s.children,i),n.child;case 9:return f=n.type._context,s=n.pendingProps.children,Cl(n),f=$t(f),s=s(f),n.flags|=1,Zt(e,n,s,i),n.child;case 14:return Xm(e,n,n.type,n.pendingProps,i);case 15:return Qm(e,n,n.type,n.pendingProps,i);case 19:return lp(e,n,i);case 31:return $v(e,n,i);case 22:return Km(e,n,i,n.pendingProps);case 24:return Cl(n),s=$t(At),e===null?(f=Gu(),f===null&&(f=pt,h=qu(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=i),f=h),n.memoizedState={parent:s,cache:f},Zu(n),Va(n,At,f)):((e.lanes&i)!==0&&(Yu(e,n),or(n,null,null,i),sr()),f=e.memoizedState,h=n.memoizedState,f.parent!==s?(f={parent:s,cache:s},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Va(n,At,s)):(s=h.cache,Va(n,At,s),s!==f.cache&&Hu(n,[At],i,!0))),Zt(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function va(e){e.flags|=4}function Cc(e,n,i,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(zp())e.flags|=8192;else throw wl=ks,$u}else e.flags&=-16777217}function rp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!bg(n))if(zp())e.flags|=8192;else throw wl=ks,$u}function Hs(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Ud():536870912,e.lanes|=n,_i|=n)}function mr(e,n){if(!Je)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function xt(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(n)for(var f=e.child;f!==null;)i|=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;)i|=f.lanes|f.childLanes,s|=f.subtreeFlags,s|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=s,e.childLanes=i,n}function Yv(e,n,i){var s=n.pendingProps;switch(Du(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(n),null;case 1:return xt(n),null;case 3:return i=n.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),n.memoizedState.cache!==s&&(n.flags|=2048),pa(At),fe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(ii(n)?va(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Bu())),xt(n),null;case 26:var f=n.type,h=n.memoizedState;return e===null?(va(n),h!==null?(xt(n),rp(n,h)):(xt(n),Cc(n,f,null,s,i))):h?h!==e.memoizedState?(va(n),xt(n),rp(n,h)):(xt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==s&&va(n),xt(n),Cc(n,f,e,s,i)),null;case 27:if(Bt(n),i=X.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&va(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return xt(n),null}e=J.current,ii(n)?Uh(n):(e=hg(f,s,i),n.stateNode=e,va(n))}return xt(n),null;case 5:if(Bt(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==s&&va(n);else{if(!s){if(n.stateNode===null)throw Error(r(166));return xt(n),null}if(h=J.current,ii(n))Uh(n);else{var v=to(X.current);switch(h){case 1:h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=v.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof s.is=="string"?v.createElement("select",{is:s.is}):v.createElement("select"),s.multiple?h.multiple=!0:s.size&&(h.size=s.size);break;default:h=typeof s.is=="string"?v.createElement(f,{is:s.is}):v.createElement(f)}}h[Vt]=n,h[rn]=s;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)h.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=h;e:switch(Yt(h,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&&va(n)}}return xt(n),Cc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,i),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==s&&va(n);else{if(typeof s!="string"&&n.stateNode===null)throw Error(r(166));if(e=X.current,ii(n)){if(e=n.stateNode,i=n.memoizedProps,s=null,f=Gt,f!==null)switch(f.tag){case 27:case 5:s=f.memoizedProps}e[Vt]=n,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||ng(e.nodeValue,i)),e||qa(n,!0)}else e=to(e).createTextNode(s),e[Vt]=n,n.stateNode=e}return xt(n),null;case 31:if(i=n.memoizedState,e===null||e.memoizedState!==null){if(s=ii(n),i!==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 Nl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;xt(n),e=!1}else i=Bu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return n.flags&256?(vn(n),n):(vn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return xt(n),null;case 13:if(s=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=ii(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 Nl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;xt(n),f=!1}else f=Bu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(vn(n),n):(vn(n),null)}return vn(n),(n.flags&128)!==0?(n.lanes=i,n):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=n.child,f=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(f=s.alternate.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==f&&(s.flags|=2048)),i!==e&&i&&(n.child.flags|=8192),Hs(n,n.updateQueue),xt(n),null);case 4:return fe(),e===null&&Qc(n.stateNode.containerInfo),xt(n),null;case 10:return pa(n.type),xt(n),null;case 19:if($(Nt),s=n.memoizedState,s===null)return xt(n),null;if(f=(n.flags&128)!==0,h=s.rendering,h===null)if(f)mr(s,!1);else{if(Tt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Cs(e),h!==null){for(n.flags|=128,mr(s,!1),e=h.updateQueue,n.updateQueue=e,Hs(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)Oh(i,e),i=i.sibling;return T(Nt,Nt.current&1|2),Je&&ha(n,s.treeForkCount),n.child}e=e.sibling}s.tail!==null&&It()>Zs&&(n.flags|=128,f=!0,mr(s,!1),n.lanes=4194304)}else{if(!f)if(e=Cs(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Hs(n,e),mr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!h.alternate&&!Je)return xt(n),null}else 2*It()-s.renderingStartTime>Zs&&i!==536870912&&(n.flags|=128,f=!0,mr(s,!1),n.lanes=4194304);s.isBackwards?(h.sibling=n.child,n.child=h):(e=s.last,e!==null?e.sibling=h:n.child=h,s.last=h)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=It(),e.sibling=null,i=Nt.current,T(Nt,f?i&1|2:i&1),Je&&ha(n,s.treeForkCount),e):(xt(n),null);case 22:case 23:return vn(n),Ku(),s=n.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(n.flags|=8192):s&&(n.flags|=8192),s?(i&536870912)!==0&&(n.flags&128)===0&&(xt(n),n.subtreeFlags&6&&(n.flags|=8192)):xt(n),i=n.updateQueue,i!==null&&Hs(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==i&&(n.flags|=2048),e!==null&&$(Al),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),pa(At),xt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Fv(e,n){switch(Du(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return pa(At),fe(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Bt(n),null;case 31:if(n.memoizedState!==null){if(vn(n),n.alternate===null)throw Error(r(340));Nl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(vn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Nl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return $(Nt),null;case 4:return fe(),null;case 10:return pa(n.type),null;case 22:case 23:return vn(n),Ku(),e!==null&&$(Al),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return pa(At),null;case 25:return null;default:return null}}function sp(e,n){switch(Du(n),n.tag){case 3:pa(At),fe();break;case 26:case 27:case 5:Bt(n);break;case 4:fe();break;case 31:n.memoizedState!==null&&vn(n);break;case 13:vn(n);break;case 19:$(Nt);break;case 10:pa(n.type);break;case 22:case 23:vn(n),Ku(),e!==null&&$(Al);break;case 24:pa(At)}}function pr(e,n){try{var i=n.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var f=s.next;i=f;do{if((i.tag&e)===e){s=void 0;var h=i.create,v=i.inst;s=h(),v.destroy=s}i=i.next}while(i!==f)}}catch(S){ut(n,n.return,S)}}function Xa(e,n,i){try{var s=n.updateQueue,f=s!==null?s.lastEffect:null;if(f!==null){var h=f.next;s=h;do{if((s.tag&e)===e){var v=s.inst,S=v.destroy;if(S!==void 0){v.destroy=void 0,f=n;var A=i,q=S;try{q()}catch(F){ut(f,A,F)}}}s=s.next}while(s!==h)}}catch(F){ut(n,n.return,F)}}function op(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{Ph(n,i)}catch(s){ut(e,e.return,s)}}}function up(e,n,i){i.props=Rl(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){ut(e,n,s)}}function gr(e,n){try{var i=e.ref;if(i!==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 i=="function"?e.refCleanup=i(s):i.current=s}}catch(f){ut(e,n,f)}}function ea(e,n){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(f){ut(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){ut(e,n,f)}else i.current=null}function cp(e){var n=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(f){ut(e,e.return,f)}}function Ac(e,n,i){try{var s=e.stateNode;p0(s,e.type,i,n),s[rn]=n}catch(f){ut(e,e.return,f)}}function fp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&tl(e.type)||e.tag===4}function jc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fp(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&&tl(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 wc(e,n,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(e),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=ca));else if(s!==4&&(s===27&&tl(e.type)&&(i=e.stateNode,n=null),e=e.child,e!==null))for(wc(e,n,i),e=e.sibling;e!==null;)wc(e,n,i),e=e.sibling}function qs(e,n,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(s!==4&&(s===27&&tl(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(qs(e,n,i),e=e.sibling;e!==null;)qs(e,n,i),e=e.sibling}function dp(e){var n=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Yt(n,s,i),n[Vt]=e,n[rn]=i}catch(h){ut(e,e.return,h)}}var xa=!1,Mt=!1,Mc=!1,hp=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function Xv(e,n){if(e=e.containerInfo,Pc=oo,e=Nh(e),Tu(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var f=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var v=0,S=-1,A=-1,q=0,F=0,ee=e,V=null;t:for(;;){for(var G;ee!==i||f!==0&&ee.nodeType!==3||(S=v+f),ee!==h||s!==0&&ee.nodeType!==3||(A=v+s),ee.nodeType===3&&(v+=ee.nodeValue.length),(G=ee.firstChild)!==null;)V=ee,ee=G;for(;;){if(ee===e)break t;if(V===i&&++q===f&&(S=v),V===h&&++F===s&&(A=v),(G=ee.nextSibling)!==null)break;ee=V,V=ee.parentNode}ee=G}i=S===-1||A===-1?null:{start:S,end:A}}else i=null}i=i||{start:0,end:0}}else i=null;for(Wc={focusedElem:e,selectionRange:i},oo=!1,Ht=n;Ht!==null;)if(n=Ht,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Ht=e;else for(;Ht!==null;){switch(n=Ht,h=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(i=0;i<e.length;i++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,i=n,f=h.memoizedProps,h=h.memoizedState,s=i.stateNode;try{var xe=Rl(i.type,f);e=s.getSnapshotBeforeUpdate(xe,h),s.__reactInternalSnapshotBeforeUpdate=e}catch(je){ut(i,i.return,je)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)nf(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":nf(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,Ht=e;break}Ht=n.return}}function mp(e,n,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Sa(e,i),s&4&&pr(5,i);break;case 1:if(Sa(e,i),s&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(v){ut(i,i.return,v)}else{var f=Rl(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){ut(i,i.return,v)}}s&64&&op(i),s&512&&gr(i,i.return);break;case 3:if(Sa(e,i),s&64&&(e=i.updateQueue,e!==null)){if(n=null,i.child!==null)switch(i.child.tag){case 27:case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode}try{Ph(e,n)}catch(v){ut(i,i.return,v)}}break;case 27:n===null&&s&4&&dp(i);case 26:case 5:Sa(e,i),n===null&&s&4&&cp(i),s&512&&gr(i,i.return);break;case 12:Sa(e,i);break;case 31:Sa(e,i),s&4&&yp(e,i);break;case 13:Sa(e,i),s&4&&_p(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=a0.bind(null,i),k0(e,i))));break;case 22:if(s=i.memoizedState!==null||xa,!s){n=n!==null&&n.memoizedState!==null||Mt,f=xa;var h=Mt;xa=s,(Mt=n)&&!h?ka(e,i,(i.subtreeFlags&8772)!==0):Sa(e,i),xa=f,Mt=h}break;case 30:break;default:Sa(e,i)}}function pp(e){var n=e.alternate;n!==null&&(e.alternate=null,pp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&su(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,on=!1;function ba(e,n,i){for(i=i.child;i!==null;)gp(e,n,i),i=i.sibling}function gp(e,n,i){if(Ot&&typeof Ot.onCommitFiberUnmount=="function")try{Ot.onCommitFiberUnmount(Wt,i)}catch{}switch(i.tag){case 26:Mt||ea(i,n),ba(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Mt||ea(i,n);var s=bt,f=on;tl(i.type)&&(bt=i.stateNode,on=!1),ba(e,n,i),Nr(i.stateNode),bt=s,on=f;break;case 5:Mt||ea(i,n);case 6:if(s=bt,f=on,bt=null,ba(e,n,i),bt=s,on=f,bt!==null)if(on)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(i.stateNode)}catch(h){ut(i,n,h)}else try{bt.removeChild(i.stateNode)}catch(h){ut(i,n,h)}break;case 18:bt!==null&&(on?(e=bt,og(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Ei(e)):og(bt,i.stateNode));break;case 4:s=bt,f=on,bt=i.stateNode.containerInfo,on=!0,ba(e,n,i),bt=s,on=f;break;case 0:case 11:case 14:case 15:Xa(2,i,n),Mt||Xa(4,i,n),ba(e,n,i);break;case 1:Mt||(ea(i,n),s=i.stateNode,typeof s.componentWillUnmount=="function"&&up(i,n,s)),ba(e,n,i);break;case 21:ba(e,n,i);break;case 22:Mt=(s=Mt)||i.memoizedState!==null,ba(e,n,i),Mt=s;break;default:ba(e,n,i)}}function yp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ei(e)}catch(i){ut(n,n.return,i)}}}function _p(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ei(e)}catch(i){ut(n,n.return,i)}}function Qv(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new hp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new hp),n;default:throw Error(r(435,e.tag))}}function Vs(e,n){var i=Qv(e);n.forEach(function(s){if(!i.has(s)){i.add(s);var f=l0.bind(null,e,s);s.then(f,f)}})}function un(e,n){var i=n.deletions;if(i!==null)for(var s=0;s<i.length;s++){var f=i[s],h=e,v=n,S=v;e:for(;S!==null;){switch(S.tag){case 27:if(tl(S.type)){bt=S.stateNode,on=!1;break e}break;case 5:bt=S.stateNode,on=!1;break e;case 3:case 4:bt=S.stateNode.containerInfo,on=!0;break e}S=S.return}if(bt===null)throw Error(r(160));gp(h,v,f),bt=null,on=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)vp(n,e),n=n.sibling}var Zn=null;function vp(e,n){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:un(n,e),cn(e),s&4&&(Xa(3,e,e.return),pr(3,e),Xa(5,e,e.return));break;case 1:un(n,e),cn(e),s&512&&(Mt||i===null||ea(i,i.return)),s&64&&xa&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var f=Zn;if(un(n,e),cn(e),s&512&&(Mt||i===null||ea(i,i.return)),s&4){var h=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(s){case"title":h=f.getElementsByTagName("title")[0],(!h||h[Gi]||h[Vt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(s),f.head.insertBefore(h,f.querySelector("head > title"))),Yt(h,s,i),h[Vt]=e,Ut(h),s=h;break e;case"link":var v=vg("link","href",f).get(s+(i.href||""));if(v){for(var S=0;S<v.length;S++)if(h=v[S],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(S,1);break t}}h=f.createElement(s),Yt(h,s,i),f.head.appendChild(h);break;case"meta":if(v=vg("meta","content",f).get(s+(i.content||""))){for(S=0;S<v.length;S++)if(h=v[S],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(S,1);break t}}h=f.createElement(s),Yt(h,s,i),f.head.appendChild(h);break;default:throw Error(r(468,s))}h[Vt]=e,Ut(h),s=h}e.stateNode=s}else xg(f,e.type,e.stateNode);else e.stateNode=_g(f,s,e.memoizedProps);else h!==s?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,s===null?xg(f,e.type,e.stateNode):_g(f,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ac(e,e.memoizedProps,i.memoizedProps)}break;case 27:un(n,e),cn(e),s&512&&(Mt||i===null||ea(i,i.return)),i!==null&&s&4&&Ac(e,e.memoizedProps,i.memoizedProps);break;case 5:if(un(n,e),cn(e),s&512&&(Mt||i===null||ea(i,i.return)),e.flags&32){f=e.stateNode;try{Ql(f,"")}catch(xe){ut(e,e.return,xe)}}s&4&&e.stateNode!=null&&(f=e.memoizedProps,Ac(e,f,i!==null?i.memoizedProps:f)),s&1024&&(Mc=!0);break;case 6:if(un(n,e),cn(e),s&4){if(e.stateNode===null)throw Error(r(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(xe){ut(e,e.return,xe)}}break;case 3:if(lo=null,f=Zn,Zn=no(n.containerInfo),un(n,e),Zn=f,cn(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Ei(n.containerInfo)}catch(xe){ut(e,e.return,xe)}Mc&&(Mc=!1,xp(e));break;case 4:s=Zn,Zn=no(e.stateNode.containerInfo),un(n,e),cn(e),Zn=s;break;case 12:un(n,e),cn(e);break;case 31:un(n,e),cn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Vs(e,s)));break;case 13:un(n,e),cn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&($s=It()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Vs(e,s)));break;case 22:f=e.memoizedState!==null;var A=i!==null&&i.memoizedState!==null,q=xa,F=Mt;if(xa=q||f,Mt=F||A,un(n,e),Mt=F,xa=q,cn(e),s&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(i===null||A||xa||Mt||Ol(e)),i=null,n=e;;){if(n.tag===5||n.tag===26){if(i===null){A=i=n;try{if(h=A.stateNode,f)v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{S=A.stateNode;var ee=A.memoizedProps.style,V=ee!=null&&ee.hasOwnProperty("display")?ee.display:null;S.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(xe){ut(A,A.return,xe)}}}else if(n.tag===6){if(i===null){A=n;try{A.stateNode.nodeValue=f?"":A.memoizedProps}catch(xe){ut(A,A.return,xe)}}}else if(n.tag===18){if(i===null){A=n;try{var G=A.stateNode;f?ug(G,!0):ug(A.stateNode,!1)}catch(xe){ut(A,A.return,xe)}}}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;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Vs(e,i))));break;case 19:un(n,e),cn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Vs(e,s)));break;case 30:break;case 21:break;default:un(n,e),cn(e)}}function cn(e){var n=e.flags;if(n&2){try{for(var i,s=e.return;s!==null;){if(fp(s)){i=s;break}s=s.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var f=i.stateNode,h=jc(e);qs(e,h,f);break;case 5:var v=i.stateNode;i.flags&32&&(Ql(v,""),i.flags&=-33);var S=jc(e);qs(e,S,v);break;case 3:case 4:var A=i.stateNode.containerInfo,q=jc(e);wc(e,q,A);break;default:throw Error(r(161))}}catch(F){ut(e,e.return,F)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function xp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;xp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Sa(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)mp(e,n.alternate,n),n=n.sibling}function Ol(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),Ol(n);break;case 1:ea(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&up(n,n.return,i),Ol(n);break;case 27:Nr(n.stateNode);case 26:case 5:ea(n,n.return),Ol(n);break;case 22:n.memoizedState===null&&Ol(n);break;case 30:Ol(n);break;default:Ol(n)}e=e.sibling}}function ka(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var s=n.alternate,f=e,h=n,v=h.flags;switch(h.tag){case 0:case 11:case 15:ka(f,h,i),pr(4,h);break;case 1:if(ka(f,h,i),s=h,f=s.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(q){ut(s,s.return,q)}if(s=h,f=s.updateQueue,f!==null){var S=s.stateNode;try{var A=f.shared.hiddenCallbacks;if(A!==null)for(f.shared.hiddenCallbacks=null,f=0;f<A.length;f++)Jh(A[f],S)}catch(q){ut(s,s.return,q)}}i&&v&64&&op(h),gr(h,h.return);break;case 27:dp(h);case 26:case 5:ka(f,h,i),i&&s===null&&v&4&&cp(h),gr(h,h.return);break;case 12:ka(f,h,i);break;case 31:ka(f,h,i),i&&v&4&&yp(f,h);break;case 13:ka(f,h,i),i&&v&4&&_p(f,h);break;case 22:h.memoizedState===null&&ka(f,h,i),gr(h,h.return);break;case 30:break;default:ka(f,h,i)}n=n.sibling}}function zc(e,n){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&nr(i))}function Rc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&nr(e))}function Yn(e,n,i,s){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)bp(e,n,i,s),n=n.sibling}function bp(e,n,i,s){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Yn(e,n,i,s),f&2048&&pr(9,n);break;case 1:Yn(e,n,i,s);break;case 3:Yn(e,n,i,s),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&nr(e)));break;case 12:if(f&2048){Yn(e,n,i,s),e=n.stateNode;try{var h=n.memoizedProps,v=h.id,S=h.onPostCommit;typeof S=="function"&&S(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){ut(n,n.return,A)}}else Yn(e,n,i,s);break;case 31:Yn(e,n,i,s);break;case 13:Yn(e,n,i,s);break;case 23:break;case 22:h=n.stateNode,v=n.alternate,n.memoizedState!==null?h._visibility&2?Yn(e,n,i,s):yr(e,n):h._visibility&2?Yn(e,n,i,s):(h._visibility|=2,pi(e,n,i,s,(n.subtreeFlags&10256)!==0||!1)),f&2048&&zc(v,n);break;case 24:Yn(e,n,i,s),f&2048&&Rc(n.alternate,n);break;default:Yn(e,n,i,s)}}function pi(e,n,i,s,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=e,v=n,S=i,A=s,q=v.flags;switch(v.tag){case 0:case 11:case 15:pi(h,v,S,A,f),pr(8,v);break;case 23:break;case 22:var F=v.stateNode;v.memoizedState!==null?F._visibility&2?pi(h,v,S,A,f):yr(h,v):(F._visibility|=2,pi(h,v,S,A,f)),f&&q&2048&&zc(v.alternate,v);break;case 24:pi(h,v,S,A,f),f&&q&2048&&Rc(v.alternate,v);break;default:pi(h,v,S,A,f)}n=n.sibling}}function yr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,s=n,f=s.flags;switch(s.tag){case 22:yr(i,s),f&2048&&zc(s.alternate,s);break;case 24:yr(i,s),f&2048&&Rc(s.alternate,s);break;default:yr(i,s)}n=n.sibling}}var _r=8192;function gi(e,n,i){if(e.subtreeFlags&_r)for(e=e.child;e!==null;)Sp(e,n,i),e=e.sibling}function Sp(e,n,i){switch(e.tag){case 26:gi(e,n,i),e.flags&_r&&e.memoizedState!==null&&D0(i,Zn,e.memoizedState,e.memoizedProps);break;case 5:gi(e,n,i);break;case 3:case 4:var s=Zn;Zn=no(e.stateNode.containerInfo),gi(e,n,i),Zn=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=_r,_r=16777216,gi(e,n,i),_r=s):gi(e,n,i));break;default:gi(e,n,i)}}function kp(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 vr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var s=n[i];Ht=s,Np(s,e)}kp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Tp(e),e=e.sibling}function Tp(e){switch(e.tag){case 0:case 11:case 15:vr(e),e.flags&2048&&Xa(9,e,e.return);break;case 3:vr(e);break;case 12:vr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Gs(e)):vr(e);break;default:vr(e)}}function Gs(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var s=n[i];Ht=s,Np(s,e)}kp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Xa(8,n,n.return),Gs(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,Gs(n));break;default:Gs(n)}e=e.sibling}}function Np(e,n){for(;Ht!==null;){var i=Ht;switch(i.tag){case 0:case 11:case 15:Xa(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:nr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Ht=s;else e:for(i=e;Ht!==null;){s=Ht;var f=s.sibling,h=s.return;if(pp(s),s===i){Ht=null;break e}if(f!==null){f.return=h,Ht=f;break e}Ht=h}}}var Kv={getCacheForType:function(e){var n=$t(At),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i},cacheSignal:function(){return $t(At).controller.signal}},Jv=typeof WeakMap=="function"?WeakMap:Map,st=0,pt=null,$e=null,Xe=0,ot=0,xn=null,Qa=!1,yi=!1,Oc=!1,Ta=0,Tt=0,Ka=0,Dl=0,Dc=0,bn=0,_i=0,xr=null,fn=null,Lc=!1,$s=0,Ep=0,Zs=1/0,Ys=null,Ja=null,Dt=0,Pa=null,vi=null,Na=0,Bc=0,Ic=null,Cp=null,br=0,Uc=null;function Sn(){return(st&2)!==0&&Xe!==0?Xe&-Xe:B.T!==null?Zc():Gd()}function Ap(){if(bn===0)if((Xe&536870912)===0||Je){var e=es;es<<=1,(es&3932160)===0&&(es=262144),bn=e}else bn=536870912;return e=_n.current,e!==null&&(e.flags|=32),bn}function dn(e,n,i){(e===pt&&(ot===2||ot===9)||e.cancelPendingCommit!==null)&&(xi(e,0),Wa(e,Xe,bn,!1)),Vi(e,i),((st&2)===0||e!==pt)&&(e===pt&&((st&2)===0&&(Dl|=i),Tt===4&&Wa(e,Xe,bn,!1)),ta(e))}function jp(e,n,i){if((st&6)!==0)throw Error(r(327));var s=!i&&(n&127)===0&&(n&e.expiredLanes)===0||qi(e,n),f=s?e0(e,n):qc(e,n,!0),h=s;do{if(f===0){yi&&!s&&Wa(e,n,0,!1);break}else{if(i=e.current.alternate,h&&!Pv(i)){f=qc(e,n,!1),h=!1;continue}if(f===2){if(h=n,e.errorRecoveryDisabledLanes&h)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var S=e;f=xr;var A=S.current.memoizedState.isDehydrated;if(A&&(xi(S,v).flags|=256),v=qc(S,v,!1),v!==2){if(Oc&&!A){S.errorRecoveryDisabledLanes|=h,Dl|=h,f=4;break e}h=fn,fn=f,h!==null&&(fn===null?fn=h:fn.push.apply(fn,h))}f=v}if(h=!1,f!==2)continue}}if(f===1){xi(e,0),Wa(e,n,0,!0);break}e:{switch(s=e,h=f,h){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Wa(s,n,bn,!Qa);break e;case 2:fn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=$s+300-It(),10<f)){if(Wa(s,n,bn,!Qa),ns(s,0,!0)!==0)break e;Na=n,s.timeoutHandle=rg(wp.bind(null,s,i,fn,Ys,Lc,n,bn,Dl,_i,Qa,h,"Throttled",-0,0),f);break e}wp(s,i,fn,Ys,Lc,n,bn,Dl,_i,Qa,h,null,-0,0)}}break}while(!0);ta(e)}function wp(e,n,i,s,f,h,v,S,A,q,F,ee,V,G){if(e.timeoutHandle=-1,ee=n.subtreeFlags,ee&8192||(ee&16785408)===16785408){ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ca},Sp(n,h,ee);var xe=(h&62914560)===h?$s-It():(h&4194048)===h?Ep-It():0;if(xe=L0(ee,xe),xe!==null){Na=h,e.cancelPendingCommit=xe(Ip.bind(null,e,n,h,i,s,f,v,S,A,F,ee,null,V,G)),Wa(e,h,v,!q);return}}Ip(e,n,h,i,s,f,v,S,A)}function Pv(e){for(var n=e;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var f=i[s],h=f.getSnapshot;f=f.value;try{if(!gn(h(),f))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;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 Wa(e,n,i,s){n&=~Dc,n&=~Dl,e.suspendedLanes|=n,e.pingedLanes&=~n,s&&(e.warmLanes|=n),s=e.expirationTimes;for(var f=n;0<f;){var h=31-mt(f),v=1<<h;s[h]=-1,f&=~v}i!==0&&Hd(e,i,n)}function Fs(){return(st&6)===0?(Sr(0),!1):!0}function Hc(){if($e!==null){if(ot===0)var e=$e.return;else e=$e,ma=El=null,nc(e),ci=null,lr=0,e=$e;for(;e!==null;)sp(e.alternate,e),e=e.return;$e=null}}function xi(e,n){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,_0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Na=0,Hc(),pt=e,$e=i=da(e.current,null),Xe=n,ot=0,xn=null,Qa=!1,yi=qi(e,n),Oc=!1,_i=bn=Dc=Dl=Ka=Tt=0,fn=xr=null,Lc=!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-mt(s),h=1<<f;n|=e[f],s&=~h}return Ta=n,ms(),i}function Mp(e,n){Ie=null,B.H=dr,n===ui||n===Ss?(n=Fh(),ot=3):n===$u?(n=Fh(),ot=4):ot=n===_c?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,xn=n,$e===null&&(Tt=1,Ls(e,Mn(n,e.current)))}function zp(){var e=_n.current;return e===null?!0:(Xe&4194048)===Xe?Dn===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?e===Dn:!1}function Rp(){var e=B.H;return B.H=dr,e===null?dr:e}function Op(){var e=B.A;return B.A=Kv,e}function Xs(){Tt=4,Qa||(Xe&4194048)!==Xe&&_n.current!==null||(yi=!0),(Ka&134217727)===0&&(Dl&134217727)===0||pt===null||Wa(pt,Xe,bn,!1)}function qc(e,n,i){var s=st;st|=2;var f=Rp(),h=Op();(pt!==e||Xe!==n)&&(Ys=null,xi(e,n)),n=!1;var v=Tt;e:do try{if(ot!==0&&$e!==null){var S=$e,A=xn;switch(ot){case 8:Hc(),v=6;break e;case 3:case 2:case 9:case 6:_n.current===null&&(n=!0);var q=ot;if(ot=0,xn=null,bi(e,S,A,q),i&&yi){v=0;break e}break;default:q=ot,ot=0,xn=null,bi(e,S,A,q)}}Wv(),v=Tt;break}catch(F){Mp(e,F)}while(!0);return n&&e.shellSuspendCounter++,ma=El=null,st=s,B.H=f,B.A=h,$e===null&&(pt=null,Xe=0,ms()),v}function Wv(){for(;$e!==null;)Dp($e)}function e0(e,n){var i=st;st|=2;var s=Rp(),f=Op();pt!==e||Xe!==n?(Ys=null,Zs=It()+500,xi(e,n)):yi=qi(e,n);e:do try{if(ot!==0&&$e!==null){n=$e;var h=xn;t:switch(ot){case 1:ot=0,xn=null,bi(e,n,h,1);break;case 2:case 9:if(Zh(h)){ot=0,xn=null,Lp(n);break}n=function(){ot!==2&&ot!==9||pt!==e||(ot=7),ta(e)},h.then(n,n);break e;case 3:ot=7;break e;case 4:ot=5;break e;case 7:Zh(h)?(ot=0,xn=null,Lp(n)):(ot=0,xn=null,bi(e,n,h,7));break;case 5:var v=null;switch($e.tag){case 26:v=$e.memoizedState;case 5:case 27:var S=$e;if(v?bg(v):S.stateNode.complete){ot=0,xn=null;var A=S.sibling;if(A!==null)$e=A;else{var q=S.return;q!==null?($e=q,Qs(q)):$e=null}break t}}ot=0,xn=null,bi(e,n,h,5);break;case 6:ot=0,xn=null,bi(e,n,h,6);break;case 8:Hc(),Tt=6;break e;default:throw Error(r(462))}}t0();break}catch(F){Mp(e,F)}while(!0);return ma=El=null,B.H=s,B.A=f,st=i,$e!==null?0:(pt=null,Xe=0,ms(),Tt)}function t0(){for(;$e!==null&&!Hi();)Dp($e)}function Dp(e){var n=ip(e.alternate,e,Ta);e.memoizedProps=e.pendingProps,n===null?Qs(e):$e=n}function Lp(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=Wm(i,n,n.pendingProps,n.type,void 0,Xe);break;case 11:n=Wm(i,n,n.pendingProps,n.type.render,n.ref,Xe);break;case 5:nc(n);default:sp(i,n),n=$e=Oh(n,Ta),n=ip(i,n,Ta)}e.memoizedProps=e.pendingProps,n===null?Qs(e):$e=n}function bi(e,n,i,s){ma=El=null,nc(n),ci=null,lr=0;var f=n.return;try{if(Gv(e,f,n,i,Xe)){Tt=1,Ls(e,Mn(i,e.current)),$e=null;return}}catch(h){if(f!==null)throw $e=f,h;Tt=1,Ls(e,Mn(i,e.current)),$e=null;return}n.flags&32768?(Je||s===1?e=!0:yi||(Xe&536870912)!==0?e=!1:(Qa=e=!0,(s===2||s===9||s===3||s===6)&&(s=_n.current,s!==null&&s.tag===13&&(s.flags|=16384))),Bp(n,e)):Qs(n)}function Qs(e){var n=e;do{if((n.flags&32768)!==0){Bp(n,Qa);return}e=n.return;var i=Yv(n.alternate,n,Ta);if(i!==null){$e=i;return}if(n=n.sibling,n!==null){$e=n;return}$e=n=e}while(n!==null);Tt===0&&(Tt=5)}function Bp(e,n){do{var i=Fv(e.alternate,e);if(i!==null){i.flags&=32767,$e=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){$e=e;return}$e=e=i}while(e!==null);Tt=6,$e=null}function Ip(e,n,i,s,f,h,v,S,A){e.cancelPendingCommit=null;do Ks();while(Dt!==0);if((st&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(h=n.lanes|n.childLanes,h|=ju,O1(e,i,h,v,S,A),e===pt&&($e=pt=null,Xe=0),vi=n,Pa=e,Na=i,Bc=h,Ic=f,Cp=s,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,i0(de,function(){return Gp(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||s){s=B.T,B.T=null,f=W.p,W.p=2,v=st,st|=4;try{Xv(e,n,i)}finally{st=v,W.p=f,B.T=s}}Dt=1,Up(),Hp(),qp()}}function Up(){if(Dt===1){Dt=0;var e=Pa,n=vi,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var s=W.p;W.p=2;var f=st;st|=4;try{vp(n,e);var h=Wc,v=Nh(e.containerInfo),S=h.focusedElem,A=h.selectionRange;if(v!==S&&S&&S.ownerDocument&&Th(S.ownerDocument.documentElement,S)){if(A!==null&&Tu(S)){var q=A.start,F=A.end;if(F===void 0&&(F=q),"selectionStart"in S)S.selectionStart=q,S.selectionEnd=Math.min(F,S.value.length);else{var ee=S.ownerDocument||document,V=ee&&ee.defaultView||window;if(V.getSelection){var G=V.getSelection(),xe=S.textContent.length,je=Math.min(A.start,xe),ht=A.end===void 0?je:Math.min(A.end,xe);!G.extend&&je>ht&&(v=ht,ht=je,je=v);var L=kh(S,je),w=kh(S,ht);if(L&&w&&(G.rangeCount!==1||G.anchorNode!==L.node||G.anchorOffset!==L.offset||G.focusNode!==w.node||G.focusOffset!==w.offset)){var H=ee.createRange();H.setStart(L.node,L.offset),G.removeAllRanges(),je>ht?(G.addRange(H),G.extend(w.node,w.offset)):(H.setEnd(w.node,w.offset),G.addRange(H))}}}}for(ee=[],G=S;G=G.parentNode;)G.nodeType===1&&ee.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<ee.length;S++){var P=ee[S];P.element.scrollLeft=P.left,P.element.scrollTop=P.top}}oo=!!Pc,Wc=Pc=null}finally{st=f,W.p=s,B.T=i}}e.current=n,Dt=2}}function Hp(){if(Dt===2){Dt=0;var e=Pa,n=vi,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var s=W.p;W.p=2;var f=st;st|=4;try{mp(e,n.alternate,n)}finally{st=f,W.p=s,B.T=i}}Dt=3}}function qp(){if(Dt===4||Dt===3){Dt=0,Jn();var e=Pa,n=vi,i=Na,s=Cp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Dt=5:(Dt=0,vi=Pa=null,Vp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Ja=null),iu(i),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=B.T,f=W.p,W.p=2,B.T=null;try{for(var h=e.onRecoverableError,v=0;v<s.length;v++){var S=s[v];h(S.value,{componentStack:S.stack})}}finally{B.T=n,W.p=f}}(Na&3)!==0&&Ks(),ta(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===Uc?br++:(br=0,Uc=e):br=0,Sr(0)}}function Vp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,nr(n)))}function Ks(){return Up(),Hp(),qp(),Gp()}function Gp(){if(Dt!==5)return!1;var e=Pa,n=Bc;Bc=0;var i=iu(Na),s=B.T,f=W.p;try{W.p=32>i?32:i,B.T=null,i=Ic,Ic=null;var h=Pa,v=Na;if(Dt=0,vi=Pa=null,Na=0,(st&6)!==0)throw Error(r(331));var S=st;if(st|=4,Tp(h.current),bp(h,h.current,v,i),st=S,Sr(0,!1),Ot&&typeof Ot.onPostCommitFiberRoot=="function")try{Ot.onPostCommitFiberRoot(Wt,h)}catch{}return!0}finally{W.p=f,B.T=s,Vp(e,n)}}function $p(e,n,i){n=Mn(i,n),n=yc(e.stateNode,n,2),e=Za(e,n,2),e!==null&&(Vi(e,2),ta(e))}function ut(e,n,i){if(e.tag===3)$p(e,e,i);else for(;n!==null;){if(n.tag===3){$p(n,e,i);break}else if(n.tag===1){var s=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ja===null||!Ja.has(s))){e=Mn(i,e),i=Zm(2),s=Za(n,i,2),s!==null&&(Ym(i,s,n,e),Vi(s,2),ta(s));break}}n=n.return}}function Vc(e,n,i){var s=e.pingCache;if(s===null){s=e.pingCache=new Jv;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(i)||(Oc=!0,f.add(i),e=n0.bind(null,e,n,i),n.then(e,e))}function n0(e,n,i){var s=e.pingCache;s!==null&&s.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,pt===e&&(Xe&i)===i&&(Tt===4||Tt===3&&(Xe&62914560)===Xe&&300>It()-$s?(st&2)===0&&xi(e,0):Dc|=i,_i===Xe&&(_i=0)),ta(e)}function Zp(e,n){n===0&&(n=Ud()),e=kl(e,n),e!==null&&(Vi(e,n),ta(e))}function a0(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),Zp(e,i)}function l0(e,n){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,f=e.memoizedState;f!==null&&(i=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),Zp(e,i)}function i0(e,n){return Da(e,n)}var Js=null,Si=null,Gc=!1,Ps=!1,$c=!1,el=0;function ta(e){e!==Si&&e.next===null&&(Si===null?Js=Si=e:Si=Si.next=e),Ps=!0,Gc||(Gc=!0,s0())}function Sr(e,n){if(!$c&&Ps){$c=!0;do for(var i=!1,s=Js;s!==null;){if(e!==0){var f=s.pendingLanes;if(f===0)var h=0;else{var v=s.suspendedLanes,S=s.pingedLanes;h=(1<<31-mt(42|e)+1)-1,h&=f&~(v&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,Qp(s,h))}else h=Xe,h=ns(s,s===pt?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(h&3)===0||qi(s,h)||(i=!0,Qp(s,h));s=s.next}while(i);$c=!1}}function r0(){Yp()}function Yp(){Ps=Gc=!1;var e=0;el!==0&&y0()&&(e=el);for(var n=It(),i=null,s=Js;s!==null;){var f=s.next,h=Fp(s,n);h===0?(s.next=null,i===null?Js=f:i.next=f,f===null&&(Si=i)):(i=s,(e!==0||(h&3)!==0)&&(Ps=!0)),s=f}Dt!==0&&Dt!==5||Sr(e),el!==0&&(el=0)}function Fp(e,n){for(var i=e.suspendedLanes,s=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var v=31-mt(h),S=1<<v,A=f[v];A===-1?((S&i)===0||(S&s)!==0)&&(f[v]=R1(S,n)):A<=n&&(e.expiredLanes|=S),h&=~S}if(n=pt,i=Xe,i=ns(e,e===n?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===n&&(ot===2||ot===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&gl(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||qi(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(s!==null&&gl(s),iu(i)){case 2:case 8:i=ce;break;case 32:i=de;break;case 268435456:i=Me;break;default:i=de}return s=Xp.bind(null,e),i=Da(i,s),e.callbackPriority=n,e.callbackNode=i,n}return s!==null&&s!==null&&gl(s),e.callbackPriority=2,e.callbackNode=null,2}function Xp(e,n){if(Dt!==0&&Dt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Ks()&&e.callbackNode!==i)return null;var s=Xe;return s=ns(e,e===pt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(jp(e,s,n),Fp(e,It()),e.callbackNode!=null&&e.callbackNode===i?Xp.bind(null,e):null)}function Qp(e,n){if(Ks())return null;jp(e,n,!0)}function s0(){v0(function(){(st&6)!==0?Da(Q,r0):Yp()})}function Zc(){if(el===0){var e=si;e===0&&(e=Wr,Wr<<=1,(Wr&261888)===0&&(Wr=256)),el=e}return el}function Kp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:rs(""+e)}function Jp(e,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,e.id&&i.setAttribute("form",e.id),n.parentNode.insertBefore(i,n),e=new FormData(e),i.parentNode.removeChild(i),e}function o0(e,n,i,s,f){if(n==="submit"&&i&&i.stateNode===f){var h=Kp((f[rn]||null).action),v=s.submitter;v&&(n=(n=v[rn]||null)?Kp(n.formAction):v.getAttribute("formAction"),n!==null&&(h=n,v=null));var S=new cs("action","action",null,s,f);e.push({event:S,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(el!==0){var A=v?Jp(f,v):new FormData(f);fc(i,{pending:!0,data:A,method:f.method,action:h},null,A)}}else typeof h=="function"&&(S.preventDefault(),A=v?Jp(f,v):new FormData(f),fc(i,{pending:!0,data:A,method:f.method,action:h},h,A))},currentTarget:f}]})}}for(var Yc=0;Yc<Au.length;Yc++){var Fc=Au[Yc],u0=Fc.toLowerCase(),c0=Fc[0].toUpperCase()+Fc.slice(1);$n(u0,"on"+c0)}$n(Ah,"onAnimationEnd"),$n(jh,"onAnimationIteration"),$n(wh,"onAnimationStart"),$n("dblclick","onDoubleClick"),$n("focusin","onFocus"),$n("focusout","onBlur"),$n(Ev,"onTransitionRun"),$n(Cv,"onTransitionStart"),$n(Av,"onTransitionCancel"),$n(Mh,"onTransitionEnd"),Fl("onMouseEnter",["mouseout","mouseover"]),Fl("onMouseLeave",["mouseout","mouseover"]),Fl("onPointerEnter",["pointerout","pointerover"]),Fl("onPointerLeave",["pointerout","pointerover"]),vl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),vl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),vl("onBeforeInput",["compositionend","keypress","textInput","paste"]),vl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),vl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),vl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kr="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(" "),f0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(kr));function Pp(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],f=s.event;s=s.listeners;e:{var h=void 0;if(n)for(var v=s.length-1;0<=v;v--){var S=s[v],A=S.instance,q=S.currentTarget;if(S=S.listener,A!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=q;try{h(f)}catch(F){hs(F)}f.currentTarget=null,h=A}else for(v=0;v<s.length;v++){if(S=s[v],A=S.instance,q=S.currentTarget,S=S.listener,A!==h&&f.isPropagationStopped())break e;h=S,f.currentTarget=q;try{h(f)}catch(F){hs(F)}f.currentTarget=null,h=A}}}}function Ze(e,n){var i=n[ru];i===void 0&&(i=n[ru]=new Set);var s=e+"__bubble";i.has(s)||(Wp(n,e,2,!1),i.add(s))}function Xc(e,n,i){var s=0;n&&(s|=4),Wp(i,e,s,n)}var Ws="_reactListening"+Math.random().toString(36).slice(2);function Qc(e){if(!e[Ws]){e[Ws]=!0,Yd.forEach(function(i){i!=="selectionchange"&&(f0.has(i)||Xc(i,!1,e),Xc(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ws]||(n[Ws]=!0,Xc("selectionchange",!1,n))}}function Wp(e,n,i,s){switch(Ag(n)){case 2:var f=U0;break;case 8:f=H0;break;default:f=ff}i=f.bind(null,n,i,e),f=void 0,!pu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),s?f!==void 0?e.addEventListener(n,i,{capture:!0,passive:f}):e.addEventListener(n,i,!0):f!==void 0?e.addEventListener(n,i,{passive:f}):e.addEventListener(n,i,!1)}function Kc(e,n,i,s,f){var h=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 S=s.stateNode.containerInfo;if(S===f)break;if(v===4)for(v=s.return;v!==null;){var A=v.tag;if((A===3||A===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;S!==null;){if(v=$l(S),v===null)return;if(A=v.tag,A===5||A===6||A===26||A===27){s=h=v;continue e}S=S.parentNode}}s=s.return}lh(function(){var q=h,F=hu(i),ee=[];e:{var V=zh.get(e);if(V!==void 0){var G=cs,xe=e;switch(e){case"keypress":if(os(i)===0)break e;case"keydown":case"keyup":G=lv;break;case"focusin":xe="focus",G=vu;break;case"focusout":xe="blur",G=vu;break;case"beforeblur":case"afterblur":G=vu;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":G=sh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=Y1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=sv;break;case Ah:case jh:case wh:G=Q1;break;case Mh:G=uv;break;case"scroll":case"scrollend":G=$1;break;case"wheel":G=fv;break;case"copy":case"cut":case"paste":G=J1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=uh;break;case"toggle":case"beforetoggle":G=hv}var je=(n&4)!==0,ht=!je&&(e==="scroll"||e==="scrollend"),L=je?V!==null?V+"Capture":null:V;je=[];for(var w=q,H;w!==null;){var P=w;if(H=P.stateNode,P=P.tag,P!==5&&P!==26&&P!==27||H===null||L===null||(P=Zi(w,L),P!=null&&je.push(Tr(w,P,H))),ht)break;w=w.return}0<je.length&&(V=new G(V,xe,null,i,F),ee.push({event:V,listeners:je}))}}if((n&7)===0){e:{if(V=e==="mouseover"||e==="pointerover",G=e==="mouseout"||e==="pointerout",V&&i!==du&&(xe=i.relatedTarget||i.fromElement)&&($l(xe)||xe[Gl]))break e;if((G||V)&&(V=F.window===F?F:(V=F.ownerDocument)?V.defaultView||V.parentWindow:window,G?(xe=i.relatedTarget||i.toElement,G=q,xe=xe?$l(xe):null,xe!==null&&(ht=u(xe),je=xe.tag,xe!==ht||je!==5&&je!==27&&je!==6)&&(xe=null)):(G=null,xe=q),G!==xe)){if(je=sh,P="onMouseLeave",L="onMouseEnter",w="mouse",(e==="pointerout"||e==="pointerover")&&(je=uh,P="onPointerLeave",L="onPointerEnter",w="pointer"),ht=G==null?V:$i(G),H=xe==null?V:$i(xe),V=new je(P,w+"leave",G,i,F),V.target=ht,V.relatedTarget=H,P=null,$l(F)===q&&(je=new je(L,w+"enter",xe,i,F),je.target=H,je.relatedTarget=ht,P=je),ht=P,G&&xe)t:{for(je=d0,L=G,w=xe,H=0,P=L;P;P=je(P))H++;P=0;for(var Ee=w;Ee;Ee=je(Ee))P++;for(;0<H-P;)L=je(L),H--;for(;0<P-H;)w=je(w),P--;for(;H--;){if(L===w||w!==null&&L===w.alternate){je=L;break t}L=je(L),w=je(w)}je=null}else je=null;G!==null&&eg(ee,V,G,je,!1),xe!==null&&ht!==null&&eg(ee,ht,xe,je,!0)}}e:{if(V=q?$i(q):window,G=V.nodeName&&V.nodeName.toLowerCase(),G==="select"||G==="input"&&V.type==="file")var tt=yh;else if(ph(V))if(_h)tt=kv;else{tt=bv;var ke=xv}else G=V.nodeName,!G||G.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?q&&fu(q.elementType)&&(tt=yh):tt=Sv;if(tt&&(tt=tt(e,q))){gh(ee,tt,i,F);break e}ke&&ke(e,V,q),e==="focusout"&&q&&V.type==="number"&&q.memoizedProps.value!=null&&cu(V,"number",V.value)}switch(ke=q?$i(q):window,e){case"focusin":(ph(ke)||ke.contentEditable==="true")&&(Wl=ke,Nu=q,Wi=null);break;case"focusout":Wi=Nu=Wl=null;break;case"mousedown":Eu=!0;break;case"contextmenu":case"mouseup":case"dragend":Eu=!1,Eh(ee,i,F);break;case"selectionchange":if(Nv)break;case"keydown":case"keyup":Eh(ee,i,F)}var qe;if(bu)e:{switch(e){case"compositionstart":var Qe="onCompositionStart";break e;case"compositionend":Qe="onCompositionEnd";break e;case"compositionupdate":Qe="onCompositionUpdate";break e}Qe=void 0}else Pl?hh(e,i)&&(Qe="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Qe="onCompositionStart");Qe&&(ch&&i.locale!=="ko"&&(Pl||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&Pl&&(qe=ih()):(Ia=F,gu="value"in Ia?Ia.value:Ia.textContent,Pl=!0)),ke=eo(q,Qe),0<ke.length&&(Qe=new oh(Qe,e,null,i,F),ee.push({event:Qe,listeners:ke}),qe?Qe.data=qe:(qe=mh(i),qe!==null&&(Qe.data=qe)))),(qe=pv?gv(e,i):yv(e,i))&&(Qe=eo(q,"onBeforeInput"),0<Qe.length&&(ke=new oh("onBeforeInput","beforeinput",null,i,F),ee.push({event:ke,listeners:Qe}),ke.data=qe)),o0(ee,e,q,i,F)}Pp(ee,n)})}function Tr(e,n,i){return{instance:e,listener:n,currentTarget:i}}function eo(e,n){for(var i=n+"Capture",s=[];e!==null;){var f=e,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Zi(e,i),f!=null&&s.unshift(Tr(e,f,h)),f=Zi(e,n),f!=null&&s.push(Tr(e,f,h))),e.tag===3)return s;e=e.return}return[]}function d0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function eg(e,n,i,s,f){for(var h=n._reactName,v=[];i!==null&&i!==s;){var S=i,A=S.alternate,q=S.stateNode;if(S=S.tag,A!==null&&A===s)break;S!==5&&S!==26&&S!==27||q===null||(A=q,f?(q=Zi(i,h),q!=null&&v.unshift(Tr(i,q,A))):f||(q=Zi(i,h),q!=null&&v.push(Tr(i,q,A)))),i=i.return}v.length!==0&&e.push({event:n,listeners:v})}var h0=/\r\n?/g,m0=/\u0000|\uFFFD/g;function tg(e){return(typeof e=="string"?e:""+e).replace(h0,`
|
|
49
|
+
`).replace(m0,"")}function ng(e,n){return n=tg(n),tg(e)===n}function dt(e,n,i,s,f,h){switch(i){case"children":typeof s=="string"?n==="body"||n==="textarea"&&s===""||Ql(e,s):(typeof s=="number"||typeof s=="bigint")&&n!=="body"&&Ql(e,""+s);break;case"className":ls(e,"class",s);break;case"tabIndex":ls(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":ls(e,i,s);break;case"style":nh(e,s,h);break;case"data":if(n!=="object"){ls(e,"data",s);break}case"src":case"href":if(s===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=rs(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"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 h=="function"&&(i==="formAction"?(n!=="input"&&dt(e,n,"name",f.name,f,null),dt(e,n,"formEncType",f.formEncType,f,null),dt(e,n,"formMethod",f.formMethod,f,null),dt(e,n,"formTarget",f.formTarget,f,null)):(dt(e,n,"encType",f.encType,f,null),dt(e,n,"method",f.method,f,null),dt(e,n,"target",f.target,f,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=rs(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ca);break;case"onScroll":s!=null&&Ze("scroll",e);break;case"onScrollEnd":s!=null&&Ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(i=s.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}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}i=rs(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);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(i,""+s):e.removeAttribute(i);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(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":Ze("beforetoggle",e),Ze("toggle",e),as(e,"popover",s);break;case"xlinkActuate":ua(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ua(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ua(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ua(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ua(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ua(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ua(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ua(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ua(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":as(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=V1.get(i)||i,as(e,i,s))}}function Jc(e,n,i,s,f,h){switch(i){case"style":nh(e,s,h);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(r(61));if(i=s.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Ql(e,s):(typeof s=="number"||typeof s=="bigint")&&Ql(e,""+s);break;case"onScroll":s!=null&&Ze("scroll",e);break;case"onScrollEnd":s!=null&&Ze("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ca);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fd.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),n=i.slice(2,f?i.length-7:void 0),h=e[rn]||null,h=h!=null?h[i]:null,typeof h=="function"&&e.removeEventListener(n,h,f),typeof s=="function")){typeof h!="function"&&h!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,s,f);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):as(e,i,s)}}}function Yt(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ze("error",e),Ze("load",e);var s=!1,f=!1,h;for(h in i)if(i.hasOwnProperty(h)){var v=i[h];if(v!=null)switch(h){case"src":s=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:dt(e,n,h,v,i,null)}}f&&dt(e,n,"srcSet",i.srcSet,i,null),s&&dt(e,n,"src",i.src,i,null);return;case"input":Ze("invalid",e);var S=h=v=f=null,A=null,q=null;for(s in i)if(i.hasOwnProperty(s)){var F=i[s];if(F!=null)switch(s){case"name":f=F;break;case"type":v=F;break;case"checked":A=F;break;case"defaultChecked":q=F;break;case"value":h=F;break;case"defaultValue":S=F;break;case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(r(137,n));break;default:dt(e,n,s,F,i,null)}}Pd(e,h,S,A,q,v,f,!1);return;case"select":Ze("invalid",e),s=v=h=null;for(f in i)if(i.hasOwnProperty(f)&&(S=i[f],S!=null))switch(f){case"value":h=S;break;case"defaultValue":v=S;break;case"multiple":s=S;default:dt(e,n,f,S,i,null)}n=h,i=v,e.multiple=!!s,n!=null?Xl(e,!!s,n,!1):i!=null&&Xl(e,!!s,i,!0);return;case"textarea":Ze("invalid",e),h=f=s=null;for(v in i)if(i.hasOwnProperty(v)&&(S=i[v],S!=null))switch(v){case"value":s=S;break;case"defaultValue":f=S;break;case"children":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(r(91));break;default:dt(e,n,v,S,i,null)}eh(e,s,f,h);return;case"option":for(A in i)if(i.hasOwnProperty(A)&&(s=i[A],s!=null))switch(A){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:dt(e,n,A,s,i,null)}return;case"dialog":Ze("beforetoggle",e),Ze("toggle",e),Ze("cancel",e),Ze("close",e);break;case"iframe":case"object":Ze("load",e);break;case"video":case"audio":for(s=0;s<kr.length;s++)Ze(kr[s],e);break;case"image":Ze("error",e),Ze("load",e);break;case"details":Ze("toggle",e);break;case"embed":case"source":case"link":Ze("error",e),Ze("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(q in i)if(i.hasOwnProperty(q)&&(s=i[q],s!=null))switch(q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:dt(e,n,q,s,i,null)}return;default:if(fu(n)){for(F in i)i.hasOwnProperty(F)&&(s=i[F],s!==void 0&&Jc(e,n,F,s,i,void 0));return}}for(S in i)i.hasOwnProperty(S)&&(s=i[S],s!=null&&dt(e,n,S,s,i,null))}function p0(e,n,i,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,h=null,v=null,S=null,A=null,q=null,F=null;for(G in i){var ee=i[G];if(i.hasOwnProperty(G)&&ee!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":A=ee;default:s.hasOwnProperty(G)||dt(e,n,G,null,s,ee)}}for(var V in s){var G=s[V];if(ee=i[V],s.hasOwnProperty(V)&&(G!=null||ee!=null))switch(V){case"type":h=G;break;case"name":f=G;break;case"checked":q=G;break;case"defaultChecked":F=G;break;case"value":v=G;break;case"defaultValue":S=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,n));break;default:G!==ee&&dt(e,n,V,G,s,ee)}}uu(e,v,S,A,q,F,h,f);return;case"select":G=v=S=V=null;for(h in i)if(A=i[h],i.hasOwnProperty(h)&&A!=null)switch(h){case"value":break;case"multiple":G=A;default:s.hasOwnProperty(h)||dt(e,n,h,null,s,A)}for(f in s)if(h=s[f],A=i[f],s.hasOwnProperty(f)&&(h!=null||A!=null))switch(f){case"value":V=h;break;case"defaultValue":S=h;break;case"multiple":v=h;default:h!==A&&dt(e,n,f,h,s,A)}n=S,i=v,s=G,V!=null?Xl(e,!!i,V,!1):!!s!=!!i&&(n!=null?Xl(e,!!i,n,!0):Xl(e,!!i,i?[]:"",!1));return;case"textarea":G=V=null;for(S in i)if(f=i[S],i.hasOwnProperty(S)&&f!=null&&!s.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:dt(e,n,S,null,s,f)}for(v in s)if(f=s[v],h=i[v],s.hasOwnProperty(v)&&(f!=null||h!=null))switch(v){case"value":V=f;break;case"defaultValue":G=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==h&&dt(e,n,v,f,s,h)}Wd(e,V,G);return;case"option":for(var xe in i)if(V=i[xe],i.hasOwnProperty(xe)&&V!=null&&!s.hasOwnProperty(xe))switch(xe){case"selected":e.selected=!1;break;default:dt(e,n,xe,null,s,V)}for(A in s)if(V=s[A],G=i[A],s.hasOwnProperty(A)&&V!==G&&(V!=null||G!=null))switch(A){case"selected":e.selected=V&&typeof V!="function"&&typeof V!="symbol";break;default:dt(e,n,A,V,s,G)}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 je in i)V=i[je],i.hasOwnProperty(je)&&V!=null&&!s.hasOwnProperty(je)&&dt(e,n,je,null,s,V);for(q in s)if(V=s[q],G=i[q],s.hasOwnProperty(q)&&V!==G&&(V!=null||G!=null))switch(q){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(137,n));break;default:dt(e,n,q,V,s,G)}return;default:if(fu(n)){for(var ht in i)V=i[ht],i.hasOwnProperty(ht)&&V!==void 0&&!s.hasOwnProperty(ht)&&Jc(e,n,ht,void 0,s,V);for(F in s)V=s[F],G=i[F],!s.hasOwnProperty(F)||V===G||V===void 0&&G===void 0||Jc(e,n,F,V,s,G);return}}for(var L in i)V=i[L],i.hasOwnProperty(L)&&V!=null&&!s.hasOwnProperty(L)&&dt(e,n,L,null,s,V);for(ee in s)V=s[ee],G=i[ee],!s.hasOwnProperty(ee)||V===G||V==null&&G==null||dt(e,n,ee,V,s,G)}function ag(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function g0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var f=i[s],h=f.transferSize,v=f.initiatorType,S=f.duration;if(h&&S&&ag(v)){for(v=0,S=f.responseEnd,s+=1;s<i.length;s++){var A=i[s],q=A.startTime;if(q>S)break;var F=A.transferSize,ee=A.initiatorType;F&&ag(ee)&&(A=A.responseEnd,v+=F*(A<S?1:(S-q)/(A-q)))}if(--s,n+=8*(h+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 Pc=null,Wc=null;function to(e){return e.nodeType===9?e:e.ownerDocument}function lg(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 ig(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 ef(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 tf=null;function y0(){var e=window.event;return e&&e.type==="popstate"?e===tf?!1:(tf=e,!0):(tf=null,!1)}var rg=typeof setTimeout=="function"?setTimeout:void 0,_0=typeof clearTimeout=="function"?clearTimeout:void 0,sg=typeof Promise=="function"?Promise:void 0,v0=typeof queueMicrotask=="function"?queueMicrotask:typeof sg<"u"?function(e){return sg.resolve(null).then(e).catch(x0)}:rg;function x0(e){setTimeout(function(){throw e})}function tl(e){return e==="head"}function og(e,n){var i=n,s=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(f),Ei(n);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Nr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Nr(i);for(var h=i.firstChild;h;){var v=h.nextSibling,S=h.nodeName;h[Gi]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=v}}else i==="body"&&Nr(e.ownerDocument.body);i=f}while(i);Ei(n)}function ug(e,n){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?n?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(n?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function nf(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":nf(i),su(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function b0(e,n,i,s){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Gi])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==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(h=e.getAttribute("src"),(h!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=Ln(e.nextSibling),e===null)break}return null}function S0(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Ln(e.nextSibling),e===null))return null;return e}function cg(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 af(e){return e.data==="$?"||e.data==="$~"}function lf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function k0(e,n){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||i.readyState!=="loading")n();else{var s=function(){n(),i.removeEventListener("DOMContentLoaded",s)};i.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 rf=null;function fg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(n===0)return Ln(e.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}e=e.nextSibling}return null}function dg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(n===0)return e;n--}else i!=="/$"&&i!=="/&"||n++}e=e.previousSibling}return null}function hg(e,n,i){switch(n=to(i),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 Nr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);su(e)}var Bn=new Map,mg=new Set;function no(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ea=W.d;W.d={f:T0,r:N0,D:E0,C:C0,L:A0,m:j0,X:M0,S:w0,M:z0};function T0(){var e=Ea.f(),n=Fs();return e||n}function N0(e){var n=Zl(e);n!==null&&n.tag===5&&n.type==="form"?Mm(n):Ea.r(e)}var ki=typeof document>"u"?null:document;function pg(e,n,i){var s=ki;if(s&&typeof n=="string"&&n){var f=jn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),mg.has(f)||(mg.add(f),e={rel:e,crossOrigin:i,href:n},s.querySelector(f)===null&&(n=s.createElement("link"),Yt(n,"link",e),Ut(n),s.head.appendChild(n)))}}function E0(e){Ea.D(e),pg("dns-prefetch",e,null)}function C0(e,n){Ea.C(e,n),pg("preconnect",e,n)}function A0(e,n,i){Ea.L(e,n,i);var s=ki;if(s&&e&&n){var f='link[rel="preload"][as="'+jn(n)+'"]';n==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+jn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+jn(i.imageSizes)+'"]')):f+='[href="'+jn(e)+'"]';var h=f;switch(n){case"style":h=Ti(e);break;case"script":h=Ni(e)}Bn.has(h)||(e=y({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),Bn.set(h,e),s.querySelector(f)!==null||n==="style"&&s.querySelector(Er(h))||n==="script"&&s.querySelector(Cr(h))||(n=s.createElement("link"),Yt(n,"link",e),Ut(n),s.head.appendChild(n)))}}function j0(e,n){Ea.m(e,n);var i=ki;if(i&&e){var s=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+jn(s)+'"][href="'+jn(e)+'"]',h=f;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Ni(e)}if(!Bn.has(h)&&(e=y({rel:"modulepreload",href:e},n),Bn.set(h,e),i.querySelector(f)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Cr(h)))return}s=i.createElement("link"),Yt(s,"link",e),Ut(s),i.head.appendChild(s)}}}function w0(e,n,i){Ea.S(e,n,i);var s=ki;if(s&&e){var f=Yl(s).hoistableStyles,h=Ti(e);n=n||"default";var v=f.get(h);if(!v){var S={loading:0,preload:null};if(v=s.querySelector(Er(h)))S.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},i),(i=Bn.get(h))&&sf(e,i);var A=v=s.createElement("link");Ut(A),Yt(A,"link",e),A._p=new Promise(function(q,F){A.onload=q,A.onerror=F}),A.addEventListener("load",function(){S.loading|=1}),A.addEventListener("error",function(){S.loading|=2}),S.loading|=4,ao(v,n,s)}v={type:"stylesheet",instance:v,count:1,state:S},f.set(h,v)}}}function M0(e,n){Ea.X(e,n);var i=ki;if(i&&e){var s=Yl(i).hoistableScripts,f=Ni(e),h=s.get(f);h||(h=i.querySelector(Cr(f)),h||(e=y({src:e,async:!0},n),(n=Bn.get(f))&&of(e,n),h=i.createElement("script"),Ut(h),Yt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function z0(e,n){Ea.M(e,n);var i=ki;if(i&&e){var s=Yl(i).hoistableScripts,f=Ni(e),h=s.get(f);h||(h=i.querySelector(Cr(f)),h||(e=y({src:e,async:!0,type:"module"},n),(n=Bn.get(f))&&of(e,n),h=i.createElement("script"),Ut(h),Yt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(f,h))}}function gg(e,n,i,s){var f=(f=X.current)?no(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=Ti(i.href),i=Yl(f).hoistableStyles,s=i.get(n),s||(s={type:"style",instance:null,count:0,state:null},i.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Ti(i.href);var h=Yl(f).hoistableStyles,v=h.get(e);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,v),(h=f.querySelector(Er(e)))&&!h._p&&(v.instance=h,v.state.loading=5),Bn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Bn.set(e,i),h||R0(f,e,i,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=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ni(i),i=Yl(f).hoistableScripts,s=i.get(n),s||(s={type:"script",instance:null,count:0,state:null},i.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ti(e){return'href="'+jn(e)+'"'}function Er(e){return'link[rel="stylesheet"]['+e+"]"}function yg(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function R0(e,n,i,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",i),Ut(n),e.head.appendChild(n))}function Ni(e){return'[src="'+jn(e)+'"]'}function Cr(e){return"script[async]"+e}function _g(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var s=e.querySelector('style[data-href~="'+jn(i.href)+'"]');if(s)return n.instance=s,Ut(s),s;var f=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Ut(s),Yt(s,"style",f),ao(s,i.precedence,e),n.instance=s;case"stylesheet":f=Ti(i.href);var h=e.querySelector(Er(f));if(h)return n.state.loading|=4,n.instance=h,Ut(h),h;s=yg(i),(f=Bn.get(f))&&sf(s,f),h=(e.ownerDocument||e).createElement("link"),Ut(h);var v=h;return v._p=new Promise(function(S,A){v.onload=S,v.onerror=A}),Yt(h,"link",s),n.state.loading|=4,ao(h,i.precedence,e),n.instance=h;case"script":return h=Ni(i.src),(f=e.querySelector(Cr(h)))?(n.instance=f,Ut(f),f):(s=i,(f=Bn.get(h))&&(s=y({},i),of(s,f)),e=e.ownerDocument||e,f=e.createElement("script"),Ut(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,ao(s,i.precedence,e));return n.instance}function ao(e,n,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=s.length?s[s.length-1]:null,h=f,v=0;v<s.length;v++){var S=s[v];if(S.dataset.precedence===n)h=S;else if(h!==f)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function sf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function of(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var lo=null;function vg(e,n,i){if(lo===null){var s=new Map,f=lo=new Map;f.set(i,s)}else f=lo,s=f.get(i),s||(s=new Map,f.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var h=i[f];if(!(h[Gi]||h[Vt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var v=h.getAttribute(n)||"";v=e+v;var S=s.get(v);S?S.push(h):s.set(v,[h])}}return s}function xg(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function O0(e,n,i){if(i===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 bg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function D0(e,n,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=Ti(s.href),h=n.querySelector(Er(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=io.bind(e),n.then(e,e)),i.state.loading|=4,i.instance=h,Ut(h);return}h=n.ownerDocument||n,s=yg(s),(f=Bn.get(f))&&sf(s,f),h=h.createElement("link"),Ut(h);var v=h;v._p=new Promise(function(S,A){v.onload=S,v.onerror=A}),Yt(h,"link",s),i.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=io.bind(e),n.addEventListener("load",i),n.addEventListener("error",i))}}var uf=0;function L0(e,n){return e.stylesheets&&e.count===0&&so(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&so(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+n);0<e.imgBytes&&uf===0&&(uf=62500*g0());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&so(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>uf?50:800)+n);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(f)}}:null}function io(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)so(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ro=null;function so(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ro=new Map,n.forEach(B0,e),ro=null,io.call(e))}function B0(e,n){if(!(n.state.loading&4)){var i=ro.get(e);if(i)var s=i.get(null);else{i=new Map,ro.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var v=f[h];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),s=v)}s&&i.set(null,s)}f=n.instance,v=f.getAttribute("data-precedence"),h=i.get(v)||s,h===s&&i.set(null,f),i.set(v,f),this.count++,s=io.bind(this),f.addEventListener("load",s),f.addEventListener("error",s),h?h.parentNode.insertBefore(f,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Ar={$$typeof:j,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function I0(e,n,i,s,f,h,v,S,A){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=au(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=au(0),this.hiddenUpdates=au(null),this.identifierPrefix=s,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function Sg(e,n,i,s,f,h,v,S,A,q,F,ee){return e=new I0(e,n,i,v,A,q,F,ee,S),n=1,h===!0&&(n|=24),h=yn(3,null,null,n),e.current=h,h.stateNode=e,n=qu(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:s,isDehydrated:i,cache:n},Zu(h),e}function kg(e){return e?(e=ni,e):ni}function Tg(e,n,i,s,f,h){f=kg(f),s.context===null?s.context=f:s.pendingContext=f,s=$a(n),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=Za(e,s,n),i!==null&&(dn(i,e,n),rr(i,e,n))}function Ng(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function cf(e,n){Ng(e,n),(e=e.alternate)&&Ng(e,n)}function Eg(e){if(e.tag===13||e.tag===31){var n=kl(e,67108864);n!==null&&dn(n,e,67108864),cf(e,67108864)}}function Cg(e){if(e.tag===13||e.tag===31){var n=Sn();n=lu(n);var i=kl(e,n);i!==null&&dn(i,e,n),cf(e,n)}}var oo=!0;function U0(e,n,i,s){var f=B.T;B.T=null;var h=W.p;try{W.p=2,ff(e,n,i,s)}finally{W.p=h,B.T=f}}function H0(e,n,i,s){var f=B.T;B.T=null;var h=W.p;try{W.p=8,ff(e,n,i,s)}finally{W.p=h,B.T=f}}function ff(e,n,i,s){if(oo){var f=df(s);if(f===null)Kc(e,n,s,uo,i),jg(e,s);else if(V0(f,e,n,i,s))s.stopPropagation();else if(jg(e,s),n&4&&-1<q0.indexOf(e)){for(;f!==null;){var h=Zl(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var v=_l(h.pendingLanes);if(v!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;v;){var A=1<<31-mt(v);S.entanglements[1]|=A,v&=~A}ta(h),(st&6)===0&&(Zs=It()+500,Sr(0))}}break;case 31:case 13:S=kl(h,2),S!==null&&dn(S,h,2),Fs(),cf(h,2)}if(h=df(s),h===null&&Kc(e,n,s,uo,i),h===f)break;f=h}f!==null&&s.stopPropagation()}else Kc(e,n,s,null,i)}}function df(e){return e=hu(e),hf(e)}var uo=null;function hf(e){if(uo=null,e=$l(e),e!==null){var n=u(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=c(n),e!==null)return e;e=null}else if(i===31){if(e=d(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return uo=e,null}function Ag(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(yl()){case Q:return 2;case ce:return 8;case de:case we:return 32;case Me:return 268435456;default:return 32}default:return 32}}var mf=!1,nl=null,al=null,ll=null,jr=new Map,wr=new Map,il=[],q0="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 jg(e,n){switch(e){case"focusin":case"focusout":nl=null;break;case"dragenter":case"dragleave":al=null;break;case"mouseover":case"mouseout":ll=null;break;case"pointerover":case"pointerout":jr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":wr.delete(n.pointerId)}}function Mr(e,n,i,s,f,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:i,eventSystemFlags:s,nativeEvent:h,targetContainers:[f]},n!==null&&(n=Zl(n),n!==null&&Eg(n)),e):(e.eventSystemFlags|=s,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function V0(e,n,i,s,f){switch(n){case"focusin":return nl=Mr(nl,e,n,i,s,f),!0;case"dragenter":return al=Mr(al,e,n,i,s,f),!0;case"mouseover":return ll=Mr(ll,e,n,i,s,f),!0;case"pointerover":var h=f.pointerId;return jr.set(h,Mr(jr.get(h)||null,e,n,i,s,f)),!0;case"gotpointercapture":return h=f.pointerId,wr.set(h,Mr(wr.get(h)||null,e,n,i,s,f)),!0}return!1}function wg(e){var n=$l(e.target);if(n!==null){var i=u(n);if(i!==null){if(n=i.tag,n===13){if(n=c(i),n!==null){e.blockedOn=n,$d(e.priority,function(){Cg(i)});return}}else if(n===31){if(n=d(i),n!==null){e.blockedOn=n,$d(e.priority,function(){Cg(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function co(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=df(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);du=s,i.target.dispatchEvent(s),du=null}else return n=Zl(i),n!==null&&Eg(n),e.blockedOn=i,!1;n.shift()}return!0}function Mg(e,n,i){co(e)&&i.delete(n)}function G0(){mf=!1,nl!==null&&co(nl)&&(nl=null),al!==null&&co(al)&&(al=null),ll!==null&&co(ll)&&(ll=null),jr.forEach(Mg),wr.forEach(Mg)}function fo(e,n){e.blockedOn===n&&(e.blockedOn=null,mf||(mf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,G0)))}var ho=null;function zg(e){ho!==e&&(ho=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){ho===e&&(ho=null);for(var n=0;n<e.length;n+=3){var i=e[n],s=e[n+1],f=e[n+2];if(typeof s!="function"){if(hf(s||i)===null)continue;break}var h=Zl(i);h!==null&&(e.splice(n,3),n-=3,fc(h,{pending:!0,data:f,method:i.method,action:s},s,f))}}))}function Ei(e){function n(A){return fo(A,e)}nl!==null&&fo(nl,e),al!==null&&fo(al,e),ll!==null&&fo(ll,e),jr.forEach(n),wr.forEach(n);for(var i=0;i<il.length;i++){var s=il[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<il.length&&(i=il[0],i.blockedOn===null);)wg(i),i.blockedOn===null&&il.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var f=i[s],h=i[s+1],v=f[rn]||null;if(typeof h=="function")v||zg(i);else if(v){var S=null;if(h&&h.hasAttribute("formAction")){if(f=h,v=h[rn]||null)S=v.formAction;else if(hf(f)!==null)continue}else S=v.action;typeof S=="function"?i[s+1]=S:(i.splice(s,3),s-=3),zg(i)}}}function Rg(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.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(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function pf(e){this._internalRoot=e}mo.prototype.render=pf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var i=n.current,s=Sn();Tg(i,s,e,n,null,null)},mo.prototype.unmount=pf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Tg(e.current,2,null,e,null,null),Fs(),n[Gl]=null}};function mo(e){this._internalRoot=e}mo.prototype.unstable_scheduleHydration=function(e){if(e){var n=Gd();e={blockedOn:null,target:e,priority:n};for(var i=0;i<il.length&&n!==0&&n<il[i].priority;i++);il.splice(i,0,e),i===0&&wg(e)}};var Og=a.version;if(Og!=="19.2.4")throw Error(r(527,Og,"19.2.4"));W.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=g(n),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var $0={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var po=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!po.isDisabled&&po.supportsFiber)try{Wt=po.inject($0),Ot=po}catch{}}return Rr.createRoot=function(e,n){if(!o(e))throw Error(r(299));var i=!1,s="",f=qm,h=Vm,v=Gm;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError)),n=Sg(e,1,!1,null,null,i,s,null,f,h,v,Rg),e[Gl]=n.current,Qc(e),new pf(n)},Rr.hydrateRoot=function(e,n,i){if(!o(e))throw Error(r(299));var s=!1,f="",h=qm,v=Vm,S=Gm,A=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError),i.formState!==void 0&&(A=i.formState)),n=Sg(e,1,!0,n,i??null,s,f,A,h,v,S,Rg),n.context=kg(null),i=n.current,s=Sn(),s=lu(s),f=$a(s),f.callback=null,Za(i,f,s),i=s,n.current.lanes=i,Vi(n,i),ta(n),e[Gl]=n.current,Qc(e),new mo(n)},Rr.version="19.2.4",Rr}var $g;function tx(){if($g)return _f.exports;$g=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=ex(),_f.exports}var nx=tx();const ax=Zo(nx);/**
|
|
50
50
|
* @license lucide-react v0.575.0 - ISC
|
|
51
51
|
*
|
|
52
52
|
* This source code is licensed under the ISC license.
|
|
53
53
|
* See the LICENSE file in the root directory of this source tree.
|
|
54
|
-
*/const
|
|
54
|
+
*/const r_=(...t)=>t.filter((a,l,r)=>!!a&&a.trim()!==""&&r.indexOf(a)===l).join(" ").trim();/**
|
|
55
55
|
* @license lucide-react v0.575.0 - ISC
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
|
-
*/const
|
|
59
|
+
*/const lx=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
60
60
|
* @license lucide-react v0.575.0 - ISC
|
|
61
61
|
*
|
|
62
62
|
* This source code is licensed under the ISC license.
|
|
63
63
|
* See the LICENSE file in the root directory of this source tree.
|
|
64
|
-
*/const
|
|
64
|
+
*/const ix=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,r)=>r?r.toUpperCase():l.toLowerCase());/**
|
|
65
65
|
* @license lucide-react v0.575.0 - ISC
|
|
66
66
|
*
|
|
67
67
|
* This source code is licensed under the ISC license.
|
|
68
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
69
|
-
*/const
|
|
69
|
+
*/const Zg=t=>{const a=ix(t);return a.charAt(0).toUpperCase()+a.slice(1)};/**
|
|
70
70
|
* @license lucide-react v0.575.0 - ISC
|
|
71
71
|
*
|
|
72
72
|
* This source code is licensed under the ISC license.
|
|
73
73
|
* See the LICENSE file in the root directory of this source tree.
|
|
74
|
-
*/var
|
|
74
|
+
*/var rx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
75
75
|
* @license lucide-react v0.575.0 - ISC
|
|
76
76
|
*
|
|
77
77
|
* This source code is licensed under the ISC license.
|
|
78
78
|
* See the LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/const
|
|
79
|
+
*/const sx=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};/**
|
|
80
80
|
* @license lucide-react v0.575.0 - ISC
|
|
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
|
|
84
|
+
*/const ox=R.forwardRef(({color:t="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:r,className:o="",children:u,iconNode:c,...d},m)=>R.createElement("svg",{ref:m,...rx,width:a,height:a,stroke:t,strokeWidth:r?Number(l)*24/Number(a):l,className:r_("lucide",o),...!u&&!sx(d)&&{"aria-hidden":"true"},...d},[...c.map(([g,_])=>R.createElement(g,_)),...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
|
|
89
|
+
*/const lt=(t,a)=>{const l=R.forwardRef(({className:r,...o},u)=>R.createElement(ox,{ref:u,iconNode:a,className:r_(`lucide-${lx(Zg(t))}`,`lucide-${t}`,r),...o}));return l.displayName=Zg(t),l};/**
|
|
90
90
|
* @license lucide-react v0.575.0 - ISC
|
|
91
91
|
*
|
|
92
92
|
* This source code is licensed under the ISC license.
|
|
93
93
|
* See the LICENSE file in the root directory of this source tree.
|
|
94
|
-
*/const
|
|
94
|
+
*/const ux=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],cx=lt("activity",ux);/**
|
|
95
95
|
* @license lucide-react v0.575.0 - ISC
|
|
96
96
|
*
|
|
97
97
|
* This source code is licensed under the ISC license.
|
|
98
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
99
|
-
*/const
|
|
99
|
+
*/const fx=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],Gf=lt("bot",fx);/**
|
|
100
100
|
* @license lucide-react v0.575.0 - ISC
|
|
101
101
|
*
|
|
102
102
|
* This source code is licensed under the ISC license.
|
|
103
103
|
* See the LICENSE file in the root directory of this source tree.
|
|
104
|
-
*/const
|
|
104
|
+
*/const dx=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]],hx=lt("brain-circuit",dx);/**
|
|
105
105
|
* @license lucide-react v0.575.0 - ISC
|
|
106
106
|
*
|
|
107
107
|
* This source code is licensed under the ISC license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
|
-
*/const
|
|
109
|
+
*/const mx=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],px=lt("bug",mx);/**
|
|
110
110
|
* @license lucide-react v0.575.0 - ISC
|
|
111
111
|
*
|
|
112
112
|
* This source code is licensed under the ISC license.
|
|
113
113
|
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
-
*/const
|
|
114
|
+
*/const gx=[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]],yx=lt("cable",gx);/**
|
|
115
115
|
* @license lucide-react v0.575.0 - ISC
|
|
116
116
|
*
|
|
117
117
|
* This source code is licensed under the ISC license.
|
|
118
118
|
* See the LICENSE file in the root directory of this source tree.
|
|
119
|
-
*/const
|
|
119
|
+
*/const _x=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$f=lt("check",_x);/**
|
|
120
120
|
* @license lucide-react v0.575.0 - ISC
|
|
121
121
|
*
|
|
122
122
|
* This source code is licensed under the ISC license.
|
|
123
123
|
* See the LICENSE file in the root directory of this source tree.
|
|
124
|
-
*/const
|
|
124
|
+
*/const vx=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],wa=lt("chevron-down",vx);/**
|
|
125
125
|
* @license lucide-react v0.575.0 - ISC
|
|
126
126
|
*
|
|
127
127
|
* This source code is licensed under the ISC license.
|
|
128
128
|
* See the LICENSE file in the root directory of this source tree.
|
|
129
|
-
*/const
|
|
129
|
+
*/const xx=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],dl=lt("chevron-right",xx);/**
|
|
130
130
|
* @license lucide-react v0.575.0 - ISC
|
|
131
131
|
*
|
|
132
132
|
* This source code is licensed under the ISC license.
|
|
133
133
|
* See the LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/const
|
|
134
|
+
*/const bx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Sx=lt("circle-x",bx);/**
|
|
135
135
|
* @license lucide-react v0.575.0 - ISC
|
|
136
136
|
*
|
|
137
137
|
* This source code is licensed under the ISC license.
|
|
138
138
|
* See the LICENSE file in the root directory of this source tree.
|
|
139
|
-
*/const
|
|
139
|
+
*/const kx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Tx=lt("circle",kx);/**
|
|
140
140
|
* @license lucide-react v0.575.0 - ISC
|
|
141
141
|
*
|
|
142
142
|
* This source code is licensed under the ISC license.
|
|
143
143
|
* See the LICENSE file in the root directory of this source tree.
|
|
144
|
-
*/const
|
|
144
|
+
*/const Nx=[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"m9 14 2 2 4-4",key:"df797q"}]],Ex=lt("clipboard-check",Nx);/**
|
|
145
145
|
* @license lucide-react v0.575.0 - ISC
|
|
146
146
|
*
|
|
147
147
|
* This source code is licensed under the ISC license.
|
|
148
148
|
* See the LICENSE file in the root directory of this source tree.
|
|
149
|
-
*/const
|
|
149
|
+
*/const Cx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],Ax=lt("clock",Cx);/**
|
|
150
150
|
* @license lucide-react v0.575.0 - ISC
|
|
151
151
|
*
|
|
152
152
|
* This source code is licensed under the ISC license.
|
|
153
153
|
* See the LICENSE file in the root directory of this source tree.
|
|
154
|
-
*/const
|
|
154
|
+
*/const jx=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],s_=lt("copy",jx);/**
|
|
155
155
|
* @license lucide-react v0.575.0 - ISC
|
|
156
156
|
*
|
|
157
157
|
* This source code is licensed under the ISC license.
|
|
158
158
|
* See the LICENSE file in the root directory of this source tree.
|
|
159
|
-
*/const
|
|
159
|
+
*/const wx=[["path",{d:"m15 10 5 5-5 5",key:"qqa56n"}],["path",{d:"M4 4v7a4 4 0 0 0 4 4h12",key:"z08zvw"}]],Mx=lt("corner-down-right",wx);/**
|
|
160
160
|
* @license lucide-react v0.575.0 - ISC
|
|
161
161
|
*
|
|
162
162
|
* This source code is licensed under the ISC license.
|
|
163
163
|
* See the LICENSE file in the root directory of this source tree.
|
|
164
|
-
*/const
|
|
164
|
+
*/const zx=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],Rx=lt("cpu",zx);/**
|
|
165
165
|
* @license lucide-react v0.575.0 - ISC
|
|
166
166
|
*
|
|
167
167
|
* This source code is licensed under the ISC license.
|
|
168
168
|
* See the LICENSE file in the root directory of this source tree.
|
|
169
|
-
*/const
|
|
169
|
+
*/const Ox=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Dx=lt("file-text",Ox);/**
|
|
170
170
|
* @license lucide-react v0.575.0 - ISC
|
|
171
171
|
*
|
|
172
172
|
* This source code is licensed under the ISC license.
|
|
173
173
|
* See the LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/const
|
|
174
|
+
*/const Lx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Bx=lt("globe",Lx);/**
|
|
175
175
|
* @license lucide-react v0.575.0 - ISC
|
|
176
176
|
*
|
|
177
177
|
* This source code is licensed under the ISC license.
|
|
178
178
|
* See the LICENSE file in the root directory of this source tree.
|
|
179
|
-
*/const
|
|
179
|
+
*/const Ix=[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]],Ux=lt("hexagon",Ix);/**
|
|
180
180
|
* @license lucide-react v0.575.0 - ISC
|
|
181
181
|
*
|
|
182
182
|
* This source code is licensed under the ISC license.
|
|
183
183
|
* See the LICENSE file in the root directory of this source tree.
|
|
184
|
-
*/const
|
|
184
|
+
*/const Hx=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],qx=lt("info",Hx);/**
|
|
185
185
|
* @license lucide-react v0.575.0 - ISC
|
|
186
186
|
*
|
|
187
187
|
* This source code is licensed under the ISC license.
|
|
188
188
|
* See the LICENSE file in the root directory of this source tree.
|
|
189
|
-
*/const
|
|
189
|
+
*/const Vx=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],Gx=lt("key-round",Vx);/**
|
|
190
190
|
* @license lucide-react v0.575.0 - ISC
|
|
191
191
|
*
|
|
192
192
|
* This source code is licensed under the ISC license.
|
|
193
193
|
* See the LICENSE file in the root directory of this source tree.
|
|
194
|
-
*/const
|
|
194
|
+
*/const $x=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],o_=lt("loader-circle",$x);/**
|
|
195
195
|
* @license lucide-react v0.575.0 - ISC
|
|
196
196
|
*
|
|
197
197
|
* This source code is licensed under the ISC license.
|
|
198
198
|
* See the LICENSE file in the root directory of this source tree.
|
|
199
|
-
*/const
|
|
199
|
+
*/const Zx=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Yx=lt("message-square",Zx);/**
|
|
200
200
|
* @license lucide-react v0.575.0 - ISC
|
|
201
201
|
*
|
|
202
202
|
* This source code is licensed under the ISC license.
|
|
203
203
|
* See the LICENSE file in the root directory of this source tree.
|
|
204
|
-
*/const
|
|
204
|
+
*/const Fx=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Xx=lt("pencil",Fx);/**
|
|
205
205
|
* @license lucide-react v0.575.0 - ISC
|
|
206
206
|
*
|
|
207
207
|
* This source code is licensed under the ISC license.
|
|
208
208
|
* See the LICENSE file in the root directory of this source tree.
|
|
209
|
-
*/const
|
|
209
|
+
*/const Qx=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],hd=lt("refresh-cw",Qx);/**
|
|
210
210
|
* @license lucide-react v0.575.0 - ISC
|
|
211
211
|
*
|
|
212
212
|
* This source code is licensed under the ISC license.
|
|
213
213
|
* See the LICENSE file in the root directory of this source tree.
|
|
214
|
-
*/const
|
|
214
|
+
*/const Kx=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Jx=lt("shield-check",Kx);/**
|
|
215
215
|
* @license lucide-react v0.575.0 - ISC
|
|
216
216
|
*
|
|
217
217
|
* This source code is licensed under the ISC license.
|
|
218
218
|
* See the LICENSE file in the root directory of this source tree.
|
|
219
|
-
*/const
|
|
219
|
+
*/const Px=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Wx=lt("trash-2",Px);/**
|
|
220
220
|
* @license lucide-react v0.575.0 - ISC
|
|
221
221
|
*
|
|
222
222
|
* This source code is licensed under the ISC license.
|
|
223
223
|
* See the LICENSE file in the root directory of this source tree.
|
|
224
|
-
*/const
|
|
224
|
+
*/const eb=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],md=lt("triangle-alert",eb);/**
|
|
225
225
|
* @license lucide-react v0.575.0 - ISC
|
|
226
226
|
*
|
|
227
227
|
* This source code is licensed under the ISC license.
|
|
228
228
|
* See the LICENSE file in the root directory of this source tree.
|
|
229
|
-
*/const
|
|
229
|
+
*/const tb=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],u_=lt("unplug",tb);/**
|
|
230
230
|
* @license lucide-react v0.575.0 - ISC
|
|
231
231
|
*
|
|
232
232
|
* This source code is licensed under the ISC license.
|
|
233
233
|
* See the LICENSE file in the root directory of this source tree.
|
|
234
|
-
*/const
|
|
234
|
+
*/const nb=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],ab=lt("user",nb);/**
|
|
235
235
|
* @license lucide-react v0.575.0 - ISC
|
|
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
|
|
239
|
+
*/const lb=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],za=lt("wrench",lb);/**
|
|
240
240
|
* @license lucide-react v0.575.0 - ISC
|
|
241
241
|
*
|
|
242
242
|
* This source code is licensed under the ISC license.
|
|
243
243
|
* See the LICENSE file in the root directory of this source tree.
|
|
244
|
-
*/const Wx=[["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"}]],md=it("zap",Wx),eb="_panel_1gqyj_1",tb="_resizeHandle_1gqyj_11",nb="_header_1gqyj_22",ab="_headerLeft_1gqyj_32",lb="_headerTitle_1gqyj_38",ib="_headerActions_1gqyj_44",rb="_collapseToggle_1gqyj_50",sb="_iconBtn_1gqyj_66",ob="_spinning_1gqyj_86",ub="_status_1gqyj_98",cb="_body_1gqyj_103",Xn={panel:eb,resizeHandle:tb,header:nb,headerLeft:ab,headerTitle:lb,headerActions:ib,collapseToggle:rb,iconBtn:sb,spinning:ob,status:ub,body:cb},fb=300,db=150;function Zo({title:t,status:a,onRefresh:i,isRefreshing:r,titleExtra:o,defaultCollapsed:u=!1,defaultHeight:c=fb,children:h}){const[m,p]=R.useState(u),[y,_]=R.useState(c),x=R.useRef(u);R.useEffect(()=>{u!==x.current&&(x.current=u,p(u))},[u]);const b=R.useRef(null),N=R.useCallback(L=>{L.preventDefault();const O=L.clientY,k=y,z=Q=>{const $=O-Q.clientY;_(Math.max(db,k+$))},w=()=>{b.current=null,document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",w),document.body.style.cursor="",document.body.style.userSelect=""};b.current={move:z,up:w},document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",z),document.addEventListener("mouseup",w)},[y]);return R.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:Xn.panel,style:{height:m?"auto":y},children:[!m&&g.jsx("div",{className:Xn.resizeHandle,onMouseDown:N,role:"separator","aria-label":"Resize panel"}),g.jsxs("div",{className:Xn.header,children:[g.jsxs("div",{className:Xn.headerLeft,children:[g.jsxs("button",{className:Xn.collapseToggle,onClick:()=>p(L=>!L),"aria-label":"Toggle panel",children:[m?g.jsx(cl,{size:14}):g.jsx(wa,{size:14}),g.jsx("span",{className:Xn.headerTitle,children:t}),o]}),a&&g.jsx("span",{className:Xn.status,children:a})]}),g.jsx("div",{className:Xn.headerActions,children:i&&g.jsx("button",{className:Xn.iconBtn,onClick:i,disabled:r,title:"Refresh","aria-label":`Refresh ${t}`,children:g.jsx(dd,{size:12,className:r?Xn.spinning:""})})})]}),!m&&g.jsx("div",{className:Xn.body,children:h})]})}const hb="_error_1di92_1",mb="_version_1di92_7",pb="_body_1di92_13",gb="_cardName_1di92_17",yb="_cardDesc_1di92_24",_b="_section_1di92_30",vb="_sectionLabel_1di92_34",xb="_tags_1di92_43",bb="_tag_1di92_43",Sb="_skillList_1di92_58",kb="_skillItem_1di92_64",Tb="_skillName_1di92_73",Nb="_skillDesc_1di92_80",Eb="_skillTags_1di92_85",Dt={error:hb,version:mb,body:pb,cardName:gb,cardDesc:yb,section:_b,sectionLabel:vb,tags:xb,tag:bb,skillList:Sb,skillItem:kb,skillName:Tb,skillDesc:Nb,skillTags:Eb};function Cb({card:t,isLoading:a,error:i,onRefresh:r}){var o,u,c;return!t&&!i&&!a?null:g.jsxs(Zo,{title:"A2A Agent Card",titleExtra:t!=null&&t.version?g.jsxs("span",{className:Dt.version,children:["v",t.version]}):void 0,onRefresh:r,isRefreshing:a,children:[i&&g.jsx("div",{className:Dt.error,children:i}),t&&g.jsxs("div",{className:Dt.body,children:[t.name&&g.jsx("div",{className:Dt.cardName,children:t.name}),t.description&&g.jsx("div",{className:Dt.cardDesc,children:t.description}),g.jsxs("div",{className:Dt.section,children:[g.jsx("div",{className:Dt.sectionLabel,children:"Capabilities"}),g.jsxs("div",{className:Dt.tags,children:[((o=t.capabilities)==null?void 0:o.streaming)&&g.jsx("span",{className:Dt.tag,children:"streaming"}),(u=t.defaultInputModes)==null?void 0:u.map(h=>g.jsxs("span",{className:Dt.tag,children:["input: ",h]},`in-${h}`)),(c=t.defaultOutputModes)==null?void 0:c.map(h=>g.jsxs("span",{className:Dt.tag,children:["output: ",h]},`out-${h}`))]})]}),t.skills&&t.skills.length>0&&g.jsxs("div",{className:Dt.section,children:[g.jsxs("div",{className:Dt.sectionLabel,children:["Skills (",t.skills.length,")"]}),g.jsx("div",{className:Dt.skillList,children:t.skills.map((h,m)=>g.jsxs("div",{className:Dt.skillItem,children:[g.jsx("span",{className:Dt.skillName,children:h.name??h.id??`Skill ${m+1}`}),h.description&&g.jsx("span",{className:Dt.skillDesc,children:h.description}),h.tags&&h.tags.length>0&&g.jsx("div",{className:Dt.skillTags,children:h.tags.map(p=>g.jsx("span",{className:Dt.tag,children:p},p))})]},h.id??m))})]})]})]})}const Ab="_area_1u9gx_1",wb="_row_1u9gx_8",jb="_textarea_1u9gx_16",zb="_sendBtn_1u9gx_45",po={area:Ab,row:wb,textarea:jb,sendBtn:zb};function Mb({isStreaming:t,isStarting:a,onSend:i}){const[r,o]=R.useState(""),u=R.useRef(null),c=R.useRef(!1),h=!t&&!!r.trim(),m=_=>{o(_.target.value);const x=_.target;x.style.height="auto",x.style.height=Math.min(x.scrollHeight,160)+"px"},p=()=>{if(!h)return;const _=r.trim();o(""),u.current&&(u.current.style.height="auto"),i(_)},y=_=>{_.key==="Enter"&&!_.shiftKey&&!c.current&&(_.preventDefault(),p())};return g.jsx("div",{className:po.area,children:g.jsxs("div",{className:po.row,children:[g.jsx("textarea",{className:po.textarea,ref:u,value:r,onChange:m,onKeyDown:y,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:po.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 Rb="_wrapper_1rkpz_1",Ob="_tooltip_1rkpz_6",Db="_align_center_1rkpz_18",Lb="_align_left_1rkpz_23",Bb="_align_right_1rkpz_27",Ub="_info_1rkpz_31",Ib="_error_1rkpz_37",Hb="_warning_1rkpz_43",go={wrapper:Rb,tooltip:Ob,align_center:Db,align_left:Lb,align_right:Bb,info:Ub,error:Ib,warning:Hb};function Ci({content:t,variant:a="info",align:i="center",forceShow:r,children:o}){const[u,c]=R.useState(!1),h=R.useRef(null),m=()=>{h.current&&clearTimeout(h.current),h.current=setTimeout(()=>c(!0),300)},p=()=>{h.current&&clearTimeout(h.current),h.current=null,c(!1)};R.useEffect(()=>()=>{h.current&&clearTimeout(h.current)},[]);const y=r??u;return g.jsxs("div",{className:go.wrapper,onMouseEnter:m,onMouseLeave:p,children:[o,y&&t&&g.jsx("div",{className:`${go.tooltip} ${go[a]} ${go[`align_${i}`]}`,children:t})]})}const qb="_toolbar_1lwtu_1",Vb="_agentSection_1lwtu_11",Gb="_agentPicker_1lwtu_18",$b="_clickable_1lwtu_30",Zb="_agentLabel_1lwtu_44",Yb="_agentName_1lwtu_49",Xb="_starting_1lwtu_53",Fb="_chevron_1lwtu_59",Qb="_dropdown_1lwtu_64",Kb="_dropdownItem_1lwtu_77",Jb="_active_1lwtu_101",Pb="_hasError_1lwtu_105",Wb="_dropdownName_1lwtu_110",eS="_statusBadge_1lwtu_115",tS="_status_running_1lwtu_125",nS="_status_starting_1lwtu_130",aS="_status_error_1lwtu_135",lS="_status_idle_1lwtu_140",iS="_dropdownMeta_1lwtu_145",rS="_rightSection_1lwtu_150",sS="_errorText_1lwtu_157",oS="_sessionBadge_1lwtu_162",uS="_newSessionBtn_1lwtu_183",cS="_sessionEditBtn_1lwtu_201",fS="_sessionSetBtn_1lwtu_218",dS="_sessionIdForm_1lwtu_235",hS="_sessionIdInput_1lwtu_240",mS="_sessionIdConfirmBtn_1lwtu_252",pS="_sessionIdCancelBtn_1lwtu_253",gS="_confirmOverlay_1lwtu_282",yS="_confirmModal_1lwtu_292",_S="_confirmTitle_1lwtu_301",vS="_confirmMessage_1lwtu_308",xS="_confirmActions_1lwtu_315",bS="_confirmBtn_1lwtu_321",SS="_confirmBtnPrimary_1lwtu_336",kS="_dropdownSeparator_1lwtu_346",TS="_status_deployed_1lwtu_352",NS="_targetToggle_1lwtu_357",ES="_targetOption_1lwtu_365",CS="_targetOptionActive_1lwtu_376",AS="_targetBadge_1lwtu_386",we={toolbar:qb,agentSection:Vb,agentPicker:Gb,clickable:$b,agentLabel:Zb,agentName:Yb,starting:Xb,chevron:Fb,dropdown:Qb,dropdownItem:Kb,active:Jb,hasError:Pb,dropdownName:Wb,statusBadge:eS,status_running:tS,status_starting:nS,status_error:aS,status_idle:lS,dropdownMeta:iS,rightSection:rS,errorText:sS,sessionBadge:oS,newSessionBtn:uS,sessionEditBtn:cS,sessionSetBtn:fS,sessionIdForm:dS,sessionIdInput:hS,sessionIdConfirmBtn:mS,sessionIdCancelBtn:pS,confirmOverlay:gS,confirmModal:yS,confirmTitle:_S,confirmMessage:vS,confirmActions:xS,confirmBtn:bS,confirmBtnPrimary:SS,dropdownSeparator:kS,status_deployed:TS,targetToggle:NS,targetOption:ES,targetOptionActive:CS,targetBadge:AS};function wS(t,a,i,r,o){return o.has(t)?"error":t===a&&i?"starting":t===a&&r?"running":"idle"}const jS={running:"Running",starting:"Starting",error:"Error",idle:"Idle"};function zS({agents:t,harnesses:a,errors:i,selectedAgentName:r,selectedHarnessName:o,isStarting:u,isReady:c,startError:h,sessionId:m,onSelectAgent:p,onSelectHarness:y,onResetChat:_,isAgentDeployed:x,invocationTarget:b="local",onToggleTarget:N,onSetSessionId:L}){const[O,k]=R.useState(!1),[z,w]=R.useState(null),[Q,$]=R.useState(null),[B,J]=R.useState(null),[de,he]=R.useState(!1),[M,ae]=R.useState(!1),[le,pe]=R.useState(""),[ne,Z]=R.useState(null),U=R.useRef(null),P=R.useRef(null),oe=new Map(i.map(ce=>[ce.name,ce.message]));R.useEffect(()=>{if(!O)return;const ce=ut=>{P.current&&!P.current.contains(ut.target)&&k(!1)};return document.addEventListener("mousedown",ce),()=>document.removeEventListener("mousedown",ce)},[O]);const Se=ce=>{k(!1),(ce!==r||o)&&(w(ce),$(null))},E=ce=>{k(!1),ce!==o&&($(ce),w(null))},C=z??Q??(B?B==="deployed"?"Deployed":"Local":null),G=ce=>{ce!==b&&J(ce)},T=()=>{if(B){N==null||N(B),J(null);return}z?(p(z),w(null)):Q&&(y(Q),$(null))},te=()=>{w(null),$(null),J(null)},ue=()=>{m&&navigator.clipboard.writeText(m).then(()=>{he(!0),setTimeout(()=>he(!1),1500)}).catch(()=>{})},X=()=>{const ce=le.trim();ce.length>=33?(L==null||L(ce),ae(!1),pe(""),Z(null)):Z("Session ID must be at least 33 characters")},xe=o??r??(t.length===0&&a.length===0?"No agents":"Starting…"),qe=t.length+a.length>1;return g.jsxs("div",{className:we.toolbar,children:[g.jsxs("div",{className:we.agentSection,ref:P,children:[g.jsxs("button",{className:`${we.agentPicker} ${qe?we.clickable:""}`,onClick:qe?()=>k(ce=>!ce):void 0,disabled:!qe,title:qe?"Switch agent":void 0,"data-testid":"agent-selector",children:[g.jsx("span",{className:we.agentLabel,children:"Chat with"}),g.jsx("span",{className:we.agentName,"data-testid":"agent-status",children:xe}),u&&g.jsx("span",{className:we.starting,children:"starting…"}),qe&&g.jsx(wa,{size:14,className:we.chevron})]}),O&&g.jsxs("div",{className:we.dropdown,"data-testid":"agent-dropdown",children:[t.map(ce=>{const ut=oe.get(ce.name),Lt=ce.name===r&&!o,tn=wS(ce.name,r,u,c,oe);return g.jsxs("button",{className:`${we.dropdownItem} ${Lt?we.active:""} ${ut?we.hasError:""}`,onClick:()=>Se(ce.name),disabled:!!ut||u,title:ut??void 0,"data-testid":`agent-option-${ce.name}`,children:[g.jsx("span",{className:we.dropdownName,children:ce.name}),g.jsx("span",{className:`${we.statusBadge} ${we[`status_${tn}`]}`,children:jS[tn]}),g.jsx("span",{className:we.dropdownMeta,children:ce.buildType}),ce.protocol&&g.jsx("span",{className:we.dropdownMeta,children:ce.protocol})]},ce.name)}),a.length>0&&t.length>0&&g.jsx("div",{className:we.dropdownSeparator}),a.map(ce=>{const ut=ce.name===o;return g.jsxs("button",{className:`${we.dropdownItem} ${ut?we.active:""}`,onClick:()=>E(ce.name),disabled:u,children:[g.jsx("span",{className:we.dropdownName,children:ce.name}),g.jsx("span",{className:`${we.statusBadge} ${we.status_deployed}`,children:"Deployed"}),g.jsx("span",{className:we.dropdownMeta,children:"Harness"})]},`harness-${ce.name}`)})]})]}),o?g.jsx("span",{className:we.targetBadge,children:"Deployed"}):x&&N?g.jsxs("div",{className:we.targetToggle,children:[g.jsx("button",{className:`${we.targetOption} ${b==="local"?we.targetOptionActive:""}`,onClick:()=>G("local"),children:"Local"}),g.jsx("button",{className:`${we.targetOption} ${b==="deployed"?we.targetOptionActive:""}`,onClick:()=>G("deployed"),children:"Deployed"})]}):r?g.jsx(Ci,{content:"This agent is not deployed. Run 'agentcore deploy' to deploy your project resources in your AWS account.",align:"left",children:g.jsx("span",{className:we.targetBadge,children:"Local only"})}):null,g.jsxs("div",{className:we.rightSection,children:[h&&g.jsx("span",{className:we.errorText,children:h}),M?g.jsx(Ci,{content:ne,variant:"error",forceShow:!!ne,children:g.jsxs("div",{className:we.sessionIdForm,children:[g.jsx("input",{ref:U,className:we.sessionIdInput,type:"text",placeholder:"Paste session ID…",value:le,onChange:ce=>{pe(ce.target.value),Z(null)},onKeyDown:ce=>{ce.key==="Escape"?(ae(!1),pe(""),Z(null)):ce.key==="Enter"&&X()}}),g.jsx("button",{className:we.sessionIdConfirmBtn,onClick:X,title:"Confirm",children:g.jsx(Gf,{size:12})}),g.jsx("button",{className:we.sessionIdCancelBtn,onClick:()=>{ae(!1),pe(""),Z(null)},title:"Cancel",children:g.jsx(Li,{size:12})})]})}):m?g.jsxs(g.Fragment,{children:[g.jsx(Ci,{content:de?"Copied!":`${m} (click to copy)`,align:"right",children:g.jsxs("button",{className:we.sessionBadge,onClick:ue,children:["session: ",m.length>12?m.slice(0,12)+"…":m,de?g.jsx(Gf,{size:10}):g.jsx(a_,{size:10})]})}),L&&g.jsx(Ci,{content:"Edit session ID",align:"right",children:g.jsx("button",{className:we.sessionEditBtn,onClick:()=>{pe(m??""),ae(!0),setTimeout(()=>{var ce;return(ce=U.current)==null?void 0:ce.select()},0)},"aria-label":"Edit session ID",children:g.jsx(qx,{size:10})})})]}):L?g.jsx(Ci,{content:"Use specific session ID for conversation continuity",align:"right",children:g.jsx("button",{className:we.sessionSetBtn,onClick:()=>{ae(!0),setTimeout(()=>{var ce;return(ce=U.current)==null?void 0:ce.focus()},0)},children:"Set session ID…"})}):null,m&&!M&&g.jsx(Ci,{content:"New session",align:"right",children:g.jsx("button",{className:we.newSessionBtn,onClick:_,"aria-label":"Start new session",children:g.jsx(Yx,{size:12})})})]}),C&&g.jsx("div",{className:we.confirmOverlay,onClick:te,children:g.jsxs("div",{className:we.confirmModal,onClick:ce=>ce.stopPropagation(),children:[g.jsx("div",{className:we.confirmTitle,children:B?"Switch target?":"Switch agent?"}),g.jsxs("div",{className:we.confirmMessage,children:["Switching to ",g.jsx("strong",{children:C})," will clear your current conversation history."]}),g.jsxs("div",{className:we.confirmActions,children:[g.jsx("button",{className:we.confirmBtn,onClick:te,children:"Cancel"}),g.jsx("button",{className:`${we.confirmBtn} ${we.confirmBtnPrimary}`,onClick:T,children:"Switch"})]})]})})]})}const MS="_field_lhobl_1",RS="_label_lhobl_8",OS="_description_lhobl_14",DS="_hint_lhobl_20",LS="_optional_lhobl_25",Rr={field:MS,label:RS,description:OS,hint:DS,optional:LS};function Ml({label:t,description:a,hint:i,optional:r,children:o}){return g.jsxs("div",{className:Rr.field,children:[g.jsxs("label",{className:Rr.label,children:[t,r&&g.jsx("span",{className:Rr.optional,children:" - optional"})]}),a&&g.jsx("span",{className:Rr.description,children:a}),i&&g.jsx("span",{className:Rr.hint,children:i}),o]})}function BS(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 US="_fields_7g8cg_1",IS="_sectionLabel_7g8cg_8",HS="_modelRow_7g8cg_17",qS="_input_7g8cg_22",VS="_select_7g8cg_23",GS="_textarea_7g8cg_45",$S="_toolList_7g8cg_60",ZS="_toolItem_7g8cg_66",YS="_toolName_7g8cg_75",XS="_emptyTools_7g8cg_79",Ht={fields:US,sectionLabel:IS,modelRow:HS,input:qS,select:VS,textarea:GS,toolList:$S,toolItem:ZS,toolName:YS,emptyTools:XS},FS=t=>t==="openai"||t==="gemini";function QS({overrides:t,onChange:a,tools:i=[]}){const{provider:r,id:o,credentialArn:u}=BS(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(Zo,{title:"Harness Settings",defaultCollapsed:!0,children:g.jsxs("div",{className:Ht.fields,children:[g.jsxs(Ml,{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)})]}),FS(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(Ml,{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(Ml,{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(Ml,{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(Ml,{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(Ml,{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(Ml,{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 KS="_header_lggp3_1",JS="_title_lggp3_11",PS="_badge_lggp3_16",WS="_ready_lggp3_24",ek="_error_lggp3_29",tk="_rightGroup_lggp3_34",nk="_iconBtn_lggp3_41",ak="_iconBtnActive_lggp3_61",ea={header:KS,title:JS,badge:PS,ready:WS,error:ek,rightGroup:tk,iconBtn:nk,iconBtnActive:ak};function lk({isConnected:t,hasConnected:a,hasError:i,onToggleResources:r,isResourcesOpen:o}){return g.jsxs("header",{className:ea.header,children:[g.jsx("div",{className:ea.title,children:"AgentCore agent inspector"}),g.jsx("div",{className:`${ea.badge} ${i?ea.error:t?ea.ready:a?ea.error:""}`,children:i?"Error":t?"Connected":a?"Disconnected":"Connecting"}),g.jsxs("div",{className:ea.rightGroup,children:[g.jsx("a",{className:ea.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(cx,{size:14})}),r&&g.jsx("button",{className:`${ea.iconBtn} ${o?ea.iconBtnActive:""}`,onClick:r,title:"Toggle resources","aria-label":"Toggle resource panel",children:g.jsx(Ox,{size:14})})]})]})}const ik="_errorMessage_1up60_1",rk="_truncated_1up60_7",sk="_full_1up60_12",ok="_toggle_1up60_17",yo={errorMessage:ik,truncated:rk,full:sk,toggle:ok},Zg=300;function $f({content:t}){const[a,i]=R.useState(!1),r=t.length>Zg;return g.jsxs("div",{className:yo.errorMessage,children:[g.jsx("span",{className:a||!r?yo.full:yo.truncated,children:a||!r?t:t.slice(0,Zg)+"…"}),r&&g.jsx("button",{className:yo.toggle,onClick:()=>i(o=>!o),children:a?"Show less":"Show more"})]})}const uk="_root_1x2ve_1",ck="_pill_1x2ve_5",fk="_cards_1x2ve_18",dk="_card_1x2ve_18",hk="_cardError_1x2ve_33",mk="_cardHeader_1x2ve_37",pk="_toolIcon_1x2ve_43",gk="_errorIcon_1x2ve_48",yk="_toolName_1x2ve_53",_k="_preview_1x2ve_60",vk="_spinner_1x2ve_70",xk="_toggle_1x2ve_84",bk="_json_1x2ve_100",Sk="_jsonError_1x2ve_115",Ft={root:uk,pill:ck,cards:fk,card:dk,cardError:hk,cardHeader:mk,toolIcon:pk,errorIcon:gk,toolName:yk,preview:_k,spinner:vk,toggle:xk,json:bk,jsonError:Sk};function Yg(t){if(!t)return null;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function kk(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 Tk({tool:t}){const[a,i]=R.useState(!1),[r,o]=R.useState(!1),u=t.resultStatus==="error",c=t.serverName?`${t.serverName}/${t.toolName}`:t.toolName,h=kk(t.input),m=Yg(t.input),p=Yg(t.result);return g.jsxs("div",{className:`${Ft.card} ${u?Ft.cardError:""}`,children:[g.jsxs("div",{className:Ft.cardHeader,children:[u?g.jsx(yx,{size:12,className:Ft.errorIcon}):g.jsx(za,{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(l_,{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(wa,{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(wa,{size:12}):g.jsx(cl,{size:12}),"Result"]}),r&&g.jsx("pre",{className:`${Ft.json} ${u?Ft.jsonError:""}`,children:p})]})]})}function Nk({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(za,{size:12}),a.length," tool",a.length===1?"":"s"," used"]}),g.jsx("div",{className:Ft.cards,children:a.map(([i,r])=>g.jsx(Tk,{tool:r},i))})]})}function Ek(t,a){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const Ck=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ak=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wk={};function Xg(t,a){return(wk.jsx?Ak:Ck).test(t)}const jk=/[ \t\n\f\r]/g;function zk(t){return typeof t=="object"?t.type==="text"?Fg(t.value):!1:Fg(t)}function Fg(t){return t.replace(jk,"")===""}class Fr{constructor(a,i,r){this.normal=i,this.property=a,r&&(this.space=r)}}Fr.prototype.normal={};Fr.prototype.property={};Fr.prototype.space=void 0;function r_(t,a){const i={},r={};for(const o of t)Object.assign(i,o.property),Object.assign(r,o.normal);return new Fr(i,r,a)}function Zf(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 Mk=0;const Ie=Il(),zt=Il(),Yf=Il(),se=Il(),yt=Il(),Mi=Il(),Sn=Il();function Il(){return 2**++Mk}const Xf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:zt,commaOrSpaceSeparated:Sn,commaSeparated:Mi,number:se,overloadedBoolean:Yf,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),bf=Object.keys(Xf);class pd extends hn{constructor(a,i,r,o){let u=-1;if(super(a,i),Qg(this,"space",o),typeof r=="number")for(;++u<bf.length;){const c=bf[u];Qg(this,bf[u],(r&Xf[c])===Xf[c])}}}pd.prototype.defined=!0;function Qg(t,a,i){i&&(t[a]=i)}function Bi(t){const a={},i={};for(const[r,o]of Object.entries(t.properties)){const u=new pd(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),a[r]=u,i[Zf(r)]=r,i[Zf(u.attribute)]=r}return new Fr(a,i,t.space)}const s_=Bi({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:se,ariaColIndex:se,ariaColSpan:se,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:se,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:se,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:yt,ariaRowCount:se,ariaRowIndex:se,ariaRowSpan:se,ariaSelected:zt,ariaSetSize:se,ariaSort:null,ariaValueMax:se,ariaValueMin:se,ariaValueNow:se,ariaValueText:null,role:null},transform(t,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()}});function o_(t,a){return a in t?t[a]:a}function u_(t,a){return o_(t,a.toLowerCase())}const Rk=Bi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Mi,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:yt,autoFocus:Ie,autoPlay:Ie,blocking:yt,capture:null,charSet:null,checked:Ie,cite:null,className:yt,cols:se,colSpan:null,content:null,contentEditable:zt,controls:Ie,controlsList:yt,coords:se|Mi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:Yf,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:yt,height:se,hidden:Yf,high:se,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:yt,itemRef:yt,itemScope:Ie,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:se,manifest:null,max:null,maxLength:se,media:null,method:null,min:null,minLength:se,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,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:Ie,optimum:se,pattern:null,ping:yt,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:yt,required:Ie,reversed:Ie,rows:se,rowSpan:se,sandbox:yt,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:se,sizes:null,slot:null,span:se,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:se,step:null,style:null,tabIndex:se,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:zt,width:se,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:se,borderColor:null,bottomMargin:se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:se,leftMargin:se,link:null,longDesc:null,lowSrc:null,marginHeight:se,marginWidth:se,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:se,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:se,security:null,unselectable:null},space:"html",transform:u_}),Ok=Bi({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:se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:se,amplitude:se,arabicForm:null,ascent:se,attributeName:null,attributeType:null,azimuth:se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:se,by:null,calcMode:null,capHeight:se,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:se,diffuseConstant:se,direction:null,display:null,dur:null,divisor:se,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:se,enableBackground:null,end:null,event:null,exponent:se,externalResourcesRequired:null,fill:null,fillOpacity:se,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:Mi,g2:Mi,glyphName:Mi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:se,horizOriginX:se,horizOriginY:se,id:null,ideographic:se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:se,k:se,k1:se,k2:se,k3:se,k4:se,kernelMatrix:Sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:se,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:se,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:se,overlineThickness:se,paintOrder:null,panose1:null,path:null,pathLength:se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:se,pointsAtY:se,pointsAtZ:se,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:se,specularExponent:se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:se,strikethroughThickness:se,string:null,stroke:null,strokeDashArray:Sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:se,strokeOpacity:se,strokeWidth:null,style:null,surfaceScale:se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Sn,tabIndex:se,tableValues:null,target:null,targetX:se,targetY:se,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:se,underlineThickness:se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:se,values:null,vAlphabetic:se,vMathematical:se,vectorEffect:null,vHanging:se,vIdeographic:se,version:null,vertAdvY:se,vertOriginX:se,vertOriginY:se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:o_}),c_=Bi({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()}}),f_=Bi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:u_}),d_=Bi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,a){return"xml:"+a.slice(3).toLowerCase()}}),Dk={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"},Lk=/[A-Z]/g,Kg=/-[a-z]/g,Bk=/^data[-\w.:]+$/i;function Uk(t,a){const i=Zf(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"&&Bk.test(a)){if(a.charAt(4)==="-"){const u=a.slice(5).replace(Kg,Hk);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=a.slice(4);if(!Kg.test(u)){let c=u.replace(Lk,Ik);c.charAt(0)!=="-"&&(c="-"+c),a="data"+c}}o=pd}return new o(r,a)}function Ik(t){return"-"+t.toLowerCase()}function Hk(t){return t.charAt(1).toUpperCase()}const qk=r_([s_,Rk,c_,f_,d_],"html"),gd=r_([s_,Ok,c_,f_,d_],"svg");function Vk(t){return t.join(" ").trim()}var Ai={},Sf,Jg;function Gk(){if(Jg)return Sf;Jg=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=`
|
|
245
|
-
`,p="/",y="*",_="",x="comment",b="declaration";function N(O,k){if(typeof O!="string")throw new TypeError("First argument must be a string");if(!O)return[];k=k||{};var z=1,w=1;function Q(ne){var Z=ne.match(a);Z&&(z+=Z.length);var U=ne.lastIndexOf(m);w=~U?ne.length-U:w+ne.length}function $(){var ne={line:z,column:w};return function(Z){return Z.position=new B(ne),he(),Z}}function B(ne){this.start=ne,this.end={line:z,column:w},this.source=k.source}B.prototype.content=O;function J(ne){var Z=new Error(k.source+":"+z+":"+w+": "+ne);if(Z.reason=ne,Z.filename=k.source,Z.line=z,Z.column=w,Z.source=O,!k.silent)throw Z}function de(ne){var Z=ne.exec(O);if(Z){var U=Z[0];return Q(U),O=O.slice(U.length),Z}}function he(){de(i)}function M(ne){var Z;for(ne=ne||[];Z=ae();)Z!==!1&&ne.push(Z);return ne}function ae(){var ne=$();if(!(p!=O.charAt(0)||y!=O.charAt(1))){for(var Z=2;_!=O.charAt(Z)&&(y!=O.charAt(Z)||p!=O.charAt(Z+1));)++Z;if(Z+=2,_===O.charAt(Z-1))return J("End of comment missing");var U=O.slice(2,Z-2);return w+=2,Q(U),O=O.slice(Z),w+=2,ne({type:x,comment:U})}}function le(){var ne=$(),Z=de(r);if(Z){if(ae(),!de(o))return J("property missing ':'");var U=de(u),P=ne({type:b,property:L(Z[0].replace(t,_)),value:U?L(U[0].replace(t,_)):_});return de(c),P}}function pe(){var ne=[];M(ne);for(var Z;Z=le();)Z!==!1&&(ne.push(Z),M(ne));return ne}return he(),pe()}function L(O){return O?O.replace(h,_):_}return Sf=N,Sf}var Pg;function $k(){if(Pg)return Ai;Pg=1;var t=Ai&&Ai.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ai,"__esModule",{value:!0}),Ai.default=i;const a=t(Gk());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 Ai}var Or={},Wg;function Zk(){if(Wg)return Or;Wg=1,Object.defineProperty(Or,"__esModule",{value:!0}),Or.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 Or.camelCase=m,Or}var Dr,ey;function Yk(){if(ey)return Dr;ey=1;var t=Dr&&Dr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},a=t($k()),i=Zk();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,Dr=r,Dr}var Xk=Yk();const Fk=$o(Xk),h_=m_("end"),yd=m_("start");function m_(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 Qk(t){const a=yd(t),i=h_(t);if(a&&i)return{start:a,end:i}}function Hr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?ty(t.position):"start"in t||"end"in t?ty(t):"line"in t||"column"in t?Ff(t):""}function Ff(t){return ny(t&&t.line)+":"+ny(t&&t.column)}function ty(t){return Ff(t&&t.start)+"-"+Ff(t&&t.end)}function ny(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=Hr(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 _d={}.hasOwnProperty,Kk=new Map,Jk=/[A-Z]/g,Pk=new Set(["table","tbody","thead","tfoot","tr"]),Wk=new Set(["td","th"]),p_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function e2(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=o2(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=s2(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"?gd:qk,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},u=g_(o,t,void 0);return u&&typeof u!="string"?u:o.create(t,o.Fragment,{children:u||void 0},void 0)}function g_(t,a,i){if(a.type==="element")return t2(t,a,i);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return n2(t,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return l2(t,a,i);if(a.type==="mdxjsEsm")return a2(t,a);if(a.type==="root")return i2(t,a,i);if(a.type==="text")return r2(t,a)}function t2(t,a,i){const r=t.schema;let o=r;a.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=gd,t.schema=o),t.ancestors.push(a);const u=__(t,a.tagName,!1),c=u2(t,a);let h=xd(t,a);return Pk.has(a.tagName)&&(h=h.filter(function(m){return typeof m=="string"?!zk(m):!0})),y_(t,c,u,a),vd(c,h),t.ancestors.pop(),t.schema=r,t.create(a,u,c,i)}function n2(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)}Gr(t,a.position)}function a2(t,a){if(a.data&&a.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(a.data.estree);Gr(t,a.position)}function l2(t,a,i){const r=t.schema;let o=r;a.name==="svg"&&r.space==="html"&&(o=gd,t.schema=o),t.ancestors.push(a);const u=a.name===null?t.Fragment:__(t,a.name,!0),c=c2(t,a),h=xd(t,a);return y_(t,c,u,a),vd(c,h),t.ancestors.pop(),t.schema=r,t.create(a,u,c,i)}function i2(t,a,i){const r={};return vd(r,xd(t,a)),t.create(a,t.Fragment,r,i)}function r2(t,a){return a.value}function y_(t,a,i,r){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(a.node=r)}function vd(t,a){if(a.length>0){const i=a.length>1?a:a[0];i&&(t.children=i)}}function s2(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 o2(t,a){return i;function i(r,o,u,c){const h=Array.isArray(u.children),m=yd(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 u2(t,a){const i={};let r,o;for(o in a.properties)if(o!=="children"&&_d.call(a.properties,o)){const u=f2(t,o,a.properties[o]);if(u){const[c,h]=u;t.tableCellAlignToStyle&&c==="align"&&typeof h=="string"&&Wk.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 c2(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 Gr(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 Gr(t,a.position);else u=r.value===null?!0:r.value;i[o]=u}return i}function xd(t,a){const i=[];let r=-1;const o=t.passKeys?new Map:Kk;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=g_(t,u,c);h!==void 0&&i.push(h)}return i}function f2(t,a,i){const r=Uk(t.schema,a);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?Ek(i):Vk(i)),r.property==="style"){let o=typeof i=="object"?i:d2(t,String(i));return t.stylePropertyNameCase==="css"&&(o=h2(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&r.space?Dk[r.property]||r.property:r.attribute,i]}}function d2(t,a){try{return Fk(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=p_+"#cannot-parse-style-attribute",o}}function __(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=Xg(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=Xg(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(r.type==="Literal"){const o=r.value;return _d.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(r);Gr(t)}function Gr(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=p_+"#cannot-handle-mdx-estrees-without-createevaluater",i}function h2(t){const a={};let i;for(i in t)_d.call(t,i)&&(a[m2(i)]=t[i]);return a}function m2(t){let a=t.replace(Jk,p2);return a.slice(0,3)==="ms-"&&(a="-"+a),a}function p2(t){return"-"+t.toLowerCase()}const kf={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"]},g2={};function bd(t,a){const i=g2,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,o=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return v_(t,r,o)}function v_(t,a,i){if(y2(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 ay(t.children,a,i)}return Array.isArray(t)?ay(t,a,i):""}function ay(t,a,i){const r=[];let o=-1;for(;++o<t.length;)r[o]=v_(t[o],a,i);return r.join("")}function y2(t){return!!(t&&typeof t=="object")}const ly=document.createElement("i");function Sd(t){const a="&"+t+";";ly.innerHTML=a;const i=ly.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 Hn(t,a){return t.length>0?(Tn(t,t.length,0,a),t):a}const iy={}.hasOwnProperty;function x_(t){const a={};let i=-1;for(;++i<t.length;)_2(a,t[i]);return a}function _2(t,a){let i;for(i in a){const o=(iy.call(t,i)?t[i]:void 0)||(t[i]={}),u=a[i];let c;if(u)for(c in u){iy.call(o,c)||(o[c]=[]);const h=u[c];v2(o[c],Array.isArray(h)?h:h?[h]:[])}}}function v2(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 b_(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 Fn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wt=dl(/[A-Za-z]/),Qt=dl(/[\dA-Za-z]/),x2=dl(/[#-'*+\--9=?A-Z^-~]/);function wo(t){return t!==null&&(t<32||t===127)}const Qf=dl(/\d/),b2=dl(/[\dA-Fa-f]/),S2=dl(/[!-/:-@[-`{-~]/);function Ce(t){return t!==null&&t<-2}function pt(t){return t!==null&&(t<0||t===32)}function $e(t){return t===-2||t===-1||t===32}const Yo=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 Ui(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 Ke(t,a,i,r){const o=r?r-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(m){return $e(m)?(t.enter(i),h(m)):a(m)}function h(m){return $e(m)&&u++<o?(t.consume(m),h):(t.exit(i),a(m))}}const k2={tokenize:T2};function T2(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"),Ke(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 Ce(h)?(t.consume(h),t.exit("chunkText"),u):(t.consume(h),c)}}const N2={tokenize:E2},ry={tokenize:C2};function E2(t){const a=this,i=[];let r=0,o,u,c;return h;function h(w){if(r<i.length){const Q=i[r];return a.containerState=Q[1],t.attempt(Q[0].continuation,m,p)(w)}return p(w)}function m(w){if(r++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,o&&z();const Q=a.events.length;let $=Q,B;for(;$--;)if(a.events[$][0]==="exit"&&a.events[$][1].type==="chunkFlow"){B=a.events[$][1].end;break}k(r);let J=Q;for(;J<a.events.length;)a.events[J][1].end={...B},J++;return Tn(a.events,$+1,0,a.events.slice(Q)),a.events.length=J,p(w)}return h(w)}function p(w){if(r===i.length){if(!o)return x(w);if(o.currentConstruct&&o.currentConstruct.concrete)return N(w);a.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return a.containerState={},t.check(ry,y,_)(w)}function y(w){return o&&z(),k(r),x(w)}function _(w){return a.parser.lazy[a.now().line]=r!==i.length,c=a.now().offset,N(w)}function x(w){return a.containerState={},t.attempt(ry,b,N)(w)}function b(w){return r++,i.push([a.currentConstruct,a.containerState]),x(w)}function N(w){if(w===null){o&&z(),k(0),t.consume(w);return}return o=o||a.parser.flow(a.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),L(w)}function L(w){if(w===null){O(t.exit("chunkFlow"),!0),k(0),t.consume(w);return}return Ce(w)?(t.consume(w),O(t.exit("chunkFlow")),r=0,a.interrupt=void 0,h):(t.consume(w),L)}function O(w,Q){const $=a.sliceStream(w);if(Q&&$.push(null),w.previous=u,u&&(u.next=w),u=w,o.defineSkip(w.start),o.write($),a.parser.lazy[w.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<c&&(!o.events[B][1].end||o.events[B][1].end.offset>c))return;const J=a.events.length;let de=J,he,M;for(;de--;)if(a.events[de][0]==="exit"&&a.events[de][1].type==="chunkFlow"){if(he){M=a.events[de][1].end;break}he=!0}for(k(r),B=J;B<a.events.length;)a.events[B][1].end={...M},B++;Tn(a.events,de+1,0,a.events.slice(J)),a.events.length=B}}function k(w){let Q=i.length;for(;Q-- >w;){const $=i[Q];a.containerState=$[1],$[0].exit.call(a,t)}i.length=w}function z(){o.write([null]),u=void 0,o=void 0,a.containerState._closeFlow=void 0}}function C2(t,a,i){return Ke(t,t.attempt(this.parser.constructs.document,a,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ri(t){if(t===null||pt(t)||Ol(t))return 1;if(Yo(t))return 2}function Xo(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 Kf={name:"attention",resolveAll:A2,tokenize:w2};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};sy(_,-m),sy(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=Hn(p,[["enter",t[r][1],a],["exit",t[r][1],a]])),p=Hn(p,[["enter",o,a],["enter",c,a],["exit",c,a],["enter",u,a]]),p=Hn(p,Xo(a.parser.constructs.insideSpan.null,t.slice(r+1,i),a)),p=Hn(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=Hn(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 w2(t,a){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ri(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=Ri(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 sy(t,a){t.column+=a,t.offset+=a,t._bufferIndex+=a}const j2={name:"autolink",tokenize:z2};function z2(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 Wt(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||wo(b)?i(b):(t.consume(b),m)}function p(b){return b===64?(t.consume(b),y):x2(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 Qr={partial:!0,tokenize:M2};function M2(t,a,i){return r;function r(u){return $e(u)?Ke(t,o,"linePrefix")(u):o(u)}function o(u){return u===null||Ce(u)?a(u):i(u)}}const S_={continuation:{tokenize:O2},exit:D2,name:"blockQuote",tokenize:R2};function R2(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 $e(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),a):(t.exit("blockQuotePrefix"),a(c))}}function O2(t,a,i){const r=this;return o;function o(c){return $e(c)?Ke(t,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return t.attempt(S_,a,i)(c)}}function D2(t){t.exit("blockQuote")}const k_={name:"characterEscape",tokenize:L2};function L2(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 S2(u)?(t.enter("characterEscapeValue"),t.consume(u),t.exit("characterEscapeValue"),t.exit("characterEscape"),a):i(u)}}const T_={name:"characterReference",tokenize:B2};function B2(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=b2,y):(t.enter("characterReferenceValue"),u=7,c=Qf,y(_))}function y(_){if(_===59&&o){const x=t.exit("characterReferenceValue");return c===Qt&&!Sd(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 oy={partial:!0,tokenize:I2},uy={concrete:!0,name:"codeFenced",tokenize:U2};function U2(t,a,i){const r=this,o={partial:!0,tokenize:$};let u=0,c=0,h;return m;function m(B){return p(B)}function p(B){const J=r.events[r.events.length-1];return u=J&&J[1].type==="linePrefix"?J[2].sliceSerialize(J[1],!0).length:0,h=B,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(B)}function y(B){return B===h?(c++,t.consume(B),y):c<3?i(B):(t.exit("codeFencedFenceSequence"),$e(B)?Ke(t,_,"whitespace")(B):_(B))}function _(B){return B===null||Ce(B)?(t.exit("codeFencedFence"),r.interrupt?a(B):t.check(oy,L,Q)(B)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),x(B))}function x(B){return B===null||Ce(B)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),_(B)):$e(B)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ke(t,b,"whitespace")(B)):B===96&&B===h?i(B):(t.consume(B),x)}function b(B){return B===null||Ce(B)?_(B):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),N(B))}function N(B){return B===null||Ce(B)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),_(B)):B===96&&B===h?i(B):(t.consume(B),N)}function L(B){return t.attempt(o,Q,O)(B)}function O(B){return t.enter("lineEnding"),t.consume(B),t.exit("lineEnding"),k}function k(B){return u>0&&$e(B)?Ke(t,z,"linePrefix",u+1)(B):z(B)}function z(B){return B===null||Ce(B)?t.check(oy,L,Q)(B):(t.enter("codeFlowValue"),w(B))}function w(B){return B===null||Ce(B)?(t.exit("codeFlowValue"),z(B)):(t.consume(B),w)}function Q(B){return t.exit("codeFenced"),a(B)}function $(B,J,de){let he=0;return M;function M(Z){return B.enter("lineEnding"),B.consume(Z),B.exit("lineEnding"),ae}function ae(Z){return B.enter("codeFencedFence"),$e(Z)?Ke(B,le,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):le(Z)}function le(Z){return Z===h?(B.enter("codeFencedFenceSequence"),pe(Z)):de(Z)}function pe(Z){return Z===h?(he++,B.consume(Z),pe):he>=c?(B.exit("codeFencedFenceSequence"),$e(Z)?Ke(B,ne,"whitespace")(Z):ne(Z)):de(Z)}function ne(Z){return Z===null||Ce(Z)?(B.exit("codeFencedFence"),J(Z)):de(Z)}}}function I2(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 Tf={name:"codeIndented",tokenize:q2},H2={partial:!0,tokenize:V2};function q2(t,a,i){const r=this;return o;function o(p){return t.enter("codeIndented"),Ke(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):Ce(p)?t.attempt(H2,c,m)(p):(t.enter("codeFlowValue"),h(p))}function h(p){return p===null||Ce(p)?(t.exit("codeFlowValue"),c(p)):(t.consume(p),h)}function m(p){return t.exit("codeIndented"),a(p)}}function V2(t,a,i){const r=this;return o;function o(c){return r.parser.lazy[r.now().line]?i(c):Ce(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):Ke(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):Ce(c)?o(c):i(c)}}const G2={name:"codeText",previous:Z2,resolve:$2,tokenize:Y2};function $2(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 Z2(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Y2(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(_)):Ce(_)?(t.enter("lineEnding"),t.consume(_),t.exit("lineEnding"),m):(t.enter("codeTextData"),p(_))}function p(_){return _===null||_===32||_===96||Ce(_)?(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 X2{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&&Lr(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),Lr(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),Lr(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);Lr(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-a,Number.POSITIVE_INFINITY);Lr(this.left,i.reverse())}}}function Lr(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 N_(t){const a={};let i=-1,r,o,u,c,h,m,p;const y=new X2(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,F2(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 F2(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,L=0;const O=[L];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&&(L=x+1,O.push(L),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):O.pop(),x=O.length;x--;){const k=h.slice(O[x],O[x+1]),z=u.pop();m.push([z,z+k.length-1]),t.splice(z,2,k)}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 Q2={resolve:J2,tokenize:P2},K2={partial:!0,tokenize:W2};function J2(t){return N_(t),t}function P2(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):Ce(h)?t.check(K2,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 W2(t,a,i){const r=this;return o;function o(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Ke(t,u,"linePrefix")}function u(c){if(c===null||Ce(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 E_(t,a,i,r,o,u,c,h,m){const p=m||Number.POSITIVE_INFINITY;let y=0;return _;function _(k){return k===60?(t.enter(r),t.enter(o),t.enter(u),t.consume(k),t.exit(u),x):k===null||k===32||k===41||wo(k)?i(k):(t.enter(r),t.enter(c),t.enter(h),t.enter("chunkString",{contentType:"string"}),L(k))}function x(k){return k===62?(t.enter(u),t.consume(k),t.exit(u),t.exit(o),t.exit(r),a):(t.enter(h),t.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===62?(t.exit("chunkString"),t.exit(h),x(k)):k===null||k===60||Ce(k)?i(k):(t.consume(k),k===92?N:b)}function N(k){return k===60||k===62||k===92?(t.consume(k),b):b(k)}function L(k){return!y&&(k===null||k===41||pt(k))?(t.exit("chunkString"),t.exit(h),t.exit(c),t.exit(r),a(k)):y<p&&k===40?(t.consume(k),y++,L):k===41?(t.consume(k),y--,L):k===null||k===32||k===40||wo(k)?i(k):(t.consume(k),k===92?O:L)}function O(k){return k===40||k===41||k===92?(t.consume(k),L):L(k)}}function C_(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):Ce(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||Ce(b)||h++>999?(t.exit("chunkString"),y(b)):(t.consume(b),m||(m=!$e(b)),b===92?x:_)}function x(b){return b===91||b===92||b===93?(t.consume(b),h++,_):_(b)}}function A_(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):Ce(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),Ke(t,p,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===c||x===null||Ce(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 qr(t,a){let i;return r;function r(o){return Ce(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),i=!0,r):$e(o)?Ke(t,r,i?"linePrefix":"lineSuffix")(o):a(o)}}const eT={name:"definition",tokenize:nT},tT={partial:!0,tokenize:aT};function nT(t,a,i){const r=this;let o;return u;function u(b){return t.enter("definition"),c(b)}function c(b){return C_.call(r,t,h,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function h(b){return o=Fn(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)?qr(t,p)(b):p(b)}function p(b){return E_(t,y,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function y(b){return t.attempt(tT,_,_)(b)}function _(b){return $e(b)?Ke(t,x,"whitespace")(b):x(b)}function x(b){return b===null||Ce(b)?(t.exit("definition"),r.parser.defined.push(o),a(b)):i(b)}}function aT(t,a,i){return r;function r(h){return pt(h)?qr(t,o)(h):i(h)}function o(h){return A_(t,u,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function u(h){return $e(h)?Ke(t,c,"whitespace")(h):c(h)}function c(h){return h===null||Ce(h)?a(h):i(h)}}const lT={name:"hardBreakEscape",tokenize:iT};function iT(t,a,i){return r;function r(u){return t.enter("hardBreakEscape"),t.consume(u),o}function o(u){return Ce(u)?(t.exit("hardBreakEscape"),a(u)):i(u)}}const rT={name:"headingAtx",resolve:sT,tokenize:oT};function sT(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 oT(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||Ce(y)?(t.exit("atxHeading"),a(y)):$e(y)?Ke(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 uT=["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"],cy=["pre","script","style","textarea"],cT={concrete:!0,name:"htmlFlow",resolveTo:hT,tokenize:mT},fT={partial:!0,tokenize:gT},dT={partial:!0,tokenize:pT};function hT(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 mT(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,L):T===63?(t.consume(T),o=3,r.interrupt?a:E):Wt(T)?(t.consume(T),c=String.fromCharCode(T),O):i(T)}function x(T){return T===45?(t.consume(T),o=2,b):T===91?(t.consume(T),o=5,h=0,N):Wt(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:le:N):i(T)}function L(T){return Wt(T)?(t.consume(T),c=String.fromCharCode(T),O):i(T)}function O(T){if(T===null||T===47||T===62||pt(T)){const te=T===47,ue=c.toLowerCase();return!te&&!u&&cy.includes(ue)?(o=1,r.interrupt?a(T):le(T)):uT.includes(c.toLowerCase())?(o=6,te?(t.consume(T),k):r.interrupt?a(T):le(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(T):u?z(T):w(T))}return T===45||Qt(T)?(t.consume(T),c+=String.fromCharCode(T),O):i(T)}function k(T){return T===62?(t.consume(T),r.interrupt?a:le):i(T)}function z(T){return $e(T)?(t.consume(T),z):M(T)}function w(T){return T===47?(t.consume(T),M):T===58||T===95||Wt(T)?(t.consume(T),Q):$e(T)?(t.consume(T),w):M(T)}function Q(T){return T===45||T===46||T===58||T===95||Qt(T)?(t.consume(T),Q):$(T)}function $(T){return T===61?(t.consume(T),B):$e(T)?(t.consume(T),$):w(T)}function B(T){return T===null||T===60||T===61||T===62||T===96?i(T):T===34||T===39?(t.consume(T),m=T,J):$e(T)?(t.consume(T),B):de(T)}function J(T){return T===m?(t.consume(T),m=null,he):T===null||Ce(T)?i(T):(t.consume(T),J)}function de(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||pt(T)?$(T):(t.consume(T),de)}function he(T){return T===47||T===62||$e(T)?w(T):i(T)}function M(T){return T===62?(t.consume(T),ae):i(T)}function ae(T){return T===null||Ce(T)?le(T):$e(T)?(t.consume(T),ae):i(T)}function le(T){return T===45&&o===2?(t.consume(T),U):T===60&&o===1?(t.consume(T),P):T===62&&o===4?(t.consume(T),C):T===63&&o===3?(t.consume(T),E):T===93&&o===5?(t.consume(T),Se):Ce(T)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(fT,G,pe)(T)):T===null||Ce(T)?(t.exit("htmlFlowData"),pe(T)):(t.consume(T),le)}function pe(T){return t.check(dT,ne,G)(T)}function ne(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),Z}function Z(T){return T===null||Ce(T)?pe(T):(t.enter("htmlFlowData"),le(T))}function U(T){return T===45?(t.consume(T),E):le(T)}function P(T){return T===47?(t.consume(T),c="",oe):le(T)}function oe(T){if(T===62){const te=c.toLowerCase();return cy.includes(te)?(t.consume(T),C):le(T)}return Wt(T)&&c.length<8?(t.consume(T),c+=String.fromCharCode(T),oe):le(T)}function Se(T){return T===93?(t.consume(T),E):le(T)}function E(T){return T===62?(t.consume(T),C):T===45&&o===2?(t.consume(T),E):le(T)}function C(T){return T===null||Ce(T)?(t.exit("htmlFlowData"),G(T)):(t.consume(T),C)}function G(T){return t.exit("htmlFlow"),a(T)}}function pT(t,a,i){const r=this;return o;function o(c){return Ce(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 gT(t,a,i){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(Qr,a,i)}}const yT={name:"htmlText",tokenize:_T};function _T(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),$):E===63?(t.consume(E),w):Wt(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):Wt(E)?(t.consume(E),z):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):Ce(E)?(c=_,P(E)):(t.consume(E),_)}function x(E){return E===45?(t.consume(E),b):_(E)}function b(E){return E===62?U(E):E===45?x(E):_(E)}function N(E){const C="CDATA[";return E===C.charCodeAt(u++)?(t.consume(E),u===C.length?L:N):i(E)}function L(E){return E===null?i(E):E===93?(t.consume(E),O):Ce(E)?(c=L,P(E)):(t.consume(E),L)}function O(E){return E===93?(t.consume(E),k):L(E)}function k(E){return E===62?U(E):E===93?(t.consume(E),k):L(E)}function z(E){return E===null||E===62?U(E):Ce(E)?(c=z,P(E)):(t.consume(E),z)}function w(E){return E===null?i(E):E===63?(t.consume(E),Q):Ce(E)?(c=w,P(E)):(t.consume(E),w)}function Q(E){return E===62?U(E):w(E)}function $(E){return Wt(E)?(t.consume(E),B):i(E)}function B(E){return E===45||Qt(E)?(t.consume(E),B):J(E)}function J(E){return Ce(E)?(c=J,P(E)):$e(E)?(t.consume(E),J):U(E)}function de(E){return E===45||Qt(E)?(t.consume(E),de):E===47||E===62||pt(E)?he(E):i(E)}function he(E){return E===47?(t.consume(E),U):E===58||E===95||Wt(E)?(t.consume(E),M):Ce(E)?(c=he,P(E)):$e(E)?(t.consume(E),he):U(E)}function M(E){return E===45||E===46||E===58||E===95||Qt(E)?(t.consume(E),M):ae(E)}function ae(E){return E===61?(t.consume(E),le):Ce(E)?(c=ae,P(E)):$e(E)?(t.consume(E),ae):he(E)}function le(E){return E===null||E===60||E===61||E===62||E===96?i(E):E===34||E===39?(t.consume(E),o=E,pe):Ce(E)?(c=le,P(E)):$e(E)?(t.consume(E),le):(t.consume(E),ne)}function pe(E){return E===o?(t.consume(E),o=void 0,Z):E===null?i(E):Ce(E)?(c=pe,P(E)):(t.consume(E),pe)}function ne(E){return E===null||E===34||E===39||E===60||E===61||E===96?i(E):E===47||E===62||pt(E)?he(E):(t.consume(E),ne)}function Z(E){return E===47||E===62||pt(E)?he(E):i(E)}function U(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),a):i(E)}function P(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),oe}function oe(E){return $e(E)?Ke(t,Se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Se(E)}function Se(E){return t.enter("htmlTextData"),c(E)}}const kd={name:"labelEnd",resolveAll:ST,resolveTo:kT,tokenize:TT},vT={tokenize:NT},xT={tokenize:ET},bT={tokenize:CT};function ST(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 kT(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=Hn(h,t.slice(u+1,u+r+3)),h=Hn(h,[["enter",y,a]]),h=Hn(h,Xo(a.parser.constructs.insideSpan.null,t.slice(u+r+4,c-3),a)),h=Hn(h,[["exit",y,a],t[c-2],t[c-1],["exit",p,a]]),h=Hn(h,t.slice(c+1)),h=Hn(h,[["exit",m,a]]),Tn(t,u,t.length,h),t}function TT(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(Fn(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(vT,y,c?y:_)(x):x===91?t.attempt(xT,y,c?p:_)(x):c?y(x):_(x)}function p(x){return t.attempt(bT,y,_)(x)}function y(x){return a(x)}function _(x){return u._balanced=!0,i(x)}}function NT(t,a,i){return r;function r(_){return t.enter("resource"),t.enter("resourceMarker"),t.consume(_),t.exit("resourceMarker"),o}function o(_){return pt(_)?qr(t,u)(_):u(_)}function u(_){return _===41?y(_):E_(t,c,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(_)}function c(_){return pt(_)?qr(t,m)(_):y(_)}function h(_){return i(_)}function m(_){return _===34||_===39||_===40?A_(t,p,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(_):y(_)}function p(_){return pt(_)?qr(t,y)(_):y(_)}function y(_){return _===41?(t.enter("resourceMarker"),t.consume(_),t.exit("resourceMarker"),t.exit("resource"),a):i(_)}}function ET(t,a,i){const r=this;return o;function o(h){return C_.call(r,t,u,c,"reference","referenceMarker","referenceString")(h)}function u(h){return r.parser.defined.includes(Fn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?a(h):i(h)}function c(h){return i(h)}}function CT(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:kd.resolveAll,tokenize:wT};function wT(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 jT={name:"labelStartLink",resolveAll:kd.resolveAll,tokenize:zT};function zT(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 Nf={name:"lineEnding",tokenize:MT};function MT(t,a){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Ke(t,a,"linePrefix")}}const No={name:"thematicBreak",tokenize:RT};function RT(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||Ce(p))?(t.exit("thematicBreak"),a(p)):i(p)}function m(p){return p===o?(t.consume(p),r++,m):(t.exit("thematicBreakSequence"),$e(p)?Ke(t,h,"whitespace")(p):h(p))}}const fn={continuation:{tokenize:BT},exit:IT,name:"list",tokenize:LT},OT={partial:!0,tokenize:HT},DT={partial:!0,tokenize:UT};function LT(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:Qf(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(No,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 Qf(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(Qr,r.interrupt?i:y,t.attempt(OT,x,_))}function y(b){return r.containerState.initialBlankLine=!0,u++,x(b)}function _(b){return $e(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 BT(t,a,i){const r=this;return r.containerState._closeFlow=void 0,t.check(Qr,o,u);function o(h){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ke(t,a,"listItemIndent",r.containerState.size+1)(h)}function u(h){return r.containerState.furtherBlankLines||!$e(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(DT,a,c)(h))}function c(h){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ke(t,t.attempt(fn,a,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function UT(t,a,i){const r=this;return Ke(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 IT(t){t.exit(this.containerState.type)}function HT(t,a,i){const r=this;return Ke(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!$e(u)&&c&&c[1].type==="listItemPrefixWhitespace"?a(u):i(u)}}const fy={name:"setextUnderline",resolveTo:qT,tokenize:VT};function qT(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 VT(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"),$e(p)?Ke(t,m,"lineSuffix")(p):m(p))}function m(p){return p===null||Ce(p)?(t.exit("setextHeadingLine"),a(p)):i(p)}}const GT={tokenize:$T};function $T(t){const a=this,i=t.attempt(Qr,r,t.attempt(this.parser.constructs.flowInitial,o,Ke(t,t.attempt(this.parser.constructs.flow,o,t.attempt(Q2,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 ZT={resolveAll:j_()},YT=w_("string"),XT=w_("text");function w_(t){return{resolveAll:j_(t==="text"?FT: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 j_(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 FT(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 QT={42:fn,43:fn,45:fn,48:fn,49:fn,50:fn,51:fn,52:fn,53:fn,54:fn,55:fn,56:fn,57:fn,62:S_},KT={91:eT},JT={[-2]:Tf,[-1]:Tf,32:Tf},PT={35:rT,42:No,45:[fy,No],60:cT,61:fy,95:No,96:uy,126:uy},WT={38:T_,92:k_},eN={[-5]:Nf,[-4]:Nf,[-3]:Nf,33:AT,38:T_,42:Kf,60:[j2,yT],91:jT,92:[lT,k_],93:kd,95:Kf,96:G2},tN={null:[Kf,ZT]},nN={null:[42,95]},aN={null:[]},lN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:nN,contentInitial:KT,disable:aN,document:QT,flow:PT,flowInitial:JT,insideSpan:tN,string:WT,text:eN},Symbol.toStringTag,{value:"Module"}));function iN(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:J($),check:J(B),consume:z,enter:w,exit:Q,interrupt:J(B,{interrupt:!0})},p={code:null,containerState:{},defineSkip:L,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 _(ae){return c=Hn(c,ae),O(),c[c.length-1]!==null?[]:(de(a,0),p.events=Xo(u,p.events,p),p.events)}function x(ae,le){return sN(b(ae),le)}function b(ae){return rN(c,ae)}function N(){const{_bufferIndex:ae,_index:le,line:pe,column:ne,offset:Z}=r;return{_bufferIndex:ae,_index:le,line:pe,column:ne,offset:Z}}function L(ae){o[ae.line]=ae.column,M()}function O(){let ae;for(;r._index<c.length;){const le=c[r._index];if(typeof le=="string")for(ae=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ae&&r._bufferIndex<le.length;)k(le.charCodeAt(r._bufferIndex));else k(le)}}function k(ae){y=y(ae)}function z(ae){Ce(ae)?(r.line++,r.column=1,r.offset+=ae===-3?2:1,M()):ae!==-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=ae}function w(ae,le){const pe=le||{};return pe.type=ae,pe.start=N(),p.events.push(["enter",pe,p]),h.push(pe),pe}function Q(ae){const le=h.pop();return le.end=N(),p.events.push(["exit",le,p]),le}function $(ae,le){de(ae,le.from)}function B(ae,le){le.restore()}function J(ae,le){return pe;function pe(ne,Z,U){let P,oe,Se,E;return Array.isArray(ne)?G(ne):"tokenize"in ne?G([ne]):C(ne);function C(X){return xe;function xe(qe){const ce=qe!==null&&X[qe],ut=qe!==null&&X.null,Lt=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(ut)?ut:ut?[ut]:[]];return G(Lt)(qe)}}function G(X){return P=X,oe=0,X.length===0?U:T(X[oe])}function T(X){return xe;function xe(qe){return E=he(),Se=X,X.partial||(p.currentConstruct=X),X.name&&p.parser.constructs.disable.null.includes(X.name)?ue():X.tokenize.call(le?Object.assign(Object.create(p),le):p,m,te,ue)(qe)}}function te(X){return ae(Se,E),Z}function ue(X){return E.restore(),++oe<P.length?T(P[oe]):U}}}function de(ae,le){ae.resolveAll&&!u.includes(ae)&&u.push(ae),ae.resolve&&Tn(p.events,le,p.events.length-le,ae.resolve(p.events.slice(le),p)),ae.resolveTo&&(p.events=ae.resolveTo(p.events,p))}function he(){const ae=N(),le=p.previous,pe=p.currentConstruct,ne=p.events.length,Z=Array.from(h);return{from:ne,restore:U};function U(){r=ae,p.previous=le,p.currentConstruct=pe,p.events.length=ne,h=Z,M()}}function M(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function rN(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 sN(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=`
|
|
244
|
+
*/const ib=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Li=lt("x",ib);/**
|
|
245
|
+
* @license lucide-react v0.575.0 - ISC
|
|
246
|
+
*
|
|
247
|
+
* This source code is licensed under the ISC license.
|
|
248
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
+
*/const rb=[["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"}]],pd=lt("zap",rb),sb="_panel_1gqyj_1",ob="_resizeHandle_1gqyj_11",ub="_header_1gqyj_22",cb="_headerLeft_1gqyj_32",fb="_headerTitle_1gqyj_38",db="_headerActions_1gqyj_44",hb="_collapseToggle_1gqyj_50",mb="_iconBtn_1gqyj_66",pb="_spinning_1gqyj_86",gb="_status_1gqyj_98",yb="_body_1gqyj_103",Fn={panel:sb,resizeHandle:ob,header:ub,headerLeft:cb,headerTitle:fb,headerActions:db,collapseToggle:hb,iconBtn:mb,spinning:pb,status:gb,body:yb},_b=300,vb=150;function Yo({title:t,status:a,onRefresh:l,isRefreshing:r,titleExtra:o,defaultCollapsed:u=!1,defaultHeight:c=_b,children:d}){const[m,g]=R.useState(u),[_,y]=R.useState(c),x=R.useRef(u);R.useEffect(()=>{u!==x.current&&(x.current=u,g(u))},[u]);const b=R.useRef(null),N=R.useCallback(O=>{O.preventDefault();const D=O.clientY,k=_,M=K=>{const Y=D-K.clientY;y(Math.max(vb,k+Y))},j=()=>{b.current=null,document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",j),document.body.style.cursor="",document.body.style.userSelect=""};b.current={move:M,up:j},document.body.style.cursor="row-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",M),document.addEventListener("mouseup",j)},[_]);return R.useEffect(()=>()=>{b.current&&(document.removeEventListener("mousemove",b.current.move),document.removeEventListener("mouseup",b.current.up),document.body.style.cursor="",document.body.style.userSelect="")},[]),p.jsxs("div",{className:Fn.panel,style:{height:m?"auto":_},children:[!m&&p.jsx("div",{className:Fn.resizeHandle,onMouseDown:N,role:"separator","aria-label":"Resize panel"}),p.jsxs("div",{className:Fn.header,children:[p.jsxs("div",{className:Fn.headerLeft,children:[p.jsxs("button",{className:Fn.collapseToggle,onClick:()=>g(O=>!O),"aria-label":"Toggle panel",children:[m?p.jsx(dl,{size:14}):p.jsx(wa,{size:14}),p.jsx("span",{className:Fn.headerTitle,children:t}),o]}),a&&p.jsx("span",{className:Fn.status,children:a})]}),p.jsx("div",{className:Fn.headerActions,children:l&&p.jsx("button",{className:Fn.iconBtn,onClick:l,disabled:r,title:"Refresh","aria-label":`Refresh ${t}`,children:p.jsx(hd,{size:12,className:r?Fn.spinning:""})})})]}),!m&&p.jsx("div",{className:Fn.body,children:d})]})}const xb="_error_1di92_1",bb="_version_1di92_7",Sb="_body_1di92_13",kb="_cardName_1di92_17",Tb="_cardDesc_1di92_24",Nb="_section_1di92_30",Eb="_sectionLabel_1di92_34",Cb="_tags_1di92_43",Ab="_tag_1di92_43",jb="_skillList_1di92_58",wb="_skillItem_1di92_64",Mb="_skillName_1di92_73",zb="_skillDesc_1di92_80",Rb="_skillTags_1di92_85",Lt={error:xb,version:bb,body:Sb,cardName:kb,cardDesc:Tb,section:Nb,sectionLabel:Eb,tags:Cb,tag:Ab,skillList:jb,skillItem:wb,skillName:Mb,skillDesc:zb,skillTags:Rb};function Ob({card:t,isLoading:a,error:l,onRefresh:r}){var o,u,c;return!t&&!l&&!a?null:p.jsxs(Yo,{title:"A2A Agent Card",titleExtra:t!=null&&t.version?p.jsxs("span",{className:Lt.version,children:["v",t.version]}):void 0,onRefresh:r,isRefreshing:a,children:[l&&p.jsx("div",{className:Lt.error,children:l}),t&&p.jsxs("div",{className:Lt.body,children:[t.name&&p.jsx("div",{className:Lt.cardName,children:t.name}),t.description&&p.jsx("div",{className:Lt.cardDesc,children:t.description}),p.jsxs("div",{className:Lt.section,children:[p.jsx("div",{className:Lt.sectionLabel,children:"Capabilities"}),p.jsxs("div",{className:Lt.tags,children:[((o=t.capabilities)==null?void 0:o.streaming)&&p.jsx("span",{className:Lt.tag,children:"streaming"}),(u=t.defaultInputModes)==null?void 0:u.map(d=>p.jsxs("span",{className:Lt.tag,children:["input: ",d]},`in-${d}`)),(c=t.defaultOutputModes)==null?void 0:c.map(d=>p.jsxs("span",{className:Lt.tag,children:["output: ",d]},`out-${d}`))]})]}),t.skills&&t.skills.length>0&&p.jsxs("div",{className:Lt.section,children:[p.jsxs("div",{className:Lt.sectionLabel,children:["Skills (",t.skills.length,")"]}),p.jsx("div",{className:Lt.skillList,children:t.skills.map((d,m)=>p.jsxs("div",{className:Lt.skillItem,children:[p.jsx("span",{className:Lt.skillName,children:d.name??d.id??`Skill ${m+1}`}),d.description&&p.jsx("span",{className:Lt.skillDesc,children:d.description}),d.tags&&d.tags.length>0&&p.jsx("div",{className:Lt.skillTags,children:d.tags.map(g=>p.jsx("span",{className:Lt.tag,children:g},g))})]},d.id??m))})]})]})]})}const Db="_area_1u9gx_1",Lb="_row_1u9gx_8",Bb="_textarea_1u9gx_16",Ib="_sendBtn_1u9gx_45",go={area:Db,row:Lb,textarea:Bb,sendBtn:Ib};function Ub({isStreaming:t,isStarting:a,onSend:l}){const[r,o]=R.useState(""),u=R.useRef(null),c=R.useRef(!1),d=!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"},g=()=>{if(!d)return;const y=r.trim();o(""),u.current&&(u.current.style.height="auto"),l(y)},_=y=>{y.key==="Enter"&&!y.shiftKey&&!c.current&&(y.preventDefault(),g())};return p.jsx("div",{className:go.area,children:p.jsxs("div",{className:go.row,children:[p.jsx("textarea",{className:go.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"}),p.jsx("button",{className:go.sendBtn,onClick:g,disabled:!d,"aria-label":"Send message",children:p.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),p.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]})})}const Hb="_wrapper_1rkpz_1",qb="_tooltip_1rkpz_6",Vb="_align_center_1rkpz_18",Gb="_align_left_1rkpz_23",$b="_align_right_1rkpz_27",Zb="_info_1rkpz_31",Yb="_error_1rkpz_37",Fb="_warning_1rkpz_43",yo={wrapper:Hb,tooltip:qb,align_center:Vb,align_left:Gb,align_right:$b,info:Zb,error:Yb,warning:Fb};function cl({content:t,variant:a="info",align:l="center",forceShow:r,children:o}){const[u,c]=R.useState(!1),d=R.useRef(null),m=()=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>c(!0),300)},g=()=>{d.current&&clearTimeout(d.current),d.current=null,c(!1)};R.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]);const _=r??u;return p.jsxs("div",{className:yo.wrapper,onMouseEnter:m,onMouseLeave:g,children:[o,_&&t&&p.jsx("div",{className:`${yo.tooltip} ${yo[a]} ${yo[`align_${l}`]}`,children:t})]})}const Xb="_toolbar_1lwtu_1",Qb="_agentSection_1lwtu_11",Kb="_agentPicker_1lwtu_18",Jb="_clickable_1lwtu_30",Pb="_agentLabel_1lwtu_44",Wb="_agentName_1lwtu_49",eS="_starting_1lwtu_53",tS="_chevron_1lwtu_59",nS="_dropdown_1lwtu_64",aS="_dropdownItem_1lwtu_77",lS="_active_1lwtu_101",iS="_hasError_1lwtu_105",rS="_dropdownName_1lwtu_110",sS="_statusBadge_1lwtu_115",oS="_status_running_1lwtu_125",uS="_status_starting_1lwtu_130",cS="_status_error_1lwtu_135",fS="_status_idle_1lwtu_140",dS="_dropdownMeta_1lwtu_145",hS="_rightSection_1lwtu_150",mS="_errorText_1lwtu_157",pS="_sessionBadge_1lwtu_162",gS="_newSessionBtn_1lwtu_183",yS="_sessionEditBtn_1lwtu_201",_S="_sessionSetBtn_1lwtu_218",vS="_sessionIdForm_1lwtu_235",xS="_sessionIdInput_1lwtu_240",bS="_sessionIdConfirmBtn_1lwtu_252",SS="_sessionIdCancelBtn_1lwtu_253",kS="_confirmOverlay_1lwtu_282",TS="_confirmModal_1lwtu_292",NS="_confirmTitle_1lwtu_301",ES="_confirmMessage_1lwtu_308",CS="_confirmActions_1lwtu_315",AS="_confirmBtn_1lwtu_321",jS="_confirmBtnPrimary_1lwtu_336",wS="_dropdownSeparator_1lwtu_346",MS="_status_deployed_1lwtu_352",zS="_targetToggle_1lwtu_357",RS="_targetOption_1lwtu_365",OS="_targetOptionActive_1lwtu_376",DS="_targetBadge_1lwtu_386",ze={toolbar:Xb,agentSection:Qb,agentPicker:Kb,clickable:Jb,agentLabel:Pb,agentName:Wb,starting:eS,chevron:tS,dropdown:nS,dropdownItem:aS,active:lS,hasError:iS,dropdownName:rS,statusBadge:sS,status_running:oS,status_starting:uS,status_error:cS,status_idle:fS,dropdownMeta:dS,rightSection:hS,errorText:mS,sessionBadge:pS,newSessionBtn:gS,sessionEditBtn:yS,sessionSetBtn:_S,sessionIdForm:vS,sessionIdInput:xS,sessionIdConfirmBtn:bS,sessionIdCancelBtn:SS,confirmOverlay:kS,confirmModal:TS,confirmTitle:NS,confirmMessage:ES,confirmActions:CS,confirmBtn:AS,confirmBtnPrimary:jS,dropdownSeparator:wS,status_deployed:MS,targetToggle:zS,targetOption:RS,targetOptionActive:OS,targetBadge:DS};function LS(t,a,l,r,o){return o.has(t)?"error":t===a&&l?"starting":t===a&&r?"running":"idle"}const BS={running:"Running",starting:"Starting",error:"Error",idle:"Idle"};function IS({agents:t,harnesses:a,errors:l,selectedAgentName:r,selectedHarnessName:o,isStarting:u,isReady:c,startError:d,sessionId:m,onSelectAgent:g,onSelectHarness:_,onResetChat:y,isAgentDeployed:x,invocationTarget:b="local",onToggleTarget:N,onSetSessionId:O}){const[D,k]=R.useState(!1),[M,j]=R.useState(null),[K,Y]=R.useState(null),[I,U]=R.useState(null),[re,le]=R.useState(!1),[z,te]=R.useState(!1),[ae,ge]=R.useState(""),[ne,Z]=R.useState(null),B=R.useRef(null),W=R.useRef(null),ue=new Map(l.map(fe=>[fe.name,fe.message]));R.useEffect(()=>{if(!D)return;const fe=ct=>{W.current&&!W.current.contains(ct.target)&&k(!1)};return document.addEventListener("mousedown",fe),()=>document.removeEventListener("mousedown",fe)},[D]);const Ne=fe=>{k(!1),(fe!==r||o)&&(j(fe),Y(null))},E=fe=>{k(!1),fe!==o&&(Y(fe),j(null))},C=M??K??(I?I==="deployed"?"Deployed":"Local":null),$=fe=>{fe!==b&&U(fe)},T=()=>{if(I){N==null||N(I),U(null);return}M?(g(M),j(null)):K&&(_(K),Y(null))},J=()=>{j(null),Y(null),U(null)},me=()=>{m&&navigator.clipboard.writeText(m).then(()=>{le(!0),setTimeout(()=>le(!1),1500)}).catch(()=>{})},X=()=>{const fe=ae.trim();fe.length>=33?(O==null||O(fe),te(!1),ge(""),Z(null)):Z("Session ID must be at least 33 characters")},_e=o??r??(t.length===0&&a.length===0?"No agents":"Starting…"),He=t.length+a.length>1;return p.jsxs("div",{className:ze.toolbar,children:[p.jsxs("div",{className:ze.agentSection,ref:W,children:[p.jsxs("button",{className:`${ze.agentPicker} ${He?ze.clickable:""}`,onClick:He?()=>k(fe=>!fe):void 0,disabled:!He,title:He?"Switch agent":void 0,"data-testid":"agent-selector",children:[p.jsx("span",{className:ze.agentLabel,children:"Chat with"}),p.jsx("span",{className:ze.agentName,"data-testid":"agent-status",children:_e}),u&&p.jsx("span",{className:ze.starting,children:"starting…"}),He&&p.jsx(wa,{size:14,className:ze.chevron})]}),D&&p.jsxs("div",{className:ze.dropdown,"data-testid":"agent-dropdown",children:[t.map(fe=>{const ct=ue.get(fe.name),Bt=fe.name===r&&!o,an=LS(fe.name,r,u,c,ue);return p.jsxs("button",{className:`${ze.dropdownItem} ${Bt?ze.active:""} ${ct?ze.hasError:""}`,onClick:()=>Ne(fe.name),disabled:!!ct||u,title:ct??void 0,"data-testid":`agent-option-${fe.name}`,children:[p.jsx("span",{className:ze.dropdownName,children:fe.name}),p.jsx("span",{className:`${ze.statusBadge} ${ze[`status_${an}`]}`,children:BS[an]}),p.jsx("span",{className:ze.dropdownMeta,children:fe.buildType}),fe.protocol&&p.jsx("span",{className:ze.dropdownMeta,children:fe.protocol})]},fe.name)}),a.length>0&&t.length>0&&p.jsx("div",{className:ze.dropdownSeparator}),a.map(fe=>{const ct=fe.name===o;return p.jsxs("button",{className:`${ze.dropdownItem} ${ct?ze.active:""}`,onClick:()=>E(fe.name),disabled:u,children:[p.jsx("span",{className:ze.dropdownName,children:fe.name}),p.jsx("span",{className:`${ze.statusBadge} ${ze.status_deployed}`,children:"Deployed"}),p.jsx("span",{className:ze.dropdownMeta,children:"Harness"})]},`harness-${fe.name}`)})]})]}),o?p.jsx("span",{className:ze.targetBadge,children:"Deployed"}):x&&N?p.jsxs("div",{className:ze.targetToggle,children:[p.jsx("button",{className:`${ze.targetOption} ${b==="local"?ze.targetOptionActive:""}`,onClick:()=>$("local"),children:"Local"}),p.jsx("button",{className:`${ze.targetOption} ${b==="deployed"?ze.targetOptionActive:""}`,onClick:()=>$("deployed"),children:"Deployed"})]}):r?p.jsx(cl,{content:"This agent is not deployed. Run 'agentcore deploy' to deploy your project resources in your AWS account.",align:"left",children:p.jsx("span",{className:ze.targetBadge,children:"Local only"})}):null,p.jsxs("div",{className:ze.rightSection,children:[d&&p.jsx("span",{className:ze.errorText,children:d}),z?p.jsx(cl,{content:ne,variant:"error",forceShow:!!ne,children:p.jsxs("div",{className:ze.sessionIdForm,children:[p.jsx("input",{ref:B,className:ze.sessionIdInput,type:"text",placeholder:"Paste session ID…",value:ae,onChange:fe=>{ge(fe.target.value),Z(null)},onKeyDown:fe=>{fe.key==="Escape"?(te(!1),ge(""),Z(null)):fe.key==="Enter"&&X()}}),p.jsx("button",{className:ze.sessionIdConfirmBtn,onClick:X,title:"Confirm",children:p.jsx($f,{size:12})}),p.jsx("button",{className:ze.sessionIdCancelBtn,onClick:()=>{te(!1),ge(""),Z(null)},title:"Cancel",children:p.jsx(Li,{size:12})})]})}):m?p.jsxs(p.Fragment,{children:[p.jsx(cl,{content:re?"Copied!":`${m} (click to copy)`,align:"right",children:p.jsxs("button",{className:ze.sessionBadge,onClick:me,children:["session: ",m.length>12?m.slice(0,12)+"…":m,re?p.jsx($f,{size:10}):p.jsx(s_,{size:10})]})}),O&&p.jsx(cl,{content:"Edit session ID",align:"right",children:p.jsx("button",{className:ze.sessionEditBtn,onClick:()=>{ge(m??""),te(!0),setTimeout(()=>{var fe;return(fe=B.current)==null?void 0:fe.select()},0)},"aria-label":"Edit session ID",children:p.jsx(Xx,{size:10})})})]}):O?p.jsx(cl,{content:"Use specific session ID for conversation continuity",align:"right",children:p.jsx("button",{className:ze.sessionSetBtn,onClick:()=>{te(!0),setTimeout(()=>{var fe;return(fe=B.current)==null?void 0:fe.focus()},0)},children:"Set session ID…"})}):null,m&&!z&&p.jsx(cl,{content:"New session",align:"right",children:p.jsx("button",{className:ze.newSessionBtn,onClick:y,"aria-label":"Start new session",children:p.jsx(Wx,{size:12})})})]}),C&&p.jsx("div",{className:ze.confirmOverlay,onClick:J,children:p.jsxs("div",{className:ze.confirmModal,onClick:fe=>fe.stopPropagation(),children:[p.jsx("div",{className:ze.confirmTitle,children:I?"Switch target?":"Switch agent?"}),p.jsxs("div",{className:ze.confirmMessage,children:["Switching to ",p.jsx("strong",{children:C})," will clear your current conversation history."]}),p.jsxs("div",{className:ze.confirmActions,children:[p.jsx("button",{className:ze.confirmBtn,onClick:J,children:"Cancel"}),p.jsx("button",{className:`${ze.confirmBtn} ${ze.confirmBtnPrimary}`,onClick:T,children:"Switch"})]})]})})]})}const US="_field_1my5z_1",HS="_label_1my5z_8",qS="_description_1my5z_14",VS="_hint_1my5z_27",GS="_optional_1my5z_32",Or={field:US,label:HS,description:qS,hint:VS,optional:GS};function Kt({label:t,description:a,hint:l,optional:r,children:o}){return p.jsxs("div",{className:Or.field,children:[p.jsxs("label",{className:Or.label,children:[t,r&&p.jsx("span",{className:Or.optional,children:" - optional"})]}),a&&p.jsx("span",{className:Or.description,children:a}),o,l&&p.jsx("span",{className:Or.hint,children:l})]})}const $S="_infoIcon_4uj90_1",ZS={infoIcon:$S};function c_(){return p.jsx(qx,{size:14,className:ZS.infoIcon})}const YS="_sectionLabel_yyel0_1",FS={sectionLabel:YS};function Mi({children:t,tooltip:a}){return p.jsxs("div",{className:FS.sectionLabel,children:[p.jsx("span",{children:t}),a&&p.jsx(cl,{content:a,align:"left",children:p.jsx(c_,{})})]})}const XS="_fields_1sypp_1",QS="_input_1sypp_8",KS="_select_1sypp_9",JS="_selectSmall_1sypp_10",PS="_paramValue_1sypp_11",WS="_textarea_1sypp_12",ek="_fieldRow_1sypp_33",tk="_inputError_1sypp_50",nk="_radioGroup_1sypp_59",ak="_radioLabel_1sypp_65",lk="_skillRow_1sypp_74",ik="_skillHeader_1sypp_84",rk="_skillHint_1sypp_90",sk="_gitFields_1sypp_103",ok="_paramGrid_1sypp_109",uk="_validationError_1sypp_118",ck="_paramRow_1sypp_124",fk="_paramKey_1sypp_130",dk="_addBtn_1sypp_146",hk="_removeBtn_1sypp_161",mk="_toolList_1sypp_175",pk="_toolItem_1sypp_181",gk="_toolName_1sypp_190",yk="_emptyTools_1sypp_194",Ce={fields:XS,input:QS,select:KS,selectSmall:JS,paramValue:PS,textarea:WS,fieldRow:ek,inputError:tk,radioGroup:nk,radioLabel:ak,skillRow:lk,skillHeader:ik,skillHint:rk,gitFields:sk,paramGrid:ok,validationError:uk,paramRow:ck,paramKey:fk,addBtn:dk,removeBtn:hk,toolList:mk,toolItem:pk,toolName:gk,emptyTools:yk};function _k({params:t,availableParams:a,onAdd:l,onRemove:r,onUpdate:o}){const u=Object.entries(t);return p.jsxs(p.Fragment,{children:[p.jsx(Mi,{tooltip:"Pass custom configurations directly to the model's API to override or extend its default behavior.",children:"Additional parameters"}),u.map(([c,d])=>p.jsxs("div",{className:Ce.paramRow,children:[p.jsx("span",{className:Ce.paramKey,children:c}),p.jsx("input",{className:Ce.paramValue,placeholder:"Value",value:d,onChange:m=>o(c,m.target.value)}),p.jsx("button",{type:"button",className:Ce.removeBtn,onClick:()=>r(c),title:"Remove",children:"×"})]},c)),a.length>0&&p.jsxs("select",{className:Ce.selectSmall,value:"",onChange:c=>{c.target.value&&l(c.target.value)},children:[p.jsx("option",{value:"",children:"+ Add parameter"}),a.map(c=>p.jsx("option",{value:c,children:c},c))]})]})}function vk({derived:t,onFieldChange:a}){const l=t.temperature!==void 0&&(t.temperature<0||t.temperature>2),r=t.topP!==void 0&&(t.topP<0||t.topP>1),o=t.topK!==void 0&&(t.topK<0||t.topK>500),u=t.maxTokens!==void 0&&t.maxTokens<1;return p.jsxs(p.Fragment,{children:[p.jsx(Mi,{tooltip:"Configure how the model generates responses. These parameters are passed directly to the model provider.",children:"Inference parameters"}),p.jsxs("div",{className:Ce.paramGrid,children:[p.jsxs(Kt,{label:"Temperature",hint:"Available range: 0 – 2",description:p.jsxs(p.Fragment,{children:["The temperature value that controls randomness in the model's responses. Lower values produce more deterministic outputs."," ",p.jsx("a",{href:"https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_InferenceConfiguration.html",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})]}),children:[p.jsx("input",{className:`${Ce.input} ${l?Ce.inputError:""}`,type:"number",step:"0.1",value:t.temperature??"",onChange:c=>{const d=c.target.value;a({temperature:d?Number(d):void 0})}}),l&&p.jsx("span",{className:Ce.validationError,children:"Must be between 0 and 2"})]}),p.jsxs(Kt,{label:"Top P",hint:"Available range: 0 – 1",description:p.jsxs(p.Fragment,{children:["The top-p sampling parameter that controls the diversity of the model's responses by limiting the cumulative probability of token choices."," ",p.jsx("a",{href:"https://docs.aws.amazon.com/bedrock-agentcore-control/latest/APIReference/API_InferenceConfiguration.html",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})]}),children:[p.jsx("input",{className:`${Ce.input} ${r?Ce.inputError:""}`,type:"number",step:"0.01",value:t.topP??"",onChange:c=>{const d=c.target.value;a({topP:d?Number(d):void 0})}}),r&&p.jsx("span",{className:Ce.validationError,children:"Must be between 0 and 1"})]}),t.provider==="gemini"&&p.jsxs(Kt,{label:"Top K",hint:"0 – 500",children:[p.jsx("input",{className:`${Ce.input} ${o?Ce.inputError:""}`,type:"number",step:"1",value:t.topK??"",onChange:c=>{const d=c.target.value;a({topK:d?Number(d):void 0})}}),o&&p.jsx("span",{className:Ce.validationError,children:"Must be between 0 and 500"})]}),p.jsxs(Kt,{label:"Max output tokens",hint:"Min. input: 1",description:"Maximum tokens in the model response (distinct from invocation max tokens)",children:[p.jsx("input",{className:`${Ce.input} ${u?Ce.inputError:""}`,type:"number",step:"1",value:t.maxTokens??"",onChange:c=>{const d=c.target.value;a({maxTokens:d?Number(d):void 0})}}),u&&p.jsx("span",{className:Ce.validationError,children:"Must be at least 1"})]})]})]})}const xk=t=>t==="open_ai"||t==="gemini"||t==="lite_llm";function bk({derived:t,onProviderChange:a,onBedrockModeChange:l,onFieldChange:r}){return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:Ce.fieldRow,children:[p.jsx(Kt,{label:"Model source",children:p.jsxs("select",{className:Ce.select,value:t.provider,onChange:o=>a(o.target.value),children:[p.jsx("option",{value:"bedrock",children:"Amazon Bedrock"}),p.jsx("option",{value:"open_ai",children:"OpenAI"}),p.jsx("option",{value:"gemini",children:"Gemini"}),p.jsx("option",{value:"lite_llm",children:"LiteLLM"})]})}),p.jsx(Kt,{label:"Model ID",children:p.jsx("input",{className:Ce.input,placeholder:"Enter Model ID",value:t.id,onChange:o=>r({id:o.target.value})})})]}),t.provider==="bedrock"&&p.jsxs("div",{className:Ce.fieldRow,children:[p.jsx(Kt,{label:"API source",children:p.jsxs("div",{className:Ce.radioGroup,children:[p.jsxs("label",{className:Ce.radioLabel,children:[p.jsx("input",{type:"radio",name:"bedrockMode",value:"bedrock",checked:t.bedrockMode==="bedrock",onChange:()=>l("bedrock")}),"Bedrock"]}),p.jsxs("label",{className:Ce.radioLabel,children:[p.jsx("input",{type:"radio",name:"bedrockMode",value:"mantle",checked:t.bedrockMode==="mantle",onChange:()=>l("mantle")}),"Bedrock Mantle",p.jsx(cl,{content:"Use the Bedrock Mantle API to access models via Responses or Chat Completions format.",align:"left",children:p.jsx(c_,{})})]})]})}),t.bedrockMode==="mantle"&&p.jsx(Kt,{label:"API format",children:p.jsxs("select",{className:Ce.select,value:t.apiFormat||"responses",onChange:o=>r({apiFormat:o.target.value}),children:[p.jsx("option",{value:"responses",children:"Responses"}),p.jsx("option",{value:"chat_completions",children:"Chat Completions"})]})})]}),t.provider==="open_ai"&&p.jsx(Kt,{label:"API format",optional:!0,children:p.jsxs("select",{className:Ce.select,value:t.apiFormat,onChange:o=>r({apiFormat:o.target.value}),children:[p.jsx("option",{value:"",children:"Select format"}),p.jsx("option",{value:"responses",children:"Responses"}),p.jsx("option",{value:"chat_completions",children:"Chat Completions"})]})}),xk(t.provider)&&p.jsx(Kt,{label:"API key ARN",children:p.jsx("input",{className:Ce.input,placeholder:"Credential Provider ARN",value:t.credentialArn,onChange:o=>r({credentialArn:o.target.value})})}),t.provider==="lite_llm"&&p.jsx(Kt,{label:"API base URL",children:p.jsx("input",{className:Ce.input,placeholder:"https://your-gateway.example.com/v1",value:t.apiBase,onChange:o=>r({apiBase:o.target.value})})})]})}const Sk="https://github.com/aws/agent-toolkit-for-aws/tree/main/skills";function kk(t){return"s3"in t?"s3":"awsSkills"in t?"aws_skills":"path"in t?"path":"git"}function Tk({skills:t,onAdd:a,onRemove:l,onUpdate:r,onChangeType:o}){return p.jsxs(p.Fragment,{children:[p.jsx(Mi,{tooltip:"Attach skills to provide your Harness with additional knowledge and capabilities at runtime. Skills are bundles of files and scripts that the Harness can reference and execute during a session.",children:"Skills"}),t.map((u,c)=>{var m,g,_,y;const d=kk(u);return p.jsxs("div",{className:Ce.skillRow,children:[p.jsxs("div",{className:Ce.skillHeader,children:[p.jsxs("select",{className:Ce.selectSmall,value:d,onChange:x=>o(c,x.target.value),children:[p.jsx("option",{value:"path",children:"Skill path"}),p.jsx("option",{value:"s3",children:"S3"}),p.jsx("option",{value:"git",children:"Git"}),d==="aws_skills"&&p.jsx("option",{value:"aws_skills",disabled:!0,children:"AWS Skills"})]}),p.jsxs("span",{className:Ce.skillHint,children:[d==="path"&&"Specify a filesystem path available in the agent runtime.",d==="s3"&&"Select skills from S3 bucket.",d==="git"&&"Enables referencing skills directly from public or private repositories.",d==="aws_skills"&&p.jsxs(p.Fragment,{children:["Built-in AWS skills."," ",p.jsx("a",{href:Sk,target:"_blank",rel:"noopener noreferrer",children:"Browse available skills"})]})]}),p.jsx("button",{type:"button",className:Ce.removeBtn,onClick:()=>l(c),title:"Remove skill",children:"×"})]}),d==="s3"&&"s3"in u&&p.jsx("input",{className:Ce.input,placeholder:"s3://bucket/",value:u.s3.uri,onChange:x=>r(c,{s3:{uri:x.target.value}})}),d==="git"&&"git"in u&&p.jsxs("div",{className:Ce.gitFields,children:[p.jsx("input",{className:Ce.input,placeholder:"Enter Git URL",value:u.git.url,onChange:x=>r(c,{git:{...u.git,url:x.target.value}})}),p.jsx("input",{className:Ce.input,placeholder:"Subdirectory (optional)",value:u.git.path??"",onChange:x=>r(c,{git:{...u.git,path:x.target.value||void 0}})}),p.jsx("input",{className:Ce.input,placeholder:"Credential ARN (optional, needed for private repos)",value:((m=u.git.auth)==null?void 0:m.credentialArn)??"",onChange:x=>{var N;const b=x.target.value;r(c,{git:{...u.git,auth:b?{credentialArn:b,username:(N=u.git.auth)==null?void 0:N.username}:void 0}})}}),((g=u.git.auth)==null?void 0:g.credentialArn)&&p.jsx("input",{className:Ce.input,placeholder:"User name (optional)",value:((_=u.git.auth)==null?void 0:_.username)??"",onChange:x=>r(c,{git:{...u.git,auth:{credentialArn:u.git.auth.credentialArn,username:x.target.value||void 0}}})})]}),d==="path"&&"path"in u&&p.jsx("input",{className:Ce.input,placeholder:"Enter skills path (e.g. .agent/skills/my-skill.md)",value:u.path,onChange:x=>r(c,{path:x.target.value})}),d==="aws_skills"&&"awsSkills"in u&&p.jsx("input",{className:Ce.input,placeholder:"Glob paths (e.g. core-skills/* or specialized-skills/operations-skills/*). Leave blank for all.",value:((y=u.awsSkills.paths)==null?void 0:y.join(", "))??"",onChange:x=>{const N=x.target.value.split(",").map(O=>O.trim()).filter(Boolean);r(c,{awsSkills:N.length>0?{paths:N}:{}})}})]},c)}),p.jsx("button",{type:"button",className:Ce.addBtn,onClick:a,children:"+ Add skill"})]})}function Nk(t){const{provider:a,id:l,credentialArn:r,bedrockMode:o,apiFormat:u,apiBase:c,temperature:d,topP:m,topK:g,maxTokens:_,additionalParams:y}=t,x={};return a==="bedrock"?x.bedrockModelConfig={modelId:l,...o==="mantle"&&u?{apiFormat:u}:{},...d!==void 0?{temperature:d}:{},...m!==void 0?{topP:m}:{},..._!==void 0?{maxTokens:_}:{},...y&&Object.keys(y).length>0?{additionalParams:y}:{}}:a==="open_ai"?x.openAiModelConfig={modelId:l,...r?{apiKeyArn:r}:{},...u?{apiFormat:u}:{},...d!==void 0?{temperature:d}:{},...m!==void 0?{topP:m}:{},..._!==void 0?{maxTokens:_}:{},...y&&Object.keys(y).length>0?{additionalParams:y}:{}}:a==="gemini"?x.geminiModelConfig={modelId:l,...r?{apiKeyArn:r}:{},...d!==void 0?{temperature:d}:{},...m!==void 0?{topP:m}:{},...g!==void 0?{topK:g}:{},..._!==void 0?{maxTokens:_}:{}}:a==="lite_llm"&&(x.liteLlmModelConfig={modelId:l,...r?{apiKeyArn:r}:{},...c?{apiBase:c}:{},...d!==void 0?{temperature:d}:{},...m!==void 0?{topP:m}:{},..._!==void 0?{maxTokens:_}:{},...y&&Object.keys(y).length>0?{additionalParams:y}:{}}),x}const Yg=["frequency_penalty","presence_penalty","logit_bias","logprobs","top_logprobs","n","seed","stop","response_format","service_tier","parallel_tool_calls","reasoning_effort"],Fg=["frequency_penalty","presence_penalty","top_k","seed","service_tier","parallel_tool_calls","reasoning","truncation"],Ek=["frequency_penalty","presence_penalty","top_k","stop","seed","logprobs","top_logprobs","logit_bias","n","response_format","repetition_penalty","user","reasoning_effort"];function Ck(t,a,l){return t==="bedrock"?a!=="mantle"?[]:l==="chat_completions"?Yg:Fg:t==="open_ai"?l==="chat_completions"?Yg:Fg:t==="lite_llm"?Ek:[]}const Xg={provider:"bedrock",id:"",credentialArn:"",bedrockMode:"bedrock",apiFormat:"",apiBase:""};function Ak(t){if(!t)return Xg;if("provider"in t){const l=t,o=["bedrock","open_ai","gemini","lite_llm"].includes(l.provider)?l.provider:"bedrock",u=o==="bedrock"&&l.apiFormat&&l.apiFormat!=="converse_stream";return{provider:o,id:l.modelId,credentialArn:l.apiKeyArn??"",bedrockMode:u?"mantle":"bedrock",apiFormat:l.apiFormat==="converse_stream"?"":l.apiFormat??"",apiBase:l.apiBase??"",temperature:l.temperature,topP:l.topP,topK:l.topK,maxTokens:l.maxTokens}}const a=t;if(a.bedrockModelConfig){const l=a.bedrockModelConfig;return{provider:"bedrock",id:l.modelId,credentialArn:"",bedrockMode:l.apiFormat?"mantle":"bedrock",apiFormat:l.apiFormat??"",apiBase:"",temperature:l.temperature,topP:l.topP,maxTokens:l.maxTokens,additionalParams:l.additionalParams}}if(a.openAiModelConfig){const l=a.openAiModelConfig;return{provider:"open_ai",id:l.modelId,credentialArn:l.apiKeyArn??"",bedrockMode:"bedrock",apiFormat:l.apiFormat??"",apiBase:"",temperature:l.temperature,topP:l.topP,maxTokens:l.maxTokens,additionalParams:l.additionalParams}}if(a.geminiModelConfig){const l=a.geminiModelConfig;return{provider:"gemini",id:l.modelId,credentialArn:l.apiKeyArn??"",bedrockMode:"bedrock",apiFormat:"",apiBase:"",temperature:l.temperature,topP:l.topP,topK:l.topK,maxTokens:l.maxTokens}}if(a.liteLlmModelConfig){const l=a.liteLlmModelConfig;return{provider:"lite_llm",id:l.modelId,credentialArn:l.apiKeyArn??"",bedrockMode:"bedrock",apiFormat:"",apiBase:l.apiBase??"",temperature:l.temperature,topP:l.topP,maxTokens:l.maxTokens,additionalParams:l.additionalParams}}return Xg}function jk({overrides:t,onChange:a,tools:l=[],modelConfig:r}){const o=Ak(t.model??r),u=U=>{const re={...o,...U};a({...t,model:Nk(re)})},c=U=>{u({provider:U,id:"",credentialArn:"",bedrockMode:"bedrock",apiFormat:"",apiBase:"",temperature:void 0,topP:void 0,topK:void 0,maxTokens:void 0,additionalParams:void 0})},d=U=>{u({bedrockMode:U,apiFormat:U==="mantle"?"responses":""})},m=t.skills??[],g=U=>{a({...t,skills:U})},_=()=>{g([...m,{path:""}])},y=U=>{g(m.filter((re,le)=>le!==U))},x=(U,re)=>{const le=[...m];le[U]=re,g(le)},b=(U,re)=>{re==="s3"?x(U,{s3:{uri:""}}):re==="path"?x(U,{path:""}):re==="aws_skills"?x(U,{awsSkills:{}}):x(U,{git:{url:""}})},N=o.additionalParams??{},O=Ck(o.provider,o.bedrockMode,o.apiFormat),D=O.filter(U=>!(U in N)),k=O.length>0,M=U=>{u({additionalParams:{...N,[U]:""}})},j=U=>{const re={...N};delete re[U],u({additionalParams:Object.keys(re).length>0?re:void 0})},K=(U,re)=>{u({additionalParams:{...N,[U]:re}})},Y=U=>!t.allowedTools||t.allowedTools.includes(U),I=U=>{const re=t.allowedTools??l,le=Y(U)?re.filter(z=>z!==U):[...re,U];a({...t,allowedTools:le.length===l.length?void 0:le})};return p.jsx(Yo,{title:"Harness Settings",defaultCollapsed:!0,children:p.jsxs("div",{className:Ce.fields,children:[p.jsx(bk,{derived:o,onProviderChange:c,onBedrockModeChange:d,onFieldChange:u}),p.jsx(Kt,{label:"System Prompt",children:p.jsx("textarea",{className:Ce.textarea,placeholder:"You are a helpful assistant.",value:t.systemPrompt??"",onChange:U=>a({...t,systemPrompt:U.target.value||void 0}),rows:3})}),p.jsx(Tk,{skills:m,onAdd:_,onRemove:y,onUpdate:x,onChangeType:b}),p.jsx(vk,{derived:o,onFieldChange:u}),k&&p.jsx(_k,{params:N,availableParams:D,onAdd:M,onRemove:j,onUpdate:K}),p.jsx(Mi,{children:"Tools"}),l.length>0?p.jsx("div",{className:Ce.toolList,children:l.map(U=>p.jsxs("label",{className:Ce.toolItem,children:[p.jsx("input",{type:"checkbox",checked:Y(U),onChange:()=>I(U)}),p.jsx("span",{className:Ce.toolName,children:U})]},U))}):p.jsxs("p",{className:Ce.emptyTools,children:["No tools configured. Use ",p.jsx("code",{children:"agentcore add tool"})," to add tools."," ",p.jsx("a",{href:"https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-tools.html",target:"_blank",rel:"noopener noreferrer",children:"Learn more"})]}),p.jsx(Mi,{children:"Memory"}),p.jsx(Kt,{label:"Actor ID",description:"Specify the actor ID to identify memory retrieval",children:p.jsx("input",{className:Ce.input,placeholder:"E.g. user-123",value:t.actorId??"",onChange:U=>a({...t,actorId:U.target.value||void 0})})}),p.jsx(Mi,{children:"Invocation limits"}),p.jsxs("div",{className:Ce.paramGrid,children:[p.jsx(Kt,{label:"Max iterations",description:"Maximum number of iterations the Harness can perform",children:p.jsx("input",{className:Ce.input,type:"number",placeholder:"Default: 75",value:t.maxIterations??"",onChange:U=>a({...t,maxIterations:U.target.value?Number(U.target.value):void 0})})}),p.jsx(Kt,{label:"Timeout duration (seconds)",description:"Maximum time allowed for the Harness to complete an invocation",hint:"Maximum: 86400 seconds",children:p.jsx("input",{className:Ce.input,type:"number",placeholder:"Default: 3600",value:t.timeoutSeconds??"",onChange:U=>a({...t,timeoutSeconds:U.target.value?Number(U.target.value):void 0})})}),p.jsx(Kt,{label:"Max tokens",description:"Maximum number of output tokens per invocation",children:p.jsx("input",{className:Ce.input,type:"number",placeholder:"E.g. 16384",value:t.maxTokens??"",onChange:U=>a({...t,maxTokens:U.target.value?Number(U.target.value):void 0})})})]})]})})}const wk="_header_lggp3_1",Mk="_title_lggp3_11",zk="_badge_lggp3_16",Rk="_ready_lggp3_24",Ok="_error_lggp3_29",Dk="_rightGroup_lggp3_34",Lk="_iconBtn_lggp3_41",Bk="_iconBtnActive_lggp3_61",na={header:wk,title:Mk,badge:zk,ready:Rk,error:Ok,rightGroup:Dk,iconBtn:Lk,iconBtnActive:Bk};function Ik({isConnected:t,hasConnected:a,hasError:l,onToggleResources:r,isResourcesOpen:o}){return p.jsxs("header",{className:na.header,children:[p.jsx("div",{className:na.title,children:"AgentCore agent inspector"}),p.jsx("div",{className:`${na.badge} ${l?na.error:t?na.ready:a?na.error:""}`,children:l?"Error":t?"Connected":a?"Disconnected":"Connecting"}),p.jsxs("div",{className:na.rightGroup,children:[p.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:p.jsx(px,{size:14})}),r&&p.jsx("button",{className:`${na.iconBtn} ${o?na.iconBtnActive:""}`,onClick:r,title:"Toggle resources","aria-label":"Toggle resource panel",children:p.jsx(Ux,{size:14})})]})]})}const Uk="_errorMessage_1up60_1",Hk="_truncated_1up60_7",qk="_full_1up60_12",Vk="_toggle_1up60_17",_o={errorMessage:Uk,truncated:Hk,full:qk,toggle:Vk},Qg=300;function Zf({content:t}){const[a,l]=R.useState(!1),r=t.length>Qg;return p.jsxs("div",{className:_o.errorMessage,children:[p.jsx("span",{className:a||!r?_o.full:_o.truncated,children:a||!r?t:t.slice(0,Qg)+"…"}),r&&p.jsx("button",{className:_o.toggle,onClick:()=>l(o=>!o),children:a?"Show less":"Show more"})]})}const Gk="_root_1x2ve_1",$k="_pill_1x2ve_5",Zk="_cards_1x2ve_18",Yk="_card_1x2ve_18",Fk="_cardError_1x2ve_33",Xk="_cardHeader_1x2ve_37",Qk="_toolIcon_1x2ve_43",Kk="_errorIcon_1x2ve_48",Jk="_toolName_1x2ve_53",Pk="_preview_1x2ve_60",Wk="_spinner_1x2ve_70",e2="_toggle_1x2ve_84",t2="_json_1x2ve_100",n2="_jsonError_1x2ve_115",Qt={root:Gk,pill:$k,cards:Zk,card:Yk,cardError:Fk,cardHeader:Xk,toolIcon:Qk,errorIcon:Kk,toolName:Jk,preview:Pk,spinner:Wk,toggle:e2,json:t2,jsonError:n2};function Kg(t){if(!t)return null;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function a2(t,a=60){if(!t)return null;try{const l=JSON.parse(t),r=Object.values(l)[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 l2({tool:t}){const[a,l]=R.useState(!1),[r,o]=R.useState(!1),u=t.resultStatus==="error",c=t.serverName?`${t.serverName}/${t.toolName}`:t.toolName,d=a2(t.input),m=Kg(t.input),g=Kg(t.result);return p.jsxs("div",{className:`${Qt.card} ${u?Qt.cardError:""}`,children:[p.jsxs("div",{className:Qt.cardHeader,children:[u?p.jsx(Sx,{size:12,className:Qt.errorIcon}):p.jsx(za,{size:12,className:Qt.toolIcon}),p.jsx("span",{className:Qt.toolName,children:c}),d&&p.jsx("span",{className:Qt.preview,children:d}),!t.result&&p.jsx(o_,{size:12,className:Qt.spinner})]}),m&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:Qt.toggle,onClick:()=>l(_=>!_),children:[a?p.jsx(wa,{size:12}):p.jsx(dl,{size:12}),"Input"]}),a&&p.jsx("pre",{className:Qt.json,children:m})]}),g&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{className:Qt.toggle,onClick:()=>o(_=>!_),children:[r?p.jsx(wa,{size:12}):p.jsx(dl,{size:12}),"Result"]}),r&&p.jsx("pre",{className:`${Qt.json} ${u?Qt.jsonError:""}`,children:g})]})]})}function i2({toolExecutions:t}){const a=Object.entries(t);return a.length===0?null:p.jsxs("div",{className:Qt.root,children:[p.jsxs("div",{className:Qt.pill,children:[p.jsx(za,{size:12}),a.length," tool",a.length===1?"":"s"," used"]}),p.jsx("div",{className:Qt.cards,children:a.map(([l,r])=>p.jsx(l2,{tool:r},l))})]})}function r2(t,a){const l={};return(t[t.length-1]===""?[...t,""]:t).join((l.padRight?" ":"")+","+(l.padLeft===!1?"":" ")).trim()}const s2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,u2={};function Jg(t,a){return(u2.jsx?o2:s2).test(t)}const c2=/[ \t\n\f\r]/g;function f2(t){return typeof t=="object"?t.type==="text"?Pg(t.value):!1:Pg(t)}function Pg(t){return t.replace(c2,"")===""}class Qr{constructor(a,l,r){this.normal=l,this.property=a,r&&(this.space=r)}}Qr.prototype.normal={};Qr.prototype.property={};Qr.prototype.space=void 0;function f_(t,a){const l={},r={};for(const o of t)Object.assign(l,o.property),Object.assign(r,o.normal);return new Qr(l,r,a)}function Yf(t){return t.toLowerCase()}class pn{constructor(a,l){this.attribute=l,this.property=a}}pn.prototype.attribute="";pn.prototype.booleanish=!1;pn.prototype.boolean=!1;pn.prototype.commaOrSpaceSeparated=!1;pn.prototype.commaSeparated=!1;pn.prototype.defined=!1;pn.prototype.mustUseProperty=!1;pn.prototype.number=!1;pn.prototype.overloadedBoolean=!1;pn.prototype.property="";pn.prototype.spaceSeparated=!1;pn.prototype.space=void 0;let d2=0;const Ve=Vl(),zt=Vl(),Ff=Vl(),oe=Vl(),yt=Vl(),zi=Vl(),kn=Vl();function Vl(){return 2**++d2}const Xf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ve,booleanish:zt,commaOrSpaceSeparated:kn,commaSeparated:zi,number:oe,overloadedBoolean:Ff,spaceSeparated:yt},Symbol.toStringTag,{value:"Module"})),Sf=Object.keys(Xf);class gd extends pn{constructor(a,l,r,o){let u=-1;if(super(a,l),Wg(this,"space",o),typeof r=="number")for(;++u<Sf.length;){const c=Sf[u];Wg(this,Sf[u],(r&Xf[c])===Xf[c])}}}gd.prototype.defined=!0;function Wg(t,a,l){l&&(t[a]=l)}function Bi(t){const a={},l={};for(const[r,o]of Object.entries(t.properties)){const u=new gd(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(u.mustUseProperty=!0),a[r]=u,l[Yf(r)]=r,l[Yf(u.attribute)]=r}return new Qr(a,l,t.space)}const d_=Bi({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:oe,ariaColIndex:oe,ariaColSpan:oe,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:oe,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:yt,ariaPlaceholder:null,ariaPosInSet:oe,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:yt,ariaRowCount:oe,ariaRowIndex:oe,ariaRowSpan:oe,ariaSelected:zt,ariaSetSize:oe,ariaSort:null,ariaValueMax:oe,ariaValueMin:oe,ariaValueNow:oe,ariaValueText:null,role:null},transform(t,a){return a==="role"?a:"aria-"+a.slice(4).toLowerCase()}});function h_(t,a){return a in t?t[a]:a}function m_(t,a){return h_(t,a.toLowerCase())}const h2=Bi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:zi,acceptCharset:yt,accessKey:yt,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:yt,autoFocus:Ve,autoPlay:Ve,blocking:yt,capture:null,charSet:null,checked:Ve,cite:null,className:yt,cols:oe,colSpan:null,content:null,contentEditable:zt,controls:Ve,controlsList:yt,coords:oe|zi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ve,defer:Ve,dir:null,dirName:null,disabled:Ve,download:Ff,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ve,formTarget:null,headers:yt,height:oe,hidden:Ff,high:oe,href:null,hrefLang:null,htmlFor:yt,httpEquiv:yt,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:yt,itemRef:yt,itemScope:Ve,itemType:yt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ve,low:oe,manifest:null,max:null,maxLength:oe,media:null,method:null,min:null,minLength:oe,multiple:Ve,muted:Ve,name:null,nonce:null,noModule:Ve,noValidate:Ve,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:Ve,optimum:oe,pattern:null,ping:yt,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:yt,required:Ve,reversed:Ve,rows:oe,rowSpan:oe,sandbox:yt,scope:null,scoped:Ve,seamless:Ve,selected:Ve,shadowRootClonable:Ve,shadowRootDelegatesFocus:Ve,shadowRootMode:null,shape:null,size:oe,sizes:null,slot:null,span:oe,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:oe,step:null,style:null,tabIndex:oe,target:null,title:null,translate:null,type:null,typeMustMatch:Ve,useMap:null,value:zt,width:oe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:yt,axis:null,background:null,bgColor:null,border:oe,borderColor:null,bottomMargin:oe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ve,declare:Ve,event:null,face:null,frame:null,frameBorder:null,hSpace:oe,leftMargin:oe,link:null,longDesc:null,lowSrc:null,marginHeight:oe,marginWidth:oe,noResize:Ve,noHref:Ve,noShade:Ve,noWrap:Ve,object:null,profile:null,prompt:null,rev:null,rightMargin:oe,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:oe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:oe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ve,disableRemotePlayback:Ve,prefix:null,property:null,results:oe,security:null,unselectable:null},space:"html",transform:m_}),m2=Bi({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:kn,accentHeight:oe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:oe,amplitude:oe,arabicForm:null,ascent:oe,attributeName:null,attributeType:null,azimuth:oe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:oe,by:null,calcMode:null,capHeight:oe,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:oe,diffuseConstant:oe,direction:null,display:null,dur:null,divisor:oe,dominantBaseline:null,download:Ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:oe,enableBackground:null,end:null,event:null,exponent:oe,externalResourcesRequired:null,fill:null,fillOpacity:oe,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:zi,g2:zi,glyphName:zi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:oe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:oe,horizOriginX:oe,horizOriginY:oe,id:null,ideographic:oe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:oe,k:oe,k1:oe,k2:oe,k3:oe,k4:oe,kernelMatrix:kn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:oe,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:oe,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:oe,overlineThickness:oe,paintOrder:null,panose1:null,path:null,pathLength:oe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:yt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:oe,pointsAtY:oe,pointsAtZ:oe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:kn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:kn,rev:kn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:kn,requiredFeatures:kn,requiredFonts:kn,requiredFormats:kn,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:oe,specularExponent:oe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:oe,strikethroughThickness:oe,string:null,stroke:null,strokeDashArray:kn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:oe,strokeOpacity:oe,strokeWidth:null,style:null,surfaceScale:oe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:kn,tabIndex:oe,tableValues:null,target:null,targetX:oe,targetY:oe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:kn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:oe,underlineThickness:oe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:oe,values:null,vAlphabetic:oe,vMathematical:oe,vectorEffect:null,vHanging:oe,vIdeographic:oe,version:null,vertAdvY:oe,vertOriginX:oe,vertOriginY:oe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:oe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:h_}),p_=Bi({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()}}),g_=Bi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:m_}),y_=Bi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,a){return"xml:"+a.slice(3).toLowerCase()}}),p2={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},g2=/[A-Z]/g,ey=/-[a-z]/g,y2=/^data[-\w.:]+$/i;function _2(t,a){const l=Yf(a);let r=a,o=pn;if(l in t.normal)return t.property[t.normal[l]];if(l.length>4&&l.slice(0,4)==="data"&&y2.test(a)){if(a.charAt(4)==="-"){const u=a.slice(5).replace(ey,x2);r="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=a.slice(4);if(!ey.test(u)){let c=u.replace(g2,v2);c.charAt(0)!=="-"&&(c="-"+c),a="data"+c}}o=gd}return new o(r,a)}function v2(t){return"-"+t.toLowerCase()}function x2(t){return t.charAt(1).toUpperCase()}const b2=f_([d_,h2,p_,g_,y_],"html"),yd=f_([d_,m2,p_,g_,y_],"svg");function S2(t){return t.join(" ").trim()}var Ci={},kf,ty;function k2(){if(ty)return kf;ty=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,a=/\n/g,l=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,m=`
|
|
250
|
+
`,g="/",_="*",y="",x="comment",b="declaration";function N(D,k){if(typeof D!="string")throw new TypeError("First argument must be a string");if(!D)return[];k=k||{};var M=1,j=1;function K(ne){var Z=ne.match(a);Z&&(M+=Z.length);var B=ne.lastIndexOf(m);j=~B?ne.length-B:j+ne.length}function Y(){var ne={line:M,column:j};return function(Z){return Z.position=new I(ne),le(),Z}}function I(ne){this.start=ne,this.end={line:M,column:j},this.source=k.source}I.prototype.content=D;function U(ne){var Z=new Error(k.source+":"+M+":"+j+": "+ne);if(Z.reason=ne,Z.filename=k.source,Z.line=M,Z.column=j,Z.source=D,!k.silent)throw Z}function re(ne){var Z=ne.exec(D);if(Z){var B=Z[0];return K(B),D=D.slice(B.length),Z}}function le(){re(l)}function z(ne){var Z;for(ne=ne||[];Z=te();)Z!==!1&&ne.push(Z);return ne}function te(){var ne=Y();if(!(g!=D.charAt(0)||_!=D.charAt(1))){for(var Z=2;y!=D.charAt(Z)&&(_!=D.charAt(Z)||g!=D.charAt(Z+1));)++Z;if(Z+=2,y===D.charAt(Z-1))return U("End of comment missing");var B=D.slice(2,Z-2);return j+=2,K(B),D=D.slice(Z),j+=2,ne({type:x,comment:B})}}function ae(){var ne=Y(),Z=re(r);if(Z){if(te(),!re(o))return U("property missing ':'");var B=re(u),W=ne({type:b,property:O(Z[0].replace(t,y)),value:B?O(B[0].replace(t,y)):y});return re(c),W}}function ge(){var ne=[];z(ne);for(var Z;Z=ae();)Z!==!1&&(ne.push(Z),z(ne));return ne}return le(),ge()}function O(D){return D?D.replace(d,y):y}return kf=N,kf}var ny;function T2(){if(ny)return Ci;ny=1;var t=Ci&&Ci.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ci,"__esModule",{value:!0}),Ci.default=l;const a=t(k2());function l(r,o){let u=null;if(!r||typeof r!="string")return u;const c=(0,a.default)(r),d=typeof o=="function";return c.forEach(m=>{if(m.type!=="declaration")return;const{property:g,value:_}=m;d?o(g,_,m):_&&(u=u||{},u[g]=_)}),u}return Ci}var Dr={},ay;function N2(){if(ay)return Dr;ay=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,a=/-([a-z])/g,l=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,u=function(g){return!g||l.test(g)||t.test(g)},c=function(g,_){return _.toUpperCase()},d=function(g,_){return"".concat(_,"-")},m=function(g,_){return _===void 0&&(_={}),u(g)?g:(g=g.toLowerCase(),_.reactCompat?g=g.replace(o,d):g=g.replace(r,d),g.replace(a,c))};return Dr.camelCase=m,Dr}var Lr,ly;function E2(){if(ly)return Lr;ly=1;var t=Lr&&Lr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},a=t(T2()),l=N2();function r(o,u){var c={};return!o||typeof o!="string"||(0,a.default)(o,function(d,m){d&&m&&(c[(0,l.camelCase)(d,u)]=m)}),c}return r.default=r,Lr=r,Lr}var C2=E2();const A2=Zo(C2),__=v_("end"),_d=v_("start");function v_(t){return a;function a(l){const r=l&&l.position&&l.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 j2(t){const a=_d(t),l=__(t);if(a&&l)return{start:a,end:l}}function qr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?iy(t.position):"start"in t||"end"in t?iy(t):"line"in t||"column"in t?Qf(t):""}function Qf(t){return ry(t&&t.line)+":"+ry(t&&t.column)}function iy(t){return Qf(t&&t.start)+"-"+Qf(t&&t.end)}function ry(t){return t&&typeof t=="number"?t:1}class Pt extends Error{constructor(a,l,r){super(),typeof l=="string"&&(r=l,l=void 0);let o="",u={},c=!1;if(l&&("line"in l&&"column"in l?u={place:l}:"start"in l&&"end"in l?u={place:l}:"type"in l?u={ancestors:[l],place:l.position}:u={...l}),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 d=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=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=d?d.line:void 0,this.name=qr(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}}Pt.prototype.file="";Pt.prototype.name="";Pt.prototype.reason="";Pt.prototype.message="";Pt.prototype.stack="";Pt.prototype.column=void 0;Pt.prototype.line=void 0;Pt.prototype.ancestors=void 0;Pt.prototype.cause=void 0;Pt.prototype.fatal=void 0;Pt.prototype.place=void 0;Pt.prototype.ruleId=void 0;Pt.prototype.source=void 0;const vd={}.hasOwnProperty,w2=new Map,M2=/[A-Z]/g,z2=new Set(["table","tbody","thead","tfoot","tr"]),R2=new Set(["td","th"]),x_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function O2(t,a){if(!a||a.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const l=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=V2(l,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=q2(l,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:l,ignoreInvalidStyle:a.ignoreInvalidStyle||!1,passKeys:a.passKeys!==!1,passNode:a.passNode||!1,schema:a.space==="svg"?yd:b2,stylePropertyNameCase:a.stylePropertyNameCase||"dom",tableCellAlignToStyle:a.tableCellAlignToStyle!==!1},u=b_(o,t,void 0);return u&&typeof u!="string"?u:o.create(t,o.Fragment,{children:u||void 0},void 0)}function b_(t,a,l){if(a.type==="element")return D2(t,a,l);if(a.type==="mdxFlowExpression"||a.type==="mdxTextExpression")return L2(t,a);if(a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement")return I2(t,a,l);if(a.type==="mdxjsEsm")return B2(t,a);if(a.type==="root")return U2(t,a,l);if(a.type==="text")return H2(t,a)}function D2(t,a,l){const r=t.schema;let o=r;a.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=yd,t.schema=o),t.ancestors.push(a);const u=k_(t,a.tagName,!1),c=G2(t,a);let d=bd(t,a);return z2.has(a.tagName)&&(d=d.filter(function(m){return typeof m=="string"?!f2(m):!0})),S_(t,c,u,a),xd(c,d),t.ancestors.pop(),t.schema=r,t.create(a,u,c,l)}function L2(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)}$r(t,a.position)}function B2(t,a){if(a.data&&a.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(a.data.estree);$r(t,a.position)}function I2(t,a,l){const r=t.schema;let o=r;a.name==="svg"&&r.space==="html"&&(o=yd,t.schema=o),t.ancestors.push(a);const u=a.name===null?t.Fragment:k_(t,a.name,!0),c=$2(t,a),d=bd(t,a);return S_(t,c,u,a),xd(c,d),t.ancestors.pop(),t.schema=r,t.create(a,u,c,l)}function U2(t,a,l){const r={};return xd(r,bd(t,a)),t.create(a,t.Fragment,r,l)}function H2(t,a){return a.value}function S_(t,a,l,r){typeof l!="string"&&l!==t.Fragment&&t.passNode&&(a.node=r)}function xd(t,a){if(a.length>0){const l=a.length>1?a:a[0];l&&(t.children=l)}}function q2(t,a,l){return r;function r(o,u,c,d){const g=Array.isArray(c.children)?l:a;return d?g(u,c,d):g(u,c)}}function V2(t,a){return l;function l(r,o,u,c){const d=Array.isArray(u.children),m=_d(r);return a(o,u,c,d,{columnNumber:m?m.column-1:void 0,fileName:t,lineNumber:m?m.line:void 0},void 0)}}function G2(t,a){const l={};let r,o;for(o in a.properties)if(o!=="children"&&vd.call(a.properties,o)){const u=Z2(t,o,a.properties[o]);if(u){const[c,d]=u;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&R2.has(a.tagName)?r=d:l[c]=d}}if(r){const u=l.style||(l.style={});u[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return l}function $2(t,a){const l={};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 d=c.properties[0];d.type,Object.assign(l,t.evaluater.evaluateExpression(d.argument))}else $r(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 d=r.value.data.estree.body[0];d.type,u=t.evaluater.evaluateExpression(d.expression)}else $r(t,a.position);else u=r.value===null?!0:r.value;l[o]=u}return l}function bd(t,a){const l=[];let r=-1;const o=t.passKeys?new Map:w2;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 g=o.get(m)||0;c=m+"-"+g,o.set(m,g+1)}}const d=b_(t,u,c);d!==void 0&&l.push(d)}return l}function Z2(t,a,l){const r=_2(t.schema,a);if(!(l==null||typeof l=="number"&&Number.isNaN(l))){if(Array.isArray(l)&&(l=r.commaSeparated?r2(l):S2(l)),r.property==="style"){let o=typeof l=="object"?l:Y2(t,String(l));return t.stylePropertyNameCase==="css"&&(o=F2(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&r.space?p2[r.property]||r.property:r.attribute,l]}}function Y2(t,a){try{return A2(a,{reactCompat:!0})}catch(l){if(t.ignoreInvalidStyle)return{};const r=l,o=new Pt("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=x_+"#cannot-parse-style-attribute",o}}function k_(t,a,l){let r;if(!l)r={type:"Literal",value:a};else if(a.includes(".")){const o=a.split(".");let u=-1,c;for(;++u<o.length;){const d=Jg(o[u])?{type:"Identifier",name:o[u]}:{type:"Literal",value:o[u]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(u&&d.type==="Literal"),optional:!1}:d}r=c}else r=Jg(a)&&!/^[a-z]/.test(a)?{type:"Identifier",name:a}:{type:"Literal",value:a};if(r.type==="Literal"){const o=r.value;return vd.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(r);$r(t)}function $r(t,a){const l=new Pt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:a,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw l.file=t.filePath||void 0,l.url=x_+"#cannot-handle-mdx-estrees-without-createevaluater",l}function F2(t){const a={};let l;for(l in t)vd.call(t,l)&&(a[X2(l)]=t[l]);return a}function X2(t){let a=t.replace(M2,Q2);return a.slice(0,3)==="ms-"&&(a="-"+a),a}function Q2(t){return"-"+t.toLowerCase()}const Tf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},K2={};function Sd(t,a){const l=K2,r=typeof l.includeImageAlt=="boolean"?l.includeImageAlt:!0,o=typeof l.includeHtml=="boolean"?l.includeHtml:!0;return T_(t,r,o)}function T_(t,a,l){if(J2(t)){if("value"in t)return t.type==="html"&&!l?"":t.value;if(a&&"alt"in t&&t.alt)return t.alt;if("children"in t)return sy(t.children,a,l)}return Array.isArray(t)?sy(t,a,l):""}function sy(t,a,l){const r=[];let o=-1;for(;++o<t.length;)r[o]=T_(t[o],a,l);return r.join("")}function J2(t){return!!(t&&typeof t=="object")}const oy=document.createElement("i");function kd(t){const a="&"+t+";";oy.innerHTML=a;const l=oy.textContent;return l.charCodeAt(l.length-1)===59&&t!=="semi"||l===a?!1:l}function Nn(t,a,l,r){const o=t.length;let u=0,c;if(a<0?a=-a>o?0:o+a:a=a>o?o:a,l=l>0?l:0,r.length<1e4)c=Array.from(r),c.unshift(a,l),t.splice(...c);else for(l&&t.splice(a,l);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?(Nn(t,t.length,0,a),t):a}const uy={}.hasOwnProperty;function N_(t){const a={};let l=-1;for(;++l<t.length;)P2(a,t[l]);return a}function P2(t,a){let l;for(l in a){const o=(uy.call(t,l)?t[l]:void 0)||(t[l]={}),u=a[l];let c;if(u)for(c in u){uy.call(o,c)||(o[c]=[]);const d=u[c];W2(o[c],Array.isArray(d)?d:d?[d]:[])}}}function W2(t,a){let l=-1;const r=[];for(;++l<a.length;)(a[l].add==="after"?t:r).push(a[l]);Nn(t,0,0,r)}function E_(t,a){const l=Number.parseInt(t,a);return l<9||l===11||l>13&&l<32||l>126&&l<160||l>55295&&l<57344||l>64975&&l<65008||(l&65535)===65535||(l&65535)===65534||l>1114111?"�":String.fromCodePoint(l)}function Xn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const tn=ml(/[A-Za-z]/),Jt=ml(/[\dA-Za-z]/),eT=ml(/[#-'*+\--9=?A-Z^-~]/);function wo(t){return t!==null&&(t<32||t===127)}const Kf=ml(/\d/),tT=ml(/[\dA-Fa-f]/),nT=ml(/[!-/:-@[-`{-~]/);function Ae(t){return t!==null&&t<-2}function gt(t){return t!==null&&(t<0||t===32)}function Ye(t){return t===-2||t===-1||t===32}const Fo=ml(new RegExp("\\p{P}|\\p{S}","u")),Bl=ml(/\s/);function ml(t){return a;function a(l){return l!==null&&l>-1&&t.test(String.fromCharCode(l))}}function Ii(t){const a=[];let l=-1,r=0,o=0;for(;++l<t.length;){const u=t.charCodeAt(l);let c="";if(u===37&&Jt(t.charCodeAt(l+1))&&Jt(t.charCodeAt(l+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 d=t.charCodeAt(l+1);u<56320&&d>56319&&d<57344?(c=String.fromCharCode(u,d),o=1):c="�"}else c=String.fromCharCode(u);c&&(a.push(t.slice(r,l),encodeURIComponent(c)),r=l+o+1,c=""),o&&(l+=o,o=0)}return a.join("")+t.slice(r)}function Pe(t,a,l,r){const o=r?r-1:Number.POSITIVE_INFINITY;let u=0;return c;function c(m){return Ye(m)?(t.enter(l),d(m)):a(m)}function d(m){return Ye(m)&&u++<o?(t.consume(m),d):(t.exit(l),a(m))}}const aT={tokenize:lT};function lT(t){const a=t.attempt(this.parser.constructs.contentInitial,r,o);let l;return a;function r(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Pe(t,a,"linePrefix")}function o(d){return t.enter("paragraph"),u(d)}function u(d){const m=t.enter("chunkText",{contentType:"text",previous:l});return l&&(l.next=m),l=m,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return Ae(d)?(t.consume(d),t.exit("chunkText"),u):(t.consume(d),c)}}const iT={tokenize:rT},cy={tokenize:sT};function rT(t){const a=this,l=[];let r=0,o,u,c;return d;function d(j){if(r<l.length){const K=l[r];return a.containerState=K[1],t.attempt(K[0].continuation,m,g)(j)}return g(j)}function m(j){if(r++,a.containerState._closeFlow){a.containerState._closeFlow=void 0,o&&M();const K=a.events.length;let Y=K,I;for(;Y--;)if(a.events[Y][0]==="exit"&&a.events[Y][1].type==="chunkFlow"){I=a.events[Y][1].end;break}k(r);let U=K;for(;U<a.events.length;)a.events[U][1].end={...I},U++;return Nn(a.events,Y+1,0,a.events.slice(K)),a.events.length=U,g(j)}return d(j)}function g(j){if(r===l.length){if(!o)return x(j);if(o.currentConstruct&&o.currentConstruct.concrete)return N(j);a.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return a.containerState={},t.check(cy,_,y)(j)}function _(j){return o&&M(),k(r),x(j)}function y(j){return a.parser.lazy[a.now().line]=r!==l.length,c=a.now().offset,N(j)}function x(j){return a.containerState={},t.attempt(cy,b,N)(j)}function b(j){return r++,l.push([a.currentConstruct,a.containerState]),x(j)}function N(j){if(j===null){o&&M(),k(0),t.consume(j);return}return o=o||a.parser.flow(a.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:u}),O(j)}function O(j){if(j===null){D(t.exit("chunkFlow"),!0),k(0),t.consume(j);return}return Ae(j)?(t.consume(j),D(t.exit("chunkFlow")),r=0,a.interrupt=void 0,d):(t.consume(j),O)}function D(j,K){const Y=a.sliceStream(j);if(K&&Y.push(null),j.previous=u,u&&(u.next=j),u=j,o.defineSkip(j.start),o.write(Y),a.parser.lazy[j.start.line]){let I=o.events.length;for(;I--;)if(o.events[I][1].start.offset<c&&(!o.events[I][1].end||o.events[I][1].end.offset>c))return;const U=a.events.length;let re=U,le,z;for(;re--;)if(a.events[re][0]==="exit"&&a.events[re][1].type==="chunkFlow"){if(le){z=a.events[re][1].end;break}le=!0}for(k(r),I=U;I<a.events.length;)a.events[I][1].end={...z},I++;Nn(a.events,re+1,0,a.events.slice(U)),a.events.length=I}}function k(j){let K=l.length;for(;K-- >j;){const Y=l[K];a.containerState=Y[1],Y[0].exit.call(a,t)}l.length=j}function M(){o.write([null]),u=void 0,o=void 0,a.containerState._closeFlow=void 0}}function sT(t,a,l){return Pe(t,t.attempt(this.parser.constructs.document,a,l),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ri(t){if(t===null||gt(t)||Bl(t))return 1;if(Fo(t))return 2}function Xo(t,a,l){const r=[];let o=-1;for(;++o<t.length;){const u=t[o].resolveAll;u&&!r.includes(u)&&(a=u(a,l),r.push(u))}return a}const Jf={name:"attention",resolveAll:oT,tokenize:uT};function oT(t,a){let l=-1,r,o,u,c,d,m,g,_;for(;++l<t.length;)if(t[l][0]==="enter"&&t[l][1].type==="attentionSequence"&&t[l][1]._close){for(r=l;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[l][1]).charCodeAt(0)){if((t[r][1]._close||t[l][1]._open)&&(t[l][1].end.offset-t[l][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[l][1].end.offset-t[l][1].start.offset)%3))continue;m=t[r][1].end.offset-t[r][1].start.offset>1&&t[l][1].end.offset-t[l][1].start.offset>1?2:1;const y={...t[r][1].end},x={...t[l][1].start};fy(y,-m),fy(x,m),c={type:m>1?"strongSequence":"emphasisSequence",start:y,end:{...t[r][1].end}},d={type:m>1?"strongSequence":"emphasisSequence",start:{...t[l][1].start},end:x},u={type:m>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[l][1].start}},o={type:m>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[r][1].end={...c.start},t[l][1].start={...d.end},g=[],t[r][1].end.offset-t[r][1].start.offset&&(g=qn(g,[["enter",t[r][1],a],["exit",t[r][1],a]])),g=qn(g,[["enter",o,a],["enter",c,a],["exit",c,a],["enter",u,a]]),g=qn(g,Xo(a.parser.constructs.insideSpan.null,t.slice(r+1,l),a)),g=qn(g,[["exit",u,a],["enter",d,a],["exit",d,a],["exit",o,a]]),t[l][1].end.offset-t[l][1].start.offset?(_=2,g=qn(g,[["enter",t[l][1],a],["exit",t[l][1],a]])):_=0,Nn(t,r-1,l-r+3,g),l=r+g.length-_-2;break}}for(l=-1;++l<t.length;)t[l][1].type==="attentionSequence"&&(t[l][1].type="data");return t}function uT(t,a){const l=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Ri(r);let u;return c;function c(m){return u=m,t.enter("attentionSequence"),d(m)}function d(m){if(m===u)return t.consume(m),d;const g=t.exit("attentionSequence"),_=Ri(m),y=!_||_===2&&o||l.includes(m),x=!o||o===2&&_||l.includes(r);return g._open=!!(u===42?y:y&&(o||!x)),g._close=!!(u===42?x:x&&(_||!y)),a(m)}}function fy(t,a){t.column+=a,t.offset+=a,t._bufferIndex+=a}const cT={name:"autolink",tokenize:fT};function fT(t,a,l){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?l(b):g(b)}function c(b){return b===43||b===45||b===46||Jt(b)?(r=1,d(b)):g(b)}function d(b){return b===58?(t.consume(b),r=0,m):(b===43||b===45||b===46||Jt(b))&&r++<32?(t.consume(b),d):(r=0,g(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||wo(b)?l(b):(t.consume(b),m)}function g(b){return b===64?(t.consume(b),_):eT(b)?(t.consume(b),g):l(b)}function _(b){return Jt(b)?y(b):l(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||Jt(b))&&r++<63){const N=b===45?x:y;return t.consume(b),N}return l(b)}}const Kr={partial:!0,tokenize:dT};function dT(t,a,l){return r;function r(u){return Ye(u)?Pe(t,o,"linePrefix")(u):o(u)}function o(u){return u===null||Ae(u)?a(u):l(u)}}const C_={continuation:{tokenize:mT},exit:pT,name:"blockQuote",tokenize:hT};function hT(t,a,l){const r=this;return o;function o(c){if(c===62){const d=r.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),u}return l(c)}function u(c){return Ye(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),a):(t.exit("blockQuotePrefix"),a(c))}}function mT(t,a,l){const r=this;return o;function o(c){return Ye(c)?Pe(t,u,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):u(c)}function u(c){return t.attempt(C_,a,l)(c)}}function pT(t){t.exit("blockQuote")}const A_={name:"characterEscape",tokenize:gT};function gT(t,a,l){return r;function r(u){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(u),t.exit("escapeMarker"),o}function o(u){return nT(u)?(t.enter("characterEscapeValue"),t.consume(u),t.exit("characterEscapeValue"),t.exit("characterEscape"),a):l(u)}}const j_={name:"characterReference",tokenize:yT};function yT(t,a,l){const r=this;let o=0,u,c;return d;function d(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"),g):(t.enter("characterReferenceValue"),u=31,c=Jt,_(y))}function g(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),u=6,c=tT,_):(t.enter("characterReferenceValue"),u=7,c=Kf,_(y))}function _(y){if(y===59&&o){const x=t.exit("characterReferenceValue");return c===Jt&&!kd(r.sliceSerialize(x))?l(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),a)}return c(y)&&o++<u?(t.consume(y),_):l(y)}}const dy={partial:!0,tokenize:vT},hy={concrete:!0,name:"codeFenced",tokenize:_T};function _T(t,a,l){const r=this,o={partial:!0,tokenize:Y};let u=0,c=0,d;return m;function m(I){return g(I)}function g(I){const U=r.events[r.events.length-1];return u=U&&U[1].type==="linePrefix"?U[2].sliceSerialize(U[1],!0).length:0,d=I,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),_(I)}function _(I){return I===d?(c++,t.consume(I),_):c<3?l(I):(t.exit("codeFencedFenceSequence"),Ye(I)?Pe(t,y,"whitespace")(I):y(I))}function y(I){return I===null||Ae(I)?(t.exit("codeFencedFence"),r.interrupt?a(I):t.check(dy,O,K)(I)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),x(I))}function x(I){return I===null||Ae(I)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(I)):Ye(I)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Pe(t,b,"whitespace")(I)):I===96&&I===d?l(I):(t.consume(I),x)}function b(I){return I===null||Ae(I)?y(I):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),N(I))}function N(I){return I===null||Ae(I)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(I)):I===96&&I===d?l(I):(t.consume(I),N)}function O(I){return t.attempt(o,K,D)(I)}function D(I){return t.enter("lineEnding"),t.consume(I),t.exit("lineEnding"),k}function k(I){return u>0&&Ye(I)?Pe(t,M,"linePrefix",u+1)(I):M(I)}function M(I){return I===null||Ae(I)?t.check(dy,O,K)(I):(t.enter("codeFlowValue"),j(I))}function j(I){return I===null||Ae(I)?(t.exit("codeFlowValue"),M(I)):(t.consume(I),j)}function K(I){return t.exit("codeFenced"),a(I)}function Y(I,U,re){let le=0;return z;function z(Z){return I.enter("lineEnding"),I.consume(Z),I.exit("lineEnding"),te}function te(Z){return I.enter("codeFencedFence"),Ye(Z)?Pe(I,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Z):ae(Z)}function ae(Z){return Z===d?(I.enter("codeFencedFenceSequence"),ge(Z)):re(Z)}function ge(Z){return Z===d?(le++,I.consume(Z),ge):le>=c?(I.exit("codeFencedFenceSequence"),Ye(Z)?Pe(I,ne,"whitespace")(Z):ne(Z)):re(Z)}function ne(Z){return Z===null||Ae(Z)?(I.exit("codeFencedFence"),U(Z)):re(Z)}}}function vT(t,a,l){const r=this;return o;function o(c){return c===null?l(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u)}function u(c){return r.parser.lazy[r.now().line]?l(c):a(c)}}const Nf={name:"codeIndented",tokenize:bT},xT={partial:!0,tokenize:ST};function bT(t,a,l){const r=this;return o;function o(g){return t.enter("codeIndented"),Pe(t,u,"linePrefix",5)(g)}function u(g){const _=r.events[r.events.length-1];return _&&_[1].type==="linePrefix"&&_[2].sliceSerialize(_[1],!0).length>=4?c(g):l(g)}function c(g){return g===null?m(g):Ae(g)?t.attempt(xT,c,m)(g):(t.enter("codeFlowValue"),d(g))}function d(g){return g===null||Ae(g)?(t.exit("codeFlowValue"),c(g)):(t.consume(g),d)}function m(g){return t.exit("codeIndented"),a(g)}}function ST(t,a,l){const r=this;return o;function o(c){return r.parser.lazy[r.now().line]?l(c):Ae(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):Pe(t,u,"linePrefix",5)(c)}function u(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(c):Ae(c)?o(c):l(c)}}const kT={name:"codeText",previous:NT,resolve:TT,tokenize:ET};function TT(t){let a=t.length-4,l=3,r,o;if((t[l][1].type==="lineEnding"||t[l][1].type==="space")&&(t[a][1].type==="lineEnding"||t[a][1].type==="space")){for(r=l;++r<a;)if(t[r][1].type==="codeTextData"){t[l][1].type="codeTextPadding",t[a][1].type="codeTextPadding",l+=2,a-=2;break}}for(r=l-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 NT(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ET(t,a,l){let r=0,o,u;return c;function c(y){return t.enter("codeText"),t.enter("codeTextSequence"),d(y)}function d(y){return y===96?(t.consume(y),r++,d):(t.exit("codeTextSequence"),m(y))}function m(y){return y===null?l(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),m):y===96?(u=t.enter("codeTextSequence"),o=0,_(y)):Ae(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),m):(t.enter("codeTextData"),g(y))}function g(y){return y===null||y===32||y===96||Ae(y)?(t.exit("codeTextData"),m(y)):(t.consume(y),g)}function _(y){return y===96?(t.consume(y),o++,_):o===r?(t.exit("codeTextSequence"),t.exit("codeText"),a(y)):(u.type="codeTextData",g(y))}}class CT{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,l){const r=l??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,l,r){const o=l||0;this.setCursor(Math.trunc(a));const u=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Br(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),Br(this.left,a)}unshift(a){this.setCursor(0),this.right.push(a)}unshiftMany(a){this.setCursor(0),Br(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 l=this.left.splice(a,Number.POSITIVE_INFINITY);Br(this.right,l.reverse())}else{const l=this.right.splice(this.left.length+this.right.length-a,Number.POSITIVE_INFINITY);Br(this.left,l.reverse())}}}function Br(t,a){let l=0;if(a.length<1e4)t.push(...a);else for(;l<a.length;)t.push(...a.slice(l,l+1e4)),l+=1e4}function w_(t){const a={};let l=-1,r,o,u,c,d,m,g;const _=new CT(t);for(;++l<_.length;){for(;l in a;)l=a[l];if(r=_.get(l),l&&r[1].type==="chunkFlow"&&_.get(l-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,AT(_,l)),l=a[l],g=!0);else if(r[1]._container){for(u=l,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},d=_.slice(o,l),d.unshift(r),_.splice(o,l-o+1,d))}}return Nn(t,0,Number.POSITIVE_INFINITY,_.slice(0)),!g}function AT(t,a){const l=t.get(a)[1],r=t.get(a)[2];let o=a-1;const u=[];let c=l._tokenizer;c||(c=r.parser[l.contentType](l.start),l._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,m=[],g={};let _,y,x=-1,b=l,N=0,O=0;const D=[O];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=l;++x<d.length;)d[x][0]==="exit"&&d[x-1][0]==="enter"&&d[x][1].type===d[x-1][1].type&&d[x][1].start.line!==d[x][1].end.line&&(O=x+1,D.push(O),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(c.events=[],b?(b._tokenizer=void 0,b.previous=void 0):D.pop(),x=D.length;x--;){const k=d.slice(D[x],D[x+1]),M=u.pop();m.push([M,M+k.length-1]),t.splice(M,2,k)}for(m.reverse(),x=-1;++x<m.length;)g[N+m[x][0]]=N+m[x][1],N+=m[x][1]-m[x][0]-1;return g}const jT={resolve:MT,tokenize:zT},wT={partial:!0,tokenize:RT};function MT(t){return w_(t),t}function zT(t,a){let l;return r;function r(d){return t.enter("content"),l=t.enter("chunkContent",{contentType:"content"}),o(d)}function o(d){return d===null?u(d):Ae(d)?t.check(wT,c,u)(d):(t.consume(d),o)}function u(d){return t.exit("chunkContent"),t.exit("content"),a(d)}function c(d){return t.consume(d),t.exit("chunkContent"),l.next=t.enter("chunkContent",{contentType:"content",previous:l}),l=l.next,o}}function RT(t,a,l){const r=this;return o;function o(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Pe(t,u,"linePrefix")}function u(c){if(c===null||Ae(c))return l(c);const d=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?a(c):t.interrupt(r.parser.constructs.flow,l,a)(c)}}function M_(t,a,l,r,o,u,c,d,m){const g=m||Number.POSITIVE_INFINITY;let _=0;return y;function y(k){return k===60?(t.enter(r),t.enter(o),t.enter(u),t.consume(k),t.exit(u),x):k===null||k===32||k===41||wo(k)?l(k):(t.enter(r),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),O(k))}function x(k){return k===62?(t.enter(u),t.consume(k),t.exit(u),t.exit(o),t.exit(r),a):(t.enter(d),t.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===62?(t.exit("chunkString"),t.exit(d),x(k)):k===null||k===60||Ae(k)?l(k):(t.consume(k),k===92?N:b)}function N(k){return k===60||k===62||k===92?(t.consume(k),b):b(k)}function O(k){return!_&&(k===null||k===41||gt(k))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(r),a(k)):_<g&&k===40?(t.consume(k),_++,O):k===41?(t.consume(k),_--,O):k===null||k===32||k===40||wo(k)?l(k):(t.consume(k),k===92?D:O)}function D(k){return k===40||k===41||k===92?(t.consume(k),O):O(k)}}function z_(t,a,l,r,o,u){const c=this;let d=0,m;return g;function g(b){return t.enter(r),t.enter(o),t.consume(b),t.exit(o),t.enter(u),_}function _(b){return d>999||b===null||b===91||b===93&&!m||b===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?l(b):b===93?(t.exit(u),t.enter(o),t.consume(b),t.exit(o),t.exit(r),a):Ae(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||Ae(b)||d++>999?(t.exit("chunkString"),_(b)):(t.consume(b),m||(m=!Ye(b)),b===92?x:y)}function x(b){return b===91||b===92||b===93?(t.consume(b),d++,y):y(b)}}function R_(t,a,l,r,o,u){let c;return d;function d(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):l(x)}function m(x){return x===c?(t.enter(o),t.consume(x),t.exit(o),t.exit(r),a):(t.enter(u),g(x))}function g(x){return x===c?(t.exit(u),m(c)):x===null?l(x):Ae(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),Pe(t,g,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),_(x))}function _(x){return x===c||x===null||Ae(x)?(t.exit("chunkString"),g(x)):(t.consume(x),x===92?y:_)}function y(x){return x===c||x===92?(t.consume(x),_):_(x)}}function Vr(t,a){let l;return r;function r(o){return Ae(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),l=!0,r):Ye(o)?Pe(t,r,l?"linePrefix":"lineSuffix")(o):a(o)}}const OT={name:"definition",tokenize:LT},DT={partial:!0,tokenize:BT};function LT(t,a,l){const r=this;let o;return u;function u(b){return t.enter("definition"),c(b)}function c(b){return z_.call(r,t,d,l,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function d(b){return o=Xn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(t.enter("definitionMarker"),t.consume(b),t.exit("definitionMarker"),m):l(b)}function m(b){return gt(b)?Vr(t,g)(b):g(b)}function g(b){return M_(t,_,l,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function _(b){return t.attempt(DT,y,y)(b)}function y(b){return Ye(b)?Pe(t,x,"whitespace")(b):x(b)}function x(b){return b===null||Ae(b)?(t.exit("definition"),r.parser.defined.push(o),a(b)):l(b)}}function BT(t,a,l){return r;function r(d){return gt(d)?Vr(t,o)(d):l(d)}function o(d){return R_(t,u,l,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function u(d){return Ye(d)?Pe(t,c,"whitespace")(d):c(d)}function c(d){return d===null||Ae(d)?a(d):l(d)}}const IT={name:"hardBreakEscape",tokenize:UT};function UT(t,a,l){return r;function r(u){return t.enter("hardBreakEscape"),t.consume(u),o}function o(u){return Ae(u)?(t.exit("hardBreakEscape"),a(u)):l(u)}}const HT={name:"headingAtx",resolve:qT,tokenize:VT};function qT(t,a){let l=t.length-2,r=3,o,u;return t[r][1].type==="whitespace"&&(r+=2),l-2>r&&t[l][1].type==="whitespace"&&(l-=2),t[l][1].type==="atxHeadingSequence"&&(r===l-1||l-4>r&&t[l-2][1].type==="whitespace")&&(l-=r+1===l?2:4),l>r&&(o={type:"atxHeadingText",start:t[r][1].start,end:t[l][1].end},u={type:"chunkText",start:t[r][1].start,end:t[l][1].end,contentType:"text"},Nn(t,r,l-r+1,[["enter",o,a],["enter",u,a],["exit",u,a],["exit",o,a]])),t}function VT(t,a,l){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||gt(_)?(t.exit("atxHeadingSequence"),d(_)):l(_)}function d(_){return _===35?(t.enter("atxHeadingSequence"),m(_)):_===null||Ae(_)?(t.exit("atxHeading"),a(_)):Ye(_)?Pe(t,d,"whitespace")(_):(t.enter("atxHeadingText"),g(_))}function m(_){return _===35?(t.consume(_),m):(t.exit("atxHeadingSequence"),d(_))}function g(_){return _===null||_===35||gt(_)?(t.exit("atxHeadingText"),d(_)):(t.consume(_),g)}}const GT=["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"],my=["pre","script","style","textarea"],$T={concrete:!0,name:"htmlFlow",resolveTo:FT,tokenize:XT},ZT={partial:!0,tokenize:KT},YT={partial:!0,tokenize:QT};function FT(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 XT(t,a,l){const r=this;let o,u,c,d,m;return g;function g(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,O):T===63?(t.consume(T),o=3,r.interrupt?a:E):tn(T)?(t.consume(T),c=String.fromCharCode(T),D):l(T)}function x(T){return T===45?(t.consume(T),o=2,b):T===91?(t.consume(T),o=5,d=0,N):tn(T)?(t.consume(T),o=4,r.interrupt?a:E):l(T)}function b(T){return T===45?(t.consume(T),r.interrupt?a:E):l(T)}function N(T){const J="CDATA[";return T===J.charCodeAt(d++)?(t.consume(T),d===J.length?r.interrupt?a:ae:N):l(T)}function O(T){return tn(T)?(t.consume(T),c=String.fromCharCode(T),D):l(T)}function D(T){if(T===null||T===47||T===62||gt(T)){const J=T===47,me=c.toLowerCase();return!J&&!u&&my.includes(me)?(o=1,r.interrupt?a(T):ae(T)):GT.includes(c.toLowerCase())?(o=6,J?(t.consume(T),k):r.interrupt?a(T):ae(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?l(T):u?M(T):j(T))}return T===45||Jt(T)?(t.consume(T),c+=String.fromCharCode(T),D):l(T)}function k(T){return T===62?(t.consume(T),r.interrupt?a:ae):l(T)}function M(T){return Ye(T)?(t.consume(T),M):z(T)}function j(T){return T===47?(t.consume(T),z):T===58||T===95||tn(T)?(t.consume(T),K):Ye(T)?(t.consume(T),j):z(T)}function K(T){return T===45||T===46||T===58||T===95||Jt(T)?(t.consume(T),K):Y(T)}function Y(T){return T===61?(t.consume(T),I):Ye(T)?(t.consume(T),Y):j(T)}function I(T){return T===null||T===60||T===61||T===62||T===96?l(T):T===34||T===39?(t.consume(T),m=T,U):Ye(T)?(t.consume(T),I):re(T)}function U(T){return T===m?(t.consume(T),m=null,le):T===null||Ae(T)?l(T):(t.consume(T),U)}function re(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||gt(T)?Y(T):(t.consume(T),re)}function le(T){return T===47||T===62||Ye(T)?j(T):l(T)}function z(T){return T===62?(t.consume(T),te):l(T)}function te(T){return T===null||Ae(T)?ae(T):Ye(T)?(t.consume(T),te):l(T)}function ae(T){return T===45&&o===2?(t.consume(T),B):T===60&&o===1?(t.consume(T),W):T===62&&o===4?(t.consume(T),C):T===63&&o===3?(t.consume(T),E):T===93&&o===5?(t.consume(T),Ne):Ae(T)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(ZT,$,ge)(T)):T===null||Ae(T)?(t.exit("htmlFlowData"),ge(T)):(t.consume(T),ae)}function ge(T){return t.check(YT,ne,$)(T)}function ne(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),Z}function Z(T){return T===null||Ae(T)?ge(T):(t.enter("htmlFlowData"),ae(T))}function B(T){return T===45?(t.consume(T),E):ae(T)}function W(T){return T===47?(t.consume(T),c="",ue):ae(T)}function ue(T){if(T===62){const J=c.toLowerCase();return my.includes(J)?(t.consume(T),C):ae(T)}return tn(T)&&c.length<8?(t.consume(T),c+=String.fromCharCode(T),ue):ae(T)}function Ne(T){return T===93?(t.consume(T),E):ae(T)}function E(T){return T===62?(t.consume(T),C):T===45&&o===2?(t.consume(T),E):ae(T)}function C(T){return T===null||Ae(T)?(t.exit("htmlFlowData"),$(T)):(t.consume(T),C)}function $(T){return t.exit("htmlFlow"),a(T)}}function QT(t,a,l){const r=this;return o;function o(c){return Ae(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),u):l(c)}function u(c){return r.parser.lazy[r.now().line]?l(c):a(c)}}function KT(t,a,l){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(Kr,a,l)}}const JT={name:"htmlText",tokenize:PT};function PT(t,a,l){const r=this;let o,u,c;return d;function d(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),m}function m(E){return E===33?(t.consume(E),g):E===47?(t.consume(E),Y):E===63?(t.consume(E),j):tn(E)?(t.consume(E),re):l(E)}function g(E){return E===45?(t.consume(E),_):E===91?(t.consume(E),u=0,N):tn(E)?(t.consume(E),M):l(E)}function _(E){return E===45?(t.consume(E),b):l(E)}function y(E){return E===null?l(E):E===45?(t.consume(E),x):Ae(E)?(c=y,W(E)):(t.consume(E),y)}function x(E){return E===45?(t.consume(E),b):y(E)}function b(E){return E===62?B(E):E===45?x(E):y(E)}function N(E){const C="CDATA[";return E===C.charCodeAt(u++)?(t.consume(E),u===C.length?O:N):l(E)}function O(E){return E===null?l(E):E===93?(t.consume(E),D):Ae(E)?(c=O,W(E)):(t.consume(E),O)}function D(E){return E===93?(t.consume(E),k):O(E)}function k(E){return E===62?B(E):E===93?(t.consume(E),k):O(E)}function M(E){return E===null||E===62?B(E):Ae(E)?(c=M,W(E)):(t.consume(E),M)}function j(E){return E===null?l(E):E===63?(t.consume(E),K):Ae(E)?(c=j,W(E)):(t.consume(E),j)}function K(E){return E===62?B(E):j(E)}function Y(E){return tn(E)?(t.consume(E),I):l(E)}function I(E){return E===45||Jt(E)?(t.consume(E),I):U(E)}function U(E){return Ae(E)?(c=U,W(E)):Ye(E)?(t.consume(E),U):B(E)}function re(E){return E===45||Jt(E)?(t.consume(E),re):E===47||E===62||gt(E)?le(E):l(E)}function le(E){return E===47?(t.consume(E),B):E===58||E===95||tn(E)?(t.consume(E),z):Ae(E)?(c=le,W(E)):Ye(E)?(t.consume(E),le):B(E)}function z(E){return E===45||E===46||E===58||E===95||Jt(E)?(t.consume(E),z):te(E)}function te(E){return E===61?(t.consume(E),ae):Ae(E)?(c=te,W(E)):Ye(E)?(t.consume(E),te):le(E)}function ae(E){return E===null||E===60||E===61||E===62||E===96?l(E):E===34||E===39?(t.consume(E),o=E,ge):Ae(E)?(c=ae,W(E)):Ye(E)?(t.consume(E),ae):(t.consume(E),ne)}function ge(E){return E===o?(t.consume(E),o=void 0,Z):E===null?l(E):Ae(E)?(c=ge,W(E)):(t.consume(E),ge)}function ne(E){return E===null||E===34||E===39||E===60||E===61||E===96?l(E):E===47||E===62||gt(E)?le(E):(t.consume(E),ne)}function Z(E){return E===47||E===62||gt(E)?le(E):l(E)}function B(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),a):l(E)}function W(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),ue}function ue(E){return Ye(E)?Pe(t,Ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Ne(E)}function Ne(E){return t.enter("htmlTextData"),c(E)}}const Td={name:"labelEnd",resolveAll:nN,resolveTo:aN,tokenize:lN},WT={tokenize:iN},eN={tokenize:rN},tN={tokenize:sN};function nN(t){let a=-1;const l=[];for(;++a<t.length;){const r=t[a][1];if(l.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!==l.length&&Nn(t,0,t.length,l),t}function aN(t,a){let l=t.length,r=0,o,u,c,d;for(;l--;)if(o=t[l][1],u){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[l][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(t[l][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(u=l,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(c=l);const m={type:t[u][1].type==="labelLink"?"link":"image",start:{...t[u][1].start},end:{...t[t.length-1][1].end}},g={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 d=[["enter",m,a],["enter",g,a]],d=qn(d,t.slice(u+1,u+r+3)),d=qn(d,[["enter",_,a]]),d=qn(d,Xo(a.parser.constructs.insideSpan.null,t.slice(u+r+4,c-3),a)),d=qn(d,[["exit",_,a],t[c-2],t[c-1],["exit",g,a]]),d=qn(d,t.slice(c+1)),d=qn(d,[["exit",m,a]]),Nn(t,u,t.length,d),t}function lN(t,a,l){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 d;function d(x){return u?u._inactive?y(x):(c=r.parser.defined.includes(Xn(r.sliceSerialize({start:u.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(x),t.exit("labelMarker"),t.exit("labelEnd"),m):l(x)}function m(x){return x===40?t.attempt(WT,_,c?_:y)(x):x===91?t.attempt(eN,_,c?g:y)(x):c?_(x):y(x)}function g(x){return t.attempt(tN,_,y)(x)}function _(x){return a(x)}function y(x){return u._balanced=!0,l(x)}}function iN(t,a,l){return r;function r(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),o}function o(y){return gt(y)?Vr(t,u)(y):u(y)}function u(y){return y===41?_(y):M_(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function c(y){return gt(y)?Vr(t,m)(y):_(y)}function d(y){return l(y)}function m(y){return y===34||y===39||y===40?R_(t,g,l,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):_(y)}function g(y){return gt(y)?Vr(t,_)(y):_(y)}function _(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),a):l(y)}}function rN(t,a,l){const r=this;return o;function o(d){return z_.call(r,t,u,c,"reference","referenceMarker","referenceString")(d)}function u(d){return r.parser.defined.includes(Xn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?a(d):l(d)}function c(d){return l(d)}}function sN(t,a,l){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):l(u)}}const oN={name:"labelStartImage",resolveAll:Td.resolveAll,tokenize:uN};function uN(t,a,l){const r=this;return o;function o(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),u}function u(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):l(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?l(d):a(d)}}const cN={name:"labelStartLink",resolveAll:Td.resolveAll,tokenize:fN};function fN(t,a,l){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?l(c):a(c)}}const Ef={name:"lineEnding",tokenize:dN};function dN(t,a){return l;function l(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Pe(t,a,"linePrefix")}}const Eo={name:"thematicBreak",tokenize:hN};function hN(t,a,l){let r=0,o;return u;function u(g){return t.enter("thematicBreak"),c(g)}function c(g){return o=g,d(g)}function d(g){return g===o?(t.enter("thematicBreakSequence"),m(g)):r>=3&&(g===null||Ae(g))?(t.exit("thematicBreak"),a(g)):l(g)}function m(g){return g===o?(t.consume(g),r++,m):(t.exit("thematicBreakSequence"),Ye(g)?Pe(t,d,"whitespace")(g):d(g))}}const hn={continuation:{tokenize:yN},exit:vN,name:"list",tokenize:gN},mN={partial:!0,tokenize:xN},pN={partial:!0,tokenize:_N};function gN(t,a,l){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 d;function d(b){const N=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:Kf(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(Eo,l,g)(b):g(b);if(!r.interrupt||b===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),m(b)}return l(b)}function m(b){return Kf(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"),g(b)):l(b)}function g(b){return t.enter("listItemMarker"),t.consume(b),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,t.check(Kr,r.interrupt?l:_,t.attempt(mN,x,y))}function _(b){return r.containerState.initialBlankLine=!0,u++,x(b)}function y(b){return Ye(b)?(t.enter("listItemPrefixWhitespace"),t.consume(b),t.exit("listItemPrefixWhitespace"),x):l(b)}function x(b){return r.containerState.size=u+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,a(b)}}function yN(t,a,l){const r=this;return r.containerState._closeFlow=void 0,t.check(Kr,o,u);function o(d){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Pe(t,a,"listItemIndent",r.containerState.size+1)(d)}function u(d){return r.containerState.furtherBlankLines||!Ye(d)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(d)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(pN,a,c)(d))}function c(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,Pe(t,t.attempt(hn,a,l),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function _N(t,a,l){const r=this;return Pe(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):l(u)}}function vN(t){t.exit(this.containerState.type)}function xN(t,a,l){const r=this;return Pe(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!Ye(u)&&c&&c[1].type==="listItemPrefixWhitespace"?a(u):l(u)}}const py={name:"setextUnderline",resolveTo:bN,tokenize:SN};function bN(t,a){let l=t.length,r,o,u;for(;l--;)if(t[l][0]==="enter"){if(t[l][1].type==="content"){r=l;break}t[l][1].type==="paragraph"&&(o=l)}else t[l][1].type==="content"&&t.splice(l,1),!u&&t[l][1].type==="definition"&&(u=l);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 SN(t,a,l){const r=this;let o;return u;function u(g){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=g,c(g)):l(g)}function c(g){return t.enter("setextHeadingLineSequence"),d(g)}function d(g){return g===o?(t.consume(g),d):(t.exit("setextHeadingLineSequence"),Ye(g)?Pe(t,m,"lineSuffix")(g):m(g))}function m(g){return g===null||Ae(g)?(t.exit("setextHeadingLine"),a(g)):l(g)}}const kN={tokenize:TN};function TN(t){const a=this,l=t.attempt(Kr,r,t.attempt(this.parser.constructs.flowInitial,o,Pe(t,t.attempt(this.parser.constructs.flow,o,t.attempt(jT,o)),"linePrefix")));return l;function r(u){if(u===null){t.consume(u);return}return t.enter("lineEndingBlank"),t.consume(u),t.exit("lineEndingBlank"),a.currentConstruct=void 0,l}function o(u){if(u===null){t.consume(u);return}return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),a.currentConstruct=void 0,l}}const NN={resolveAll:D_()},EN=O_("string"),CN=O_("text");function O_(t){return{resolveAll:D_(t==="text"?AN:void 0),tokenize:a};function a(l){const r=this,o=this.parser.constructs[t],u=l.attempt(o,c,d);return c;function c(_){return g(_)?u(_):d(_)}function d(_){if(_===null){l.consume(_);return}return l.enter("data"),l.consume(_),m}function m(_){return g(_)?(l.exit("data"),u(_)):(l.consume(_),m)}function g(_){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 D_(t){return a;function a(l,r){let o=-1,u;for(;++o<=l.length;)u===void 0?l[o]&&l[o][1].type==="data"&&(u=o,o++):(!l[o]||l[o][1].type!=="data")&&(o!==u+2&&(l[u][1].end=l[o-1][1].end,l.splice(u+2,o-u-2),o=u+2),u=void 0);return t?t(l,r):l}}function AN(t,a){let l=0;for(;++l<=t.length;)if((l===t.length||t[l][1].type==="lineEnding")&&t[l-1][1].type==="data"){const r=t[l-1][1],o=a.sliceStream(r);let u=o.length,c=-1,d=0,m;for(;u--;){const g=o[u];if(typeof g=="string"){for(c=g.length;g.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(g===-2)m=!0,d++;else if(g!==-1){u++;break}}if(a._contentTypeTextTrailing&&l===t.length&&(d=0),d){const g={type:l===t.length||m||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?c:r.start._bufferIndex+c,_index:r.start._index+u,line:r.end.line,column:r.end.column-d,offset:r.end.offset-d},end:{...r.end}};r.end={...g.start},r.start.offset===r.end.offset?Object.assign(r,g):(t.splice(l,0,["enter",g,a],["exit",g,a]),l+=2)}l++}return t}const jN={42:hn,43:hn,45:hn,48:hn,49:hn,50:hn,51:hn,52:hn,53:hn,54:hn,55:hn,56:hn,57:hn,62:C_},wN={91:OT},MN={[-2]:Nf,[-1]:Nf,32:Nf},zN={35:HT,42:Eo,45:[py,Eo],60:$T,61:py,95:Eo,96:hy,126:hy},RN={38:j_,92:A_},ON={[-5]:Ef,[-4]:Ef,[-3]:Ef,33:oN,38:j_,42:Jf,60:[cT,JT],91:cN,92:[IT,A_],93:Td,95:Jf,96:kT},DN={null:[Jf,NN]},LN={null:[42,95]},BN={null:[]},IN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:LN,contentInitial:wN,disable:BN,document:jN,flow:zN,flowInitial:MN,insideSpan:DN,string:RN,text:ON},Symbol.toStringTag,{value:"Module"}));function UN(t,a,l){let r={_bufferIndex:-1,_index:0,line:l&&l.line||1,column:l&&l.column||1,offset:l&&l.offset||0};const o={},u=[];let c=[],d=[];const m={attempt:U(Y),check:U(I),consume:M,enter:j,exit:K,interrupt:U(I,{interrupt:!0})},g={code:null,containerState:{},defineSkip:O,events:[],now:N,parser:t,previous:null,sliceSerialize:x,sliceStream:b,write:y};let _=a.tokenize.call(g,m);return a.resolveAll&&u.push(a),g;function y(te){return c=qn(c,te),D(),c[c.length-1]!==null?[]:(re(a,0),g.events=Xo(u,g.events,g),g.events)}function x(te,ae){return qN(b(te),ae)}function b(te){return HN(c,te)}function N(){const{_bufferIndex:te,_index:ae,line:ge,column:ne,offset:Z}=r;return{_bufferIndex:te,_index:ae,line:ge,column:ne,offset:Z}}function O(te){o[te.line]=te.column,z()}function D(){let te;for(;r._index<c.length;){const ae=c[r._index];if(typeof ae=="string")for(te=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===te&&r._bufferIndex<ae.length;)k(ae.charCodeAt(r._bufferIndex));else k(ae)}}function k(te){_=_(te)}function M(te){Ae(te)?(r.line++,r.column=1,r.offset+=te===-3?2:1,z()):te!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),g.previous=te}function j(te,ae){const ge=ae||{};return ge.type=te,ge.start=N(),g.events.push(["enter",ge,g]),d.push(ge),ge}function K(te){const ae=d.pop();return ae.end=N(),g.events.push(["exit",ae,g]),ae}function Y(te,ae){re(te,ae.from)}function I(te,ae){ae.restore()}function U(te,ae){return ge;function ge(ne,Z,B){let W,ue,Ne,E;return Array.isArray(ne)?$(ne):"tokenize"in ne?$([ne]):C(ne);function C(X){return _e;function _e(He){const fe=He!==null&&X[He],ct=He!==null&&X.null,Bt=[...Array.isArray(fe)?fe:fe?[fe]:[],...Array.isArray(ct)?ct:ct?[ct]:[]];return $(Bt)(He)}}function $(X){return W=X,ue=0,X.length===0?B:T(X[ue])}function T(X){return _e;function _e(He){return E=le(),Ne=X,X.partial||(g.currentConstruct=X),X.name&&g.parser.constructs.disable.null.includes(X.name)?me():X.tokenize.call(ae?Object.assign(Object.create(g),ae):g,m,J,me)(He)}}function J(X){return te(Ne,E),Z}function me(X){return E.restore(),++ue<W.length?T(W[ue]):B}}}function re(te,ae){te.resolveAll&&!u.includes(te)&&u.push(te),te.resolve&&Nn(g.events,ae,g.events.length-ae,te.resolve(g.events.slice(ae),g)),te.resolveTo&&(g.events=te.resolveTo(g.events,g))}function le(){const te=N(),ae=g.previous,ge=g.currentConstruct,ne=g.events.length,Z=Array.from(d);return{from:ne,restore:B};function B(){r=te,g.previous=ae,g.currentConstruct=ge,g.events.length=ne,d=Z,z()}}function z(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function HN(t,a){const l=a.start._index,r=a.start._bufferIndex,o=a.end._index,u=a.end._bufferIndex;let c;if(l===o)c=[t[l].slice(r,u)];else{if(c=t.slice(l,o),r>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(r):c.shift()}u>0&&c.push(t[o].slice(0,u))}return c}function qN(t,a){let l=-1;const r=[];let o;for(;++l<t.length;){const u=t[l];let c;if(typeof u=="string")c=u;else switch(u){case-5:{c="\r";break}case-4:{c=`
|
|
246
251
|
`;break}case-3:{c=`\r
|
|
247
|
-
`;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 oN(t){const r={constructs:x_([lN,...(t||{}).extensions||[]]),content:o(k2),defined:[],document:o(N2),flow:o(GT),lazy:{},string:o(YT),text:o(XT)};return r;function o(u){return c;function c(h){return iN(r,u,h)}}}function uN(t){for(;!N_(t););return t}const dy=/[\0\t\n\r]/g;function cN(){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(dy.lastIndex=_,p=dy.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 fN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function dN(t){return t.replace(fN,hN)}function hN(t,a,i){if(a)return a;if(i.charCodeAt(0)===35){const o=i.charCodeAt(1),u=o===120||o===88;return b_(i.slice(u?2:1),u?16:10)}return Sd(i)||t}const z_={}.hasOwnProperty;function mN(t,a,i){return a&&typeof a=="object"&&(i=a,a=void 0),pN(i)(uN(oN(i).document().write(cN()(t,a,!0))))}function pN(t){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Ra),autolinkProtocol:he,autolinkEmail:he,atxHeading:u(gt),blockQuote:u(ut),characterEscape:he,characterReference:he,codeFenced:u(Lt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Lt,c),codeText:u(tn,c),codeTextData:he,data:he,codeFlowValue:he,definition:u(ra),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(me),hardBreakEscape:u(bt),hardBreakTrailing:u(bt),htmlFlow:u(Vn,c),htmlFlowData:he,htmlText:u(Vn,c),htmlTextData:he,image:u(Hl),label:c,link:u(Ra),listItem:u(En),listItemValue:x,listOrdered:u(Oa,_),listUnordered:u(Oa),paragraph:u(ql),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(gt),strong:u(hl),thematicBreak:u(Vl)},exit:{atxHeading:m(),atxHeadingSequence:$,autolink:m(),autolinkEmail:ce,autolinkProtocol:qe,blockQuote:m(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:ue,characterReferenceMarkerNumeric:ue,characterReferenceValue:X,characterReference:xe,codeFenced:m(O),codeFencedFence:L,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:M,codeIndented:m(k),codeText:m(Z),codeTextData:M,data:M,definition:m(),definitionDestinationString:Q,definitionLabelString:z,definitionTitleString:w,emphasis:m(),hardBreakEscape:m(le),hardBreakTrailing:m(le),htmlFlow:m(pe),htmlFlowData:M,htmlText:m(ne),htmlTextData:M,image:m(P),label:Se,labelText:oe,lineEnding:ae,link:m(U),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:te,resourceDestinationString:E,resourceTitleString:C,resource:G,setextHeading:m(de),setextHeadingLineSequence:J,setextHeadingText:B,strong:m(),thematicBreak:m()}};M_(a,(t||{}).mdastExtensions||[]);const i={};return r;function r(F){let ee={type:"root",children:[]};const Ne={stack:[ee],tokenStack:[],config:a,enter:h,exit:p,buffer:c,resume:y,data:i},De=[];let rt=-1;for(;++rt<F.length;)if(F[rt][1].type==="listOrdered"||F[rt][1].type==="listUnordered")if(F[rt][0]==="enter")De.push(rt);else{const mn=De.pop();rt=o(F,mn,rt)}for(rt=-1;++rt<F.length;){const mn=a[F[rt][0]];z_.call(mn,F[rt][1].type)&&mn[F[rt][1].type].call(Object.assign({sliceSerialize:F[rt][2].sliceSerialize},Ne),F[rt][1])}if(Ne.tokenStack.length>0){const mn=Ne.tokenStack[Ne.tokenStack.length-1];(mn[1]||hy).call(Ne,void 0,mn[0])}for(ee.position={start:rl(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:rl(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<a.transforms.length;)ee=a.transforms[rt](ee)||ee;return ee}function o(F,ee,Ne){let De=ee-1,rt=-1,mn=!1,sa,Jt,Rt,nn;for(;++De<=Ne;){const ht=F[De];switch(ht[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ht[0]==="enter"?rt++:rt--,nn=void 0;break}case"lineEndingBlank":{ht[0]==="enter"&&(sa&&!nn&&!rt&&!Rt&&(Rt=De),nn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:nn=void 0}if(!rt&&ht[0]==="enter"&&ht[1].type==="listItemPrefix"||rt===-1&&ht[0]==="exit"&&(ht[1].type==="listUnordered"||ht[1].type==="listOrdered")){if(sa){let Da=De;for(Jt=void 0;Da--;){const Gn=F[Da];if(Gn[1].type==="lineEnding"||Gn[1].type==="lineEndingBlank"){if(Gn[0]==="exit")continue;Jt&&(F[Jt][1].type="lineEndingBlank",mn=!0),Gn[1].type="lineEnding",Jt=Da}else if(!(Gn[1].type==="linePrefix"||Gn[1].type==="blockQuotePrefix"||Gn[1].type==="blockQuotePrefixWhitespace"||Gn[1].type==="blockQuoteMarker"||Gn[1].type==="listItemIndent"))break}Rt&&(!Jt||Rt<Jt)&&(sa._spread=!0),sa.end=Object.assign({},Jt?F[Jt][1].start:ht[1].end),F.splice(Jt||De,0,["exit",sa,ht[2]]),De++,Ne++}if(ht[1].type==="listItemPrefix"){const Da={type:"listItem",_spread:!1,start:Object.assign({},ht[1].start),end:void 0};sa=Da,F.splice(De,0,["enter",Da,ht[2]]),De++,Ne++,Rt=void 0,nn=!0}}}return F[ee][1]._spread=mn,Ne}function u(F,ee){return Ne;function Ne(De){h.call(this,F(De),De),ee&&ee.call(this,De)}}function c(){this.stack.push({type:"fragment",children:[]})}function h(F,ee,Ne){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([ee,Ne||void 0]),F.position={start:rl(ee.start),end:void 0}}function m(F){return ee;function ee(Ne){F&&F.call(this,Ne),p.call(this,Ne)}}function p(F,ee){const Ne=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==F.type&&(ee?ee.call(this,F,De[0]):(De[1]||hy).call(this,F,De[0]));else throw new Error("Cannot close `"+F.type+"` ("+Hr({start:F.start,end:F.end})+"): it’s not open");Ne.position.end=rl(F.end)}function y(){return bd(this.stack.pop())}function _(){this.data.expectingFirstListItemValue=!0}function x(F){if(this.data.expectingFirstListItemValue){const ee=this.stack[this.stack.length-2];ee.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function b(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.lang=F}function N(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.meta=F}function L(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function O(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F.replace(/(\r?\n|\r)$/g,"")}function z(F){const ee=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=ee,Ne.identifier=Fn(this.sliceSerialize(F)).toLowerCase()}function w(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.title=F}function Q(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.url=F}function $(F){const ee=this.stack[this.stack.length-1];if(!ee.depth){const Ne=this.sliceSerialize(F).length;ee.depth=Ne}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function J(F){const ee=this.stack[this.stack.length-1];ee.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function de(){this.data.setextHeadingSlurpLineEnding=void 0}function he(F){const Ne=this.stack[this.stack.length-1].children;let De=Ne[Ne.length-1];(!De||De.type!=="text")&&(De=Bt(),De.position={start:rl(F.start),end:void 0},Ne.push(De)),this.stack.push(De)}function M(F){const ee=this.stack.pop();ee.value+=this.sliceSerialize(F),ee.position.end=rl(F.end)}function ae(F){const ee=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ne=ee.children[ee.children.length-1];Ne.position.end=rl(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(ee.type)&&(he.call(this,F),M.call(this,F))}function le(){this.data.atHardBreak=!0}function pe(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F}function ne(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F}function Z(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.value=F}function U(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=ee,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function P(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const ee=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=ee,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function oe(F){const ee=this.sliceSerialize(F),Ne=this.stack[this.stack.length-2];Ne.label=dN(ee),Ne.identifier=Fn(ee).toLowerCase()}function Se(){const F=this.stack[this.stack.length-1],ee=this.resume(),Ne=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ne.type==="link"){const De=F.children;Ne.children=De}else Ne.alt=ee}function E(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.url=F}function C(){const F=this.resume(),ee=this.stack[this.stack.length-1];ee.title=F}function G(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function te(F){const ee=this.resume(),Ne=this.stack[this.stack.length-1];Ne.label=ee,Ne.identifier=Fn(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function ue(F){this.data.characterReferenceType=F.type}function X(F){const ee=this.sliceSerialize(F),Ne=this.data.characterReferenceType;let De;Ne?(De=b_(ee,Ne==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=Sd(ee);const rt=this.stack[this.stack.length-1];rt.value+=De}function xe(F){const ee=this.stack.pop();ee.position.end=rl(F.end)}function qe(F){M.call(this,F);const ee=this.stack[this.stack.length-1];ee.url=this.sliceSerialize(F)}function ce(F){M.call(this,F);const ee=this.stack[this.stack.length-1];ee.url="mailto:"+this.sliceSerialize(F)}function ut(){return{type:"blockquote",children:[]}}function Lt(){return{type:"code",lang:null,meta:null,value:""}}function tn(){return{type:"inlineCode",value:""}}function ra(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function me(){return{type:"emphasis",children:[]}}function gt(){return{type:"heading",depth:0,children:[]}}function bt(){return{type:"break"}}function Vn(){return{type:"html",value:""}}function Hl(){return{type:"image",title:null,url:"",alt:null}}function Ra(){return{type:"link",title:null,url:"",children:[]}}function Oa(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function En(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function ql(){return{type:"paragraph",children:[]}}function hl(){return{type:"strong",children:[]}}function Bt(){return{type:"text",value:""}}function Vl(){return{type:"thematicBreak"}}}function rl(t){return{line:t.line,column:t.column,offset:t.offset}}function M_(t,a){let i=-1;for(;++i<a.length;){const r=a[i];Array.isArray(r)?M_(t,r):gN(t,r)}}function gN(t,a){let i;for(i in a)if(z_.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 hy(t,a){throw t?new Error("Cannot close `"+t.type+"` ("+Hr({start:t.start,end:t.end})+"): a different token (`"+a.type+"`, "+Hr({start:a.start,end:a.end})+") is open"):new Error("Cannot close document, a token (`"+a.type+"`, "+Hr({start:a.start,end:a.end})+") is still open")}function yN(t){const a=this;a.parser=i;function i(r){return mN(r,{...a.data("settings"),...t,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}function _N(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 vN(t,a){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(a,i),[t.applyData(a,i),{type:"text",value:`
|
|
248
|
-
`}]}function
|
|
249
|
-
`:"",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:
|
|
250
|
-
`}),
|
|
251
|
-
`});const
|
|
252
|
-
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(
|
|
253
|
-
`}]}}const
|
|
254
|
-
`});++r<t.length;)r&&
|
|
255
|
-
`}),
|
|
256
|
-
`}),
|
|
257
|
-
`},o),u}function fE(t,a){return t&&"run"in t?async function(i,r){const o=by(i,{file:r,...a});await t.run(o,r)}:function(i,r){return by(i,{file:r,...t||a})}}function Sy(t){if(t)throw t}var Ef,ky;function dE(){if(ky)return Ef;ky=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 Ef=function m(){var p,y,_,x,b,N,L=arguments[0],O=1,k=arguments.length,z=!1;for(typeof L=="boolean"&&(z=L,L=arguments[1]||{},O=2),(L==null||typeof L!="object"&&typeof L!="function")&&(L={});O<k;++O)if(p=arguments[O],p!=null)for(y in p)_=h(L,y),x=h(p,y),L!==x&&(z&&x&&(u(x)||(b=o(x)))?(b?(b=!1,N=_&&o(_)?_:[]):N=_&&u(_)?_:{},c(L,{name:y,newValue:m(z,N,x)})):typeof x<"u"&&c(L,{name:y,newValue:x}));return L},Ef}var hE=dE();const Cf=$o(hE);function Wf(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 mE(){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?pE(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 pE(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 na={basename:gE,dirname:yE,extname:_E,join:vE,sep:"/"};function gE(t,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Kr(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 yE(t){if(Kr(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 _E(t){Kr(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 vE(...t){let a=-1,i;for(;++a<t.length;)Kr(t[a]),t[a]&&(i=i===void 0?t[a]:i+"/"+t[a]);return i===void 0?".":xE(i)}function xE(t){Kr(t);const a=t.codePointAt(0)===47;let i=bE(t,!a);return i.length===0&&!a&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),a?"/"+i:i}function bE(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 Kr(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const SE={cwd:kE};function kE(){return"/"}function ed(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function TE(t){if(typeof t=="string")t=new URL(t);else if(!ed(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 NE(t)}function NE(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 Af=["history","path","basename","stem","extname","dirname"];class H_{constructor(a){let i;a?ed(a)?i={path:a}:typeof a=="string"||EE(a)?i={value:a}:i=a:i={},this.cwd="cwd"in i?"":SE.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Af.length;){const u=Af[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)Af.includes(o)||(this[o]=i[o])}get basename(){return typeof this.path=="string"?na.basename(this.path):void 0}set basename(a){jf(a,"basename"),wf(a,"basename"),this.path=na.join(this.dirname||"",a)}get dirname(){return typeof this.path=="string"?na.dirname(this.path):void 0}set dirname(a){Ty(this.basename,"dirname"),this.path=na.join(a||"",this.basename)}get extname(){return typeof this.path=="string"?na.extname(this.path):void 0}set extname(a){if(wf(a,"extname"),Ty(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=na.join(this.dirname,this.stem+(a||""))}get path(){return this.history[this.history.length-1]}set path(a){ed(a)&&(a=TE(a)),jf(a,"path"),this.path!==a&&this.history.push(a)}get stem(){return typeof this.path=="string"?na.basename(this.path,this.extname):void 0}set stem(a){jf(a,"stem"),wf(a,"stem"),this.path=na.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 wf(t,a){if(t&&t.includes(na.sep))throw new Error("`"+a+"` cannot be a path: did not expect `"+na.sep+"`")}function jf(t,a){if(!t)throw new Error("`"+a+"` cannot be empty")}function Ty(t,a){if(!t)throw new Error("Setting `"+a+"` requires `path` to be set too")}function EE(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const CE=(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 wd extends CE{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=mE()}copy(){const a=new wd;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];a.use(...r)}return a.data(Cf(!0,{},this.namespace)),a}data(a,i){return typeof a=="string"?arguments.length===2?(Rf("data",this.frozen),this.namespace[a]=i,this):AE.call(this.namespace,a)&&this.namespace[a]||void 0:a?(Rf("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=xo(a),r=this.parser||this.Parser;return zf("parse",r),r(String(i),i)}process(a,i){const r=this;return this.freeze(),zf("process",this.parser||this.Parser),Mf("process",this.compiler||this.Compiler),i?o(void 0,i):new Promise(o);function o(u,c){const h=xo(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);zE(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(),zf("processSync",this.parser||this.Parser),Mf("processSync",this.compiler||this.Compiler),this.process(a,o),Ey("processSync","process",i),r;function o(u,c){i=!0,Sy(u),r=c}}run(a,i,r){Ny(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=xo(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),Ey("runSync","run",r),o;function u(c,h){Sy(c),o=h,r=!0}}stringify(a,i){this.freeze();const r=xo(i),o=this.compiler||this.Compiler;return Mf("stringify",o),Ny(a),o(a,r)}use(a,...i){const r=this.attachers,o=this.namespace;if(Rf("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=Cf(!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 L=r[x][1];Wf(L)&&Wf(b)&&(b=Cf(!0,L,b)),r[x]=[p,b,...N]}}}}const wE=new wd().freeze();function zf(t,a){if(typeof a!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Mf(t,a){if(typeof a!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Rf(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 Ny(t){if(!Wf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Ey(t,a,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+a+"` instead")}function xo(t){return jE(t)?t:new H_(t)}function jE(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function zE(t){return typeof t=="string"||ME(t)}function ME(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const RE="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Cy=[],Ay={allowDangerousHtml:!0},OE=/^(https?|ircs?|mailto|xmpp)$/i,DE=[{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 LE(t){const a=BE(t),i=UE(t);return IE(a.runSync(a.parse(i),i),t)}function BE(t){const a=t.rehypePlugins||Cy,i=t.remarkPlugins||Cy,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Ay}:Ay;return wE().use(yN).use(i).use(fE,r).use(a)}function UE(t){const a=t.children||"",i=new H_;return typeof a=="string"&&(i.value=a),i}function IE(t,a){const i=a.allowedElements,r=a.allowElement,o=a.components,u=a.disallowedElements,c=a.skipHtml,h=a.unwrapDisallowed,m=a.urlTransform||HE;for(const y of DE)Object.hasOwn(a,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+RE+y.id,void 0);return Ad(t,p),e2(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 kf)if(Object.hasOwn(kf,b)&&Object.hasOwn(y.properties,b)){const N=y.properties[b],L=kf[b];(L===null||L.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 HE(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||OE.test(t.slice(0,a))?t:""}function wy(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 qE(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function VE(t,a,i){const o=Qo((i||{}).ignore||[]),u=GE(a);let c=-1;for(;++c<u.length;)I_(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 O=_.children.indexOf(p);let k=!1,z=[];x.lastIndex=0;let w=x.exec(p.value);for(;w;){const Q=w.index,$={index:w.index,input:w.input,stack:[...y,p]};let B=b(...w,$);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?x.lastIndex=Q+1:(N!==Q&&z.push({type:"text",value:p.value.slice(N,Q)}),Array.isArray(B)?z.push(...B):B&&z.push(B),N=Q+w[0].length,k=!0),!x.global)break;w=x.exec(p.value)}return k?(N<p.value.length&&z.push({type:"text",value:p.value.slice(N)}),_.children.splice(O,1,...z)):z=[p],O+z.length}}function GE(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([$E(o[0]),ZE(o[1])])}return a}function $E(t){return typeof t=="string"?new RegExp(qE(t),"g"):t}function ZE(t){return typeof t=="function"?t:function(){return t}}const Of="phrasing",Df=["autolink","link","image","label"];function YE(){return{transforms:[WE],enter:{literalAutolink:FE,literalAutolinkEmail:Lf,literalAutolinkHttp:Lf,literalAutolinkWww:Lf},exit:{literalAutolink:PE,literalAutolinkEmail:JE,literalAutolinkHttp:QE,literalAutolinkWww:KE}}}function XE(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Of,notInConstruct:Df},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Of,notInConstruct:Df},{character:":",before:"[ps]",after:"\\/",inConstruct:Of,notInConstruct:Df}]}}function FE(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Lf(t){this.config.enter.autolinkProtocol.call(this,t)}function QE(t){this.config.exit.autolinkProtocol.call(this,t)}function KE(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 JE(t){this.config.exit.autolinkEmail.call(this,t)}function PE(t){this.exit(t)}function WE(t){VE(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,eC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),tC]],{ignore:["link","linkReference"]})}function eC(t,a,i,r,o){let u="";if(!q_(o)||(/^w/i.test(a)&&(i=a+i,a="",u="http://"),!nC(i)))return!1;const c=aC(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 tC(t,a,i,r){return!q_(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+a+"@"+i,children:[{type:"text",value:a+"@"+i}]}}function nC(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 aC(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=wy(t,"(");let u=wy(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 q_(t,a){const i=t.input.charCodeAt(t.index-1);return(t.index===0||Ol(i)||Yo(i))&&(!a||i!==47)}V_.peek=dC;function lC(){this.buffer()}function iC(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function rC(){this.buffer()}function sC(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function oC(t){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Fn(this.sliceSerialize(t)).toLowerCase(),i.label=a}function uC(t){this.exit(t)}function cC(t){const a=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=Fn(this.sliceSerialize(t)).toLowerCase(),i.label=a}function fC(t){this.exit(t)}function dC(){return"["}function V_(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 hC(){return{enter:{gfmFootnoteCallString:lC,gfmFootnoteCall:iC,gfmFootnoteDefinitionLabelString:rC,gfmFootnoteDefinition:sC},exit:{gfmFootnoteCallString:oC,gfmFootnoteCall:uC,gfmFootnoteDefinitionLabelString:cC,gfmFootnoteDefinition:fC}}}function mC(t){let a=!1;return t&&t.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:i,footnoteReference:V_},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?`
|
|
258
|
-
`:" ")+u.indentLines(u.containerFlow(r,
|
|
259
|
-
`)}function
|
|
260
|
-
`&&
|
|
261
|
-
`}function
|
|
262
|
-
`,encode:["`"],...
|
|
263
|
-
`),u&&(
|
|
264
|
-
`)),
|
|
265
|
-
`,...m.current()}))),
|
|
252
|
+
`;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 VN(t){const r={constructs:N_([IN,...(t||{}).extensions||[]]),content:o(aT),defined:[],document:o(iT),flow:o(kN),lazy:{},string:o(EN),text:o(CN)};return r;function o(u){return c;function c(d){return UN(r,u,d)}}}function GN(t){for(;!w_(t););return t}const gy=/[\0\t\n\r]/g;function $N(){let t=1,a="",l=!0,r;return o;function o(u,c,d){const m=[];let g,_,y,x,b;for(u=a+(typeof u=="string"?u.toString():new TextDecoder(c||void 0).decode(u)),y=0,a="",l&&(u.charCodeAt(0)===65279&&y++,l=void 0);y<u.length;){if(gy.lastIndex=y,g=gy.exec(u),x=g&&g.index!==void 0?g.index:u.length,b=u.charCodeAt(x),!g){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 d&&(r&&m.push(-5),a&&m.push(a),m.push(null)),m}}const ZN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function YN(t){return t.replace(ZN,FN)}function FN(t,a,l){if(a)return a;if(l.charCodeAt(0)===35){const o=l.charCodeAt(1),u=o===120||o===88;return E_(l.slice(u?2:1),u?16:10)}return kd(l)||t}const L_={}.hasOwnProperty;function XN(t,a,l){return a&&typeof a=="object"&&(l=a,a=void 0),QN(l)(GN(VN(l).document().write($N()(t,a,!0))))}function QN(t){const a={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(Oa),autolinkProtocol:le,autolinkEmail:le,atxHeading:u(_t),blockQuote:u(ct),characterEscape:le,characterReference:le,codeFenced:u(Bt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:u(Bt,c),codeText:u(an,c),codeTextData:le,data:le,codeFlowValue:le,definition:u(Kn),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:u(pe),hardBreakEscape:u(St),hardBreakTrailing:u(St),htmlFlow:u(Cn,c),htmlFlowData:le,htmlText:u(Cn,c),htmlTextData:le,image:u(pl),label:c,link:u(Oa),listItem:u(gl),listItemValue:x,listOrdered:u(Da,y),listUnordered:u(Da),paragraph:u(Hi),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:u(_t),strong:u(Jn),thematicBreak:u(yl)},exit:{atxHeading:m(),atxHeadingSequence:Y,autolink:m(),autolinkEmail:fe,autolinkProtocol:He,blockQuote:m(),characterEscapeValue:z,characterReferenceMarkerHexadecimal:me,characterReferenceMarkerNumeric:me,characterReferenceValue:X,characterReference:_e,codeFenced:m(D),codeFencedFence:O,codeFencedFenceInfo:b,codeFencedFenceMeta:N,codeFlowValue:z,codeIndented:m(k),codeText:m(Z),codeTextData:z,data:z,definition:m(),definitionDestinationString:K,definitionLabelString:M,definitionTitleString:j,emphasis:m(),hardBreakEscape:m(ae),hardBreakTrailing:m(ae),htmlFlow:m(ge),htmlFlowData:z,htmlText:m(ne),htmlTextData:z,image:m(W),label:Ne,labelText:ue,lineEnding:te,link:m(B),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:J,resourceDestinationString:E,resourceTitleString:C,resource:$,setextHeading:m(re),setextHeadingLineSequence:U,setextHeadingText:I,strong:m(),thematicBreak:m()}};B_(a,(t||{}).mdastExtensions||[]);const l={};return r;function r(Q){let ce={type:"root",children:[]};const de={stack:[ce],tokenStack:[],config:a,enter:d,exit:g,buffer:c,resume:_,data:l},we=[];let Me=-1;for(;++Me<Q.length;)if(Q[Me][1].type==="listOrdered"||Q[Me][1].type==="listUnordered")if(Q[Me][0]==="enter")we.push(Me);else{const Ft=we.pop();Me=o(Q,Ft,Me)}for(Me=-1;++Me<Q.length;){const Ft=a[Q[Me][0]];L_.call(Ft,Q[Me][1].type)&&Ft[Q[Me][1].type].call(Object.assign({sliceSerialize:Q[Me][2].sliceSerialize},de),Q[Me][1])}if(de.tokenStack.length>0){const Ft=de.tokenStack[de.tokenStack.length-1];(Ft[1]||yy).call(de,void 0,Ft[0])}for(ce.position={start:sl(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:sl(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<a.transforms.length;)ce=a.transforms[Me](ce)||ce;return ce}function o(Q,ce,de){let we=ce-1,Me=-1,Ft=!1,oa,Wt,Ot,ln;for(;++we<=de;){const mt=Q[we];switch(mt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mt[0]==="enter"?Me++:Me--,ln=void 0;break}case"lineEndingBlank":{mt[0]==="enter"&&(oa&&!ln&&!Me&&!Ot&&(Ot=we),ln=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ln=void 0}if(!Me&&mt[0]==="enter"&&mt[1].type==="listItemPrefix"||Me===-1&&mt[0]==="exit"&&(mt[1].type==="listUnordered"||mt[1].type==="listOrdered")){if(oa){let La=we;for(Wt=void 0;La--;){const Gn=Q[La];if(Gn[1].type==="lineEnding"||Gn[1].type==="lineEndingBlank"){if(Gn[0]==="exit")continue;Wt&&(Q[Wt][1].type="lineEndingBlank",Ft=!0),Gn[1].type="lineEnding",Wt=La}else if(!(Gn[1].type==="linePrefix"||Gn[1].type==="blockQuotePrefix"||Gn[1].type==="blockQuotePrefixWhitespace"||Gn[1].type==="blockQuoteMarker"||Gn[1].type==="listItemIndent"))break}Ot&&(!Wt||Ot<Wt)&&(oa._spread=!0),oa.end=Object.assign({},Wt?Q[Wt][1].start:mt[1].end),Q.splice(Wt||we,0,["exit",oa,mt[2]]),we++,de++}if(mt[1].type==="listItemPrefix"){const La={type:"listItem",_spread:!1,start:Object.assign({},mt[1].start),end:void 0};oa=La,Q.splice(we,0,["enter",La,mt[2]]),we++,de++,Ot=void 0,ln=!0}}}return Q[ce][1]._spread=Ft,de}function u(Q,ce){return de;function de(we){d.call(this,Q(we),we),ce&&ce.call(this,we)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(Q,ce,de){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([ce,de||void 0]),Q.position={start:sl(ce.start),end:void 0}}function m(Q){return ce;function ce(de){Q&&Q.call(this,de),g.call(this,de)}}function g(Q,ce){const de=this.stack.pop(),we=this.tokenStack.pop();if(we)we[0].type!==Q.type&&(ce?ce.call(this,Q,we[0]):(we[1]||yy).call(this,Q,we[0]));else throw new Error("Cannot close `"+Q.type+"` ("+qr({start:Q.start,end:Q.end})+"): it’s not open");de.position.end=sl(Q.end)}function _(){return Sd(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function x(Q){if(this.data.expectingFirstListItemValue){const ce=this.stack[this.stack.length-2];ce.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function b(){const Q=this.resume(),ce=this.stack[this.stack.length-1];ce.lang=Q}function N(){const Q=this.resume(),ce=this.stack[this.stack.length-1];ce.meta=Q}function O(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function D(){const Q=this.resume(),ce=this.stack[this.stack.length-1];ce.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const Q=this.resume(),ce=this.stack[this.stack.length-1];ce.value=Q.replace(/(\r?\n|\r)$/g,"")}function M(Q){const ce=this.resume(),de=this.stack[this.stack.length-1];de.label=ce,de.identifier=Xn(this.sliceSerialize(Q)).toLowerCase()}function j(){const Q=this.resume(),ce=this.stack[this.stack.length-1];ce.title=Q}function K(){const Q=this.resume(),ce=this.stack[this.stack.length-1];ce.url=Q}function Y(Q){const ce=this.stack[this.stack.length-1];if(!ce.depth){const de=this.sliceSerialize(Q).length;ce.depth=de}}function I(){this.data.setextHeadingSlurpLineEnding=!0}function U(Q){const ce=this.stack[this.stack.length-1];ce.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function re(){this.data.setextHeadingSlurpLineEnding=void 0}function le(Q){const de=this.stack[this.stack.length-1].children;let we=de[de.length-1];(!we||we.type!=="text")&&(we=It(),we.position={start:sl(Q.start),end:void 0},de.push(we)),this.stack.push(we)}function z(Q){const ce=this.stack.pop();ce.value+=this.sliceSerialize(Q),ce.position.end=sl(Q.end)}function te(Q){const ce=this.stack[this.stack.length-1];if(this.data.atHardBreak){const de=ce.children[ce.children.length-1];de.position.end=sl(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&a.canContainEols.includes(ce.type)&&(le.call(this,Q),z.call(this,Q))}function ae(){this.data.atHardBreak=!0}function ge(){const Q=this.resume(),ce=this.stack[this.stack.length-1];ce.value=Q}function ne(){const Q=this.resume(),ce=this.stack[this.stack.length-1];ce.value=Q}function Z(){const Q=this.resume(),ce=this.stack[this.stack.length-1];ce.value=Q}function B(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ce,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function W(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ce=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ce,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function ue(Q){const ce=this.sliceSerialize(Q),de=this.stack[this.stack.length-2];de.label=YN(ce),de.identifier=Xn(ce).toLowerCase()}function Ne(){const Q=this.stack[this.stack.length-1],ce=this.resume(),de=this.stack[this.stack.length-1];if(this.data.inReference=!0,de.type==="link"){const we=Q.children;de.children=we}else de.alt=ce}function E(){const Q=this.resume(),ce=this.stack[this.stack.length-1];ce.url=Q}function C(){const Q=this.resume(),ce=this.stack[this.stack.length-1];ce.title=Q}function $(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function J(Q){const ce=this.resume(),de=this.stack[this.stack.length-1];de.label=ce,de.identifier=Xn(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function me(Q){this.data.characterReferenceType=Q.type}function X(Q){const ce=this.sliceSerialize(Q),de=this.data.characterReferenceType;let we;de?(we=E_(ce,de==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):we=kd(ce);const Me=this.stack[this.stack.length-1];Me.value+=we}function _e(Q){const ce=this.stack.pop();ce.position.end=sl(Q.end)}function He(Q){z.call(this,Q);const ce=this.stack[this.stack.length-1];ce.url=this.sliceSerialize(Q)}function fe(Q){z.call(this,Q);const ce=this.stack[this.stack.length-1];ce.url="mailto:"+this.sliceSerialize(Q)}function ct(){return{type:"blockquote",children:[]}}function Bt(){return{type:"code",lang:null,meta:null,value:""}}function an(){return{type:"inlineCode",value:""}}function Kn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function pe(){return{type:"emphasis",children:[]}}function _t(){return{type:"heading",depth:0,children:[]}}function St(){return{type:"break"}}function Cn(){return{type:"html",value:""}}function pl(){return{type:"image",title:null,url:"",alt:null}}function Oa(){return{type:"link",title:null,url:"",children:[]}}function Da(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function gl(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function Hi(){return{type:"paragraph",children:[]}}function Jn(){return{type:"strong",children:[]}}function It(){return{type:"text",value:""}}function yl(){return{type:"thematicBreak"}}}function sl(t){return{line:t.line,column:t.column,offset:t.offset}}function B_(t,a){let l=-1;for(;++l<a.length;){const r=a[l];Array.isArray(r)?B_(t,r):KN(t,r)}}function KN(t,a){let l;for(l in a)if(L_.call(a,l))switch(l){case"canContainEols":{const r=a[l];r&&t[l].push(...r);break}case"transforms":{const r=a[l];r&&t[l].push(...r);break}case"enter":case"exit":{const r=a[l];r&&Object.assign(t[l],r);break}}}function yy(t,a){throw t?new Error("Cannot close `"+t.type+"` ("+qr({start:t.start,end:t.end})+"): a different token (`"+a.type+"`, "+qr({start:a.start,end:a.end})+") is open"):new Error("Cannot close document, a token (`"+a.type+"`, "+qr({start:a.start,end:a.end})+") is still open")}function JN(t){const a=this;a.parser=l;function l(r){return XN(r,{...a.data("settings"),...t,extensions:a.data("micromarkExtensions")||[],mdastExtensions:a.data("fromMarkdownExtensions")||[]})}}function PN(t,a){const l={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(a),!0)};return t.patch(a,l),t.applyData(a,l)}function WN(t,a){const l={type:"element",tagName:"br",properties:{},children:[]};return t.patch(a,l),[t.applyData(a,l),{type:"text",value:`
|
|
253
|
+
`}]}function eE(t,a){const l=a.value?a.value+`
|
|
254
|
+
`:"",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:l}]};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 tE(t,a){const l={type:"element",tagName:"del",properties:{},children:t.all(a)};return t.patch(a,l),t.applyData(a,l)}function nE(t,a){const l={type:"element",tagName:"em",properties:{},children:t.all(a)};return t.patch(a,l),t.applyData(a,l)}function aE(t,a){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(a.identifier).toUpperCase(),o=Ii(r.toLowerCase()),u=t.footnoteOrder.indexOf(r);let c,d=t.footnoteCounts.get(r);d===void 0?(d=0,t.footnoteOrder.push(r),c=t.footnoteOrder.length):c=u+1,d+=1,t.footnoteCounts.set(r,d);const m={type:"element",tagName:"a",properties:{href:"#"+l+"fn-"+o,id:l+"fnref-"+o+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(a,m);const g={type:"element",tagName:"sup",properties:{},children:[m]};return t.patch(a,g),t.applyData(a,g)}function lE(t,a){const l={type:"element",tagName:"h"+a.depth,properties:{},children:t.all(a)};return t.patch(a,l),t.applyData(a,l)}function iE(t,a){if(t.options.allowDangerousHtml){const l={type:"raw",value:a.value};return t.patch(a,l),t.applyData(a,l)}}function I_(t,a){const l=a.referenceType;let r="]";if(l==="collapsed"?r+="[]":l==="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 rE(t,a){const l=String(a.identifier).toUpperCase(),r=t.definitionById.get(l);if(!r)return I_(t,a);const o={src:Ii(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 sE(t,a){const l={src:Ii(a.url)};a.alt!==null&&a.alt!==void 0&&(l.alt=a.alt),a.title!==null&&a.title!==void 0&&(l.title=a.title);const r={type:"element",tagName:"img",properties:l,children:[]};return t.patch(a,r),t.applyData(a,r)}function oE(t,a){const l={type:"text",value:a.value.replace(/\r?\n|\r/g," ")};t.patch(a,l);const r={type:"element",tagName:"code",properties:{},children:[l]};return t.patch(a,r),t.applyData(a,r)}function uE(t,a){const l=String(a.identifier).toUpperCase(),r=t.definitionById.get(l);if(!r)return I_(t,a);const o={href:Ii(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 cE(t,a){const l={href:Ii(a.url)};a.title!==null&&a.title!==void 0&&(l.title=a.title);const r={type:"element",tagName:"a",properties:l,children:t.all(a)};return t.patch(a,r),t.applyData(a,r)}function fE(t,a,l){const r=t.all(a),o=l?dE(l):U_(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 d=-1;for(;++d<r.length;){const _=r[d];(o||d!==0||_.type!=="element"||_.tagName!=="p")&&c.push({type:"text",value:`
|
|
255
|
+
`}),_.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:`
|
|
256
|
+
`});const g={type:"element",tagName:"li",properties:u,children:c};return t.patch(a,g),t.applyData(a,g)}function dE(t){let a=!1;if(t.type==="list"){a=t.spread||!1;const l=t.children;let r=-1;for(;!a&&++r<l.length;)a=U_(l[r])}return a}function U_(t){const a=t.spread;return a??t.children.length>1}function hE(t,a){const l={},r=t.all(a);let o=-1;for(typeof a.start=="number"&&a.start!==1&&(l.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")){l.className=["contains-task-list"];break}}const u={type:"element",tagName:a.ordered?"ol":"ul",properties:l,children:t.wrap(r,!0)};return t.patch(a,u),t.applyData(a,u)}function mE(t,a){const l={type:"element",tagName:"p",properties:{},children:t.all(a)};return t.patch(a,l),t.applyData(a,l)}function pE(t,a){const l={type:"root",children:t.wrap(t.all(a))};return t.patch(a,l),t.applyData(a,l)}function gE(t,a){const l={type:"element",tagName:"strong",properties:{},children:t.all(a)};return t.patch(a,l),t.applyData(a,l)}function yE(t,a){const l=t.all(a),r=l.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(l.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(l,!0)},d=_d(a.children[1]),m=__(a.children[a.children.length-1]);d&&m&&(c.position={start:d,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 _E(t,a,l){const r=l?l.children:void 0,u=(r?r.indexOf(a):1)===0?"th":"td",c=l&&l.type==="table"?l.align:void 0,d=c?c.length:a.children.length;let m=-1;const g=[];for(;++m<d;){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)),g.push(N)}const _={type:"element",tagName:"tr",properties:{},children:t.wrap(g,!0)};return t.patch(a,_),t.applyData(a,_)}function vE(t,a){const l={type:"element",tagName:"td",properties:{},children:t.all(a)};return t.patch(a,l),t.applyData(a,l)}const _y=9,vy=32;function xE(t){const a=String(t),l=/\r?\n|\r/g;let r=l.exec(a),o=0;const u=[];for(;r;)u.push(xy(a.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=l.exec(a);return u.push(xy(a.slice(o),o>0,!1)),u.join("")}function xy(t,a,l){let r=0,o=t.length;if(a){let u=t.codePointAt(r);for(;u===_y||u===vy;)r++,u=t.codePointAt(r)}if(l){let u=t.codePointAt(o-1);for(;u===_y||u===vy;)o--,u=t.codePointAt(o-1)}return o>r?t.slice(r,o):""}function bE(t,a){const l={type:"text",value:xE(String(a.value))};return t.patch(a,l),t.applyData(a,l)}function SE(t,a){const l={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(a,l),t.applyData(a,l)}const kE={blockquote:PN,break:WN,code:eE,delete:tE,emphasis:nE,footnoteReference:aE,heading:lE,html:iE,imageReference:rE,image:sE,inlineCode:oE,linkReference:uE,link:cE,listItem:fE,list:hE,paragraph:mE,root:pE,strong:gE,table:yE,tableCell:vE,tableRow:_E,text:bE,thematicBreak:SE,toml:vo,yaml:vo,definition:vo,footnoteDefinition:vo};function vo(){}const H_=-1,Qo=0,Gr=1,Mo=2,Nd=3,Ed=4,Cd=5,Ad=6,q_=7,V_=8,by=typeof self=="object"?self:globalThis,TE=(t,a)=>{const l=(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 Qo:case H_:return l(c,o);case Gr:{const d=l([],o);for(const m of c)d.push(r(m));return d}case Mo:{const d=l({},o);for(const[m,g]of c)d[r(m)]=r(g);return d}case Nd:return l(new Date(c),o);case Ed:{const{source:d,flags:m}=c;return l(new RegExp(d,m),o)}case Cd:{const d=l(new Map,o);for(const[m,g]of c)d.set(r(m),r(g));return d}case Ad:{const d=l(new Set,o);for(const m of c)d.add(r(m));return d}case q_:{const{name:d,message:m}=c;return l(new by[d](m),o)}case V_:return l(BigInt(c),o);case"BigInt":return l(Object(BigInt(c)),o);case"ArrayBuffer":return l(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return l(new DataView(d),c)}}return l(new by[u](c),o)};return r},Sy=t=>TE(new Map,t)(0),Ai="",{toString:NE}={},{keys:EE}=Object,Ir=t=>{const a=typeof t;if(a!=="object"||!t)return[Qo,a];const l=NE.call(t).slice(8,-1);switch(l){case"Array":return[Gr,Ai];case"Object":return[Mo,Ai];case"Date":return[Nd,Ai];case"RegExp":return[Ed,Ai];case"Map":return[Cd,Ai];case"Set":return[Ad,Ai];case"DataView":return[Gr,l]}return l.includes("Array")?[Gr,l]:l.includes("Error")?[q_,l]:[Mo,l]},xo=([t,a])=>t===Qo&&(a==="function"||a==="symbol"),CE=(t,a,l,r)=>{const o=(c,d)=>{const m=r.push(c)-1;return l.set(d,m),m},u=c=>{if(l.has(c))return l.get(c);let[d,m]=Ir(c);switch(d){case Qo:{let _=c;switch(m){case"bigint":d=V_,_=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+m);_=null;break;case"undefined":return o([H_],c)}return o([d,_],c)}case Gr:{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([d,_],c);for(const x of c)_.push(u(x));return y}case Mo:{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([d,_],c);for(const x of EE(c))(t||!xo(Ir(c[x])))&&_.push([u(x),u(c[x])]);return y}case Nd:return o([d,c.toISOString()],c);case Ed:{const{source:_,flags:y}=c;return o([d,{source:_,flags:y}],c)}case Cd:{const _=[],y=o([d,_],c);for(const[x,b]of c)(t||!(xo(Ir(x))||xo(Ir(b))))&&_.push([u(x),u(b)]);return y}case Ad:{const _=[],y=o([d,_],c);for(const x of c)(t||!xo(Ir(x)))&&_.push(u(x));return y}}const{message:g}=c;return o([d,{name:m,message:g}],c)};return u},ky=(t,{json:a,lossy:l}={})=>{const r=[];return CE(!(a||l),!!a,new Map,r)(t),r},zo=typeof structuredClone=="function"?(t,a)=>a&&("json"in a||"lossy"in a)?Sy(ky(t,a)):structuredClone(t):(t,a)=>Sy(ky(t,a));function AE(t,a){const l=[{type:"text",value:"↩"}];return a>1&&l.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(a)}]}),l}function jE(t,a){return"Back to reference "+(t+1)+(a>1?"-"+a:"")}function wE(t){const a=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",l=t.options.footnoteBackContent||AE,r=t.options.footnoteBackLabel||jE,o=t.options.footnoteLabel||"Footnotes",u=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let m=-1;for(;++m<t.footnoteOrder.length;){const g=t.footnoteById.get(t.footnoteOrder[m]);if(!g)continue;const _=t.all(g),y=String(g.identifier).toUpperCase(),x=Ii(y.toLowerCase());let b=0;const N=[],O=t.footnoteCounts.get(y);for(;O!==void 0&&++b<=O;){N.length>0&&N.push({type:"text",value:" "});let M=typeof l=="string"?l:l(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 D=_[_.length-1];if(D&&D.type==="element"&&D.tagName==="p"){const M=D.children[D.children.length-1];M&&M.type==="text"?M.value+=" ":D.children.push({type:"text",value:" "}),D.children.push(...N)}else _.push(...N);const k={type:"element",tagName:"li",properties:{id:a+"fn-"+x},children:t.wrap(_,!0)};t.patch(g,k),d.push(k)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...zo(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
257
|
+
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
|
|
258
|
+
`}]}}const Ko=(function(t){if(t==null)return OE;if(typeof t=="function")return Jo(t);if(typeof t=="object")return Array.isArray(t)?ME(t):zE(t);if(typeof t=="string")return RE(t);throw new Error("Expected function, string, or object as test")});function ME(t){const a=[];let l=-1;for(;++l<t.length;)a[l]=Ko(t[l]);return Jo(r);function r(...o){let u=-1;for(;++u<a.length;)if(a[u].apply(this,o))return!0;return!1}}function zE(t){const a=t;return Jo(l);function l(r){const o=r;let u;for(u in t)if(o[u]!==a[u])return!1;return!0}}function RE(t){return Jo(a);function a(l){return l&&l.type===t}}function Jo(t){return a;function a(l,r,o){return!!(DE(l)&&t.call(this,l,typeof r=="number"?r:void 0,o||void 0))}}function OE(){return!0}function DE(t){return t!==null&&typeof t=="object"&&"type"in t}const G_=[],LE=!0,Pf=!1,BE="skip";function $_(t,a,l,r){let o;typeof a=="function"&&typeof l!="function"?(r=l,l=a):o=a;const u=Ko(o),c=r?-1:1;d(t,void 0,[])();function d(m,g,_){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=G_,N,O,D;if((!a||u(m,g,_[_.length-1]||void 0))&&(b=IE(l(m,_)),b[0]===Pf))return b;if("children"in m&&m.children){const k=m;if(k.children&&b[0]!==BE)for(O=(r?k.children.length:-1)+c,D=_.concat(k);O>-1&&O<k.children.length;){const M=k.children[O];if(N=d(M,O,D)(),N[0]===Pf)return N;O=typeof N[1]=="number"?N[1]:O+c}}return b}}}function IE(t){return Array.isArray(t)?t:typeof t=="number"?[LE,t]:t==null?G_:[t]}function jd(t,a,l,r){let o,u,c;typeof a=="function"&&typeof l!="function"?(u=void 0,c=a,o=l):(u=a,c=l,o=r),$_(t,u,d,o);function d(m,g){const _=g[g.length-1],y=_?_.children.indexOf(m):void 0;return c(m,y,_)}}const Wf={}.hasOwnProperty,UE={};function HE(t,a){const l=a||UE,r=new Map,o=new Map,u=new Map,c={...kE,...l.handlers},d={all:g,applyData:VE,definitionById:r,footnoteById:o,footnoteCounts:u,footnoteOrder:[],handlers:c,one:m,options:l,patch:qE,wrap:$E};return jd(t,function(_){if(_.type==="definition"||_.type==="footnoteDefinition"){const y=_.type==="definition"?r:o,x=String(_.identifier).toUpperCase();y.has(x)||y.set(x,_)}}),d;function m(_,y){const x=_.type,b=d.handlers[x];if(Wf.call(d.handlers,x)&&b)return b(d,_,y);if(d.options.passThrough&&d.options.passThrough.includes(x)){if("children"in _){const{children:O,...D}=_,k=zo(D);return k.children=d.all(_),k}return zo(_)}return(d.options.unknownHandler||GE)(d,_,y)}function g(_){const y=[];if("children"in _){const x=_.children;let b=-1;for(;++b<x.length;){const N=d.one(x[b],_);if(N){if(b&&x[b-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=Ty(N.value)),!Array.isArray(N)&&N.type==="element")){const O=N.children[0];O&&O.type==="text"&&(O.value=Ty(O.value))}Array.isArray(N)?y.push(...N):y.push(N)}}}return y}}function qE(t,a){t.position&&(a.position=j2(t))}function VE(t,a){let l=a;if(t&&t.data){const r=t.data.hName,o=t.data.hChildren,u=t.data.hProperties;if(typeof r=="string")if(l.type==="element")l.tagName=r;else{const c="children"in l?l.children:[l];l={type:"element",tagName:r,properties:{},children:c}}l.type==="element"&&u&&Object.assign(l.properties,zo(u)),"children"in l&&l.children&&o!==null&&o!==void 0&&(l.children=o)}return l}function GE(t,a){const l=a.data||{},r="value"in a&&!(Wf.call(l,"hProperties")||Wf.call(l,"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 $E(t,a){const l=[];let r=-1;for(a&&l.push({type:"text",value:`
|
|
259
|
+
`});++r<t.length;)r&&l.push({type:"text",value:`
|
|
260
|
+
`}),l.push(t[r]);return a&&t.length>0&&l.push({type:"text",value:`
|
|
261
|
+
`}),l}function Ty(t){let a=0,l=t.charCodeAt(a);for(;l===9||l===32;)a++,l=t.charCodeAt(a);return t.slice(a)}function Ny(t,a){const l=HE(t,a),r=l.one(t,void 0),o=wE(l),u=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&u.children.push({type:"text",value:`
|
|
262
|
+
`},o),u}function ZE(t,a){return t&&"run"in t?async function(l,r){const o=Ny(l,{file:r,...a});await t.run(o,r)}:function(l,r){return Ny(l,{file:r,...t||a})}}function Ey(t){if(t)throw t}var Cf,Cy;function YE(){if(Cy)return Cf;Cy=1;var t=Object.prototype.hasOwnProperty,a=Object.prototype.toString,l=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(g){return typeof Array.isArray=="function"?Array.isArray(g):a.call(g)==="[object Array]"},u=function(g){if(!g||a.call(g)!=="[object Object]")return!1;var _=t.call(g,"constructor"),y=g.constructor&&g.constructor.prototype&&t.call(g.constructor.prototype,"isPrototypeOf");if(g.constructor&&!_&&!y)return!1;var x;for(x in g);return typeof x>"u"||t.call(g,x)},c=function(g,_){l&&_.name==="__proto__"?l(g,_.name,{enumerable:!0,configurable:!0,value:_.newValue,writable:!0}):g[_.name]=_.newValue},d=function(g,_){if(_==="__proto__")if(t.call(g,_)){if(r)return r(g,_).value}else return;return g[_]};return Cf=function m(){var g,_,y,x,b,N,O=arguments[0],D=1,k=arguments.length,M=!1;for(typeof O=="boolean"&&(M=O,O=arguments[1]||{},D=2),(O==null||typeof O!="object"&&typeof O!="function")&&(O={});D<k;++D)if(g=arguments[D],g!=null)for(_ in g)y=d(O,_),x=d(g,_),O!==x&&(M&&x&&(u(x)||(b=o(x)))?(b?(b=!1,N=y&&o(y)?y:[]):N=y&&u(y)?y:{},c(O,{name:_,newValue:m(M,N,x)})):typeof x<"u"&&c(O,{name:_,newValue:x}));return O},Cf}var FE=YE();const Af=Zo(FE);function ed(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 XE(){const t=[],a={run:l,use:r};return a;function l(...o){let u=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...o);function d(m,...g){const _=t[++u];let y=-1;if(m){c(m);return}for(;++y<o.length;)(g[y]===null||g[y]===void 0)&&(g[y]=o[y]);o=g,_?QE(_,d)(...g):c(null,...g)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),a}}function QE(t,a){let l;return r;function r(...c){const d=t.length>c.length;let m;d&&c.push(o);try{m=t.apply(this,c)}catch(g){const _=g;if(d&&l)throw _;return o(_)}d||(m&&m.then&&typeof m.then=="function"?m.then(u,o):m instanceof Error?o(m):u(m))}function o(c,...d){l||(l=!0,a(c,...d))}function u(c){o(null,c)}}const la={basename:KE,dirname:JE,extname:PE,join:WE,sep:"/"};function KE(t,a){if(a!==void 0&&typeof a!="string")throw new TypeError('"ext" argument must be a string');Jr(t);let l=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){l=o+1;break}}else r<0&&(u=!0,r=o+1);return r<0?"":t.slice(l,r)}if(a===t)return"";let c=-1,d=a.length-1;for(;o--;)if(t.codePointAt(o)===47){if(u){l=o+1;break}}else c<0&&(u=!0,c=o+1),d>-1&&(t.codePointAt(o)===a.codePointAt(d--)?d<0&&(r=o):(d=-1,r=c));return l===r?r=c:r<0&&(r=t.length),t.slice(l,r)}function JE(t){if(Jr(t),t.length===0)return".";let a=-1,l=t.length,r;for(;--l;)if(t.codePointAt(l)===47){if(r){a=l;break}}else r||(r=!0);return a<0?t.codePointAt(0)===47?"/":".":a===1&&t.codePointAt(0)===47?"//":t.slice(0,a)}function PE(t){Jr(t);let a=t.length,l=-1,r=0,o=-1,u=0,c;for(;a--;){const d=t.codePointAt(a);if(d===47){if(c){r=a+1;break}continue}l<0&&(c=!0,l=a+1),d===46?o<0?o=a:u!==1&&(u=1):o>-1&&(u=-1)}return o<0||l<0||u===0||u===1&&o===l-1&&o===r+1?"":t.slice(o,l)}function WE(...t){let a=-1,l;for(;++a<t.length;)Jr(t[a]),t[a]&&(l=l===void 0?t[a]:l+"/"+t[a]);return l===void 0?".":eC(l)}function eC(t){Jr(t);const a=t.codePointAt(0)===47;let l=tC(t,!a);return l.length===0&&!a&&(l="."),l.length>0&&t.codePointAt(t.length-1)===47&&(l+="/"),a?"/"+l:l}function tC(t,a){let l="",r=0,o=-1,u=0,c=-1,d,m;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(o===c-1||u===1))if(o!==c-1&&u===2){if(l.length<2||r!==2||l.codePointAt(l.length-1)!==46||l.codePointAt(l.length-2)!==46){if(l.length>2){if(m=l.lastIndexOf("/"),m!==l.length-1){m<0?(l="",r=0):(l=l.slice(0,m),r=l.length-1-l.lastIndexOf("/")),o=c,u=0;continue}}else if(l.length>0){l="",r=0,o=c,u=0;continue}}a&&(l=l.length>0?l+"/..":"..",r=2)}else l.length>0?l+="/"+t.slice(o+1,c):l=t.slice(o+1,c),r=c-o-1;o=c,u=0}else d===46&&u>-1?u++:u=-1}return l}function Jr(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const nC={cwd:aC};function aC(){return"/"}function td(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function lC(t){if(typeof t=="string")t=new URL(t);else if(!td(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 iC(t)}function iC(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 l=-1;for(;++l<a.length;)if(a.codePointAt(l)===37&&a.codePointAt(l+1)===50){const r=a.codePointAt(l+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 jf=["history","path","basename","stem","extname","dirname"];class Z_{constructor(a){let l;a?td(a)?l={path:a}:typeof a=="string"||rC(a)?l={value:a}:l=a:l={},this.cwd="cwd"in l?"":nC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<jf.length;){const u=jf[r];u in l&&l[u]!==void 0&&l[u]!==null&&(this[u]=u==="history"?[...l[u]]:l[u])}let o;for(o in l)jf.includes(o)||(this[o]=l[o])}get basename(){return typeof this.path=="string"?la.basename(this.path):void 0}set basename(a){Mf(a,"basename"),wf(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){Ay(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(wf(a,"extname"),Ay(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){td(a)&&(a=lC(a)),Mf(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){Mf(a,"stem"),wf(a,"stem"),this.path=la.join(this.dirname||"",a+(this.extname||""))}fail(a,l,r){const o=this.message(a,l,r);throw o.fatal=!0,o}info(a,l,r){const o=this.message(a,l,r);return o.fatal=void 0,o}message(a,l,r){const o=new Pt(a,l,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 wf(t,a){if(t&&t.includes(la.sep))throw new Error("`"+a+"` cannot be a path: did not expect `"+la.sep+"`")}function Mf(t,a){if(!t)throw new Error("`"+a+"` cannot be empty")}function Ay(t,a){if(!t)throw new Error("Setting `"+a+"` requires `path` to be set too")}function rC(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const sC=(function(t){const r=this.constructor.prototype,o=r[t],u=function(){return o.apply(u,arguments)};return Object.setPrototypeOf(u,r),u}),oC={}.hasOwnProperty;class wd extends sC{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=XE()}copy(){const a=new wd;let l=-1;for(;++l<this.attachers.length;){const r=this.attachers[l];a.use(...r)}return a.data(Af(!0,{},this.namespace)),a}data(a,l){return typeof a=="string"?arguments.length===2?(Of("data",this.frozen),this.namespace[a]=l,this):oC.call(this.namespace,a)&&this.namespace[a]||void 0:a?(Of("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[l,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=l.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 l=bo(a),r=this.parser||this.Parser;return zf("parse",r),r(String(l),l)}process(a,l){const r=this;return this.freeze(),zf("process",this.parser||this.Parser),Rf("process",this.compiler||this.Compiler),l?o(void 0,l):new Promise(o);function o(u,c){const d=bo(a),m=r.parse(d);r.run(m,d,function(_,y,x){if(_||!y||!x)return g(_);const b=y,N=r.stringify(b,x);fC(N)?x.value=N:x.result=N,g(_,x)});function g(_,y){_||!y?c(_):u?u(y):l(void 0,y)}}}processSync(a){let l=!1,r;return this.freeze(),zf("processSync",this.parser||this.Parser),Rf("processSync",this.compiler||this.Compiler),this.process(a,o),wy("processSync","process",l),r;function o(u,c){l=!0,Ey(u),r=c}}run(a,l,r){jy(a),this.freeze();const o=this.transformers;return!r&&typeof l=="function"&&(r=l,l=void 0),r?u(void 0,r):new Promise(u);function u(c,d){const m=bo(l);o.run(a,m,g);function g(_,y,x){const b=y||a;_?d(_):c?c(b):r(void 0,b,x)}}}runSync(a,l){let r=!1,o;return this.run(a,l,u),wy("runSync","run",r),o;function u(c,d){Ey(c),o=d,r=!0}}stringify(a,l){this.freeze();const r=bo(l),o=this.compiler||this.Compiler;return Rf("stringify",o),jy(a),o(a,r)}use(a,...l){const r=this.attachers,o=this.namespace;if(Of("use",this.frozen),a!=null)if(typeof a=="function")m(a,l);else if(typeof a=="object")Array.isArray(a)?d(a):c(a);else throw new TypeError("Expected usable value, not `"+a+"`");return this;function u(g){if(typeof g=="function")m(g,[]);else if(typeof g=="object")if(Array.isArray(g)){const[_,...y]=g;m(_,y)}else c(g);else throw new TypeError("Expected usable value, not `"+g+"`")}function c(g){if(!("plugins"in g)&&!("settings"in g))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");d(g.plugins),g.settings&&(o.settings=Af(!0,o.settings,g.settings))}function d(g){let _=-1;if(g!=null)if(Array.isArray(g))for(;++_<g.length;){const y=g[_];u(y)}else throw new TypeError("Expected a list of plugins, not `"+g+"`")}function m(g,_){let y=-1,x=-1;for(;++y<r.length;)if(r[y][0]===g){x=y;break}if(x===-1)r.push([g,..._]);else if(_.length>0){let[b,...N]=_;const O=r[x][1];ed(O)&&ed(b)&&(b=Af(!0,O,b)),r[x]=[g,b,...N]}}}}const uC=new wd().freeze();function zf(t,a){if(typeof a!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Rf(t,a){if(typeof a!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Of(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 jy(t){if(!ed(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function wy(t,a,l){if(!l)throw new Error("`"+t+"` finished async. Use `"+a+"` instead")}function bo(t){return cC(t)?t:new Z_(t)}function cC(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function fC(t){return typeof t=="string"||dC(t)}function dC(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const hC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",My=[],zy={allowDangerousHtml:!0},mC=/^(https?|ircs?|mailto|xmpp)$/i,pC=[{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 gC(t){const a=yC(t),l=_C(t);return vC(a.runSync(a.parse(l),l),t)}function yC(t){const a=t.rehypePlugins||My,l=t.remarkPlugins||My,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...zy}:zy;return uC().use(JN).use(l).use(ZE,r).use(a)}function _C(t){const a=t.children||"",l=new Z_;return typeof a=="string"&&(l.value=a),l}function vC(t,a){const l=a.allowedElements,r=a.allowElement,o=a.components,u=a.disallowedElements,c=a.skipHtml,d=a.unwrapDisallowed,m=a.urlTransform||xC;for(const _ of pC)Object.hasOwn(a,_.from)&&(""+_.from+(_.to?"use `"+_.to+"` instead":"remove it")+hC+_.id,void 0);return jd(t,g),O2(t,{Fragment:p.Fragment,components:o,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function g(_,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 Tf)if(Object.hasOwn(Tf,b)&&Object.hasOwn(_.properties,b)){const N=_.properties[b],O=Tf[b];(O===null||O.includes(_.tagName))&&(_.properties[b]=m(String(N||""),b,_))}}if(_.type==="element"){let b=l?!l.includes(_.tagName):u?u.includes(_.tagName):!1;if(!b&&r&&typeof y=="number"&&(b=!r(_,y,x)),b&&x&&typeof y=="number")return d&&_.children?x.children.splice(y,1,..._.children):x.children.splice(y,1),y}}}function xC(t){const a=t.indexOf(":"),l=t.indexOf("?"),r=t.indexOf("#"),o=t.indexOf("/");return a===-1||o!==-1&&a>o||l!==-1&&a>l||r!==-1&&a>r||mC.test(t.slice(0,a))?t:""}function Ry(t,a){const l=String(t);if(typeof a!="string")throw new TypeError("Expected character");let r=0,o=l.indexOf(a);for(;o!==-1;)r++,o=l.indexOf(a,o+a.length);return r}function bC(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function SC(t,a,l){const o=Ko((l||{}).ignore||[]),u=kC(a);let c=-1;for(;++c<u.length;)$_(t,"text",d);function d(g,_){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(g,_)}function m(g,_){const y=_[_.length-1],x=u[c][0],b=u[c][1];let N=0;const D=y.children.indexOf(g);let k=!1,M=[];x.lastIndex=0;let j=x.exec(g.value);for(;j;){const K=j.index,Y={index:j.index,input:j.input,stack:[..._,g]};let I=b(...j,Y);if(typeof I=="string"&&(I=I.length>0?{type:"text",value:I}:void 0),I===!1?x.lastIndex=K+1:(N!==K&&M.push({type:"text",value:g.value.slice(N,K)}),Array.isArray(I)?M.push(...I):I&&M.push(I),N=K+j[0].length,k=!0),!x.global)break;j=x.exec(g.value)}return k?(N<g.value.length&&M.push({type:"text",value:g.value.slice(N)}),y.children.splice(D,1,...M)):M=[g],D+M.length}}function kC(t){const a=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const l=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<l.length;){const o=l[r];a.push([TC(o[0]),NC(o[1])])}return a}function TC(t){return typeof t=="string"?new RegExp(bC(t),"g"):t}function NC(t){return typeof t=="function"?t:function(){return t}}const Df="phrasing",Lf=["autolink","link","image","label"];function EC(){return{transforms:[RC],enter:{literalAutolink:AC,literalAutolinkEmail:Bf,literalAutolinkHttp:Bf,literalAutolinkWww:Bf},exit:{literalAutolink:zC,literalAutolinkEmail:MC,literalAutolinkHttp:jC,literalAutolinkWww:wC}}}function CC(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Df,notInConstruct:Lf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Df,notInConstruct:Lf},{character:":",before:"[ps]",after:"\\/",inConstruct:Df,notInConstruct:Lf}]}}function AC(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Bf(t){this.config.enter.autolinkProtocol.call(this,t)}function jC(t){this.config.exit.autolinkProtocol.call(this,t)}function wC(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 MC(t){this.config.exit.autolinkEmail.call(this,t)}function zC(t){this.exit(t)}function RC(t){SC(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OC],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),DC]],{ignore:["link","linkReference"]})}function OC(t,a,l,r,o){let u="";if(!Y_(o)||(/^w/i.test(a)&&(l=a+l,a="",u="http://"),!LC(l)))return!1;const c=BC(l+r);if(!c[0])return!1;const d={type:"link",title:null,url:u+a+c[0],children:[{type:"text",value:a+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function DC(t,a,l,r){return!Y_(r,!0)||/[-\d_]$/.test(l)?!1:{type:"link",title:null,url:"mailto:"+a+"@"+l,children:[{type:"text",value:a+"@"+l}]}}function LC(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 BC(t){const a=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!a)return[t,void 0];t=t.slice(0,a.index);let l=a[0],r=l.indexOf(")");const o=Ry(t,"(");let u=Ry(t,")");for(;r!==-1&&o>u;)t+=l.slice(0,r+1),l=l.slice(r+1),r=l.indexOf(")"),u++;return[t,l]}function Y_(t,a){const l=t.input.charCodeAt(t.index-1);return(t.index===0||Bl(l)||Fo(l))&&(!a||l!==47)}F_.peek=YC;function IC(){this.buffer()}function UC(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function HC(){this.buffer()}function qC(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function VC(t){const a=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Xn(this.sliceSerialize(t)).toLowerCase(),l.label=a}function GC(t){this.exit(t)}function $C(t){const a=this.resume(),l=this.stack[this.stack.length-1];l.type,l.identifier=Xn(this.sliceSerialize(t)).toLowerCase(),l.label=a}function ZC(t){this.exit(t)}function YC(){return"["}function F_(t,a,l,r){const o=l.createTracker(r);let u=o.move("[^");const c=l.enter("footnoteReference"),d=l.enter("reference");return u+=o.move(l.safe(l.associationId(t),{after:"]",before:u})),d(),c(),u+=o.move("]"),u}function FC(){return{enter:{gfmFootnoteCallString:IC,gfmFootnoteCall:UC,gfmFootnoteDefinitionLabelString:HC,gfmFootnoteDefinition:qC},exit:{gfmFootnoteCallString:VC,gfmFootnoteCall:GC,gfmFootnoteDefinitionLabelString:$C,gfmFootnoteDefinition:ZC}}}function XC(t){let a=!1;return t&&t.firstLineBlank&&(a=!0),{handlers:{footnoteDefinition:l,footnoteReference:F_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function l(r,o,u,c){const d=u.createTracker(c);let m=d.move("[^");const g=u.enter("footnoteDefinition"),_=u.enter("label");return m+=d.move(u.safe(u.associationId(r),{before:m,after:"]"})),_(),m+=d.move("]:"),r.children&&r.children.length>0&&(d.shift(4),m+=d.move((a?`
|
|
263
|
+
`:" ")+u.indentLines(u.containerFlow(r,d.current()),a?X_:QC))),g(),m}}function QC(t,a,l){return a===0?t:X_(t,a,l)}function X_(t,a,l){return(l?"":" ")+t}const KC=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Q_.peek=tA;function JC(){return{canContainEols:["delete"],enter:{strikethrough:WC},exit:{strikethrough:eA}}}function PC(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:KC}],handlers:{delete:Q_}}}function WC(t){this.enter({type:"delete",children:[]},t)}function eA(t){this.exit(t)}function Q_(t,a,l,r){const o=l.createTracker(r),u=l.enter("strikethrough");let c=o.move("~~");return c+=l.containerPhrasing(t,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),u(),c}function tA(){return"~"}function nA(t){return t.length}function aA(t,a){const l=a||{},r=(l.align||[]).concat(),o=l.stringLength||nA,u=[],c=[],d=[],m=[];let g=0,_=-1;for(;++_<t.length;){const O=[],D=[];let k=-1;for(t[_].length>g&&(g=t[_].length);++k<t[_].length;){const M=lA(t[_][k]);if(l.alignDelimiters!==!1){const j=o(M);D[k]=j,(m[k]===void 0||j>m[k])&&(m[k]=j)}O.push(M)}c[_]=O,d[_]=D}let y=-1;if(typeof r=="object"&&"length"in r)for(;++y<g;)u[y]=Oy(r[y]);else{const O=Oy(r);for(;++y<g;)u[y]=O}y=-1;const x=[],b=[];for(;++y<g;){const O=u[y];let D="",k="";O===99?(D=":",k=":"):O===108?D=":":O===114&&(k=":");let M=l.alignDelimiters===!1?1:Math.max(1,m[y]-D.length-k.length);const j=D+"-".repeat(M)+k;l.alignDelimiters!==!1&&(M=D.length+M+k.length,M>m[y]&&(m[y]=M),b[y]=M),x[y]=j}c.splice(1,0,x),d.splice(1,0,b),_=-1;const N=[];for(;++_<c.length;){const O=c[_],D=d[_];y=-1;const k=[];for(;++y<g;){const M=O[y]||"";let j="",K="";if(l.alignDelimiters!==!1){const Y=m[y]-(D[y]||0),I=u[y];I===114?j=" ".repeat(Y):I===99?Y%2?(j=" ".repeat(Y/2+.5),K=" ".repeat(Y/2-.5)):(j=" ".repeat(Y/2),K=j):K=" ".repeat(Y)}l.delimiterStart!==!1&&!y&&k.push("|"),l.padding!==!1&&!(l.alignDelimiters===!1&&M==="")&&(l.delimiterStart!==!1||y)&&k.push(" "),l.alignDelimiters!==!1&&k.push(j),k.push(M),l.alignDelimiters!==!1&&k.push(K),l.padding!==!1&&k.push(" "),(l.delimiterEnd!==!1||y!==g-1)&&k.push("|")}N.push(l.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return N.join(`
|
|
264
|
+
`)}function lA(t){return t==null?"":String(t)}function Oy(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 iA(t,a,l,r){const o=l.enter("blockquote"),u=l.createTracker(r);u.move("> "),u.shift(2);const c=l.indentLines(l.containerFlow(t,u.current()),rA);return o(),c}function rA(t,a,l){return">"+(l?"":" ")+t}function sA(t,a){return Dy(t,a.inConstruct,!0)&&!Dy(t,a.notInConstruct,!1)}function Dy(t,a,l){if(typeof a=="string"&&(a=[a]),!a||a.length===0)return l;let r=-1;for(;++r<a.length;)if(t.includes(a[r]))return!0;return!1}function Ly(t,a,l,r){let o=-1;for(;++o<l.unsafe.length;)if(l.unsafe[o].character===`
|
|
265
|
+
`&&sA(l.stack,l.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
266
|
+
`}function oA(t,a){const l=String(t);let r=l.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=l.indexOf(a,o);return c}function uA(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 cA(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 fA(t,a,l,r){const o=cA(l),u=t.value||"",c=o==="`"?"GraveAccent":"Tilde";if(uA(t,l)){const y=l.enter("codeIndented"),x=l.indentLines(u,dA);return y(),x}const d=l.createTracker(r),m=o.repeat(Math.max(oA(u,o)+1,3)),g=l.enter("codeFenced");let _=d.move(m);if(t.lang){const y=l.enter(`codeFencedLang${c}`);_+=d.move(l.safe(t.lang,{before:_,after:" ",encode:["`"],...d.current()})),y()}if(t.lang&&t.meta){const y=l.enter(`codeFencedMeta${c}`);_+=d.move(" "),_+=d.move(l.safe(t.meta,{before:_,after:`
|
|
267
|
+
`,encode:["`"],...d.current()})),y()}return _+=d.move(`
|
|
268
|
+
`),u&&(_+=d.move(u+`
|
|
269
|
+
`)),_+=d.move(m),g(),_}function dA(t,a,l){return(l?"":" ")+t}function Md(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 hA(t,a,l,r){const o=Md(l),u=o==='"'?"Quote":"Apostrophe",c=l.enter("definition");let d=l.enter("label");const m=l.createTracker(r);let g=m.move("[");return g+=m.move(l.safe(l.associationId(t),{before:g,after:"]",...m.current()})),g+=m.move("]: "),d(),!t.url||/[\0- \u007F]/.test(t.url)?(d=l.enter("destinationLiteral"),g+=m.move("<"),g+=m.move(l.safe(t.url,{before:g,after:">",...m.current()})),g+=m.move(">")):(d=l.enter("destinationRaw"),g+=m.move(l.safe(t.url,{before:g,after:t.title?" ":`
|
|
270
|
+
`,...m.current()}))),d(),t.title&&(d=l.enter(`title${u}`),g+=m.move(" "+o),g+=m.move(l.safe(t.title,{before:g,after:o,...m.current()})),g+=m.move(o),d()),c(),g}function mA(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 Zr(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Ro(t,a,l){const r=Ri(t),o=Ri(a);return r===void 0?o===void 0?l==="_"?{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}}K_.peek=pA;function K_(t,a,l,r){const o=mA(l),u=l.enter("emphasis"),c=l.createTracker(r),d=c.move(o);let m=c.move(l.containerPhrasing(t,{after:o,before:d,...c.current()}));const g=m.charCodeAt(0),_=Ro(r.before.charCodeAt(r.before.length-1),g,o);_.inside&&(m=Zr(g)+m.slice(1));const y=m.charCodeAt(m.length-1),x=Ro(r.after.charCodeAt(0),y,o);x.inside&&(m=m.slice(0,-1)+Zr(y));const b=c.move(o);return u(),l.attentionEncodeSurroundingInfo={after:x.outside,before:_.outside},d+m+b}function pA(t,a,l){return l.options.emphasis||"*"}function gA(t,a){let l=!1;return jd(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return l=!0,Pf}),!!((!t.depth||t.depth<3)&&Sd(t)&&(a.options.setext||l))}function yA(t,a,l,r){const o=Math.max(Math.min(6,t.depth||1),1),u=l.createTracker(r);if(gA(t,l)){const _=l.enter("headingSetext"),y=l.enter("phrasing"),x=l.containerPhrasing(t,{...u.current(),before:`
|
|
266
271
|
`,after:`
|
|
267
|
-
`});return
|
|
272
|
+
`});return y(),_(),x+`
|
|
268
273
|
`+(o===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
269
|
-
`))+1))}const c="#".repeat(o),
|
|
270
|
-
`,...u.current()});return/^[\t ]/.test(
|
|
271
|
-
`,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:
|
|
272
|
-
`))}function m(b,N,L,O){const k=L.enter("tableCell"),z=L.enter("phrasing"),w=L.containerPhrasing(b,{...O,before:u,after:u});return z(),k(),w}function p(b,N){return kC(b,{align:N,alignDelimiters:r,padding:i,stringLength:o})}function y(b,N,L){const O=b.children;let k=-1;const z=[],w=N.enter("table");for(;++k<O.length;)z[k]=_(O[k],N,L);return w(),z}function _(b,N,L){const O=b.children;let k=-1;const z=[],w=N.enter("tableRow");for(;++k<O.length;)z[k]=m(O[k],b,N,L);return w(),z}function x(b,N,L){let O=t1.inlineCode(b,N,L);return L.stack.includes("tableCell")&&(O=O.replace(/\|/g,"\\$&")),O}}function cA(){return{exit:{taskListCheckValueChecked:Oy,taskListCheckValueUnchecked:Oy,paragraph:dA}}}function fA(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:hA}}}function Oy(t){const a=this.stack[this.stack.length-2];a.type,a.checked=t.type==="taskListCheckValueChecked"}function dA(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 hA(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=t1.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 mA(){return[YE(),hC(),yC(),aA(),cA()]}function pA(t){return{extensions:[XE(),mC(t),_C(),uA(t),fA()]}}const gA={tokenize:SA,partial:!0},n1={tokenize:kA,partial:!0},a1={tokenize:TA,partial:!0},l1={tokenize:NA,partial:!0},yA={tokenize:EA,partial:!0},i1={name:"wwwAutolink",tokenize:xA,previous:s1},r1={name:"protocolAutolink",tokenize:bA,previous:o1},Ma={name:"emailAutolink",tokenize:vA,previous:u1},ia={};function _A(){return{text:ia}}let Rl=48;for(;Rl<123;)ia[Rl]=Ma,Rl++,Rl===58?Rl=65:Rl===91&&(Rl=97);ia[43]=Ma;ia[45]=Ma;ia[46]=Ma;ia[95]=Ma;ia[72]=[Ma,r1];ia[104]=[Ma,r1];ia[87]=[Ma,i1];ia[119]=[Ma,i1];function vA(t,a,i){const r=this;let o,u;return c;function c(_){return!td(_)||!u1.call(r,r.previous)||Md(r.events)?i(_):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(_))}function h(_){return td(_)?(t.consume(_),h):_===64?(t.consume(_),m):i(_)}function m(_){return _===46?t.check(yA,y,p)(_):_===45||_===95||Qt(_)?(u=!0,t.consume(_),m):y(_)}function p(_){return t.consume(_),o=!0,m}function y(_){return u&&o&&Wt(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),a(_)):i(_)}}function xA(t,a,i){const r=this;return o;function o(c){return c!==87&&c!==119||!s1.call(r,r.previous)||Md(r.events)?i(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(gA,t.attempt(n1,t.attempt(a1,u),i),i)(c))}function u(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),a(c)}}function bA(t,a,i){const r=this;let o="",u=!1;return c;function c(_){return(_===72||_===104)&&o1.call(r,r.previous)&&!Md(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(_),t.consume(_),h):i(_)}function h(_){if(Wt(_)&&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||wo(_)||pt(_)||Ol(_)||Yo(_)?i(_):t.attempt(n1,t.attempt(a1,y),i)(_)}function y(_){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),a(_)}}function SA(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 kA(t,a,i){let r,o,u;return c;function c(p){return p===46||p===95?t.check(l1,m,h)(p):p===null||pt(p)||Ol(p)||p!==45&&Yo(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 TA(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(l1,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 NA(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 Wt(h)?c(h):i(h)}function c(h){return h===59?(t.consume(h),r):Wt(h)?(t.consume(h),c):i(h)}}function EA(t,a,i){return r;function r(u){return t.consume(u),o}function o(u){return Qt(u)?i(u):a(u)}}function s1(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||pt(t)}function o1(t){return!Wt(t)}function u1(t){return!(t===47||td(t))}function td(t){return t===43||t===45||t===46||t===95||Qt(t)}function Md(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 CA={tokenize:DA,partial:!0};function AA(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:MA,continuation:{tokenize:RA},exit:OA}},text:{91:{name:"gfmFootnoteCall",tokenize:zA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:wA,resolveTo:jA}}}}function wA(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=Fn(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 jA(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 zA(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(Fn(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 MA(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 L=t.exit("gfmFootnoteDefinitionLabelString");return u=Fn(r.sliceSerialize(L)),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),Ke(t,b,"gfmFootnoteDefinitionWhitespace")):i(N)}function b(N){return a(N)}}function RA(t,a,i){return t.check(Qr,a,t.attempt(CA,a,i))}function OA(t){t.exit("gfmFootnoteDefinition")}function DA(t,a,i){const r=this;return Ke(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 LA(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,Xo(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 L=Ri(p);if(N===126)return _>1?m(N):(c.consume(N),_++,b);if(_<2&&!i)return m(N);const O=c.exit("strikethroughSequenceTemporary"),k=Ri(N);return O._open=!k||k===2&&!!L,O._close=!L||L===2&&!!k,h(N)}}}class BA{constructor(){this.map=[]}add(a,i,r){UA(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 UA(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 IA(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 HA(){return{flow:{null:{name:"table",tokenize:qA,resolveAll:VA}}}}function qA(t,a,i){const r=this;let o=0,u=0,c;return h;function h(M){let ae=r.events.length-1;for(;ae>-1;){const ne=r.events[ae][1].type;if(ne==="lineEnding"||ne==="linePrefix")ae--;else break}const le=ae>-1?r.events[ae][1].type:null,pe=le==="tableHead"||le==="tableRow"?B:m;return pe===B&&r.parser.lazy[r.now().line]?i(M):pe(M)}function m(M){return t.enter("tableHead"),t.enter("tableRow"),p(M)}function p(M){return M===124||(c=!0,u+=1),y(M)}function y(M){return M===null?i(M):Ce(M)?u>1?(u=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),b):i(M):$e(M)?Ke(t,y,"whitespace")(M):(u+=1,c&&(c=!1,o+=1),M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),c=!0,y):(t.enter("data"),_(M)))}function _(M){return M===null||M===124||pt(M)?(t.exit("data"),y(M)):(t.consume(M),M===92?x:_)}function x(M){return M===92||M===124?(t.consume(M),_):_(M)}function b(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(M):(t.enter("tableDelimiterRow"),c=!1,$e(M)?Ke(t,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):N(M))}function N(M){return M===45||M===58?O(M):M===124?(c=!0,t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),L):$(M)}function L(M){return $e(M)?Ke(t,O,"whitespace")(M):O(M)}function O(M){return M===58?(u+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),k):M===45?(u+=1,k(M)):M===null||Ce(M)?Q(M):$(M)}function k(M){return M===45?(t.enter("tableDelimiterFiller"),z(M)):$(M)}function z(M){return M===45?(t.consume(M),z):M===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),w):(t.exit("tableDelimiterFiller"),w(M))}function w(M){return $e(M)?Ke(t,Q,"whitespace")(M):Q(M)}function Q(M){return M===124?N(M):M===null||Ce(M)?!c||o!==u?$(M):(t.exit("tableDelimiterRow"),t.exit("tableHead"),a(M)):$(M)}function $(M){return i(M)}function B(M){return t.enter("tableRow"),J(M)}function J(M){return M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),J):M===null||Ce(M)?(t.exit("tableRow"),a(M)):$e(M)?Ke(t,J,"whitespace")(M):(t.enter("data"),de(M))}function de(M){return M===null||M===124||pt(M)?(t.exit("data"),J(M)):(t.consume(M),M===92?he:de)}function he(M){return M===92||M===124?(t.consume(M),de):de(M)}}function VA(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 BA;for(;++i<t.length;){const b=t[i],N=b[1];b[0]==="enter"?N.type==="tableHead"?(h=!1,m!==0&&(Dy(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],_=bo(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],_=bo(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],_=bo(x,a,u,o,i,_)):c[1]!==0&&(_=bo(x,a,c,o,i,_)),o=0):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(c[3]=i)}for(m!==0&&Dy(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=IA(a.events,i))}return t}function bo(t,a,i,r,o,u){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",h="tableContent";i[0]!==0&&(u.end=Object.assign({},ji(a.events,i[0])),t.add(i[0],0,[["exit",u,a]]));const m=ji(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=ji(a.events,i[2]),y=ji(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,L=i[3]-i[2]-1;t.add(N,L,[])}}t.add(i[3]+1,0,[["exit",_,a]])}return o!==void 0&&(u.end=Object.assign({},ji(a.events,o)),t.add(o,0,[["exit",u,a]]),u=void 0),u}function Dy(t,a,i,r,o){const u=[],c=ji(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 ji(t,a){const i=t[a],r=i[0]==="enter"?"start":"end";return i[1][r]}const GA={name:"tasklistCheck",tokenize:ZA};function $A(){return{text:{91:GA}}}function ZA(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 Ce(m)?a(m):$e(m)?t.check({tokenize:YA},a,i)(m):i(m)}}function YA(t,a,i){return Ke(t,r,"whitespace");function r(o){return o===null?i(o):a(o)}}function XA(t){return x_([_A(),AA(),LA(t),HA(),$A()])}const FA={};function QA(t){const a=this,i=t||FA,r=a.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(XA(i)),u.push(mA()),c.push(pA(i))}const KA="_root_1pdrb_1",JA="_codeBlockWrapper_1pdrb_49",PA="_codeBlockHeader_1pdrb_70",WA="_codeBlockLang_1pdrb_80",ew="_copyBtn_1pdrb_86",Ur={root:KA,codeBlockWrapper:JA,codeBlockHeader:PA,codeBlockLang:WA,copyBtn:ew};function tw({children:t,className:a,...i}){var c;if(!(/language-(\w+)/.test(a||"")||typeof t=="string"&&t.includes(`
|
|
273
|
-
`)))return
|
|
274
|
-
`)}function Fw(t){return t.isError?tt.bodyError:t.role==="user"?tt.bodyUser:tt.bodyAssistant}const Qw=R.forwardRef(({messages:t,isStreaming:a,isStarting:i,agentName:r,agentBuildType:o,agentProtocol:u,hasAvailableTargets:c=!0,isDeployed:h=!1},m)=>{if(i)return g.jsx("div",{className:tt.messages,ref:m,"data-testid":"message-list",children:g.jsxs("div",{className:tt.emptyState,children:[g.jsx("div",{className:tt.spinner}),g.jsxs("div",{className:tt.startingText,children:["Setting up ",r||"agent",g.jsx("span",{className:tt.thinkingDot,children:"."}),g.jsx("span",{className:tt.thinkingDot,children:"."}),g.jsx("span",{className:tt.thinkingDot,children:"."})]})]})});if(t.length===0){if(!c)return g.jsx("div",{className:tt.messages,ref:m,"data-testid":"message-list",children:g.jsxs("div",{className:tt.emptyState,children:[g.jsx("div",{className:tt.emptyStateIcon,children:g.jsx(Vf,{size:40,strokeWidth:1.5,color:"#6366f1"})}),g.jsx("div",{className:tt.emptyStateAgent,children:"No agents found"}),g.jsxs("div",{className:tt.emptyStateText,children:["Run ",g.jsx("code",{className:"cmd",children:"agentcore add"})," to add an agent or harness"]})]})});const y=[o==="CodeZip"?"Direct code deploy":o,u??"HTTP"].filter(Boolean).join(" · ");return g.jsx("div",{className:tt.messages,ref:m,"data-testid":"message-list",children:g.jsxs("div",{className:tt.emptyState,children:[g.jsx("div",{className:tt.emptyStateIcon,children:g.jsx(Vf,{size:40,strokeWidth:1.5,color:"#6366f1"})}),g.jsx("div",{className:tt.emptyStateAgent,children:r||"Agent"}),g.jsx("div",{className:`${tt.emptyStateBadge} ${h?tt.deployed:tt.local}`,children:h?"DEPLOYED":"LOCAL"}),y&&g.jsx("div",{className:tt.emptyStateDetails,children:y}),g.jsx("div",{className:tt.emptyStateText,children:h?"Send a prompt to invoke this deployed agent":"Send a prompt to test this agent locally"})]})})}return g.jsx("div",{className:tt.messages,ref:m,"data-testid":"message-list",children:t.map((p,y)=>a&&p.role==="assistant"&&p.content===""&&y===t.length-1?g.jsx("div",{className:tt.msg,"data-testid":"thinking-indicator",children:g.jsxs("div",{className:tt.thinking,children:["Thinking",g.jsx("span",{className:tt.thinkingDot,children:"."}),g.jsx("span",{className:tt.thinkingDot,children:"."}),g.jsx("span",{className:tt.thinkingDot,children:"."})]})},y):g.jsxs("div",{className:p.role==="user"?tt.msgUser:tt.msg,"data-testid":`chat-message-${y}`,children:[g.jsx("div",{className:Fw(p),children:p.isError?g.jsx($f,{content:p.content}):p.role==="assistant"?g.jsx(lw,{content:p.toolExecutions?Xw(p.content):p.content}):p.content}),p.toolCalls&&p.toolCalls.length>0&&g.jsx(Aw,{toolCalls:p.toolCalls}),p.toolExecutions&&Object.keys(p.toolExecutions).length>0&&g.jsx(Nk,{toolExecutions:p.toolExecutions}),p.tokenUsage&&g.jsx(fw,{usage:p.tokenUsage})]},y))})});function Kw(){const a=new URLSearchParams(window.location.search).get("port");return a&&/^\d+$/.test(a)?`http://localhost:${a}`:""}const In=Kw();function dn(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 Jw(){const[t,a]=R.useState([]),[i,r]=R.useState(!1),[o,u]=R.useState(null),[c,h]=R.useState(null),m=R.useCallback(async()=>{try{return(await dn(`${In}/api/memory?memoryName=__probe__&namespace=__probe__`)).status===404?(h(!1),!1):(h(!0),!0)}catch{return h(!1),!1}},[]),p=R.useCallback(async(x,b)=>{r(!0),u(null),a([]);try{const N=new URLSearchParams({memoryName:x,namespace:b}),L=await dn(`${In}/api/memory?${N.toString()}`);if(L.status===404){u("Memory browsing is only available in invoke mode."),h(!1);return}const O=await L.json();O.success&&O.records?a(O.records):u(O.error||"Failed to load memory records")}catch(N){u(N instanceof Error?N.message:"Failed to load memory records")}finally{r(!1)}},[]),y=R.useCallback(async(x,b,N)=>{r(!0),u(null),a([]);try{const L={memoryName:x,namespace:b,searchQuery:N},O=await dn(`${In}/api/memory/search`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(L)});if(O.status===404){u("Memory browsing is only available in invoke mode."),h(!1);return}const k=await O.json();k.success&&k.records?a(k.records):u(k.error||"Failed to search memory records")}catch(L){u(L instanceof Error?L.message:"Failed to search memory records")}finally{r(!1)}},[]),_=R.useCallback(()=>{a([]),u(null)},[]);return{records:t,isLoading:i,error:o,isAvailable:c,checkAvailability:m,listRecords:p,searchRecords:y,clear:_}}function Jo(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 Pw="_notice_1isal_1",Ww="_warning_1isal_12",ej="_retryBtn_1isal_16",If={notice:Pw,warning:Ww,retryBtn:ej};function By({children:t,variant:a="error",onRetry:i}){return g.jsxs("div",{className:`${If.notice} ${a==="warning"?If.warning:""}`,children:[t,i&&g.jsx("button",{className:If.retryBtn,onClick:i,children:"Retry"})]})}const tj="_container_qogk5_1",nj="_content_qogk5_47",aj="_status_qogk5_55",lj="_error_qogk5_62",ij="_detail_qogk5_73",rj="_detailHeader_qogk5_80",sj="_detailTitle_qogk5_89",oj="_closeBtn_qogk5_95",uj="_controls_qogk5_118",cj="_field_qogk5_124",fj="_fieldLabel_qogk5_130",dj="_input_qogk5_138",hj="_select_qogk5_158",mj="_actions_qogk5_175",pj="_actionBtn_qogk5_180",gj="_searchBtn_qogk5_202",yj="_resultCount_qogk5_213",_j="_recordList_qogk5_219",vj="_recordRow_qogk5_228",xj="_recordRowSelected_qogk5_248",bj="_recordMain_qogk5_254",Sj="_recordContent_qogk5_261",kj="_scoreBadge_qogk5_271",Tj="_recordMeta_qogk5_281",Nj="_strategyTag_qogk5_288",Ej="_recordTime_qogk5_296",Cj="_detailBody_qogk5_302",Aj="_detailSection_qogk5_309",wj="_detailLabel_qogk5_315",jj="_detailContent_qogk5_322",zj="_metadataGrid_qogk5_335",Mj="_metadataRow_qogk5_341",Rj="_metadataKey_qogk5_354",Oj="_metadataValue_qogk5_361",Dj="_detailId_qogk5_370",Lj="_namespacesValue_qogk5_377",Bj="_noMetadata_qogk5_383",ve={container:tj,content:nj,status:aj,error:lj,detail:ij,detailHeader:rj,detailTitle:sj,closeBtn:oj,controls:uj,field:cj,fieldLabel:fj,input:dj,select:hj,actions:mj,actionBtn:pj,searchBtn:gj,resultCount:yj,recordList:_j,recordRow:vj,recordRowSelected:xj,recordMain:bj,recordContent:Sj,scoreBadge:kj,recordMeta:Tj,strategyTag:Nj,recordTime:Ej,detailBody:Cj,detailSection:Aj,detailLabel:wj,detailContent:jj,metadataGrid:zj,metadataRow:Mj,metadataKey:Rj,metadataValue:Oj,detailId:Dj,namespacesValue:Lj,noMetadata:Bj};function Uj({memories:t,sessionId:a,userId:i,isActive:r}){var ue;const{records:o,isLoading:u,error:c,isAvailable:h,checkAvailability:m,listRecords:p,searchRecords:y,clear:_}=Jw(),[x,b]=R.useState(((ue=t[0])==null?void 0:ue.name)??""),[N,L]=R.useState(""),[O,k]=R.useState({}),[z,w]=R.useState(""),[Q,$]=R.useState(null),[B,J]=R.useState(!1),[de,he]=R.useState(!1),M=R.useRef(!1);R.useEffect(()=>{!x&&t.length>0&&b(t[0].name)},[t,x]);const ae=t.find(X=>X.name===x),le=(ae==null?void 0:ae.strategies)??[],pe=le.find(X=>X.type===N),ne=(pe==null?void 0:pe.namespaceTemplates)??(pe==null?void 0:pe.namespaces)??[],Z=R.useMemo(()=>pe?[...new Set(ne.flatMap(X=>(X.match(/\{(\w+)\}/g)||[]).map(qe=>qe.slice(1,-1))))]:[],[pe]);R.useEffect(()=>{r&&h===null&&m()},[r,h,m]),R.useEffect(()=>{if(!pe){k({});return}const X={};for(const xe of Z)xe==="actorId"?X[xe]=i||"default-user":xe==="sessionId"&&a?X[xe]=a:X[xe]="";k(X)},[pe,Z,a,i]);const U=X=>{b(X),L(""),$(null),he(!1),_()},P=X=>{L(X),$(null),he(!1),_()},oe=(X,xe)=>{k(qe=>({...qe,[X]:xe}))},Se=()=>pe?ne.map(X=>X.replace(/\{(\w+)\}/g,(xe,qe)=>{var ce;return((ce=O[qe])==null?void 0:ce.trim())||""})).join(","):"",E=pe!=null&&Z.every(X=>{var xe;return(xe=O[X])==null?void 0:xe.trim()}),C=()=>{E&&(J(!1),$(null),he(!0),p(x,Se()))},G=()=>{!E||!z.trim()||(J(!0),$(null),he(!0),y(x,Se(),z.trim()))},T=X=>{X.key==="Enter"&&!M.current&&(z.trim()?G():C())},te=X=>{$(xe=>(xe==null?void 0:xe.memoryRecordId)===X.memoryRecordId?null:X)};return t.length===0?g.jsxs("div",{className:ve.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:ve.container,children:g.jsxs("div",{className:ve.content,children:[t.some(X=>X.deploymentStatus!=="deployed")&&g.jsxs(By,{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(X=>X.deploymentStatus==="deployed")&&g.jsx(By,{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:ve.controls,children:[g.jsxs("div",{className:ve.field,children:[g.jsx("label",{className:ve.fieldLabel,htmlFor:"memory-selector",children:"Memory"}),g.jsx("select",{id:"memory-selector",className:ve.select,value:x,onChange:X=>U(X.target.value),children:t.map(X=>g.jsx("option",{value:X.name,children:X.name},X.name))})]}),g.jsxs("div",{className:ve.field,children:[g.jsx("label",{className:ve.fieldLabel,htmlFor:`strat-${x}`,children:"Strategy"}),g.jsxs("select",{id:`strat-${x}`,className:ve.select,value:N,onChange:X=>P(X.target.value),children:[g.jsx("option",{value:"",disabled:!0,children:"Select a strategy…"}),le.map(X=>g.jsx("option",{value:X.type,children:X.type},X.type))]})]}),Z.map(X=>g.jsxs("div",{className:ve.field,children:[g.jsx("label",{className:ve.fieldLabel,htmlFor:`ns-${x}-${X}`,children:X}),g.jsx("input",{id:`ns-${x}-${X}`,className:ve.input,type:"text",placeholder:`Enter ${X}…`,value:O[X]||"",onChange:xe=>oe(X,xe.target.value),onKeyDown:T,onCompositionStart:()=>{M.current=!0},onCompositionEnd:()=>{M.current=!1}})]},X)),pe&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:ve.field,children:[g.jsx("label",{className:ve.fieldLabel,htmlFor:`search-${x}`,children:"Search (optional)"}),g.jsx("input",{id:`search-${x}`,className:ve.input,type:"text",placeholder:"Semantic search query…",value:z,onChange:X=>w(X.target.value),onKeyDown:T,onCompositionStart:()=>{M.current=!0},onCompositionEnd:()=>{M.current=!1}})]}),g.jsxs("div",{className:ve.actions,children:[g.jsx("button",{className:ve.actionBtn,onClick:C,disabled:!E||u,children:"List"}),g.jsx("button",{className:`${ve.actionBtn} ${ve.searchBtn}`,onClick:G,disabled:!E||!z.trim()||u,children:"Search"})]})]})]}),u&&g.jsx("div",{className:ve.status,children:"Loading records…"}),c&&g.jsx("div",{className:ve.error,children:g.jsxs("span",{children:[g.jsx(hd,{size:12})," ",c]})}),!u&&!c&&de&&o.length===0&&g.jsx("div",{className:ve.status,children:"No memory records found for this namespace."}),!u&&o.length>0&&g.jsxs("div",{className:ve.recordList,children:[g.jsxs("div",{className:ve.resultCount,children:[o.length," record",o.length!==1?"s":"",B?" (search results)":""]}),o.map(X=>g.jsx(Ij,{record:X,isSelected:(Q==null?void 0:Q.memoryRecordId)===X.memoryRecordId,showScore:B,onClick:()=>te(X)},X.memoryRecordId))]}),Q&&g.jsx(Hj,{record:Q,onClose:()=>$(null)})]})]})})}function Ij({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:`${ve.recordRow} ${a?ve.recordRowSelected:""}`,onClick:r,"aria-label":`Memory record ${t.memoryRecordId}`,children:[g.jsxs("div",{className:ve.recordMain,children:[g.jsx("span",{className:ve.recordContent,children:o}),i&&t.score!==null&&t.score!==void 0&&g.jsx("span",{className:ve.scoreBadge,children:t.score.toFixed(3)})]}),g.jsxs("div",{className:ve.recordMeta,children:[g.jsx("span",{className:ve.strategyTag,children:t.memoryStrategyId}),g.jsx("span",{className:ve.recordTime,children:Jo(t.createdAt)})]})]})}function Hj({record:t,onClose:a}){const i=Object.entries(t.metadata||{});return g.jsxs("div",{className:ve.detail,children:[g.jsxs("div",{className:ve.detailHeader,children:[g.jsx("span",{className:ve.detailTitle,children:"Record Detail"}),g.jsx("button",{className:ve.closeBtn,onClick:a,"aria-label":"Close record detail",children:g.jsx(Li,{size:12})})]}),g.jsxs("div",{className:ve.detailBody,children:[g.jsxs("div",{className:ve.detailSection,children:[g.jsx("span",{className:ve.detailLabel,children:"ID"}),g.jsx("span",{className:ve.detailId,children:t.memoryRecordId})]}),g.jsxs("div",{className:ve.detailSection,children:[g.jsx("span",{className:ve.detailLabel,children:"Content"}),g.jsx("div",{className:ve.detailContent,children:t.content||"(no content)"})]}),g.jsxs("div",{className:ve.detailSection,children:[g.jsx("span",{className:ve.detailLabel,children:"Strategy"}),g.jsx("span",{className:ve.strategyTag,children:t.memoryStrategyId})]}),g.jsxs("div",{className:ve.detailSection,children:[g.jsx("span",{className:ve.detailLabel,children:"Created"}),g.jsx("span",{className:ve.recordTime,children:Jo(t.createdAt)})]}),t.score!==null&&t.score!==void 0&&g.jsxs("div",{className:ve.detailSection,children:[g.jsx("span",{className:ve.detailLabel,children:"Relevance Score"}),g.jsx("span",{className:ve.scoreBadge,children:t.score.toFixed(4)})]}),t.namespaces.length>0&&g.jsxs("div",{className:ve.detailSection,children:[g.jsx("span",{className:ve.detailLabel,children:"Namespaces"}),g.jsx("span",{className:ve.namespacesValue,children:t.namespaces.join(", ")})]}),i.length>0&&g.jsxs("div",{className:ve.detailSection,children:[g.jsx("span",{className:ve.detailLabel,children:"Metadata"}),g.jsx("div",{className:ve.metadataGrid,children:i.map(([r,o])=>g.jsxs("div",{className:ve.metadataRow,children:[g.jsx("span",{className:ve.metadataKey,children:r}),g.jsx("span",{className:ve.metadataValue,children:o})]},r))})]}),i.length===0&&g.jsxs("div",{className:ve.detailSection,children:[g.jsx("span",{className:ve.detailLabel,children:"Metadata"}),g.jsx("span",{className:ve.noMetadata,children:"No metadata"})]})]})]})}const qj="_panel_lfvg8_1",Vj="_resizeHandle_lfvg8_13",Gj="_header_lfvg8_30",$j="_projectName_lfvg8_39",Zj="_headerActions_lfvg8_45",Yj="_iconBtn_lfvg8_50",Xj="_tabBar_lfvg8_70",Fj="_tab_lfvg8_70",Qj="_tabActive_lfvg8_93",Kj="_body_lfvg8_98",Jj="_tabContent_lfvg8_104",Pj="_status_lfvg8_114",Wj="_error_lfvg8_121",e4="_retryBtn_lfvg8_132",t4="_graph_lfvg8_146",n4="_section_lfvg8_152",a4="_sectionTitle_lfvg8_158",l4="_childNode_lfvg8_167",i4="_node_lfvg8_183",r4="_nodeSelected_lfvg8_201",s4="_nodeIcon_lfvg8_206",o4="_agent_lfvg8_216",u4="_harness_lfvg8_220",c4="_memory_lfvg8_224",f4="_credential_lfvg8_228",d4="_gateway_lfvg8_232",h4="_gatewayTarget_lfvg8_236",m4="_mcpTool_lfvg8_240",p4="_evaluator_lfvg8_244",g4="_onlineEval_lfvg8_248",y4="_policyEngine_lfvg8_252",_4="_policy_lfvg8_252",v4="_unassignedTarget_lfvg8_260",x4="_nodeContent_lfvg8_264",b4="_nodeName_lfvg8_272",S4="_nodeNameRow_lfvg8_281",k4="_deployBadge_lfvg8_288",T4="_deploy_deployed_lfvg8_298",N4="_nodeSubtitle_lfvg8_313",E4="_nodeConnections_lfvg8_321",C4="_connectionTag_lfvg8_328",A4="_infoCard_lfvg8_386",w4="_infoHeader_lfvg8_393",j4="_kindBadge_lfvg8_402",z4="_infoName_lfvg8_461",M4="_infoBody_lfvg8_467",R4="_infoSectionHeader_lfvg8_471",O4="_infoRow_lfvg8_481",D4="_infoKey_lfvg8_494",L4="_infoValue_lfvg8_499",je={panel:qj,resizeHandle:Vj,header:Gj,projectName:$j,headerActions:Zj,iconBtn:Yj,tabBar:Xj,tab:Fj,tabActive:Qj,body:Kj,tabContent:Jj,status:Pj,error:Wj,retryBtn:e4,graph:t4,section:n4,sectionTitle:a4,childNode:l4,node:i4,nodeSelected:r4,nodeIcon:s4,agent:o4,harness:u4,memory:c4,credential:f4,gateway:d4,gatewayTarget:h4,mcpTool:m4,evaluator:p4,onlineEval:g4,policyEngine:y4,policy:_4,unassignedTarget:v4,nodeContent:x4,nodeName:b4,nodeNameRow:S4,deployBadge:k4,deploy_deployed:T4,"deploy_local-only":"_deploy_local-only_lfvg8_303","deploy_pending-removal":"_deploy_pending-removal_lfvg8_308",nodeSubtitle:N4,nodeConnections:E4,connectionTag:C4,infoCard:A4,infoHeader:w4,kindBadge:j4,infoName:z4,infoBody:M4,infoSectionHeader:R4,infoRow:O4,infoKey:D4,infoValue:L4},B4={agent:Vf,harness:dx,memory:ox,credential:Lx,gateway:Mx,gatewayTarget:Ex,mcpTool:za,evaluator:bx,onlineEval:ix,policyEngine:$x,policy:jx,unassignedTarget:i_},U4={deployed:"Deployed","local-only":"Not deployed","pending-removal":"Removed locally"};function Bn({kind:t,name:a,subtitle:i,isSelected:r,onClick:o,connections:u,deploymentStatus:c}){const h=B4[t];return g.jsxs("button",{className:`${je.node} ${je[t]} ${r?je.nodeSelected:""}`,onClick:o,"aria-label":`${t}: ${a}`,children:[g.jsx("span",{className:je.nodeIcon,children:g.jsx(h,{size:14})}),g.jsxs("div",{className:je.nodeContent,children:[g.jsxs("div",{className:je.nodeNameRow,children:[g.jsx("span",{className:je.nodeName,children:a}),c&&g.jsx("span",{className:`${je.deployBadge} ${je[`deploy_${c}`]}`,children:U4[c]})]}),i&&g.jsx("span",{className:je.nodeSubtitle,children:i}),u&&u.length>0&&g.jsx("div",{className:je.nodeConnections,children:u.map(m=>g.jsx("span",{className:je.connectionTag,children:m},m))})]})]})}function Uy(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 I4(){const t=In,[a,i]=R.useState([]),[r,o]=R.useState([]),[u,c]=R.useState([]),[h,m]=R.useState([]),[p,y]=R.useState(!1),[_,x]=R.useState(!1),[b,N]=R.useState(null),[L,O]=R.useState(null),k=R.useCallback(async(Q,$,B)=>{y(!0),N(null),o([]),c([]),m([]);try{const J=Uy($,B),he=await dn(`${t}/api/${Q==="cloudwatch"?"cloudwatch-traces":"traces"}?${J.toString()}`);if(he.status===404){O(!1),i([]);return}O(!0);const M=await he.json();M.success?i(M.traces):(N(M.error),i([]))}catch(J){N(J instanceof Error?J.message:"Failed to load traces"),i([])}finally{y(!1)}},[t]),z=R.useCallback(async(Q,$,B,J)=>{x(!0),N(null);try{const de=Uy(B,J),ae=await(await dn(`${t}/api/${Q==="cloudwatch"?"cloudwatch-traces":"traces"}/${encodeURIComponent($)}?${de.toString()}`)).json();if(ae.success)if(Q==="cloudwatch"){const le=ae;c(le.records??[]),m(le.spans??[]),o([])}else{const le=ae;o(c1(le.resourceSpans,le.resourceLogs)),c([]),m([])}else N(ae.error),o([]),c([]),m([])}catch(de){N(de instanceof Error?de.message:"Failed to load trace detail"),o([]),c([]),m([])}finally{x(!1)}},[t]),w=R.useCallback(()=>{o([]),c([]),m([]),N(null)},[]);return{traces:a,spans:r,deployedRecords:u,deployedSpans:h,isLoadingTraces:p,isLoadingDetail:_,error:b,isAvailable:L,fetchTraces:k,fetchTraceDetail:z,clearDetail:w}}function Zr(t){if(!t)return{};if(!Array.isArray(t))return t;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 H4(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 Iy(t){if(!t||!t.startsWith("{")&&!t.startsWith("["))return null;try{return JSON.parse(t)}catch{return null}}const q4="_dimText_rs5f0_1",V4="_assistantMsg_rs5f0_5",G4="_toolCalls_rs5f0_9",$4="_toolCall_rs5f0_9",Z4="_toolIcon_rs5f0_22",Y4="_toolName_rs5f0_26",X4="_toolArgs_rs5f0_32",F4="_toolResult_rs5f0_45",Q4="_toolResultStatus_rs5f0_51",K4="_toolResultError_rs5f0_58",J4="_finishReason_rs5f0_62",P4="_genAiContent_rs5f0_68",W4="_contentText_rs5f0_74",e3="_strandsEvent_rs5f0_78",t3="_strandsSection_rs5f0_84",n3="_strandsLabel_rs5f0_90",a3="_messageList_rs5f0_97",l3="_msgRow_rs5f0_103",i3="_roleBadge_rs5f0_109",r3="_role_user_rs5f0_120",s3="_role_assistant_rs5f0_125",o3="_role_system_rs5f0_130",u3="_role_tool_rs5f0_135",c3="_msgText_rs5f0_140",f3="_msgContent_rs5f0_146",d3="_parsedContent_rs5f0_151",h3="_spanScope_rs5f0_157",m3="_spanRaw_rs5f0_163",ze={dimText:q4,assistantMsg:V4,toolCalls:G4,toolCall:$4,toolIcon:Z4,toolName:Y4,toolArgs:X4,toolResult:F4,toolResultStatus:Q4,toolResultError:K4,finishReason:J4,genAiContent:P4,contentText:W4,strandsEvent:e3,strandsSection:t3,strandsLabel:n3,messageList:a3,msgRow:l3,roleBadge:i3,role_user:r3,role_assistant:s3,role_system:o3,role_tool:u3,msgText:c3,msgContent:f3,parsedContent:d3,spanScope:h3,spanRaw:m3};function Od({body:t}){if(t==null)return g.jsx("span",{className:ze.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(Dd,{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:ze.assistantMsg,children:r})}if(Array.isArray(i.tool_calls))return g.jsxs("div",{className:ze.toolCalls,children:[i.tool_calls.map((r,o)=>{const u=r.function;return g.jsxs("div",{className:ze.toolCall,children:[g.jsx("span",{className:ze.toolIcon,children:g.jsx(za,{size:12})}),g.jsx("span",{className:ze.toolName,children:String((u==null?void 0:u.name)??"unknown")}),g.jsx("pre",{className:ze.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:ze.finishReason,children:String(a.finish_reason)})]});if(i.role==="assistant"&&typeof i.content=="string")return g.jsx("div",{className:ze.assistantMsg,children:i.content})}return a.input||a.output?g.jsx(p3,{input:a.input,output:a.output}):g.jsx("pre",{className:ze.spanRaw,children:JSON.stringify(a,null,2)})}function Dd({content:t}){return g.jsx("div",{className:ze.genAiContent,children:t.map((a,i)=>{const r=a;if(r.text)return g.jsx("div",{className:ze.contentText,children:String(r.text)},i);if(r.toolUse){const o=r.toolUse;return g.jsxs("div",{className:ze.toolCall,children:[g.jsx("span",{className:ze.toolIcon,children:g.jsx(za,{size:12})}),g.jsx("span",{className:ze.toolName,children:String(o.name)}),g.jsx("pre",{className:ze.toolArgs,children:JSON.stringify(o.input,null,2)})]},i)}if(r.toolResult){const o=r.toolResult;return g.jsxs("div",{className:ze.toolResult,children:[g.jsx("span",{className:`${ze.toolResultStatus} ${String(o.status).toLowerCase()==="error"?ze.toolResultError:""}`,children:String(o.status||"result")}),Array.isArray(o.content)&&o.content.map((u,c)=>g.jsx("pre",{className:ze.toolArgs,children:String(u.text??JSON.stringify(u))},c))]},i)}return g.jsx("pre",{className:ze.toolArgs,children:JSON.stringify(r,null,2)},i)})})}function Hy(t){if(t&&typeof t=="object"&&!Array.isArray(t)){const a=t.messages;if(Array.isArray(a))return a}}function p3({input:t,output:a}){const i=Hy(t),r=Hy(a);return g.jsxs("div",{className:ze.strandsEvent,children:[t!=null&&g.jsxs("div",{className:ze.strandsSection,children:[g.jsx("span",{className:ze.strandsLabel,children:"Input"}),i?g.jsx(qy,{messages:i}):g.jsx("pre",{className:ze.spanRaw,children:JSON.stringify(t,null,2)})]}),a!=null&&g.jsxs("div",{className:ze.strandsSection,children:[g.jsx("span",{className:ze.strandsLabel,children:"Output"}),r?g.jsx(qy,{messages:r}):g.jsx("pre",{className:ze.spanRaw,children:JSON.stringify(a,null,2)})]})]})}function qy({messages:t}){return!t||!Array.isArray(t)?null:g.jsx("div",{className:ze.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=H4(c);return g.jsxs("div",{className:ze.msgRow,children:[g.jsx("span",{className:`${ze.roleBadge} ${ze[`role_${o}`]||""}`,children:o}),g.jsx("div",{className:ze.msgContent,children:h?g.jsx(g3,{items:h}):g.jsx("span",{className:ze.msgText,children:c||JSON.stringify(u)})})]},i)})})}function g3({items:t}){return g.jsx("div",{className:ze.parsedContent,children:t.map((a,i)=>{if(a.text){const r=String(a.text),o=Iy(r);return o?g.jsx("pre",{className:ze.toolArgs,children:JSON.stringify(o,null,2)},i):g.jsx("div",{className:ze.contentText,children:r},i)}if(a.toolUse){const r=a.toolUse;return g.jsxs("div",{className:ze.toolCall,children:[g.jsx("span",{className:ze.toolIcon,children:g.jsx(za,{size:12})}),g.jsx("span",{className:ze.toolName,children:String(r.name)}),r.input!==null&&r.input!==void 0&&Object.keys(r.input).length>0&&g.jsx("pre",{className:ze.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:ze.toolResult,children:[g.jsx("span",{className:`${ze.toolResultStatus} ${o.toLowerCase()==="error"?ze.toolResultError:""}`,children:o}),Array.isArray(r.content)&&r.content.map((u,c)=>{const h=String(u.text??""),m=Iy(h);return m?g.jsx("pre",{className:ze.toolArgs,children:JSON.stringify(m,null,2)},c):g.jsx("pre",{className:ze.toolArgs,children:h},c)})]},i)}return g.jsx("pre",{className:ze.toolArgs,children:JSON.stringify(a,null,2)},i)})})}const y3="_container_c3i5z_1",_3="_toggleRow_c3i5z_6",v3="_toggle_c3i5z_6",x3="_chevron_c3i5z_32",b3="_icon_c3i5z_38",S3="_label_c3i5z_43",k3="_content_c3i5z_47",T3="_status_c3i5z_55",N3="_error_c3i5z_62",E3="_detail_c3i5z_73",C3="_logPanel_c3i5z_73",A3="_traceDetail_c3i5z_73",w3="_detailHeader_c3i5z_80",j3="_detailTitle_c3i5z_89",z3="_closeBtn_c3i5z_95",M3="_controls_c3i5z_115",R3="_controlRow_c3i5z_122",O3="_refreshBtn_c3i5z_128",D3="_retryBtn_c3i5z_148",L3="_timeFilter_c3i5z_162",B3="_timeFilterHeader_c3i5z_168",U3="_timeModeToggle_c3i5z_174",I3="_timeModeBtn_c3i5z_183",H3="_timeModeBtnActive_c3i5z_198",q3="_dateRange_c3i5z_203",V3="_dateField_c3i5z_210",G3="_dateLabel_c3i5z_218",$3="_dateInput_c3i5z_226",Z3="_cloudwatchNote_c3i5z_248",Y3="_traceList_c3i5z_255",X3="_traceRow_c3i5z_264",F3="_traceRowSelected_c3i5z_284",Q3="_traceMain_c3i5z_290",K3="_traceId_c3i5z_296",J3="_spanCount_c3i5z_308",P3="_traceMeta_c3i5z_316",W3="_traceTime_c3i5z_322",ez="_sessionId_c3i5z_327",tz="_detailControls_c3i5z_344",nz="_quickFilter_c3i5z_350",az="_spanList_c3i5z_365",lz="_tokenPill_c3i5z_370",iz="_tokenIcon_c3i5z_385",rz="_tokenSep_c3i5z_390",sz="_tokenDim_c3i5z_394",oz="_durationPill_c3i5z_399",uz="_spanTimestamp_c3i5z_414",cz="_severityBadge_c3i5z_419",fz="_sevINFO_c3i5z_429",dz="_sevWARN_c3i5z_434",hz="_sevERROR_c3i5z_439",mz="_spanScope_c3i5z_444",pz="_spanBody_c3i5z_450",gz="_rawToggle_c3i5z_456",yz="_spanRaw_c3i5z_471",_z="_treeNode_c3i5z_486",vz="_treeRow_c3i5z_493",xz="_treeRowExpandable_c3i5z_502",bz="_treeRowSelected_c3i5z_509",Sz="_treeToggle_c3i5z_514",kz="_treeName_c3i5z_521",Tz="_treeError_c3i5z_530",Nz="_treeMetrics_c3i5z_540",Ez="_treeChildren_c3i5z_548",Cz="_treeLogRow_c3i5z_552",Az="_treeLogHeader_c3i5z_562",fe={container:y3,toggleRow:_3,toggle:v3,chevron:x3,icon:b3,label:S3,content:k3,status:T3,error:N3,detail:E3,logPanel:C3,traceDetail:A3,detailHeader:w3,detailTitle:j3,closeBtn:z3,controls:M3,controlRow:R3,refreshBtn:O3,retryBtn:D3,timeFilter:L3,timeFilterHeader:B3,timeModeToggle:U3,timeModeBtn:I3,timeModeBtnActive:H3,dateRange:q3,dateField:V3,dateLabel:G3,dateInput:$3,cloudwatchNote:Z3,traceList:Y3,traceRow:X3,traceRowSelected:F3,traceMain:Q3,traceId:K3,spanCount:J3,traceMeta:P3,traceTime:W3,sessionId:ez,detailControls:tz,quickFilter:nz,spanList:az,tokenPill:lz,tokenIcon:iz,tokenSep:rz,tokenDim:sz,durationPill:oz,spanTimestamp:uz,severityBadge:cz,sevINFO:fz,sevWARN:dz,sevERROR:hz,spanScope:mz,spanBody:pz,rawToggle:gz,spanRaw:yz,treeNode:_z,treeRow:vz,treeRowExpandable:xz,treeRowSelected:bz,treeToggle:Sz,treeName:kz,treeError:Tz,treeMetrics:Nz,treeChildren:Ez,treeLogRow:Cz,treeLogHeader:Az};function wz({spanName:t,logs:a,onClose:i}){return g.jsxs("div",{className:fe.logPanel,"data-testid":"traces-log-panel",children:[g.jsxs("div",{className:fe.detailHeader,children:[g.jsx("span",{className:fe.detailTitle,children:t}),g.jsx("button",{className:fe.closeBtn,onClick:i,"aria-label":"Close logs",children:g.jsx(Li,{size:12})})]}),a.length===0?g.jsx("div",{className:fe.status,children:"No logs for this span."}):g.jsx("div",{children:a.map((r,o)=>g.jsx(jz,{log:r},o))})]})}function jz({log:t}){const[a,i]=R.useState(!1);return g.jsxs("div",{className:fe.treeLogRow,children:[g.jsxs("div",{className:fe.treeLogHeader,children:[g.jsx("span",{className:fe.spanTimestamp,children:t.timestamp}),t.scopeName&&g.jsx("span",{className:fe.spanScope,children:t.scopeName}),t.severity&&g.jsx("span",{className:`${fe.severityBadge} ${fe[`sev${t.severity.toUpperCase()}`]||""}`,children:t.severity})]}),t.body!==void 0&&g.jsx("div",{className:fe.spanBody,children:g.jsx(Od,{body:t.body})}),g.jsx("button",{className:fe.rawToggle,onClick:()=>i(r=>!r),children:a?g.jsxs(g.Fragment,{children:[g.jsx(wa,{size:10})," Hide raw"]}):g.jsxs(g.Fragment,{children:[g.jsx(cl,{size:10})," Raw JSON"]})}),a&&g.jsx("pre",{className:fe.spanRaw,children:JSON.stringify(t,null,2)})]})}function ol(t){const a=Date.now();return{startTime:a-t,endTime:a}}function So(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 ko(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 Vy(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Eo(t){return(t==null?void 0:t.kind)==="agent"}function Co(t){return!!(t!=null&&t.isDeployed)}function Gy(t){return(t==null?void 0:t.kind)==="harness"||Co(t)&&!Eo(t)?"cloudwatch":"local"}function $y(t){if(t)return t.kind==="harness"?{harnessName:t.name}:{agentName:t.name}}function zz(t){const a=t.body;return typeof a=="object"&&a!==null&&"input"in a&&"output"in a}function Mz(t,a){return a==="all"?t:t.map(i=>h1(i,a)).filter(i=>i!==null)}function h1(t,a){const i=t.children.map(o=>h1(o,a)).filter(o=>o!==null);return Rz(t,a)||i.length>0?{...t,children:i}:null}function Rz(t,a){return a==="errors"?t.statusCode==="ERROR":a==="with-tokens"?t.logs.some(zz)||(t.inputTokens??0)>0||(t.outputTokens??0)>0:!0}const Oz=20;function Dz({roots:t,selectedSpanId:a,onSelectSpan:i}){return t.length===0?g.jsx("div",{className:fe.status,children:"No spans found."}):g.jsx("div",{className:fe.spanList,"data-testid":"traces-span-tree",children:t.map(r=>g.jsx(m1,{node:r,selectedSpanId:a,onSelectSpan:i},r.spanId))})}function m1({node:t,selectedSpanId:a,onSelectSpan:i}){const[r,o]=R.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:fe.treeNode,"data-testid":"traces-span-node",children:[g.jsxs("div",{className:`${fe.treeRow} ${fe.treeRowExpandable} ${c?fe.treeRowSelected:""}`,style:{paddingLeft:`${t.depth*Oz+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:fe.treeToggle,onClick:u?p=>{p.stopPropagation(),o(y=>!y)}:void 0,children:u?r?g.jsx(wa,{size:12}):g.jsx(cl,{size:12}):g.jsx("span",{style:{width:12}})}),g.jsx("span",{className:fe.treeName,children:t.name}),t.statusCode==="ERROR"&&g.jsx("span",{className:fe.treeError,children:"ERR"}),g.jsxs("div",{className:fe.treeMetrics,children:[h&&g.jsxs("span",{className:fe.tokenPill,children:[g.jsx(md,{size:9,className:fe.tokenIcon}),Vy(t.inputTokens??0)," ",g.jsx("span",{className:fe.tokenDim,children:"in"}),g.jsx("span",{className:fe.tokenSep,children:"/"}),Vy(t.outputTokens??0)," ",g.jsx("span",{className:fe.tokenDim,children:"out"})]}),m&&g.jsxs("span",{className:fe.durationPill,children:[g.jsx(kx,{size:9}),Rd(t.durationMs)]})]})]}),r&&u&&g.jsx("div",{className:fe.treeChildren,children:t.children.map(p=>g.jsx(m1,{node:p,selectedSpanId:a,onSelectSpan:i},p.spanId))})]})}function Lz({trace:t,isSelected:a,onClick:i}){return g.jsxs("button",{className:`${fe.traceRow} ${a?fe.traceRowSelected:""}`,onClick:i,"aria-label":`Trace ${t.traceId}`,children:[g.jsxs("div",{className:fe.traceMain,children:[g.jsx("span",{className:fe.traceId,children:t.traceId}),g.jsxs("span",{className:fe.spanCount,children:[t.spanCount," spans"]})]}),g.jsxs("div",{className:fe.traceMeta,children:[g.jsx("span",{className:fe.traceTime,children:Jo(t.timestamp)}),t.sessionId&&g.jsxs("span",{className:fe.sessionId,children:["session: ",t.sessionId]})]})]})}function Bz(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:qt(m.startTimeUnixNano),durationMs:qt(m.endTimeUnixNano)-qt(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 p1(r)}function Uz(t,a){var r;const i=new Map;for(const o of t){const u=o.durationNano?qt(o.durationNano):0;i.set(o.spanId,{spanId:o.spanId,parentSpanId:o.parentSpanId,name:o.name||"span",depth:0,startMs:o.startTimeUnixNano?qt(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 p1(i)}function p1(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 Iz=[{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}],Hz=720*60*1e3;function qz({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}=I4(),N=R.useMemo(()=>[...t.map(me=>({value:`agent:${me.name}`,name:me.name,kind:"agent",isDeployed:me.deploymentStatus==="deployed"})),...a.map(me=>({value:`harness:${me.name}`,name:me.name,kind:"harness",isDeployed:me.deploymentStatus==="deployed"}))],[t,a]),[L,O]=R.useState(""),[k,z]=R.useState("local"),[w,Q]=R.useState(null),[$,B]=R.useState(null),[J,de]=R.useState("with-tokens"),he=R.useRef(!1);R.useEffect(()=>{if(!(L===""||!N.find(bt=>bt.value===L)))return;const gt=N[0];gt&&(O(gt.value),z(Gy(gt)))},[N,L]);const M=N.find(me=>me.value===L),ae=!Eo(M)&&!Co(M),[le,pe]=R.useState("relative"),[ne,Z]=R.useState(Hz),[U,P]=R.useState(""),[oe,Se]=R.useState(""),E=R.useCallback(()=>le==="relative"?ol(ne):So(U,oe)??ol(ne),[le,ne,U,oe]),C=R.useCallback((me,gt,bt)=>{Q(null),B(null),b(),_(me,$y(gt),bt)},[b,_]);R.useEffect(()=>{i&&!he.current&&M&&!ae&&C(k,M,ol(ne)),he.current=!!i},[i,C,k,M,ae,ne]);const G=me=>{O(me);const gt=N.find(Vn=>Vn.value===me);if(!Eo(gt)&&!Co(gt))return;const bt=Gy(gt);z(bt),C(bt,gt,E())},T=me=>{z(me),C(me,M,E())},te=()=>{C(k,M,E())},ue=me=>{B(null),w===me.traceId?(Q(null),b()):(Q(me.traceId),x(k,me.traceId,$y(M),E()))},X=me=>{if(pe(me),me==="relative")C(k,M,ol(ne));else{const gt=new Date,bt=new Date(gt.getTime()-ne);P(ko(bt)),Se(ko(gt)),C(k,M,So(ko(bt),ko(gt))??ol(ne))}},xe=me=>{Z(me),C(k,M,ol(me))},qe=me=>{P(me),C(k,M,So(me,oe)??ol(ne))},ce=me=>{Se(me),C(k,M,So(U,me)??ol(ne))},ut=R.useMemo(()=>k==="cloudwatch"?Uz(c,u):Bz(o),[k,o,c,u]),Lt=R.useMemo(()=>Mz(ut,J),[ut,J]),tn=R.useMemo(()=>{if(!$)return null;const me=gt=>{for(const bt of gt){if(bt.spanId===$)return bt;const Vn=me(bt.children);if(Vn)return Vn}return null};return me(ut)},[$,ut]);if(N.length===0)return g.jsx("div",{className:fe.status,children:"No traces available."});const ra=ut.length>0;return g.jsxs("div",{className:fe.container,children:[g.jsx("div",{className:fe.controls,children:g.jsxs("div",{className:fe.controlRow,children:[g.jsxs("div",{className:fe.dateField,children:[g.jsx("label",{className:fe.dateLabel,htmlFor:"traces-resource",children:"Resource"}),g.jsx("select",{id:"traces-resource",className:fe.dateInput,value:L,onChange:me=>G(me.target.value),children:N.map(me=>g.jsxs("option",{value:me.value,children:[me.name," (",me.kind,")"]},me.value))})]}),g.jsxs("div",{className:fe.dateField,children:[g.jsx("label",{className:fe.dateLabel,htmlFor:"traces-source",children:"Source"}),g.jsxs("select",{id:"traces-source",className:fe.dateInput,value:k,onChange:me=>T(me.target.value),children:[g.jsx("option",{value:"local",disabled:!Eo(M),children:"Local traces"}),g.jsx("option",{value:"cloudwatch",disabled:!Co(M),children:"CloudWatch"})]})]}),g.jsx("button",{className:fe.refreshBtn,onClick:te,title:"Refresh traces","aria-label":"Refresh traces",children:g.jsx(dd,{size:12})})]})}),k==="cloudwatch"&&!ae&&g.jsx("div",{className:fe.cloudwatchNote,children:"Note: Traces may take 2-3 minutes to appear in CloudWatch"}),g.jsx("div",{className:fe.content,children:ae?g.jsx("div",{className:fe.status,children:"No traces available — deploy this resource to view CloudWatch traces."}):g.jsxs(g.Fragment,{children:[y!==!1&&g.jsxs("div",{className:fe.timeFilter,children:[g.jsxs("div",{className:fe.timeFilterHeader,children:[g.jsx("label",{className:fe.dateLabel,children:"Time range"}),g.jsxs("div",{className:fe.timeModeToggle,children:[g.jsx("button",{className:`${fe.timeModeBtn} ${le==="relative"?fe.timeModeBtnActive:""}`,onClick:()=>X("relative"),children:"Relative"}),g.jsx("button",{className:`${fe.timeModeBtn} ${le==="absolute"?fe.timeModeBtnActive:""}`,onClick:()=>X("absolute"),children:"Absolute"})]})]}),le==="relative"?g.jsx("div",{className:fe.dateField,children:g.jsx("select",{id:"traces-time-range",className:fe.dateInput,value:ne,onChange:me=>xe(Number(me.target.value)),children:Iz.map(me=>g.jsx("option",{value:me.ms,children:me.label},me.ms))})}):g.jsxs("div",{className:fe.dateRange,children:[g.jsxs("div",{className:fe.dateField,children:[g.jsx("label",{className:fe.dateLabel,htmlFor:"traces-start",children:"Start"}),g.jsx("input",{id:"traces-start",className:fe.dateInput,type:"datetime-local",value:U,onChange:me=>qe(me.target.value)})]}),g.jsxs("div",{className:fe.dateField,children:[g.jsx("label",{className:fe.dateLabel,htmlFor:"traces-end",children:"End"}),g.jsx("input",{id:"traces-end",className:fe.dateInput,type:"datetime-local",value:oe,onChange:me=>ce(me.target.value)})]})]})]}),h&&g.jsx("div",{className:fe.status,children:"Loading traces…"}),p&&g.jsxs("div",{className:fe.error,children:[g.jsxs("span",{children:[g.jsx(hd,{size:12})," ",p]}),g.jsx("button",{className:fe.retryBtn,onClick:te,children:"Retry"})]}),!h&&!p&&y!==!1&&r.length===0&&g.jsx("div",{className:fe.status,children:"No traces found."}),!h&&r.length>0&&g.jsx("div",{className:fe.traceList,"data-testid":"traces-trace-list",children:r.map(me=>g.jsx(Lz,{trace:me,isSelected:w===me.traceId,onClick:()=>ue(me)},me.traceId))}),w&&g.jsxs("div",{className:fe.traceDetail,children:[g.jsxs("div",{className:fe.detailHeader,children:[g.jsx("span",{className:fe.detailTitle,children:"Spans"}),g.jsxs("div",{className:fe.detailControls,children:[g.jsxs("select",{className:fe.quickFilter,value:J,onChange:me=>de(me.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:fe.closeBtn,onClick:()=>{Q(null),b()},"aria-label":"Close detail",children:g.jsx(Li,{size:12})})]})]}),m&&g.jsx("div",{className:fe.status,children:"Loading…"}),!m&&!ra&&!p&&g.jsx("div",{className:fe.status,children:"No data found."}),!m&&ra&&Lt.length===0&&J!=="all"&&g.jsx("div",{className:fe.status,children:"No matching spans."}),!m&&Lt.length>0&&g.jsx(Dz,{roots:Lt,selectedSpanId:$,onSelectSpan:B})]}),tn&&g.jsx(wz,{spanName:tn.name,logs:tn.logs,onClose:()=>B(null)})]})})]})}function Vz({resources:t,sessionId:a,userId:i,onClose:r}){const{data:o,isLoading:u,error:c,fetch:h}=t,[m,p]=R.useState(null),[y,_]=R.useState("resources"),[x,b]=R.useState(620),N=R.useRef(null),L=R.useCallback(k=>{k.preventDefault();const z=Q=>{const $=window.innerWidth-Q.clientX;b(Math.max(320,Math.min($,window.innerWidth*.8)))},w=()=>{N.current=null,document.removeEventListener("mousemove",z),document.removeEventListener("mouseup",w),document.body.style.cursor="",document.body.style.userSelect=""};N.current={move:z,up:w},document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",z),document.addEventListener("mouseup",w)},[]);R.useEffect(()=>()=>{N.current&&(document.removeEventListener("mousemove",N.current.move),document.removeEventListener("mouseup",N.current.up),document.body.style.cursor="",document.body.style.userSelect="")},[]);const O=(k,z)=>{p(w=>(w==null?void 0:w.kind)===k&&w.resource.name===z.name?null:{kind:k,resource:z})};return g.jsxs("div",{className:je.panel,style:{width:x},"data-testid":"resource-panel",children:[g.jsx("div",{className:je.resizeHandle,onMouseDown:L,role:"separator","aria-label":"Resize panel"}),g.jsxs("div",{className:je.header,children:[g.jsx("span",{className:je.projectName,children:(o==null?void 0:o.project)||"Resources"}),g.jsxs("div",{className:je.headerActions,children:[g.jsx("button",{className:je.iconBtn,onClick:h,title:"Refresh","aria-label":"Refresh resources",children:g.jsx(dd,{size:12})}),g.jsx("button",{className:je.iconBtn,onClick:r,title:"Close","aria-label":"Close resource panel",children:g.jsx(Li,{size:12})})]})]}),g.jsx("div",{className:je.tabBar,role:"tablist",children:["resources","traces","memories"].map(k=>g.jsx("button",{role:"tab","aria-selected":y===k,className:`${je.tab} ${y===k?je.tabActive:""}`,onClick:()=>_(k),children:k.charAt(0).toUpperCase()+k.slice(1)},k))}),g.jsxs("div",{className:je.body,children:[g.jsxs("div",{className:je.tabContent,hidden:y!=="resources",children:[u&&!o&&g.jsx("div",{className:je.status,children:"Loading resources…"}),c&&!o&&g.jsxs("div",{className:je.error,children:[g.jsxs("span",{children:[g.jsx(hd,{size:12})," ",c]}),g.jsx("button",{className:je.retryBtn,onClick:h,children:"Retry"})]}),o&&g.jsxs("div",{className:je.graph,children:[o.agents.length>0&&g.jsx(ta,{title:"Agents",children:o.agents.map(k=>g.jsx(Bn,{kind:"agent",name:k.name,subtitle:k.build,isSelected:(m==null?void 0:m.kind)==="agent"&&m.resource.name===k.name,onClick:()=>O("agent",k),connections:Gz(k,o.mcpRuntimeTools),deploymentStatus:k.deploymentStatus},k.name))}),(o.harnesses??[]).length>0&&g.jsx(ta,{title:"Harnesses",children:(o.harnesses??[]).map(k=>g.jsx(Bn,{kind:"harness",name:k.name,subtitle:k.model,isSelected:(m==null?void 0:m.kind)==="harness"&&m.resource.name===k.name,onClick:()=>O("harness",k),deploymentStatus:k.deploymentStatus},k.name))}),o.memories.length>0&&g.jsx(ta,{title:"Memories",children:o.memories.map(k=>g.jsx(Bn,{kind:"memory",name:k.name,subtitle:k.strategies.map(z=>z.type).join(", "),isSelected:(m==null?void 0:m.kind)==="memory"&&m.resource.name===k.name,onClick:()=>O("memory",k),deploymentStatus:k.deploymentStatus},k.name))}),o.credentials.length>0&&g.jsx(ta,{title:"Credentials",children:o.credentials.map(k=>g.jsx(Bn,{kind:"credential",name:k.name,subtitle:k.type,isSelected:(m==null?void 0:m.kind)==="credential"&&m.resource.name===k.name,onClick:()=>O("credential",k),deploymentStatus:k.deploymentStatus},k.name))}),o.gateways.length>0&&g.jsx(ta,{title:"Gateways",children:o.gateways.map(k=>g.jsxs("div",{children:[g.jsx(Bn,{kind:"gateway",name:k.name,subtitle:`${k.targets.length} target(s)`,isSelected:(m==null?void 0:m.kind)==="gateway"&&m.resource.name===k.name,onClick:()=>O("gateway",k),deploymentStatus:k.deploymentStatus}),k.targets.map(z=>g.jsx("div",{className:je.childNode,children:g.jsx(Bn,{kind:"gatewayTarget",name:z.name,subtitle:z.targetType,isSelected:(m==null?void 0:m.kind)==="gatewayTarget"&&m.resource.name===z.name,onClick:()=>O("gatewayTarget",z)})},z.name))]},k.name))}),o.mcpRuntimeTools.length>0&&g.jsx(ta,{title:"MCP Runtime Tools",children:o.mcpRuntimeTools.map(k=>g.jsx(Bn,{kind:"mcpTool",name:k.name,subtitle:k.bindings.map(z=>z.runtimeName).join(", "),isSelected:(m==null?void 0:m.kind)==="mcpTool"&&m.resource.name===k.name,onClick:()=>O("mcpTool",k),connections:k.bindings.map(z=>`→ ${z.runtimeName}`),deploymentStatus:k.deploymentStatus},k.name))}),o.evaluators.length>0&&g.jsx(ta,{title:"Evaluators",children:o.evaluators.map(k=>g.jsx(Bn,{kind:"evaluator",name:k.name,subtitle:`${k.level} — ${k.configType}`,isSelected:(m==null?void 0:m.kind)==="evaluator"&&m.resource.name===k.name,onClick:()=>O("evaluator",k),deploymentStatus:k.deploymentStatus},k.name))}),o.onlineEvalConfigs.length>0&&g.jsx(ta,{title:"Online Eval Configs",children:o.onlineEvalConfigs.map(k=>g.jsx(Bn,{kind:"onlineEval",name:k.name,subtitle:`${k.evaluators.length} evaluator(s), ${k.samplingRate}% sampling`,isSelected:(m==null?void 0:m.kind)==="onlineEval"&&m.resource.name===k.name,onClick:()=>O("onlineEval",k),connections:[`→ ${k.agent}`],deploymentStatus:k.deploymentStatus},k.name))}),o.policyEngines.length>0&&g.jsx(ta,{title:"Policy Engines",children:o.policyEngines.map(k=>g.jsxs("div",{children:[g.jsx(Bn,{kind:"policyEngine",name:k.name,subtitle:`${k.policies.length} polic${k.policies.length!==1?"ies":"y"}`,isSelected:(m==null?void 0:m.kind)==="policyEngine"&&m.resource.name===k.name,onClick:()=>O("policyEngine",k),deploymentStatus:k.deploymentStatus}),k.policies.map(z=>g.jsx("div",{className:je.childNode,children:g.jsx(Bn,{kind:"policy",name:z.name,subtitle:z.description,isSelected:(m==null?void 0:m.kind)==="policy"&&m.resource.name===z.name,onClick:()=>O("policy",z),deploymentStatus:z.deploymentStatus})},z.name))]},k.name))}),o.unassignedTargets.length>0&&g.jsx(ta,{title:"Unassigned Targets",children:o.unassignedTargets.map(k=>g.jsx(Bn,{kind:"unassignedTarget",name:k.name,subtitle:k.targetType,isSelected:(m==null?void 0:m.kind)==="unassignedTarget"&&m.resource.name===k.name,onClick:()=>O("unassignedTarget",k)},k.name))})]}),m&&g.jsxs("div",{className:je.infoCard,children:[g.jsxs("div",{className:je.infoHeader,children:[g.jsx("span",{className:`${je.kindBadge} ${je[m.kind]}`,children:Zz(m.kind)}),g.jsx("span",{className:je.infoName,children:m.resource.name})]}),g.jsxs("div",{className:je.infoBody,children:[Object.entries(m.resource).filter(([k,z])=>k!=="deployed"&&!$z(z)).map(([k,z])=>g.jsxs("div",{className:je.infoRow,children:[g.jsx("span",{className:je.infoKey,children:k}),g.jsx("span",{className:je.infoValue,children:Zy(z)})]},k)),"deployed"in m.resource&&m.resource.deployed!==null&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:je.infoSectionHeader,children:"Deployed State"}),Object.entries(m.resource.deployed).map(([k,z])=>g.jsxs("div",{className:je.infoRow,children:[g.jsx("span",{className:je.infoKey,children:k}),g.jsx("span",{className:je.infoValue,children:Zy(z)})]},k))]})]})]})]}),g.jsx("div",{className:je.tabContent,hidden:y!=="traces",children:g.jsx(qz,{agents:(o==null?void 0:o.agents)??[],harnesses:(o==null?void 0:o.harnesses)??[],isActive:y==="traces"})}),g.jsx("div",{className:je.tabContent,hidden:y!=="memories",children:g.jsx(Uj,{memories:(o==null?void 0:o.memories)??[],sessionId:a,userId:i,isActive:y==="memories"})})]})]})}function ta({title:t,children:a}){return g.jsxs("div",{className:je.section,children:[g.jsx("div",{className:je.sectionTitle,children:t}),a]})}function Gz(t,a){const i=[];for(const r of a)r.bindings.some(o=>o.runtimeName===t.name)&&i.push(`← ${r.name}`);return i}function $z(t){return!!(t===null||t===""||t===void 0||Array.isArray(t)&&t.length===0)}function Zy(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 Zz(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 Yz="_body_sadpk_1",Xz="_interactionsList_sadpk_9",Fz="_interactionItem_sadpk_17",Qz="_interactionItemSelected_sadpk_36",Kz="_interactionPrompt_sadpk_41",Jz="_interactionMeta_sadpk_49",Pz="_interactionTraceId_sadpk_55",Wz="_interactionTime_sadpk_61",eM="_interactionSpanCount_sadpk_66",tM="_rightArea_sadpk_75",nM="_waterfall_sadpk_84",aM="_userPromptRow_sadpk_90",lM="_userPromptText_sadpk_101",iM="_waterfallRow_sadpk_108",rM="_waterfallRowSelected_sadpk_122",sM="_spanIcon_sadpk_128",oM="_spanLabel_sadpk_135",uM="_barContainer_sadpk_145",cM="_bar_sadpk_145",fM="_barInvocation_sadpk_160",dM="_barAgent_sadpk_164",hM="_barLlm_sadpk_168",mM="_barTool_sadpk_172",pM="_barOther_sadpk_176",gM="_duration_sadpk_180",yM="_detailPane_sadpk_190",_M="_detailHeader_sadpk_197",vM="_iconBtn_sadpk_209",xM="_tabBar_sadpk_224",bM="_tab_sadpk_224",SM="_tabActive_sadpk_244",kM="_detailBody_sadpk_249",TM="_attrTable_sadpk_254",NM="_attrKey_sadpk_265",EM="_attrValue_sadpk_273",CM="_emptyState_sadpk_280",Be={body:Yz,interactionsList:Xz,interactionItem:Fz,interactionItemSelected:Qz,interactionPrompt:Kz,interactionMeta:Jz,interactionTraceId:Pz,interactionTime:Wz,interactionSpanCount:eM,rightArea:tM,waterfall:nM,userPromptRow:aM,userPromptText:lM,waterfallRow:iM,waterfallRowSelected:rM,spanIcon:sM,spanLabel:oM,barContainer:uM,bar:cM,barInvocation:fM,barAgent:dM,barLlm:hM,barTool:mM,barOther:pM,duration:gM,detailPane:yM,detailHeader:_M,iconBtn:vM,tabBar:xM,tab:bM,tabActive:SM,detailBody:kM,attrTable:TM,attrKey:NM,attrValue:EM,emptyState:CM};function AM({invocations:t,selectedTraceId:a,onSelect:i}){return t.length===0?g.jsx("div",{className:Be.emptyState,children:"No interactions yet"}):g.jsx("div",{className:Be.interactionsList,"data-testid":"trace-list",children:t.map(r=>g.jsxs("button",{className:`${Be.interactionItem} ${a===r.traceId?Be.interactionItemSelected:""}`,onClick:()=>i(r.traceId),"aria-label":`Trace ${r.traceId}`,children:[r.userPrompt&&g.jsx("span",{className:Be.interactionPrompt,title:r.userPrompt,children:r.userPrompt}),g.jsxs("div",{className:Be.interactionMeta,children:[g.jsxs("span",{className:Be.interactionTraceId,children:[r.traceId.slice(0,12),"..."]}),g.jsx("span",{className:Be.interactionSpanCount,children:r.spanCount})]}),g.jsx("span",{className:Be.interactionTime,children:Jo(r.timestamp)})]},r.traceId))})}function Ao(t){if(typeof t=="string"){const a=kn(t);return typeof a!="string"?Ao(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 g1(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=Zr(u.attributes),h=Ao(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=Zr(u.attributes),h=Ao(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=Ao(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 wM(t){switch(t){case 1:return"SERVER";case 2:return"CLIENT";case 3:return"PRODUCER";case 4:return"CONSUMER";default:return"INTERNAL"}}function jM(t){var u;const a={...t.attributes??{}},i=qt(t.startTimeUnixNano),o=qt(t.endTimeUnixNano)-i;return{attributes:a,status:t.status,kind:t.type==="span"?wM(t.kind):void 0,scope:(u=t.scope)==null?void 0:u.name,duration:o>0?`${o}ms`:void 0}}function zM(t){const a=t.events;if(a){let r=null;for(const o of a){const u=o.name,c=Zr(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 MM(t){const a=t.events;if(a){let r=null;for(const o of a){const u=o.name,c=Zr(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=Zr(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 RM({span:t,onClose:a}){const[i,r]=R.useState("event");return g.jsxs("div",{className:Be.detailPane,children:[g.jsxs("div",{className:Be.detailHeader,children:[g.jsx("div",{className:Be.tabBar,children:["event","request","response"].map(o=>g.jsx("button",{className:`${Be.tab} ${i===o?Be.tabActive:""}`,onClick:()=>r(o),children:o.charAt(0).toUpperCase()+o.slice(1)},o))}),g.jsx("button",{className:Be.iconBtn,onClick:a,"aria-label":"Close detail",children:g.jsx(Li,{size:14})})]}),g.jsxs("div",{className:Be.detailBody,children:[i==="event"&&g.jsx(OM,{span:t}),i==="request"&&g.jsx(DM,{span:t}),i==="response"&&g.jsx(LM,{span:t})]})]})}function OM({span:t}){const a=jM(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:Be.emptyState,children:"No event data"}):g.jsx("table",{className:Be.attrTable,children:g.jsx("tbody",{children:i.map(([o,u])=>g.jsxs("tr",{children:[g.jsx("td",{className:Be.attrKey,children:o}),g.jsx("td",{className:Be.attrValue,children:u})]},o))})})}function DM({span:t}){const a=zM(t);return a?a.type==="genai"&&Array.isArray(a.content)?g.jsx(Dd,{content:a.content}):g.jsx(Od,{body:a.content}):g.jsx("div",{className:Be.emptyState,children:"No request data"})}function LM({span:t}){const a=MM(t);return a?a.type==="genai"&&Array.isArray(a.content)?g.jsx(Dd,{content:a.content}):g.jsx(Od,{body:a.content}):g.jsx("div",{className:Be.emptyState,children:"No response data"})}const BM=16,UM={invocation:g.jsx(md,{size:12}),agent:g.jsx(Ax,{size:12}),llm:g.jsx(Ix,{size:12}),tool:g.jsx(za,{size:12}),other:g.jsx(vx,{size:10})},IM={invocation:Be.barInvocation,agent:Be.barAgent,llm:Be.barLlm,tool:Be.barTool,other:Be.barOther};function HM({tree:t,selectedSpanId:a,onSelectSpan:i,userPrompt:r}){const o=hw(mw(t));return o.length===0?g.jsx("div",{className:Be.emptyState,children:"No spans"}):g.jsxs("div",{className:Be.waterfall,children:[r&&g.jsxs("div",{className:Be.userPromptRow,children:[g.jsx("span",{className:Be.spanIcon,children:g.jsx(Kx,{size:12})}),g.jsx("span",{className:Be.userPromptText,title:r,children:r})]}),o.map((u,c)=>g.jsx(qM,{entry:u,isSelected:a===u.node.span.spanId,onSelect:()=>i(u.node.span)},u.node.span.spanId??c))]})}function qM({entry:t,isSelected:a,onSelect:i}){var y;const{node:r,offsetPercent:o,widthPercent:u}=t,c=gw(r.span),h=UM[c],m=IM[c],p=r.span.name||((y=r.span.scope)==null?void 0:y.name)||"span";return g.jsxs("div",{className:`${Be.waterfallRow} ${a?Be.waterfallRowSelected:""}`,style:{paddingLeft:`${10+r.depth*BM}px`},onClick:i,role:"button",tabIndex:0,onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&i()},children:[g.jsx("span",{className:Be.spanIcon,children:h}),g.jsx("span",{className:Be.spanLabel,title:p,children:p}),g.jsx("div",{className:Be.barContainer,children:g.jsx("div",{className:`${Be.bar} ${m}`,style:{left:`${o}%`,width:`${u}%`}})}),g.jsx("span",{className:Be.duration,children:Rd(r.durationMs)})]})}function VM({traces:t}){const{invocations:a,selectedInvocation:i,isLoading:r,selectTrace:o,refresh:u}=t,[c,h]=R.useState(null);return R.useEffect(()=>{h(null)},[i==null?void 0:i.traceId]),g.jsx(Zo,{title:"Timeline view",status:r?"Loading...":void 0,onRefresh:u,children:g.jsxs("div",{className:Be.body,children:[g.jsx(AM,{invocations:a,selectedTraceId:(i==null?void 0:i.traceId)??null,onSelect:o}),g.jsxs("div",{className:Be.rightArea,children:[!i&&a.length>0&&g.jsx("div",{className:Be.emptyState,children:"Select an interaction to view"}),i&&g.jsxs(g.Fragment,{children:[g.jsx(HM,{tree:i.tree,selectedSpanId:(c==null?void 0:c.spanId)??null,onSelectSpan:h,userPrompt:i.userPrompt}),c&&g.jsx(RM,{span:c,onClose:()=>h(null)})]})]})]})})}const GM="_error_1vxci_1",$M="_toolListItems_1vxci_7",ZM="_toolItem_1vxci_14",YM="_toolItemSelected_1vxci_34",XM="_toolName_1vxci_39",FM="_toolDesc_1vxci_45",QM="_toolForm_1vxci_53",KM="_toolFormHeader_1vxci_58",JM="_toolFormDesc_1vxci_66",PM="_noParams_1vxci_72",WM="_field_1vxci_78",eR="_fieldLabel_1vxci_82",tR="_fieldType_1vxci_92",nR="_fieldInput_1vxci_98",aR="_fieldTextarea_1vxci_115",lR="_fieldHint_1vxci_122",iR="_callBtn_1vxci_128",rR="_spinning_1vxci_153",Et={error:GM,toolListItems:$M,toolItem:ZM,toolItemSelected:YM,toolName:XM,toolDesc:FM,toolForm:QM,toolFormHeader:KM,toolFormDesc:JM,noParams:PM,field:WM,fieldLabel:eR,fieldType:tR,fieldInput:nR,fieldTextarea:aR,fieldHint:lR,callBtn:iR,spinning:rR};function sR(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 oR(t){return t.type==="integer"||t.type==="number"?"number":"text"}function uR({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]=R.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]=sR(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(L=>({...L,[_]: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(L=>({...L,[_]: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(L=>({...L,[_]:N.target.value})),placeholder:"JSON",rows:3}):g.jsx("input",{className:Et.fieldInput,type:oR(x),value:c[_],onChange:N=>h(L=>({...L,[_]: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(l_,{size:14,className:Et.spinning}),"Calling..."]}):"Call Tool"})]})}function cR({tools:t,isLoading:a,error:i,onRefresh:r,onCallTool:o,onToolCallMessage:u}){const[c,h]=R.useState(null),[m,p]=R.useState(!1),y=t.find(x=>x.name===c),_=async(x,b)=>{var O;p(!0);const N=Object.keys(b).length>0?`(${JSON.stringify(b)})`:"()",L=`Called ${x}${N}`;try{const k=await o(x,b),z=((O=k.content)==null?void 0:O.filter(Q=>Q.text!==void 0).map(Q=>Q.text))??[],w=z.length>0?z.join(`
|
|
275
|
-
`):JSON.stringify(k,null,2);u(
|
|
276
|
-
`);
|
|
274
|
+
`))+1))}const c="#".repeat(o),d=l.enter("headingAtx"),m=l.enter("phrasing");u.move(c+" ");let g=l.containerPhrasing(t,{before:"# ",after:`
|
|
275
|
+
`,...u.current()});return/^[\t ]/.test(g)&&(g=Zr(g.charCodeAt(0))+g.slice(1)),g=g?c+" "+g:c,l.options.closeAtx&&(g+=" "+c),m(),d(),g}J_.peek=_A;function J_(t){return t.value||""}function _A(){return"<"}P_.peek=vA;function P_(t,a,l,r){const o=Md(l),u=o==='"'?"Quote":"Apostrophe",c=l.enter("image");let d=l.enter("label");const m=l.createTracker(r);let g=m.move("![");return g+=m.move(l.safe(t.alt,{before:g,after:"]",...m.current()})),g+=m.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=l.enter("destinationLiteral"),g+=m.move("<"),g+=m.move(l.safe(t.url,{before:g,after:">",...m.current()})),g+=m.move(">")):(d=l.enter("destinationRaw"),g+=m.move(l.safe(t.url,{before:g,after:t.title?" ":")",...m.current()}))),d(),t.title&&(d=l.enter(`title${u}`),g+=m.move(" "+o),g+=m.move(l.safe(t.title,{before:g,after:o,...m.current()})),g+=m.move(o),d()),g+=m.move(")"),c(),g}function vA(){return"!"}W_.peek=xA;function W_(t,a,l,r){const o=t.referenceType,u=l.enter("imageReference");let c=l.enter("label");const d=l.createTracker(r);let m=d.move("![");const g=l.safe(t.alt,{before:m,after:"]",...d.current()});m+=d.move(g+"]["),c();const _=l.stack;l.stack=[],c=l.enter("reference");const y=l.safe(l.associationId(t),{before:m,after:"]",...d.current()});return c(),l.stack=_,u(),o==="full"||!g||g!==y?m+=d.move(y+"]"):o==="shortcut"?m=m.slice(0,-1):m+=d.move("]"),m}function xA(){return"!"}e1.peek=bA;function e1(t,a,l){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<l.unsafe.length;){const c=l.unsafe[u],d=l.compilePattern(c);let m;if(c.atBreak)for(;m=d.exec(r);){let g=m.index;r.charCodeAt(g)===10&&r.charCodeAt(g-1)===13&&g--,r=r.slice(0,g)+" "+r.slice(m.index+1)}}return o+r+o}function bA(){return"`"}function t1(t,a){const l=Sd(t);return!!(!a.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(l===t.url||"mailto:"+l===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}n1.peek=SA;function n1(t,a,l,r){const o=Md(l),u=o==='"'?"Quote":"Apostrophe",c=l.createTracker(r);let d,m;if(t1(t,l)){const _=l.stack;l.stack=[],d=l.enter("autolink");let y=c.move("<");return y+=c.move(l.containerPhrasing(t,{before:y,after:">",...c.current()})),y+=c.move(">"),d(),l.stack=_,y}d=l.enter("link"),m=l.enter("label");let g=c.move("[");return g+=c.move(l.containerPhrasing(t,{before:g,after:"](",...c.current()})),g+=c.move("]("),m(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(m=l.enter("destinationLiteral"),g+=c.move("<"),g+=c.move(l.safe(t.url,{before:g,after:">",...c.current()})),g+=c.move(">")):(m=l.enter("destinationRaw"),g+=c.move(l.safe(t.url,{before:g,after:t.title?" ":")",...c.current()}))),m(),t.title&&(m=l.enter(`title${u}`),g+=c.move(" "+o),g+=c.move(l.safe(t.title,{before:g,after:o,...c.current()})),g+=c.move(o),m()),g+=c.move(")"),d(),g}function SA(t,a,l){return t1(t,l)?"<":"["}a1.peek=kA;function a1(t,a,l,r){const o=t.referenceType,u=l.enter("linkReference");let c=l.enter("label");const d=l.createTracker(r);let m=d.move("[");const g=l.containerPhrasing(t,{before:m,after:"]",...d.current()});m+=d.move(g+"]["),c();const _=l.stack;l.stack=[],c=l.enter("reference");const y=l.safe(l.associationId(t),{before:m,after:"]",...d.current()});return c(),l.stack=_,u(),o==="full"||!g||g!==y?m+=d.move(y+"]"):o==="shortcut"?m=m.slice(0,-1):m+=d.move("]"),m}function kA(){return"["}function zd(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 TA(t){const a=zd(t),l=t.options.bulletOther;if(!l)return a==="*"?"-":"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(l===a)throw new Error("Expected `bullet` (`"+a+"`) and `bulletOther` (`"+l+"`) to be different");return l}function NA(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 l1(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 EA(t,a,l,r){const o=l.enter("list"),u=l.bulletCurrent;let c=t.ordered?NA(l):zd(l);const d=t.ordered?c==="."?")":".":TA(l);let m=a&&l.bulletLastUsed?c===l.bulletLastUsed:!1;if(!t.ordered){const _=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&_&&(!_.children||!_.children[0])&&l.stack[l.stack.length-1]==="list"&&l.stack[l.stack.length-2]==="listItem"&&l.stack[l.stack.length-3]==="list"&&l.stack[l.stack.length-4]==="listItem"&&l.indexStack[l.indexStack.length-1]===0&&l.indexStack[l.indexStack.length-2]===0&&l.indexStack[l.indexStack.length-3]===0&&(m=!0),l1(l)===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=d),l.bulletCurrent=c;const g=l.containerFlow(t,r);return l.bulletLastUsed=c,l.bulletCurrent=u,o(),g}function CA(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 AA(t,a,l,r){const o=CA(l);let u=l.bulletCurrent||zd(l);a&&a.type==="list"&&a.ordered&&(u=(typeof a.start=="number"&&a.start>-1?a.start:1)+(l.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 d=l.createTracker(r);d.move(u+" ".repeat(c-u.length)),d.shift(c);const m=l.enter("listItem"),g=l.indentLines(l.containerFlow(t,d.current()),_);return m(),g;function _(y,x,b){return x?(b?"":" ".repeat(c))+y:(b?u:u+" ".repeat(c-u.length))+y}}function jA(t,a,l,r){const o=l.enter("paragraph"),u=l.enter("phrasing"),c=l.containerPhrasing(t,r);return u(),o(),c}const wA=Ko(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MA(t,a,l,r){return(t.children.some(function(c){return wA(c)})?l.containerPhrasing:l.containerFlow).call(l,t,r)}function zA(t){const a=t.options.strong||"*";if(a!=="*"&&a!=="_")throw new Error("Cannot serialize strong with `"+a+"` for `options.strong`, expected `*`, or `_`");return a}i1.peek=RA;function i1(t,a,l,r){const o=zA(l),u=l.enter("strong"),c=l.createTracker(r),d=c.move(o+o);let m=c.move(l.containerPhrasing(t,{after:o,before:d,...c.current()}));const g=m.charCodeAt(0),_=Ro(r.before.charCodeAt(r.before.length-1),g,o);_.inside&&(m=Zr(g)+m.slice(1));const y=m.charCodeAt(m.length-1),x=Ro(r.after.charCodeAt(0),y,o);x.inside&&(m=m.slice(0,-1)+Zr(y));const b=c.move(o+o);return u(),l.attentionEncodeSurroundingInfo={after:x.outside,before:_.outside},d+m+b}function RA(t,a,l){return l.options.strong||"*"}function OA(t,a,l,r){return l.safe(t.value,r)}function DA(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 LA(t,a,l){const r=(l1(l)+(l.options.ruleSpaces?" ":"")).repeat(DA(l));return l.options.ruleSpaces?r.slice(0,-1):r}const r1={blockquote:iA,break:Ly,code:fA,definition:hA,emphasis:K_,hardBreak:Ly,heading:yA,html:J_,image:P_,imageReference:W_,inlineCode:e1,link:n1,linkReference:a1,list:EA,listItem:AA,paragraph:jA,root:MA,strong:i1,text:OA,thematicBreak:LA};function BA(){return{enter:{table:IA,tableData:By,tableHeader:By,tableRow:HA},exit:{codeText:qA,table:UA,tableData:If,tableHeader:If,tableRow:If}}}function IA(t){const a=t._align;this.enter({type:"table",align:a.map(function(l){return l==="none"?null:l}),children:[]},t),this.data.inTable=!0}function UA(t){this.exit(t),this.data.inTable=void 0}function HA(t){this.enter({type:"tableRow",children:[]},t)}function If(t){this.exit(t)}function By(t){this.enter({type:"tableCell",children:[]},t)}function qA(t){let a=this.resume();this.data.inTable&&(a=a.replace(/\\([\\|])/g,VA));const l=this.stack[this.stack.length-1];l.type,l.value=a,this.exit(t)}function VA(t,a){return a==="|"?a:t}function GA(t){const a=t||{},l=a.tableCellPadding,r=a.tablePipeAlign,o=a.stringLength,u=l?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
276
|
+
`,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:d}};function c(b,N,O,D){return g(_(b,O,D),b.align)}function d(b,N,O,D){const k=y(b,O,D),M=g([k]);return M.slice(0,M.indexOf(`
|
|
277
|
+
`))}function m(b,N,O,D){const k=O.enter("tableCell"),M=O.enter("phrasing"),j=O.containerPhrasing(b,{...D,before:u,after:u});return M(),k(),j}function g(b,N){return aA(b,{align:N,alignDelimiters:r,padding:l,stringLength:o})}function _(b,N,O){const D=b.children;let k=-1;const M=[],j=N.enter("table");for(;++k<D.length;)M[k]=y(D[k],N,O);return j(),M}function y(b,N,O){const D=b.children;let k=-1;const M=[],j=N.enter("tableRow");for(;++k<D.length;)M[k]=m(D[k],b,N,O);return j(),M}function x(b,N,O){let D=r1.inlineCode(b,N,O);return O.stack.includes("tableCell")&&(D=D.replace(/\|/g,"\\$&")),D}}function $A(){return{exit:{taskListCheckValueChecked:Iy,taskListCheckValueUnchecked:Iy,paragraph:YA}}}function ZA(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:FA}}}function Iy(t){const a=this.stack[this.stack.length-2];a.type,a.checked=t.type==="taskListCheckValueChecked"}function YA(t){const a=this.stack[this.stack.length-2];if(a&&a.type==="listItem"&&typeof a.checked=="boolean"){const l=this.stack[this.stack.length-1];l.type;const r=l.children[0];if(r&&r.type==="text"){const o=a.children;let u=-1,c;for(;++u<o.length;){const d=o[u];if(d.type==="paragraph"){c=d;break}}c===l&&(r.value=r.value.slice(1),r.value.length===0?l.children.shift():l.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,l.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function FA(t,a,l,r){const o=t.children[0],u=typeof t.checked=="boolean"&&o&&o.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",d=l.createTracker(r);u&&d.move(c);let m=r1.listItem(t,a,l,{...r,...d.current()});return u&&(m=m.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,g)),m;function g(_){return _+c}}function XA(){return[EC(),FC(),JC(),BA(),$A()]}function QA(t){return{extensions:[CC(),XC(t),PC(),GA(t),ZA()]}}const KA={tokenize:nj,partial:!0},s1={tokenize:aj,partial:!0},o1={tokenize:lj,partial:!0},u1={tokenize:ij,partial:!0},JA={tokenize:rj,partial:!0},c1={name:"wwwAutolink",tokenize:ej,previous:d1},f1={name:"protocolAutolink",tokenize:tj,previous:h1},Ra={name:"emailAutolink",tokenize:WA,previous:m1},sa={};function PA(){return{text:sa}}let Ll=48;for(;Ll<123;)sa[Ll]=Ra,Ll++,Ll===58?Ll=65:Ll===91&&(Ll=97);sa[43]=Ra;sa[45]=Ra;sa[46]=Ra;sa[95]=Ra;sa[72]=[Ra,f1];sa[104]=[Ra,f1];sa[87]=[Ra,c1];sa[119]=[Ra,c1];function WA(t,a,l){const r=this;let o,u;return c;function c(y){return!nd(y)||!m1.call(r,r.previous)||Rd(r.events)?l(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(y))}function d(y){return nd(y)?(t.consume(y),d):y===64?(t.consume(y),m):l(y)}function m(y){return y===46?t.check(JA,_,g)(y):y===45||y===95||Jt(y)?(u=!0,t.consume(y),m):_(y)}function g(y){return t.consume(y),o=!0,m}function _(y){return u&&o&&tn(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),a(y)):l(y)}}function ej(t,a,l){const r=this;return o;function o(c){return c!==87&&c!==119||!d1.call(r,r.previous)||Rd(r.events)?l(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(KA,t.attempt(s1,t.attempt(o1,u),l),l)(c))}function u(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),a(c)}}function tj(t,a,l){const r=this;let o="",u=!1;return c;function c(y){return(y===72||y===104)&&h1.call(r,r.previous)&&!Rd(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(y),t.consume(y),d):l(y)}function d(y){if(tn(y)&&o.length<5)return o+=String.fromCodePoint(y),t.consume(y),d;if(y===58){const x=o.toLowerCase();if(x==="http"||x==="https")return t.consume(y),m}return l(y)}function m(y){return y===47?(t.consume(y),u?g:(u=!0,m)):l(y)}function g(y){return y===null||wo(y)||gt(y)||Bl(y)||Fo(y)?l(y):t.attempt(s1,t.attempt(o1,_),l)(y)}function _(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),a(y)}}function nj(t,a,l){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):l(c)}function u(c){return c===null?l(c):a(c)}}function aj(t,a,l){let r,o,u;return c;function c(g){return g===46||g===95?t.check(u1,m,d)(g):g===null||gt(g)||Bl(g)||g!==45&&Fo(g)?m(g):(u=!0,t.consume(g),c)}function d(g){return g===95?r=!0:(o=r,r=void 0),t.consume(g),c}function m(g){return o||r||!u?l(g):a(g)}}function lj(t,a){let l=0,r=0;return o;function o(c){return c===40?(l++,t.consume(c),o):c===41&&r<l?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(u1,a,u)(c):c===null||gt(c)||Bl(c)?a(c):(t.consume(c),o)}function u(c){return c===41&&r++,t.consume(c),o}}function ij(t,a,l){return r;function r(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(t.consume(d),r):d===38?(t.consume(d),u):d===93?(t.consume(d),o):d===60||d===null||gt(d)||Bl(d)?a(d):l(d)}function o(d){return d===null||d===40||d===91||gt(d)||Bl(d)?a(d):r(d)}function u(d){return tn(d)?c(d):l(d)}function c(d){return d===59?(t.consume(d),r):tn(d)?(t.consume(d),c):l(d)}}function rj(t,a,l){return r;function r(u){return t.consume(u),o}function o(u){return Jt(u)?l(u):a(u)}}function d1(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||gt(t)}function h1(t){return!tn(t)}function m1(t){return!(t===47||nd(t))}function nd(t){return t===43||t===45||t===46||t===95||Jt(t)}function Rd(t){let a=t.length,l=!1;for(;a--;){const r=t[a][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){l=!0;break}if(r._gfmAutolinkLiteralWalkedInto){l=!1;break}}return t.length>0&&!l&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),l}const sj={tokenize:pj,partial:!0};function oj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dj,continuation:{tokenize:hj},exit:mj}},text:{91:{name:"gfmFootnoteCall",tokenize:fj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:uj,resolveTo:cj}}}}function uj(t,a,l){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 d;function d(m){if(!c||!c._balanced)return l(m);const g=Xn(r.sliceSerialize({start:c.end,end:r.now()}));return g.codePointAt(0)!==94||!u.includes(g.slice(1))?l(m):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(m),t.exit("gfmFootnoteCallLabelMarker"),a(m))}}function cj(t,a){let l=t.length;for(;l--;)if(t[l][1].type==="labelImage"&&t[l][0]==="enter"){t[l][1];break}t[l+1][1].type="data",t[l+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[l+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[l+3][1].end),end:Object.assign({},t[l+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)},d=[t[l+1],t[l+2],["enter",r,a],t[l+3],t[l+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(l,t.length-l+1,...d),t}function fj(t,a,l){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u=0,c;return d;function d(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),m}function m(y){return y!==94?l(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",g)}function g(y){if(u>999||y===93&&!c||y===null||y===91||gt(y))return l(y);if(y===93){t.exit("chunkString");const x=t.exit("gfmFootnoteCallString");return o.includes(Xn(r.sliceSerialize(x)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),a):l(y)}return gt(y)||(c=!0),u++,t.consume(y),y===92?_:g}function _(y){return y===91||y===92||y===93?(t.consume(y),u++,g):g(y)}}function dj(t,a,l){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u,c=0,d;return m;function m(N){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),g}function g(N){return N===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",_):l(N)}function _(N){if(c>999||N===93&&!d||N===null||N===91||gt(N))return l(N);if(N===93){t.exit("chunkString");const O=t.exit("gfmFootnoteDefinitionLabelString");return u=Xn(r.sliceSerialize(O)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),x}return gt(N)||(d=!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),Pe(t,b,"gfmFootnoteDefinitionWhitespace")):l(N)}function b(N){return a(N)}}function hj(t,a,l){return t.check(Kr,a,t.attempt(sj,a,l))}function mj(t){t.exit("gfmFootnoteDefinition")}function pj(t,a,l){const r=this;return Pe(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):l(u)}}function gj(t){let l=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:u,resolveAll:o};return l==null&&(l=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(c,d){let m=-1;for(;++m<c.length;)if(c[m][0]==="enter"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._close){let g=m;for(;g--;)if(c[g][0]==="exit"&&c[g][1].type==="strikethroughSequenceTemporary"&&c[g][1]._open&&c[m][1].end.offset-c[m][1].start.offset===c[g][1].end.offset-c[g][1].start.offset){c[m][1].type="strikethroughSequence",c[g][1].type="strikethroughSequence";const _={type:"strikethrough",start:Object.assign({},c[g][1].start),end:Object.assign({},c[m][1].end)},y={type:"strikethroughText",start:Object.assign({},c[g][1].end),end:Object.assign({},c[m][1].start)},x=[["enter",_,d],["enter",c[g][1],d],["exit",c[g][1],d],["enter",y,d]],b=d.parser.constructs.insideSpan.null;b&&Nn(x,x.length,0,Xo(b,c.slice(g+1,m),d)),Nn(x,x.length,0,[["exit",y,d],["enter",c[m][1],d],["exit",c[m][1],d],["exit",_,d]]),Nn(c,g-1,m-g+3,x),m=g+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,d,m){const g=this.previous,_=this.events;let y=0;return x;function x(N){return g===126&&_[_.length-1][1].type!=="characterEscape"?m(N):(c.enter("strikethroughSequenceTemporary"),b(N))}function b(N){const O=Ri(g);if(N===126)return y>1?m(N):(c.consume(N),y++,b);if(y<2&&!l)return m(N);const D=c.exit("strikethroughSequenceTemporary"),k=Ri(N);return D._open=!k||k===2&&!!O,D._close=!O||O===2&&!!k,d(N)}}}class yj{constructor(){this.map=[]}add(a,l,r){_j(this,a,l,r)}consume(a){if(this.map.sort(function(u,c){return u[0]-c[0]}),this.map.length===0)return;let l=this.map.length;const r=[];for(;l>0;)l-=1,r.push(a.slice(this.map[l][0]+this.map[l][1]),this.map[l][2]),a.length=this.map[l][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 _j(t,a,l,r){let o=0;if(!(l===0&&r.length===0)){for(;o<t.map.length;){if(t.map[o][0]===a){t.map[o][1]+=l,t.map[o][2].push(...r);return}o+=1}t.map.push([a,l,r])}}function vj(t,a){let l=!1;const r=[];for(;a<t.length;){const o=t[a];if(l){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"&&(l=!0);a+=1}return r}function xj(){return{flow:{null:{name:"table",tokenize:bj,resolveAll:Sj}}}}function bj(t,a,l){const r=this;let o=0,u=0,c;return d;function d(z){let te=r.events.length-1;for(;te>-1;){const ne=r.events[te][1].type;if(ne==="lineEnding"||ne==="linePrefix")te--;else break}const ae=te>-1?r.events[te][1].type:null,ge=ae==="tableHead"||ae==="tableRow"?I:m;return ge===I&&r.parser.lazy[r.now().line]?l(z):ge(z)}function m(z){return t.enter("tableHead"),t.enter("tableRow"),g(z)}function g(z){return z===124||(c=!0,u+=1),_(z)}function _(z){return z===null?l(z):Ae(z)?u>1?(u=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(z),t.exit("lineEnding"),b):l(z):Ye(z)?Pe(t,_,"whitespace")(z):(u+=1,c&&(c=!1,o+=1),z===124?(t.enter("tableCellDivider"),t.consume(z),t.exit("tableCellDivider"),c=!0,_):(t.enter("data"),y(z)))}function y(z){return z===null||z===124||gt(z)?(t.exit("data"),_(z)):(t.consume(z),z===92?x:y)}function x(z){return z===92||z===124?(t.consume(z),y):y(z)}function b(z){return r.interrupt=!1,r.parser.lazy[r.now().line]?l(z):(t.enter("tableDelimiterRow"),c=!1,Ye(z)?Pe(t,N,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):N(z))}function N(z){return z===45||z===58?D(z):z===124?(c=!0,t.enter("tableCellDivider"),t.consume(z),t.exit("tableCellDivider"),O):Y(z)}function O(z){return Ye(z)?Pe(t,D,"whitespace")(z):D(z)}function D(z){return z===58?(u+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(z),t.exit("tableDelimiterMarker"),k):z===45?(u+=1,k(z)):z===null||Ae(z)?K(z):Y(z)}function k(z){return z===45?(t.enter("tableDelimiterFiller"),M(z)):Y(z)}function M(z){return z===45?(t.consume(z),M):z===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(z),t.exit("tableDelimiterMarker"),j):(t.exit("tableDelimiterFiller"),j(z))}function j(z){return Ye(z)?Pe(t,K,"whitespace")(z):K(z)}function K(z){return z===124?N(z):z===null||Ae(z)?!c||o!==u?Y(z):(t.exit("tableDelimiterRow"),t.exit("tableHead"),a(z)):Y(z)}function Y(z){return l(z)}function I(z){return t.enter("tableRow"),U(z)}function U(z){return z===124?(t.enter("tableCellDivider"),t.consume(z),t.exit("tableCellDivider"),U):z===null||Ae(z)?(t.exit("tableRow"),a(z)):Ye(z)?Pe(t,U,"whitespace")(z):(t.enter("data"),re(z))}function re(z){return z===null||z===124||gt(z)?(t.exit("data"),U(z)):(t.consume(z),z===92?le:re)}function le(z){return z===92||z===124?(t.consume(z),re):re(z)}}function Sj(t,a){let l=-1,r=!0,o=0,u=[0,0,0,0],c=[0,0,0,0],d=!1,m=0,g,_,y;const x=new yj;for(;++l<t.length;){const b=t[l],N=b[1];b[0]==="enter"?N.type==="tableHead"?(d=!1,m!==0&&(Uy(x,a,m,g,_),_=void 0,m=0),g={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},x.add(l,0,[["enter",g,a]])):N.type==="tableRow"||N.type==="tableDelimiterRow"?(r=!0,y=void 0,u=[0,0,0,0],c=[0,l+1,0,0],d&&(d=!1,_={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},x.add(l,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=So(x,a,u,o,void 0,y),u=[0,0,0,0]),c[2]=l)):N.type==="tableCellDivider"&&(r?r=!1:(u[1]!==0&&(c[0]=c[1],y=So(x,a,u,o,void 0,y)),u=c,c=[u[1],l,0,0])):N.type==="tableHead"?(d=!0,m=l):N.type==="tableRow"||N.type==="tableDelimiterRow"?(m=l,u[1]!==0?(c[0]=c[1],y=So(x,a,u,o,l,y)):c[1]!==0&&(y=So(x,a,c,o,l,y)),o=0):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(c[3]=l)}for(m!==0&&Uy(x,a,m,g,_),x.consume(a.events),l=-1;++l<a.events.length;){const b=a.events[l];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=vj(a.events,l))}return t}function So(t,a,l,r,o,u){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",d="tableContent";l[0]!==0&&(u.end=Object.assign({},ji(a.events,l[0])),t.add(l[0],0,[["exit",u,a]]));const m=ji(a.events,l[1]);if(u={type:c,start:Object.assign({},m),end:Object.assign({},m)},t.add(l[1],0,[["enter",u,a]]),l[2]!==0){const g=ji(a.events,l[2]),_=ji(a.events,l[3]),y={type:d,start:Object.assign({},g),end:Object.assign({},_)};if(t.add(l[2],0,[["enter",y,a]]),r!==2){const x=a.events[l[2]],b=a.events[l[3]];if(x[1].end=Object.assign({},b[1].end),x[1].type="chunkText",x[1].contentType="text",l[3]>l[2]+1){const N=l[2]+1,O=l[3]-l[2]-1;t.add(N,O,[])}}t.add(l[3]+1,0,[["exit",y,a]])}return o!==void 0&&(u.end=Object.assign({},ji(a.events,o)),t.add(o,0,[["exit",u,a]]),u=void 0),u}function Uy(t,a,l,r,o){const u=[],c=ji(a.events,l);o&&(o.end=Object.assign({},c),u.push(["exit",o,a])),r.end=Object.assign({},c),u.push(["exit",r,a]),t.add(l+1,0,u)}function ji(t,a){const l=t[a],r=l[0]==="enter"?"start":"end";return l[1][r]}const kj={name:"tasklistCheck",tokenize:Nj};function Tj(){return{text:{91:kj}}}function Nj(t,a,l){const r=this;return o;function o(m){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?l(m):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),u)}function u(m){return gt(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):l(m)}function c(m){return m===93?(t.enter("taskListCheckMarker"),t.consume(m),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):l(m)}function d(m){return Ae(m)?a(m):Ye(m)?t.check({tokenize:Ej},a,l)(m):l(m)}}function Ej(t,a,l){return Pe(t,r,"whitespace");function r(o){return o===null?l(o):a(o)}}function Cj(t){return N_([PA(),oj(),gj(t),xj(),Tj()])}const Aj={};function jj(t){const a=this,l=t||Aj,r=a.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),u=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(Cj(l)),u.push(XA()),c.push(QA(l))}const wj="_root_1pdrb_1",Mj="_codeBlockWrapper_1pdrb_49",zj="_codeBlockHeader_1pdrb_70",Rj="_codeBlockLang_1pdrb_80",Oj="_copyBtn_1pdrb_86",Ur={root:wj,codeBlockWrapper:Mj,codeBlockHeader:zj,codeBlockLang:Rj,copyBtn:Oj};function Dj({children:t,className:a,...l}){var c;if(!(/language-(\w+)/.test(a||"")||typeof t=="string"&&t.includes(`
|
|
278
|
+
`)))return p.jsx("code",{className:a,...l,children:t});const o=String(t).replace(/\n$/,""),u=(c=a==null?void 0:a.match(/language-(\w+)/))==null?void 0:c[1];return p.jsx(Lj,{code:o,lang:u})}function Lj({code:t,lang:a}){const[l,r]=R.useState(!1),o=R.useCallback(()=>{navigator.clipboard.writeText(t).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)}).catch(()=>{})},[t]);return p.jsxs("div",{className:Ur.codeBlockWrapper,children:[p.jsxs("div",{className:Ur.codeBlockHeader,children:[a&&p.jsx("span",{className:Ur.codeBlockLang,children:a}),p.jsx("button",{className:Ur.copyBtn,onClick:o,"aria-label":"Copy code",children:l?p.jsx($f,{size:13}):p.jsx(s_,{size:13})})]}),p.jsx("pre",{children:p.jsx("code",{children:t})})]})}const Bj={code:Dj,a:({children:t,...a})=>p.jsx("a",{...a,target:"_blank",rel:"noopener noreferrer",children:t})};function Ij({content:t}){return p.jsx("div",{className:Ur.root,children:p.jsx(gC,{remarkPlugins:[jj],components:Bj,children:t})})}const Uj="_root_11p18_1",Hj="_pill_11p18_8",qj="_icon_11p18_22",Vj="_separator_11p18_27",Gj="_dim_11p18_31",$j="_cache_11p18_36",ol={root:Uj,pill:Hj,icon:qj,separator:Vj,dim:Gj,cache:$j};function Uf(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Zj({usage:t}){return p.jsx("div",{className:ol.root,children:p.jsxs("span",{className:ol.pill,children:[p.jsx(pd,{size:10,className:ol.icon}),Uf(t.inputTokens)," ",p.jsx("span",{className:ol.dim,children:"in"}),p.jsx("span",{className:ol.separator,children:"/"}),Uf(t.outputTokens)," ",p.jsx("span",{className:ol.dim,children:"out"}),t.cacheReadInputTokens!==void 0&&t.cacheReadInputTokens>0&&p.jsxs(p.Fragment,{children:[p.jsx("span",{className:ol.separator,children:"/"}),p.jsxs("span",{className:ol.cache,children:[Uf(t.cacheReadInputTokens)," cached"]})]})]})})}function qt(t){if(!t)return 0;try{return Number(BigInt(t)/1000000n)}catch{return Math.floor(Number(t)/1e6)}}function p1(t,a){const l=[];if(t)for(const r of t)for(const o of r.scopeSpans??[])for(const u of o.spans??[])l.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:qt(u.startTimeUnixNano)||Date.now()});if(a)for(const r of a)for(const o of r.scopeLogs??[])for(const u of o.logRecords??[])l.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:qt(u.timeUnixNano)||qt(u.observedTimeUnixNano)||Date.now()});return l.sort((r,o)=>r.timestampMs-o.timestampMs),l}function g1(t){const a=t.filter(u=>u.type==="span"&&u.spanId),l=new Map;for(const u of a)l.set(u.spanId,{span:u,children:[],depth:0,durationMs:qt(u.endTimeUnixNano)-qt(u.startTimeUnixNano)});const r=[];for(const u of l.values()){const c=u.span.parentSpanId,d=c?l.get(c):void 0;d?d.children.push(u):r.push(u)}const o=(u,c)=>{u.depth=c,u.children.sort((d,m)=>d.span.timestampMs-m.span.timestampMs);for(const d of u.children)o(d,c+1)};r.sort((u,c)=>u.span.timestampMs-c.span.timestampMs);for(const u of r)o(u,0);return r}function Yj(t){const a=[],l=r=>{a.push(r);for(const o of r.children)l(o)};for(const r of t)l(r);return a}function Fj(t){const a=Yj(t);if(a.length===0)return[];let l=1/0,r=0;for(const u of a){const c=qt(u.span.startTimeUnixNano),d=qt(u.span.endTimeUnixNano);c>0&&c<l&&(l=c),d>r&&(r=d)}const o=r-l;return o<=0?a.map(u=>({node:u,offsetPercent:0,widthPercent:100})):a.map(u=>{const c=qt(u.span.startTimeUnixNano),d=qt(u.span.endTimeUnixNano),m=(c-l)/o*100,g=Math.max((d-c)/o*100,.5);return{node:u,offsetPercent:Math.max(0,m),widthPercent:Math.min(g,100-m)}})}function Od(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 Xj(t){return t.map(y1).filter(a=>a!==null)}function Qj(t){const a=t.span.attributes??{};if(Number(a["gen_ai.usage.input_tokens"]??0)>0||Number(a["gen_ai.usage.output_tokens"]??0)>0||Object.keys(a).some(r=>r.startsWith("gen_ai.")))return!0;const l=(t.span.name??"").toLowerCase();return!!(l.includes("invoke")||l.includes("agent")||l.includes("tool")||l.includes("memory"))}function y1(t){const a=t.children.map(y1).filter(l=>l!==null);return Qj(t)||a.length>0?{...t,children:a}:null}function Kj(t){const a=(t.name??"").toLowerCase(),l=t.attributes??{};return a==="tool_use"||a==="tool_call"||a.startsWith("execute_tool")||l["tool.name"]||l["gen_ai.tool.name"]?"tool":t.parentSpanId?a.includes("invoke")||a.includes("agent")?"agent":Object.keys(l).some(r=>r.startsWith("gen_ai."))?"llm":"other":"invocation"}const Jj="_root_ryrat_1",Pj="_pill_ryrat_5",Wj="_cards_ryrat_24",ew="_card_ryrat_24",tw="_cardHeader_ryrat_39",nw="_toolIcon_ryrat_45",aw="_toolName_ryrat_50",lw="_duration_ryrat_57",iw="_toggle_ryrat_64",rw="_json_ryrat_80",Un={root:Jj,pill:Pj,cards:Wj,card:ew,cardHeader:tw,toolIcon:nw,toolName:aw,duration:lw,toggle:iw,json:rw};function Hy(t){if(!t)return null;try{return JSON.stringify(JSON.parse(t),null,2)}catch{return t}}function sw({tool:t}){const[a,l]=R.useState(!0),[r,o]=R.useState(!0),u=Hy(t.input),c=Hy(t.output);return p.jsxs("div",{className:Un.card,children:[p.jsxs("div",{className:Un.cardHeader,children:[p.jsx(za,{size:12,className:Un.toolIcon}),p.jsx("span",{className:Un.toolName,children:t.name}),t.durationMs!==void 0&&p.jsx("span",{className:Un.duration,children:Od(t.durationMs)})]}),u&&p.jsxs("button",{className:Un.toggle,onClick:()=>l(d=>!d),children:[a?p.jsx(wa,{size:12}):p.jsx(dl,{size:12}),"Input"]}),a&&u&&p.jsx("pre",{className:Un.json,children:u}),c&&p.jsxs("button",{className:Un.toggle,onClick:()=>o(d=>!d),children:[r?p.jsx(wa,{size:12}):p.jsx(dl,{size:12}),"Output"]}),r&&c&&p.jsx("pre",{className:Un.json,children:c})]})}function ow({toolCalls:t}){const[a,l]=R.useState(!1);return t.length===0?null:p.jsxs("div",{className:Un.root,children:[p.jsxs("button",{className:Un.pill,onClick:()=>l(r=>!r),children:[p.jsx(za,{size:12}),t.length," tool",t.length===1?"":"s"," used",a?p.jsx(wa,{size:14}):p.jsx(dl,{size:14})]}),a&&p.jsx("div",{className:Un.cards,children:t.map((r,o)=>p.jsx(sw,{tool:r},`${r.spanId}-${o}`))})]})}const uw="_messages_17zuj_1",cw="_emptyState_17zuj_10",fw="_emptyStateIcon_17zuj_20",dw="_emptyStateAgent_17zuj_26",hw="_emptyStateBadge_17zuj_32",mw="_deployed_17zuj_40",pw="_local_17zuj_44",gw="_emptyStateDetails_17zuj_49",yw="_emptyStateText_17zuj_54",_w="_msg_17zuj_59",vw="_msgUser_17zuj_65",xw="_bodyUser_17zuj_91 _body_17zuj_83",bw="_bodyAssistant_17zuj_98 _body_17zuj_83",Sw="_bodyError_17zuj_104 _body_17zuj_83",kw="_thinking_17zuj_111",Tw="_thinkingDot_17zuj_121",Nw="_spinner_17zuj_144",Ew="_startingText_17zuj_153",at={messages:uw,emptyState:cw,emptyStateIcon:fw,emptyStateAgent:dw,emptyStateBadge:hw,deployed:mw,local:pw,emptyStateDetails:gw,emptyStateText:yw,msg:_w,msgUser:vw,bodyUser:xw,bodyAssistant:bw,bodyError:Sw,thinking:kw,thinkingDot:Tw,spinner:Nw,startingText:Ew};function Cw(t){return t.replace(/\n?\n?```[^\n`]+\n\n```\n?\n?/g,`
|
|
279
|
+
`)}function Aw(t){return t.isError?at.bodyError:t.role==="user"?at.bodyUser:at.bodyAssistant}const jw=R.forwardRef(({messages:t,isStreaming:a,isStarting:l,agentName:r,agentBuildType:o,agentProtocol:u,hasAvailableTargets:c=!0,isDeployed:d=!1},m)=>{if(l)return p.jsx("div",{className:at.messages,ref:m,"data-testid":"message-list",children:p.jsxs("div",{className:at.emptyState,children:[p.jsx("div",{className:at.spinner}),p.jsxs("div",{className:at.startingText,children:["Setting up ",r||"agent",p.jsx("span",{className:at.thinkingDot,children:"."}),p.jsx("span",{className:at.thinkingDot,children:"."}),p.jsx("span",{className:at.thinkingDot,children:"."})]})]})});if(t.length===0){if(!c)return p.jsx("div",{className:at.messages,ref:m,"data-testid":"message-list",children:p.jsxs("div",{className:at.emptyState,children:[p.jsx("div",{className:at.emptyStateIcon,children:p.jsx(Gf,{size:40,strokeWidth:1.5,color:"#6366f1"})}),p.jsx("div",{className:at.emptyStateAgent,children:"No agents found"}),p.jsxs("div",{className:at.emptyStateText,children:["Run ",p.jsx("code",{className:"cmd",children:"agentcore add"})," to add an agent or harness"]})]})});const _=[o==="CodeZip"?"Direct code deploy":o,u??"HTTP"].filter(Boolean).join(" · ");return p.jsx("div",{className:at.messages,ref:m,"data-testid":"message-list",children:p.jsxs("div",{className:at.emptyState,children:[p.jsx("div",{className:at.emptyStateIcon,children:p.jsx(Gf,{size:40,strokeWidth:1.5,color:"#6366f1"})}),p.jsx("div",{className:at.emptyStateAgent,children:r||"Agent"}),p.jsx("div",{className:`${at.emptyStateBadge} ${d?at.deployed:at.local}`,children:d?"DEPLOYED":"LOCAL"}),_&&p.jsx("div",{className:at.emptyStateDetails,children:_}),p.jsx("div",{className:at.emptyStateText,children:d?"Send a prompt to invoke this deployed agent":"Send a prompt to test this agent locally"})]})})}return p.jsx("div",{className:at.messages,ref:m,"data-testid":"message-list",children:t.map((g,_)=>a&&g.role==="assistant"&&g.content===""&&_===t.length-1?p.jsx("div",{className:at.msg,"data-testid":"thinking-indicator",children:p.jsxs("div",{className:at.thinking,children:["Thinking",p.jsx("span",{className:at.thinkingDot,children:"."}),p.jsx("span",{className:at.thinkingDot,children:"."}),p.jsx("span",{className:at.thinkingDot,children:"."})]})},_):p.jsxs("div",{className:g.role==="user"?at.msgUser:at.msg,"data-testid":`chat-message-${_}`,children:[p.jsx("div",{className:Aw(g),children:g.isError?p.jsx(Zf,{content:g.content}):g.role==="assistant"?p.jsx(Ij,{content:g.toolExecutions?Cw(g.content):g.content}):g.content}),g.toolCalls&&g.toolCalls.length>0&&p.jsx(ow,{toolCalls:g.toolCalls}),g.toolExecutions&&Object.keys(g.toolExecutions).length>0&&p.jsx(i2,{toolExecutions:g.toolExecutions}),g.tokenUsage&&p.jsx(Zj,{usage:g.tokenUsage})]},_))})});function ww(){const a=new URLSearchParams(window.location.search).get("port");return a&&/^\d+$/.test(a)?`http://localhost:${a}`:""}const Hn=ww();function mn(t,a){if((a==null?void 0:a.method)==="POST"){const l=new Headers(a.headers);return l.set("X-Agentcore-Local","1"),fetch(t,{...a,headers:l})}return fetch(t,a)}function Mw(){const[t,a]=R.useState([]),[l,r]=R.useState(!1),[o,u]=R.useState(null),[c,d]=R.useState(null),m=R.useCallback(async()=>{try{return(await mn(`${Hn}/api/memory?memoryName=__probe__&namespace=__probe__`)).status===404?(d(!1),!1):(d(!0),!0)}catch{return d(!1),!1}},[]),g=R.useCallback(async(x,b)=>{r(!0),u(null),a([]);try{const N=new URLSearchParams({memoryName:x,namespace:b}),O=await mn(`${Hn}/api/memory?${N.toString()}`);if(O.status===404){u("Memory browsing is only available in invoke mode."),d(!1);return}const D=await O.json();D.success&&D.records?a(D.records):u(D.error||"Failed to load memory records")}catch(N){u(N instanceof Error?N.message:"Failed to load memory records")}finally{r(!1)}},[]),_=R.useCallback(async(x,b,N)=>{r(!0),u(null),a([]);try{const O={memoryName:x,namespace:b,searchQuery:N},D=await mn(`${Hn}/api/memory/search`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(O)});if(D.status===404){u("Memory browsing is only available in invoke mode."),d(!1);return}const k=await D.json();k.success&&k.records?a(k.records):u(k.error||"Failed to search memory records")}catch(O){u(O instanceof Error?O.message:"Failed to search memory records")}finally{r(!1)}},[]),y=R.useCallback(()=>{a([]),u(null)},[]);return{records:t,isLoading:l,error:o,isAvailable:c,checkAvailability:m,listRecords:g,searchRecords:_,clear:y}}function Po(t){try{const a=Number(t),l=Number.isFinite(a)&&a>1e12?new Date(a):new Date(t);return isNaN(l.getTime())?t:l.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"})}catch{return t}}const zw="_notice_1isal_1",Rw="_warning_1isal_12",Ow="_retryBtn_1isal_16",Hf={notice:zw,warning:Rw,retryBtn:Ow};function qy({children:t,variant:a="error",onRetry:l}){return p.jsxs("div",{className:`${Hf.notice} ${a==="warning"?Hf.warning:""}`,children:[t,l&&p.jsx("button",{className:Hf.retryBtn,onClick:l,children:"Retry"})]})}const Dw="_container_qogk5_1",Lw="_content_qogk5_47",Bw="_status_qogk5_55",Iw="_error_qogk5_62",Uw="_detail_qogk5_73",Hw="_detailHeader_qogk5_80",qw="_detailTitle_qogk5_89",Vw="_closeBtn_qogk5_95",Gw="_controls_qogk5_118",$w="_field_qogk5_124",Zw="_fieldLabel_qogk5_130",Yw="_input_qogk5_138",Fw="_select_qogk5_158",Xw="_actions_qogk5_175",Qw="_actionBtn_qogk5_180",Kw="_searchBtn_qogk5_202",Jw="_resultCount_qogk5_213",Pw="_recordList_qogk5_219",Ww="_recordRow_qogk5_228",e3="_recordRowSelected_qogk5_248",t3="_recordMain_qogk5_254",n3="_recordContent_qogk5_261",a3="_scoreBadge_qogk5_271",l3="_recordMeta_qogk5_281",i3="_strategyTag_qogk5_288",r3="_recordTime_qogk5_296",s3="_detailBody_qogk5_302",o3="_detailSection_qogk5_309",u3="_detailLabel_qogk5_315",c3="_detailContent_qogk5_322",f3="_metadataGrid_qogk5_335",d3="_metadataRow_qogk5_341",h3="_metadataKey_qogk5_354",m3="_metadataValue_qogk5_361",p3="_detailId_qogk5_370",g3="_namespacesValue_qogk5_377",y3="_noMetadata_qogk5_383",be={container:Dw,content:Lw,status:Bw,error:Iw,detail:Uw,detailHeader:Hw,detailTitle:qw,closeBtn:Vw,controls:Gw,field:$w,fieldLabel:Zw,input:Yw,select:Fw,actions:Xw,actionBtn:Qw,searchBtn:Kw,resultCount:Jw,recordList:Pw,recordRow:Ww,recordRowSelected:e3,recordMain:t3,recordContent:n3,scoreBadge:a3,recordMeta:l3,strategyTag:i3,recordTime:r3,detailBody:s3,detailSection:o3,detailLabel:u3,detailContent:c3,metadataGrid:f3,metadataRow:d3,metadataKey:h3,metadataValue:m3,detailId:p3,namespacesValue:g3,noMetadata:y3};function _3({memories:t,sessionId:a,userId:l,isActive:r}){var me;const{records:o,isLoading:u,error:c,isAvailable:d,checkAvailability:m,listRecords:g,searchRecords:_,clear:y}=Mw(),[x,b]=R.useState(((me=t[0])==null?void 0:me.name)??""),[N,O]=R.useState(""),[D,k]=R.useState({}),[M,j]=R.useState(""),[K,Y]=R.useState(null),[I,U]=R.useState(!1),[re,le]=R.useState(!1),z=R.useRef(!1);R.useEffect(()=>{!x&&t.length>0&&b(t[0].name)},[t,x]);const te=t.find(X=>X.name===x),ae=(te==null?void 0:te.strategies)??[],ge=ae.find(X=>X.type===N),ne=(ge==null?void 0:ge.namespaceTemplates)??(ge==null?void 0:ge.namespaces)??[],Z=R.useMemo(()=>ge?[...new Set(ne.flatMap(X=>(X.match(/\{(\w+)\}/g)||[]).map(He=>He.slice(1,-1))))]:[],[ge]);R.useEffect(()=>{r&&d===null&&m()},[r,d,m]),R.useEffect(()=>{if(!ge){k({});return}const X={};for(const _e of Z)_e==="actorId"?X[_e]=l||"default-user":_e==="sessionId"&&a?X[_e]=a:X[_e]="";k(X)},[ge,Z,a,l]);const B=X=>{b(X),O(""),Y(null),le(!1),y()},W=X=>{O(X),Y(null),le(!1),y()},ue=(X,_e)=>{k(He=>({...He,[X]:_e}))},Ne=()=>ge?ne.map(X=>X.replace(/\{(\w+)\}/g,(_e,He)=>{var fe;return((fe=D[He])==null?void 0:fe.trim())||""})).join(","):"",E=ge!=null&&Z.every(X=>{var _e;return(_e=D[X])==null?void 0:_e.trim()}),C=()=>{E&&(U(!1),Y(null),le(!0),g(x,Ne()))},$=()=>{!E||!M.trim()||(U(!0),Y(null),le(!0),_(x,Ne(),M.trim()))},T=X=>{X.key==="Enter"&&!z.current&&(M.trim()?$():C())},J=X=>{Y(_e=>(_e==null?void 0:_e.memoryRecordId)===X.memoryRecordId?null:X)};return t.length===0?p.jsxs("div",{className:be.status,children:[p.jsx("div",{children:"No AgentCore Memory found."}),p.jsxs("div",{children:["Run ",p.jsx("code",{className:"cmd",children:"agentcore add"})," to add Memory, then"," ",p.jsx("code",{className:"cmd",children:"agentcore deploy"})," to deploy it."]})]}):p.jsx("div",{className:be.container,children:p.jsxs("div",{className:be.content,children:[t.some(X=>X.deploymentStatus!=="deployed")&&p.jsxs(qy,{variant:"warning",children:[p.jsx("span",{children:"AgentCore Memory must be deployed before it can be used."}),p.jsxs("span",{children:["To test memory, run ",p.jsx("code",{className:"cmd",children:"agentcore deploy"})," and restart dev."]})]}),t.some(X=>X.deploymentStatus==="deployed")&&p.jsx(qy,{variant:"warning",children:"Memories may take 1-2 minutes to update after an invocation."}),d!==!1&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:be.controls,children:[p.jsxs("div",{className:be.field,children:[p.jsx("label",{className:be.fieldLabel,htmlFor:"memory-selector",children:"Memory"}),p.jsx("select",{id:"memory-selector",className:be.select,value:x,onChange:X=>B(X.target.value),children:t.map(X=>p.jsx("option",{value:X.name,children:X.name},X.name))})]}),p.jsxs("div",{className:be.field,children:[p.jsx("label",{className:be.fieldLabel,htmlFor:`strat-${x}`,children:"Strategy"}),p.jsxs("select",{id:`strat-${x}`,className:be.select,value:N,onChange:X=>W(X.target.value),children:[p.jsx("option",{value:"",disabled:!0,children:"Select a strategy…"}),ae.map(X=>p.jsx("option",{value:X.type,children:X.type},X.type))]})]}),Z.map(X=>p.jsxs("div",{className:be.field,children:[p.jsx("label",{className:be.fieldLabel,htmlFor:`ns-${x}-${X}`,children:X}),p.jsx("input",{id:`ns-${x}-${X}`,className:be.input,type:"text",placeholder:`Enter ${X}…`,value:D[X]||"",onChange:_e=>ue(X,_e.target.value),onKeyDown:T,onCompositionStart:()=>{z.current=!0},onCompositionEnd:()=>{z.current=!1}})]},X)),ge&&p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:be.field,children:[p.jsx("label",{className:be.fieldLabel,htmlFor:`search-${x}`,children:"Search (optional)"}),p.jsx("input",{id:`search-${x}`,className:be.input,type:"text",placeholder:"Semantic search query…",value:M,onChange:X=>j(X.target.value),onKeyDown:T,onCompositionStart:()=>{z.current=!0},onCompositionEnd:()=>{z.current=!1}})]}),p.jsxs("div",{className:be.actions,children:[p.jsx("button",{className:be.actionBtn,onClick:C,disabled:!E||u,children:"List"}),p.jsx("button",{className:`${be.actionBtn} ${be.searchBtn}`,onClick:$,disabled:!E||!M.trim()||u,children:"Search"})]})]})]}),u&&p.jsx("div",{className:be.status,children:"Loading records…"}),c&&p.jsx("div",{className:be.error,children:p.jsxs("span",{children:[p.jsx(md,{size:12})," ",c]})}),!u&&!c&&re&&o.length===0&&p.jsx("div",{className:be.status,children:"No memory records found for this namespace."}),!u&&o.length>0&&p.jsxs("div",{className:be.recordList,children:[p.jsxs("div",{className:be.resultCount,children:[o.length," record",o.length!==1?"s":"",I?" (search results)":""]}),o.map(X=>p.jsx(v3,{record:X,isSelected:(K==null?void 0:K.memoryRecordId)===X.memoryRecordId,showScore:I,onClick:()=>J(X)},X.memoryRecordId))]}),K&&p.jsx(x3,{record:K,onClose:()=>Y(null)})]})]})})}function v3({record:t,isSelected:a,showScore:l,onClick:r}){const o=t.content?t.content.length>120?t.content.slice(0,120)+"…":t.content:"(no content)";return p.jsxs("button",{className:`${be.recordRow} ${a?be.recordRowSelected:""}`,onClick:r,"aria-label":`Memory record ${t.memoryRecordId}`,children:[p.jsxs("div",{className:be.recordMain,children:[p.jsx("span",{className:be.recordContent,children:o}),l&&t.score!==null&&t.score!==void 0&&p.jsx("span",{className:be.scoreBadge,children:t.score.toFixed(3)})]}),p.jsxs("div",{className:be.recordMeta,children:[p.jsx("span",{className:be.strategyTag,children:t.memoryStrategyId}),p.jsx("span",{className:be.recordTime,children:Po(t.createdAt)})]})]})}function x3({record:t,onClose:a}){const l=Object.entries(t.metadata||{});return p.jsxs("div",{className:be.detail,children:[p.jsxs("div",{className:be.detailHeader,children:[p.jsx("span",{className:be.detailTitle,children:"Record Detail"}),p.jsx("button",{className:be.closeBtn,onClick:a,"aria-label":"Close record detail",children:p.jsx(Li,{size:12})})]}),p.jsxs("div",{className:be.detailBody,children:[p.jsxs("div",{className:be.detailSection,children:[p.jsx("span",{className:be.detailLabel,children:"ID"}),p.jsx("span",{className:be.detailId,children:t.memoryRecordId})]}),p.jsxs("div",{className:be.detailSection,children:[p.jsx("span",{className:be.detailLabel,children:"Content"}),p.jsx("div",{className:be.detailContent,children:t.content||"(no content)"})]}),p.jsxs("div",{className:be.detailSection,children:[p.jsx("span",{className:be.detailLabel,children:"Strategy"}),p.jsx("span",{className:be.strategyTag,children:t.memoryStrategyId})]}),p.jsxs("div",{className:be.detailSection,children:[p.jsx("span",{className:be.detailLabel,children:"Created"}),p.jsx("span",{className:be.recordTime,children:Po(t.createdAt)})]}),t.score!==null&&t.score!==void 0&&p.jsxs("div",{className:be.detailSection,children:[p.jsx("span",{className:be.detailLabel,children:"Relevance Score"}),p.jsx("span",{className:be.scoreBadge,children:t.score.toFixed(4)})]}),t.namespaces.length>0&&p.jsxs("div",{className:be.detailSection,children:[p.jsx("span",{className:be.detailLabel,children:"Namespaces"}),p.jsx("span",{className:be.namespacesValue,children:t.namespaces.join(", ")})]}),l.length>0&&p.jsxs("div",{className:be.detailSection,children:[p.jsx("span",{className:be.detailLabel,children:"Metadata"}),p.jsx("div",{className:be.metadataGrid,children:l.map(([r,o])=>p.jsxs("div",{className:be.metadataRow,children:[p.jsx("span",{className:be.metadataKey,children:r}),p.jsx("span",{className:be.metadataValue,children:o})]},r))})]}),l.length===0&&p.jsxs("div",{className:be.detailSection,children:[p.jsx("span",{className:be.detailLabel,children:"Metadata"}),p.jsx("span",{className:be.noMetadata,children:"No metadata"})]})]})]})}const b3="_panel_lfvg8_1",S3="_resizeHandle_lfvg8_13",k3="_header_lfvg8_30",T3="_projectName_lfvg8_39",N3="_headerActions_lfvg8_45",E3="_iconBtn_lfvg8_50",C3="_tabBar_lfvg8_70",A3="_tab_lfvg8_70",j3="_tabActive_lfvg8_93",w3="_body_lfvg8_98",M3="_tabContent_lfvg8_104",z3="_status_lfvg8_114",R3="_error_lfvg8_121",O3="_retryBtn_lfvg8_132",D3="_graph_lfvg8_146",L3="_section_lfvg8_152",B3="_sectionTitle_lfvg8_158",I3="_childNode_lfvg8_167",U3="_node_lfvg8_183",H3="_nodeSelected_lfvg8_201",q3="_nodeIcon_lfvg8_206",V3="_agent_lfvg8_216",G3="_harness_lfvg8_220",$3="_memory_lfvg8_224",Z3="_credential_lfvg8_228",Y3="_gateway_lfvg8_232",F3="_gatewayTarget_lfvg8_236",X3="_mcpTool_lfvg8_240",Q3="_evaluator_lfvg8_244",K3="_onlineEval_lfvg8_248",J3="_policyEngine_lfvg8_252",P3="_policy_lfvg8_252",W3="_unassignedTarget_lfvg8_260",e4="_nodeContent_lfvg8_264",t4="_nodeName_lfvg8_272",n4="_nodeNameRow_lfvg8_281",a4="_deployBadge_lfvg8_288",l4="_deploy_deployed_lfvg8_298",i4="_nodeSubtitle_lfvg8_313",r4="_nodeConnections_lfvg8_321",s4="_connectionTag_lfvg8_328",o4="_infoCard_lfvg8_386",u4="_infoHeader_lfvg8_393",c4="_kindBadge_lfvg8_402",f4="_infoName_lfvg8_461",d4="_infoBody_lfvg8_467",h4="_infoSectionHeader_lfvg8_471",m4="_infoRow_lfvg8_481",p4="_infoKey_lfvg8_494",g4="_infoValue_lfvg8_499",Re={panel:b3,resizeHandle:S3,header:k3,projectName:T3,headerActions:N3,iconBtn:E3,tabBar:C3,tab:A3,tabActive:j3,body:w3,tabContent:M3,status:z3,error:R3,retryBtn:O3,graph:D3,section:L3,sectionTitle:B3,childNode:I3,node:U3,nodeSelected:H3,nodeIcon:q3,agent:V3,harness:G3,memory:$3,credential:Z3,gateway:Y3,gatewayTarget:F3,mcpTool:X3,evaluator:Q3,onlineEval:K3,policyEngine:J3,policy:P3,unassignedTarget:W3,nodeContent:e4,nodeName:t4,nodeNameRow:n4,deployBadge:a4,deploy_deployed:l4,"deploy_local-only":"_deploy_local-only_lfvg8_303","deploy_pending-removal":"_deploy_pending-removal_lfvg8_308",nodeSubtitle:i4,nodeConnections:r4,connectionTag:s4,infoCard:o4,infoHeader:u4,kindBadge:c4,infoName:f4,infoBody:d4,infoSectionHeader:h4,infoRow:m4,infoKey:p4,infoValue:g4},y4={agent:Gf,harness:yx,memory:hx,credential:Gx,gateway:Bx,gatewayTarget:Mx,mcpTool:za,evaluator:Ex,onlineEval:cx,policyEngine:Jx,policy:Dx,unassignedTarget:u_},_4={deployed:"Deployed","local-only":"Not deployed","pending-removal":"Removed locally"};function In({kind:t,name:a,subtitle:l,isSelected:r,onClick:o,connections:u,deploymentStatus:c}){const d=y4[t];return p.jsxs("button",{className:`${Re.node} ${Re[t]} ${r?Re.nodeSelected:""}`,onClick:o,"aria-label":`${t}: ${a}`,children:[p.jsx("span",{className:Re.nodeIcon,children:p.jsx(d,{size:14})}),p.jsxs("div",{className:Re.nodeContent,children:[p.jsxs("div",{className:Re.nodeNameRow,children:[p.jsx("span",{className:Re.nodeName,children:a}),c&&p.jsx("span",{className:`${Re.deployBadge} ${Re[`deploy_${c}`]}`,children:_4[c]})]}),l&&p.jsx("span",{className:Re.nodeSubtitle,children:l}),u&&u.length>0&&p.jsx("div",{className:Re.nodeConnections,children:u.map(m=>p.jsx("span",{className:Re.connectionTag,children:m},m))})]})]})}function Vy(t,a){const l=new URLSearchParams;return t!=null&&t.agentName&&l.set("agentName",t.agentName),t!=null&&t.harnessName&&l.set("harnessName",t.harnessName),(a==null?void 0:a.startTime)!==void 0&&l.set("startTime",String(a.startTime)),(a==null?void 0:a.endTime)!==void 0&&l.set("endTime",String(a.endTime)),l}function v4(){const t=Hn,[a,l]=R.useState([]),[r,o]=R.useState([]),[u,c]=R.useState([]),[d,m]=R.useState([]),[g,_]=R.useState(!1),[y,x]=R.useState(!1),[b,N]=R.useState(null),[O,D]=R.useState(null),k=R.useCallback(async(K,Y,I)=>{_(!0),N(null),o([]),c([]),m([]);try{const U=Vy(Y,I),le=await mn(`${t}/api/${K==="cloudwatch"?"cloudwatch-traces":"traces"}?${U.toString()}`);if(le.status===404){D(!1),l([]);return}D(!0);const z=await le.json();z.success?l(z.traces):(N(z.error),l([]))}catch(U){N(U instanceof Error?U.message:"Failed to load traces"),l([])}finally{_(!1)}},[t]),M=R.useCallback(async(K,Y,I,U)=>{x(!0),N(null);try{const re=Vy(I,U),te=await(await mn(`${t}/api/${K==="cloudwatch"?"cloudwatch-traces":"traces"}/${encodeURIComponent(Y)}?${re.toString()}`)).json();if(te.success)if(K==="cloudwatch"){const ae=te;c(ae.records??[]),m(ae.spans??[]),o([])}else{const ae=te;o(p1(ae.resourceSpans,ae.resourceLogs)),c([]),m([])}else N(te.error),o([]),c([]),m([])}catch(re){N(re instanceof Error?re.message:"Failed to load trace detail"),o([]),c([]),m([])}finally{x(!1)}},[t]),j=R.useCallback(()=>{o([]),c([]),m([]),N(null)},[]);return{traces:a,spans:r,deployedRecords:u,deployedSpans:d,isLoadingTraces:g,isLoadingDetail:y,error:b,isAvailable:O,fetchTraces:k,fetchTraceDetail:M,clearDetail:j}}function Yr(t){if(!t)return{};if(!Array.isArray(t))return t;const a={};for(const l of t){if(!l.key||!l.value)continue;const r=l.value;r.stringValue!==void 0?a[l.key]=r.stringValue:r.intValue!==void 0?a[l.key]=r.intValue:r.doubleValue!==void 0?a[l.key]=r.doubleValue:r.boolValue!==void 0&&(a[l.key]=r.boolValue)}return a}function Tn(t){if(t!=null){if(typeof t!="string")return t;try{return JSON.parse(t)}catch{return t}}}function x4(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 Gy(t){if(!t||!t.startsWith("{")&&!t.startsWith("["))return null;try{return JSON.parse(t)}catch{return null}}const b4="_dimText_rs5f0_1",S4="_assistantMsg_rs5f0_5",k4="_toolCalls_rs5f0_9",T4="_toolCall_rs5f0_9",N4="_toolIcon_rs5f0_22",E4="_toolName_rs5f0_26",C4="_toolArgs_rs5f0_32",A4="_toolResult_rs5f0_45",j4="_toolResultStatus_rs5f0_51",w4="_toolResultError_rs5f0_58",M4="_finishReason_rs5f0_62",z4="_genAiContent_rs5f0_68",R4="_contentText_rs5f0_74",O4="_strandsEvent_rs5f0_78",D4="_strandsSection_rs5f0_84",L4="_strandsLabel_rs5f0_90",B4="_messageList_rs5f0_97",I4="_msgRow_rs5f0_103",U4="_roleBadge_rs5f0_109",H4="_role_user_rs5f0_120",q4="_role_assistant_rs5f0_125",V4="_role_system_rs5f0_130",G4="_role_tool_rs5f0_135",$4="_msgText_rs5f0_140",Z4="_msgContent_rs5f0_146",Y4="_parsedContent_rs5f0_151",F4="_spanScope_rs5f0_157",X4="_spanRaw_rs5f0_163",Oe={dimText:b4,assistantMsg:S4,toolCalls:k4,toolCall:T4,toolIcon:N4,toolName:E4,toolArgs:C4,toolResult:A4,toolResultStatus:j4,toolResultError:w4,finishReason:M4,genAiContent:z4,contentText:R4,strandsEvent:O4,strandsSection:D4,strandsLabel:L4,messageList:B4,msgRow:I4,roleBadge:U4,role_user:H4,role_assistant:q4,role_system:V4,role_tool:G4,msgText:$4,msgContent:Z4,parsedContent:Y4,spanScope:F4,spanRaw:X4};function Dd({body:t}){if(t==null)return p.jsx("span",{className:Oe.dimText,children:"—"});if(typeof t=="string")return p.jsx("span",{children:t});if(typeof t!="object")return p.jsx("span",{children:String(t)});const a=t;if(typeof a.message=="string"&&!a.content&&!a.input&&!a.output)return p.jsx("span",{children:a.message});if(Array.isArray(a.content))return p.jsx(Ld,{content:a.content});if(a.message&&typeof a.message=="object"){const l=a.message;if(l.role==="assistant"&&Array.isArray(l.content)){const r=l.content.map(o=>o.text).filter(Boolean).join("");if(r)return p.jsx("div",{className:Oe.assistantMsg,children:r})}if(Array.isArray(l.tool_calls))return p.jsxs("div",{className:Oe.toolCalls,children:[l.tool_calls.map((r,o)=>{const u=r.function;return p.jsxs("div",{className:Oe.toolCall,children:[p.jsx("span",{className:Oe.toolIcon,children:p.jsx(za,{size:12})}),p.jsx("span",{className:Oe.toolName,children:String((u==null?void 0:u.name)??"unknown")}),p.jsx("pre",{className:Oe.toolArgs,children:JSON.stringify(u==null?void 0:u.arguments,null,2)})]},o)}),a.finish_reason!==null&&a.finish_reason!==void 0&&p.jsx("span",{className:Oe.finishReason,children:String(a.finish_reason)})]});if(l.role==="assistant"&&typeof l.content=="string")return p.jsx("div",{className:Oe.assistantMsg,children:l.content})}return a.input||a.output?p.jsx(Q4,{input:a.input,output:a.output}):p.jsx("pre",{className:Oe.spanRaw,children:JSON.stringify(a,null,2)})}function Ld({content:t}){return p.jsx("div",{className:Oe.genAiContent,children:t.map((a,l)=>{const r=a;if(r.text)return p.jsx("div",{className:Oe.contentText,children:String(r.text)},l);if(r.toolUse){const o=r.toolUse;return p.jsxs("div",{className:Oe.toolCall,children:[p.jsx("span",{className:Oe.toolIcon,children:p.jsx(za,{size:12})}),p.jsx("span",{className:Oe.toolName,children:String(o.name)}),p.jsx("pre",{className:Oe.toolArgs,children:JSON.stringify(o.input,null,2)})]},l)}if(r.toolResult){const o=r.toolResult;return p.jsxs("div",{className:Oe.toolResult,children:[p.jsx("span",{className:`${Oe.toolResultStatus} ${String(o.status).toLowerCase()==="error"?Oe.toolResultError:""}`,children:String(o.status||"result")}),Array.isArray(o.content)&&o.content.map((u,c)=>p.jsx("pre",{className:Oe.toolArgs,children:String(u.text??JSON.stringify(u))},c))]},l)}return p.jsx("pre",{className:Oe.toolArgs,children:JSON.stringify(r,null,2)},l)})})}function $y(t){if(t&&typeof t=="object"&&!Array.isArray(t)){const a=t.messages;if(Array.isArray(a))return a}}function Q4({input:t,output:a}){const l=$y(t),r=$y(a);return p.jsxs("div",{className:Oe.strandsEvent,children:[t!=null&&p.jsxs("div",{className:Oe.strandsSection,children:[p.jsx("span",{className:Oe.strandsLabel,children:"Input"}),l?p.jsx(Zy,{messages:l}):p.jsx("pre",{className:Oe.spanRaw,children:JSON.stringify(t,null,2)})]}),a!=null&&p.jsxs("div",{className:Oe.strandsSection,children:[p.jsx("span",{className:Oe.strandsLabel,children:"Output"}),r?p.jsx(Zy,{messages:r}):p.jsx("pre",{className:Oe.spanRaw,children:JSON.stringify(a,null,2)})]})]})}function Zy({messages:t}){return!t||!Array.isArray(t)?null:p.jsx("div",{className:Oe.messageList,children:t.map((a,l)=>{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 d=x4(c);return p.jsxs("div",{className:Oe.msgRow,children:[p.jsx("span",{className:`${Oe.roleBadge} ${Oe[`role_${o}`]||""}`,children:o}),p.jsx("div",{className:Oe.msgContent,children:d?p.jsx(K4,{items:d}):p.jsx("span",{className:Oe.msgText,children:c||JSON.stringify(u)})})]},l)})})}function K4({items:t}){return p.jsx("div",{className:Oe.parsedContent,children:t.map((a,l)=>{if(a.text){const r=String(a.text),o=Gy(r);return o?p.jsx("pre",{className:Oe.toolArgs,children:JSON.stringify(o,null,2)},l):p.jsx("div",{className:Oe.contentText,children:r},l)}if(a.toolUse){const r=a.toolUse;return p.jsxs("div",{className:Oe.toolCall,children:[p.jsx("span",{className:Oe.toolIcon,children:p.jsx(za,{size:12})}),p.jsx("span",{className:Oe.toolName,children:String(r.name)}),r.input!==null&&r.input!==void 0&&Object.keys(r.input).length>0&&p.jsx("pre",{className:Oe.toolArgs,children:JSON.stringify(r.input,null,2)})]},l)}if(a.toolResult){const r=a.toolResult,o=String(r.status||"result");return p.jsxs("div",{className:Oe.toolResult,children:[p.jsx("span",{className:`${Oe.toolResultStatus} ${o.toLowerCase()==="error"?Oe.toolResultError:""}`,children:o}),Array.isArray(r.content)&&r.content.map((u,c)=>{const d=String(u.text??""),m=Gy(d);return m?p.jsx("pre",{className:Oe.toolArgs,children:JSON.stringify(m,null,2)},c):p.jsx("pre",{className:Oe.toolArgs,children:d},c)})]},l)}return p.jsx("pre",{className:Oe.toolArgs,children:JSON.stringify(a,null,2)},l)})})}const J4="_container_c3i5z_1",P4="_toggleRow_c3i5z_6",W4="_toggle_c3i5z_6",eM="_chevron_c3i5z_32",tM="_icon_c3i5z_38",nM="_label_c3i5z_43",aM="_content_c3i5z_47",lM="_status_c3i5z_55",iM="_error_c3i5z_62",rM="_detail_c3i5z_73",sM="_logPanel_c3i5z_73",oM="_traceDetail_c3i5z_73",uM="_detailHeader_c3i5z_80",cM="_detailTitle_c3i5z_89",fM="_closeBtn_c3i5z_95",dM="_controls_c3i5z_115",hM="_controlRow_c3i5z_122",mM="_refreshBtn_c3i5z_128",pM="_retryBtn_c3i5z_148",gM="_timeFilter_c3i5z_162",yM="_timeFilterHeader_c3i5z_168",_M="_timeModeToggle_c3i5z_174",vM="_timeModeBtn_c3i5z_183",xM="_timeModeBtnActive_c3i5z_198",bM="_dateRange_c3i5z_203",SM="_dateField_c3i5z_210",kM="_dateLabel_c3i5z_218",TM="_dateInput_c3i5z_226",NM="_cloudwatchNote_c3i5z_248",EM="_traceList_c3i5z_255",CM="_traceRow_c3i5z_264",AM="_traceRowSelected_c3i5z_284",jM="_traceMain_c3i5z_290",wM="_traceId_c3i5z_296",MM="_spanCount_c3i5z_308",zM="_traceMeta_c3i5z_316",RM="_traceTime_c3i5z_322",OM="_sessionId_c3i5z_327",DM="_detailControls_c3i5z_344",LM="_quickFilter_c3i5z_350",BM="_spanList_c3i5z_365",IM="_tokenPill_c3i5z_370",UM="_tokenIcon_c3i5z_385",HM="_tokenSep_c3i5z_390",qM="_tokenDim_c3i5z_394",VM="_durationPill_c3i5z_399",GM="_spanTimestamp_c3i5z_414",$M="_severityBadge_c3i5z_419",ZM="_sevINFO_c3i5z_429",YM="_sevWARN_c3i5z_434",FM="_sevERROR_c3i5z_439",XM="_spanScope_c3i5z_444",QM="_spanBody_c3i5z_450",KM="_rawToggle_c3i5z_456",JM="_spanRaw_c3i5z_471",PM="_treeNode_c3i5z_486",WM="_treeRow_c3i5z_493",ez="_treeRowExpandable_c3i5z_502",tz="_treeRowSelected_c3i5z_509",nz="_treeToggle_c3i5z_514",az="_treeName_c3i5z_521",lz="_treeError_c3i5z_530",iz="_treeMetrics_c3i5z_540",rz="_treeChildren_c3i5z_548",sz="_treeLogRow_c3i5z_552",oz="_treeLogHeader_c3i5z_562",he={container:J4,toggleRow:P4,toggle:W4,chevron:eM,icon:tM,label:nM,content:aM,status:lM,error:iM,detail:rM,logPanel:sM,traceDetail:oM,detailHeader:uM,detailTitle:cM,closeBtn:fM,controls:dM,controlRow:hM,refreshBtn:mM,retryBtn:pM,timeFilter:gM,timeFilterHeader:yM,timeModeToggle:_M,timeModeBtn:vM,timeModeBtnActive:xM,dateRange:bM,dateField:SM,dateLabel:kM,dateInput:TM,cloudwatchNote:NM,traceList:EM,traceRow:CM,traceRowSelected:AM,traceMain:jM,traceId:wM,spanCount:MM,traceMeta:zM,traceTime:RM,sessionId:OM,detailControls:DM,quickFilter:LM,spanList:BM,tokenPill:IM,tokenIcon:UM,tokenSep:HM,tokenDim:qM,durationPill:VM,spanTimestamp:GM,severityBadge:$M,sevINFO:ZM,sevWARN:YM,sevERROR:FM,spanScope:XM,spanBody:QM,rawToggle:KM,spanRaw:JM,treeNode:PM,treeRow:WM,treeRowExpandable:ez,treeRowSelected:tz,treeToggle:nz,treeName:az,treeError:lz,treeMetrics:iz,treeChildren:rz,treeLogRow:sz,treeLogHeader:oz};function uz({spanName:t,logs:a,onClose:l}){return p.jsxs("div",{className:he.logPanel,"data-testid":"traces-log-panel",children:[p.jsxs("div",{className:he.detailHeader,children:[p.jsx("span",{className:he.detailTitle,children:t}),p.jsx("button",{className:he.closeBtn,onClick:l,"aria-label":"Close logs",children:p.jsx(Li,{size:12})})]}),a.length===0?p.jsx("div",{className:he.status,children:"No logs for this span."}):p.jsx("div",{children:a.map((r,o)=>p.jsx(cz,{log:r},o))})]})}function cz({log:t}){const[a,l]=R.useState(!1);return p.jsxs("div",{className:he.treeLogRow,children:[p.jsxs("div",{className:he.treeLogHeader,children:[p.jsx("span",{className:he.spanTimestamp,children:t.timestamp}),t.scopeName&&p.jsx("span",{className:he.spanScope,children:t.scopeName}),t.severity&&p.jsx("span",{className:`${he.severityBadge} ${he[`sev${t.severity.toUpperCase()}`]||""}`,children:t.severity})]}),t.body!==void 0&&p.jsx("div",{className:he.spanBody,children:p.jsx(Dd,{body:t.body})}),p.jsx("button",{className:he.rawToggle,onClick:()=>l(r=>!r),children:a?p.jsxs(p.Fragment,{children:[p.jsx(wa,{size:10})," Hide raw"]}):p.jsxs(p.Fragment,{children:[p.jsx(dl,{size:10})," Raw JSON"]})}),a&&p.jsx("pre",{className:he.spanRaw,children:JSON.stringify(t,null,2)})]})}function ul(t){const a=Date.now();return{startTime:a-t,endTime:a}}function ko(t,a){const l=t?new Date(t).getTime():void 0,r=a?new Date(a).getTime():void 0,o=l!==void 0&&!Number.isNaN(l)?l: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 To(t){const a=l=>String(l).padStart(2,"0");return`${t.getFullYear()}-${a(t.getMonth()+1)}-${a(t.getDate())}T${a(t.getHours())}:${a(t.getMinutes())}`}function Yy(t){return t>=1e3?`${(t/1e3).toFixed(1)}k`:String(t)}function Co(t){return(t==null?void 0:t.kind)==="agent"}function Ao(t){return!!(t!=null&&t.isDeployed)}function Fy(t){return(t==null?void 0:t.kind)==="harness"||Ao(t)&&!Co(t)?"cloudwatch":"local"}function Xy(t){if(t)return t.kind==="harness"?{harnessName:t.name}:{agentName:t.name}}function fz(t){const a=t.body;return typeof a=="object"&&a!==null&&"input"in a&&"output"in a}function dz(t,a){return a==="all"?t:t.map(l=>_1(l,a)).filter(l=>l!==null)}function _1(t,a){const l=t.children.map(o=>_1(o,a)).filter(o=>o!==null);return hz(t,a)||l.length>0?{...t,children:l}:null}function hz(t,a){return a==="errors"?t.statusCode==="ERROR":a==="with-tokens"?t.logs.some(fz)||(t.inputTokens??0)>0||(t.outputTokens??0)>0:!0}const mz=20;function pz({roots:t,selectedSpanId:a,onSelectSpan:l}){return t.length===0?p.jsx("div",{className:he.status,children:"No spans found."}):p.jsx("div",{className:he.spanList,"data-testid":"traces-span-tree",children:t.map(r=>p.jsx(v1,{node:r,selectedSpanId:a,onSelectSpan:l},r.spanId))})}function v1({node:t,selectedSpanId:a,onSelectSpan:l}){const[r,o]=R.useState(!0),u=t.children.length>0,c=a===t.spanId,d=(t.inputTokens??0)>0||(t.outputTokens??0)>0,m=t.durationMs>0;return p.jsxs("div",{className:he.treeNode,"data-testid":"traces-span-node",children:[p.jsxs("div",{className:`${he.treeRow} ${he.treeRowExpandable} ${c?he.treeRowSelected:""}`,style:{paddingLeft:`${t.depth*mz+8}px`},onClick:()=>l(t.spanId),role:"button",tabIndex:0,onKeyDown:g=>{(g.key==="Enter"||g.key===" ")&&l(t.spanId)},children:[p.jsx("span",{className:he.treeToggle,onClick:u?g=>{g.stopPropagation(),o(_=>!_)}:void 0,children:u?r?p.jsx(wa,{size:12}):p.jsx(dl,{size:12}):p.jsx("span",{style:{width:12}})}),p.jsx("span",{className:he.treeName,children:t.name}),t.statusCode==="ERROR"&&p.jsx("span",{className:he.treeError,children:"ERR"}),p.jsxs("div",{className:he.treeMetrics,children:[d&&p.jsxs("span",{className:he.tokenPill,children:[p.jsx(pd,{size:9,className:he.tokenIcon}),Yy(t.inputTokens??0)," ",p.jsx("span",{className:he.tokenDim,children:"in"}),p.jsx("span",{className:he.tokenSep,children:"/"}),Yy(t.outputTokens??0)," ",p.jsx("span",{className:he.tokenDim,children:"out"})]}),m&&p.jsxs("span",{className:he.durationPill,children:[p.jsx(Ax,{size:9}),Od(t.durationMs)]})]})]}),r&&u&&p.jsx("div",{className:he.treeChildren,children:t.children.map(g=>p.jsx(v1,{node:g,selectedSpanId:a,onSelectSpan:l},g.spanId))})]})}function gz({trace:t,isSelected:a,onClick:l}){return p.jsxs("button",{className:`${he.traceRow} ${a?he.traceRowSelected:""}`,onClick:l,"aria-label":`Trace ${t.traceId}`,children:[p.jsxs("div",{className:he.traceMain,children:[p.jsx("span",{className:he.traceId,children:t.traceId}),p.jsxs("span",{className:he.spanCount,children:[t.spanCount," spans"]})]}),p.jsxs("div",{className:he.traceMeta,children:[p.jsx("span",{className:he.traceTime,children:Po(t.timestamp)}),t.sessionId&&p.jsxs("span",{className:he.sessionId,children:["session: ",t.sessionId]})]})]})}function yz(t){var o,u,c,d;const a=t.filter(m=>m.type==="span"&&m.spanId),l=t.filter(m=>m.type==="log"&&m.spanId),r=new Map;for(const m of a){const g=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:qt(m.startTimeUnixNano),durationMs:qt(m.endTimeUnixNano)-qt(m.startTimeUnixNano),inputTokens:Number(g["gen_ai.usage.input_tokens"]??0)||void 0,outputTokens:Number(g["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 l){const g=r.get(m.spanId);g&&g.logs.push({timestamp:m.timestampMs>0?new Date(m.timestampMs).toISOString():"",scopeName:(d=m.scope)==null?void 0:d.name,severity:m.severityText,body:m.body})}return x1(r)}function _z(t,a){var r;const l=new Map;for(const o of t){const u=o.durationNano?qt(o.durationNano):0;l.set(o.spanId,{spanId:o.spanId,parentSpanId:o.parentSpanId,name:o.name||"span",depth:0,startMs:o.startTimeUnixNano?qt(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,d=c.spanId;if(!d)continue;const m=l.get(d);m&&m.logs.push({timestamp:o["@timestamp"],scopeName:(r=c.scope)==null?void 0:r.name,severity:c.severityText,body:c.body})}return x1(l)}function x1(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 l=(r,o)=>{r.depth=o,r.children.sort((u,c)=>u.startMs-c.startMs);for(const u of r.children)l(u,o+1)};a.sort((r,o)=>r.startMs-o.startMs);for(const r of a)l(r,0);return a}const vz=[{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}],xz=720*60*1e3;function bz({agents:t,harnesses:a=[],isActive:l}){const{traces:r,spans:o,deployedRecords:u,deployedSpans:c,isLoadingTraces:d,isLoadingDetail:m,error:g,isAvailable:_,fetchTraces:y,fetchTraceDetail:x,clearDetail:b}=v4(),N=R.useMemo(()=>[...t.map(pe=>({value:`agent:${pe.name}`,name:pe.name,kind:"agent",isDeployed:pe.deploymentStatus==="deployed"})),...a.map(pe=>({value:`harness:${pe.name}`,name:pe.name,kind:"harness",isDeployed:pe.deploymentStatus==="deployed"}))],[t,a]),[O,D]=R.useState(""),[k,M]=R.useState("local"),[j,K]=R.useState(null),[Y,I]=R.useState(null),[U,re]=R.useState("with-tokens"),le=R.useRef(!1);R.useEffect(()=>{if(!(O===""||!N.find(St=>St.value===O)))return;const _t=N[0];_t&&(D(_t.value),M(Fy(_t)))},[N,O]);const z=N.find(pe=>pe.value===O),te=!Co(z)&&!Ao(z),[ae,ge]=R.useState("relative"),[ne,Z]=R.useState(xz),[B,W]=R.useState(""),[ue,Ne]=R.useState(""),E=R.useCallback(()=>ae==="relative"?ul(ne):ko(B,ue)??ul(ne),[ae,ne,B,ue]),C=R.useCallback((pe,_t,St)=>{K(null),I(null),b(),y(pe,Xy(_t),St)},[b,y]);R.useEffect(()=>{l&&!le.current&&z&&!te&&C(k,z,ul(ne)),le.current=!!l},[l,C,k,z,te,ne]);const $=pe=>{D(pe);const _t=N.find(Cn=>Cn.value===pe);if(!Co(_t)&&!Ao(_t))return;const St=Fy(_t);M(St),C(St,_t,E())},T=pe=>{M(pe),C(pe,z,E())},J=()=>{C(k,z,E())},me=pe=>{I(null),j===pe.traceId?(K(null),b()):(K(pe.traceId),x(k,pe.traceId,Xy(z),E()))},X=pe=>{if(ge(pe),pe==="relative")C(k,z,ul(ne));else{const _t=new Date,St=new Date(_t.getTime()-ne);W(To(St)),Ne(To(_t)),C(k,z,ko(To(St),To(_t))??ul(ne))}},_e=pe=>{Z(pe),C(k,z,ul(pe))},He=pe=>{W(pe),C(k,z,ko(pe,ue)??ul(ne))},fe=pe=>{Ne(pe),C(k,z,ko(B,pe)??ul(ne))},ct=R.useMemo(()=>k==="cloudwatch"?_z(c,u):yz(o),[k,o,c,u]),Bt=R.useMemo(()=>dz(ct,U),[ct,U]),an=R.useMemo(()=>{if(!Y)return null;const pe=_t=>{for(const St of _t){if(St.spanId===Y)return St;const Cn=pe(St.children);if(Cn)return Cn}return null};return pe(ct)},[Y,ct]);if(N.length===0)return p.jsx("div",{className:he.status,children:"No traces available."});const Kn=ct.length>0;return p.jsxs("div",{className:he.container,children:[p.jsx("div",{className:he.controls,children:p.jsxs("div",{className:he.controlRow,children:[p.jsxs("div",{className:he.dateField,children:[p.jsx("label",{className:he.dateLabel,htmlFor:"traces-resource",children:"Resource"}),p.jsx("select",{id:"traces-resource",className:he.dateInput,value:O,onChange:pe=>$(pe.target.value),children:N.map(pe=>p.jsxs("option",{value:pe.value,children:[pe.name," (",pe.kind,")"]},pe.value))})]}),p.jsxs("div",{className:he.dateField,children:[p.jsx("label",{className:he.dateLabel,htmlFor:"traces-source",children:"Source"}),p.jsxs("select",{id:"traces-source",className:he.dateInput,value:k,onChange:pe=>T(pe.target.value),children:[p.jsx("option",{value:"local",disabled:!Co(z),children:"Local traces"}),p.jsx("option",{value:"cloudwatch",disabled:!Ao(z),children:"CloudWatch"})]})]}),p.jsx("button",{className:he.refreshBtn,onClick:J,title:"Refresh traces","aria-label":"Refresh traces",children:p.jsx(hd,{size:12})})]})}),k==="cloudwatch"&&!te&&p.jsx("div",{className:he.cloudwatchNote,children:"Note: Traces may take 2-3 minutes to appear in CloudWatch"}),p.jsx("div",{className:he.content,children:te?p.jsx("div",{className:he.status,children:"No traces available — deploy this resource to view CloudWatch traces."}):p.jsxs(p.Fragment,{children:[_!==!1&&p.jsxs("div",{className:he.timeFilter,children:[p.jsxs("div",{className:he.timeFilterHeader,children:[p.jsx("label",{className:he.dateLabel,children:"Time range"}),p.jsxs("div",{className:he.timeModeToggle,children:[p.jsx("button",{className:`${he.timeModeBtn} ${ae==="relative"?he.timeModeBtnActive:""}`,onClick:()=>X("relative"),children:"Relative"}),p.jsx("button",{className:`${he.timeModeBtn} ${ae==="absolute"?he.timeModeBtnActive:""}`,onClick:()=>X("absolute"),children:"Absolute"})]})]}),ae==="relative"?p.jsx("div",{className:he.dateField,children:p.jsx("select",{id:"traces-time-range",className:he.dateInput,value:ne,onChange:pe=>_e(Number(pe.target.value)),children:vz.map(pe=>p.jsx("option",{value:pe.ms,children:pe.label},pe.ms))})}):p.jsxs("div",{className:he.dateRange,children:[p.jsxs("div",{className:he.dateField,children:[p.jsx("label",{className:he.dateLabel,htmlFor:"traces-start",children:"Start"}),p.jsx("input",{id:"traces-start",className:he.dateInput,type:"datetime-local",value:B,onChange:pe=>He(pe.target.value)})]}),p.jsxs("div",{className:he.dateField,children:[p.jsx("label",{className:he.dateLabel,htmlFor:"traces-end",children:"End"}),p.jsx("input",{id:"traces-end",className:he.dateInput,type:"datetime-local",value:ue,onChange:pe=>fe(pe.target.value)})]})]})]}),d&&p.jsx("div",{className:he.status,children:"Loading traces…"}),g&&p.jsxs("div",{className:he.error,children:[p.jsxs("span",{children:[p.jsx(md,{size:12})," ",g]}),p.jsx("button",{className:he.retryBtn,onClick:J,children:"Retry"})]}),!d&&!g&&_!==!1&&r.length===0&&p.jsx("div",{className:he.status,children:"No traces found."}),!d&&r.length>0&&p.jsx("div",{className:he.traceList,"data-testid":"traces-trace-list",children:r.map(pe=>p.jsx(gz,{trace:pe,isSelected:j===pe.traceId,onClick:()=>me(pe)},pe.traceId))}),j&&p.jsxs("div",{className:he.traceDetail,children:[p.jsxs("div",{className:he.detailHeader,children:[p.jsx("span",{className:he.detailTitle,children:"Spans"}),p.jsxs("div",{className:he.detailControls,children:[p.jsxs("select",{className:he.quickFilter,value:U,onChange:pe=>re(pe.target.value),children:[p.jsx("option",{value:"all",children:"All"}),p.jsx("option",{value:"errors",children:"Errors"}),p.jsx("option",{value:"with-tokens",children:"Agent spans"})]}),p.jsx("button",{className:he.closeBtn,onClick:()=>{K(null),b()},"aria-label":"Close detail",children:p.jsx(Li,{size:12})})]})]}),m&&p.jsx("div",{className:he.status,children:"Loading…"}),!m&&!Kn&&!g&&p.jsx("div",{className:he.status,children:"No data found."}),!m&&Kn&&Bt.length===0&&U!=="all"&&p.jsx("div",{className:he.status,children:"No matching spans."}),!m&&Bt.length>0&&p.jsx(pz,{roots:Bt,selectedSpanId:Y,onSelectSpan:I})]}),an&&p.jsx(uz,{spanName:an.name,logs:an.logs,onClose:()=>I(null)})]})})]})}function Sz({resources:t,sessionId:a,userId:l,onClose:r}){const{data:o,isLoading:u,error:c,fetch:d}=t,[m,g]=R.useState(null),[_,y]=R.useState("resources"),[x,b]=R.useState(620),N=R.useRef(null),O=R.useCallback(k=>{k.preventDefault();const M=K=>{const Y=window.innerWidth-K.clientX;b(Math.max(320,Math.min(Y,window.innerWidth*.8)))},j=()=>{N.current=null,document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",j),document.body.style.cursor="",document.body.style.userSelect=""};N.current={move:M,up:j},document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",M),document.addEventListener("mouseup",j)},[]);R.useEffect(()=>()=>{N.current&&(document.removeEventListener("mousemove",N.current.move),document.removeEventListener("mouseup",N.current.up),document.body.style.cursor="",document.body.style.userSelect="")},[]);const D=(k,M)=>{g(j=>(j==null?void 0:j.kind)===k&&j.resource.name===M.name?null:{kind:k,resource:M})};return p.jsxs("div",{className:Re.panel,style:{width:x},"data-testid":"resource-panel",children:[p.jsx("div",{className:Re.resizeHandle,onMouseDown:O,role:"separator","aria-label":"Resize panel"}),p.jsxs("div",{className:Re.header,children:[p.jsx("span",{className:Re.projectName,children:(o==null?void 0:o.project)||"Resources"}),p.jsxs("div",{className:Re.headerActions,children:[p.jsx("button",{className:Re.iconBtn,onClick:d,title:"Refresh","aria-label":"Refresh resources",children:p.jsx(hd,{size:12})}),p.jsx("button",{className:Re.iconBtn,onClick:r,title:"Close","aria-label":"Close resource panel",children:p.jsx(Li,{size:12})})]})]}),p.jsx("div",{className:Re.tabBar,role:"tablist",children:["resources","traces","memories"].map(k=>p.jsx("button",{role:"tab","aria-selected":_===k,className:`${Re.tab} ${_===k?Re.tabActive:""}`,onClick:()=>y(k),children:k.charAt(0).toUpperCase()+k.slice(1)},k))}),p.jsxs("div",{className:Re.body,children:[p.jsxs("div",{className:Re.tabContent,hidden:_!=="resources",children:[u&&!o&&p.jsx("div",{className:Re.status,children:"Loading resources…"}),c&&!o&&p.jsxs("div",{className:Re.error,children:[p.jsxs("span",{children:[p.jsx(md,{size:12})," ",c]}),p.jsx("button",{className:Re.retryBtn,onClick:d,children:"Retry"})]}),o&&p.jsxs("div",{className:Re.graph,children:[o.agents.length>0&&p.jsx(aa,{title:"Agents",children:o.agents.map(k=>p.jsx(In,{kind:"agent",name:k.name,subtitle:k.build,isSelected:(m==null?void 0:m.kind)==="agent"&&m.resource.name===k.name,onClick:()=>D("agent",k),connections:kz(k,o.mcpRuntimeTools),deploymentStatus:k.deploymentStatus},k.name))}),(o.harnesses??[]).length>0&&p.jsx(aa,{title:"Harnesses",children:(o.harnesses??[]).map(k=>p.jsx(In,{kind:"harness",name:k.name,subtitle:k.modelConfig?`${k.modelConfig.provider}/${k.modelConfig.modelId}`:"",isSelected:(m==null?void 0:m.kind)==="harness"&&m.resource.name===k.name,onClick:()=>D("harness",k),deploymentStatus:k.deploymentStatus},k.name))}),o.memories.length>0&&p.jsx(aa,{title:"Memories",children:o.memories.map(k=>p.jsx(In,{kind:"memory",name:k.name,subtitle:k.strategies.map(M=>M.type).join(", "),isSelected:(m==null?void 0:m.kind)==="memory"&&m.resource.name===k.name,onClick:()=>D("memory",k),deploymentStatus:k.deploymentStatus},k.name))}),o.credentials.length>0&&p.jsx(aa,{title:"Credentials",children:o.credentials.map(k=>p.jsx(In,{kind:"credential",name:k.name,subtitle:k.type,isSelected:(m==null?void 0:m.kind)==="credential"&&m.resource.name===k.name,onClick:()=>D("credential",k),deploymentStatus:k.deploymentStatus},k.name))}),o.gateways.length>0&&p.jsx(aa,{title:"Gateways",children:o.gateways.map(k=>p.jsxs("div",{children:[p.jsx(In,{kind:"gateway",name:k.name,subtitle:`${k.targets.length} target(s)`,isSelected:(m==null?void 0:m.kind)==="gateway"&&m.resource.name===k.name,onClick:()=>D("gateway",k),deploymentStatus:k.deploymentStatus}),k.targets.map(M=>p.jsx("div",{className:Re.childNode,children:p.jsx(In,{kind:"gatewayTarget",name:M.name,subtitle:M.targetType,isSelected:(m==null?void 0:m.kind)==="gatewayTarget"&&m.resource.name===M.name,onClick:()=>D("gatewayTarget",M)})},M.name))]},k.name))}),o.mcpRuntimeTools.length>0&&p.jsx(aa,{title:"MCP Runtime Tools",children:o.mcpRuntimeTools.map(k=>p.jsx(In,{kind:"mcpTool",name:k.name,subtitle:k.bindings.map(M=>M.runtimeName).join(", "),isSelected:(m==null?void 0:m.kind)==="mcpTool"&&m.resource.name===k.name,onClick:()=>D("mcpTool",k),connections:k.bindings.map(M=>`→ ${M.runtimeName}`),deploymentStatus:k.deploymentStatus},k.name))}),o.evaluators.length>0&&p.jsx(aa,{title:"Evaluators",children:o.evaluators.map(k=>p.jsx(In,{kind:"evaluator",name:k.name,subtitle:`${k.level} — ${k.configType}`,isSelected:(m==null?void 0:m.kind)==="evaluator"&&m.resource.name===k.name,onClick:()=>D("evaluator",k),deploymentStatus:k.deploymentStatus},k.name))}),o.onlineEvalConfigs.length>0&&p.jsx(aa,{title:"Online Eval Configs",children:o.onlineEvalConfigs.map(k=>{var M;return p.jsx(In,{kind:"onlineEval",name:k.name,subtitle:`${((M=k.evaluators)==null?void 0:M.length)??0} evaluator(s), ${k.samplingRate}% sampling`,isSelected:(m==null?void 0:m.kind)==="onlineEval"&&m.resource.name===k.name,onClick:()=>D("onlineEval",k),connections:[`→ ${k.agent}`],deploymentStatus:k.deploymentStatus},k.name)})}),o.policyEngines.length>0&&p.jsx(aa,{title:"Policy Engines",children:o.policyEngines.map(k=>p.jsxs("div",{children:[p.jsx(In,{kind:"policyEngine",name:k.name,subtitle:`${k.policies.length} polic${k.policies.length!==1?"ies":"y"}`,isSelected:(m==null?void 0:m.kind)==="policyEngine"&&m.resource.name===k.name,onClick:()=>D("policyEngine",k),deploymentStatus:k.deploymentStatus}),k.policies.map(M=>p.jsx("div",{className:Re.childNode,children:p.jsx(In,{kind:"policy",name:M.name,subtitle:M.description,isSelected:(m==null?void 0:m.kind)==="policy"&&m.resource.name===M.name,onClick:()=>D("policy",M),deploymentStatus:M.deploymentStatus})},M.name))]},k.name))}),o.unassignedTargets.length>0&&p.jsx(aa,{title:"Unassigned Targets",children:o.unassignedTargets.map(k=>p.jsx(In,{kind:"unassignedTarget",name:k.name,subtitle:k.targetType,isSelected:(m==null?void 0:m.kind)==="unassignedTarget"&&m.resource.name===k.name,onClick:()=>D("unassignedTarget",k)},k.name))})]}),m&&p.jsxs("div",{className:Re.infoCard,children:[p.jsxs("div",{className:Re.infoHeader,children:[p.jsx("span",{className:`${Re.kindBadge} ${Re[m.kind]}`,children:Nz(m.kind)}),p.jsx("span",{className:Re.infoName,children:m.resource.name})]}),p.jsxs("div",{className:Re.infoBody,children:[Object.entries(m.resource).filter(([k,M])=>k!=="deployed"&&!Tz(M)).map(([k,M])=>p.jsxs("div",{className:Re.infoRow,children:[p.jsx("span",{className:Re.infoKey,children:k}),p.jsx("span",{className:Re.infoValue,children:Qy(M)})]},k)),"deployed"in m.resource&&m.resource.deployed!==null&&p.jsxs(p.Fragment,{children:[p.jsx("div",{className:Re.infoSectionHeader,children:"Deployed State"}),Object.entries(m.resource.deployed).map(([k,M])=>p.jsxs("div",{className:Re.infoRow,children:[p.jsx("span",{className:Re.infoKey,children:k}),p.jsx("span",{className:Re.infoValue,children:Qy(M)})]},k))]})]})]})]}),p.jsx("div",{className:Re.tabContent,hidden:_!=="traces",children:p.jsx(bz,{agents:(o==null?void 0:o.agents)??[],harnesses:(o==null?void 0:o.harnesses)??[],isActive:_==="traces"})}),p.jsx("div",{className:Re.tabContent,hidden:_!=="memories",children:p.jsx(_3,{memories:(o==null?void 0:o.memories)??[],sessionId:a,userId:l,isActive:_==="memories"})})]})]})}function aa({title:t,children:a}){return p.jsxs("div",{className:Re.section,children:[p.jsx("div",{className:Re.sectionTitle,children:t}),a]})}function kz(t,a){const l=[];for(const r of a)r.bindings.some(o=>o.runtimeName===t.name)&&l.push(`← ${r.name}`);return l}function Tz(t){return!!(t===null||t===""||t===void 0||Array.isArray(t)&&t.length===0)}function Qy(t){if(t==null)return"—";if(Array.isArray(t))return t.map(l=>typeof l=="object"?JSON.stringify(l):l).join(", ")||"—";if(typeof t=="object")return JSON.stringify(t);const a=String(t);return a===""?"—":a}function Nz(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 Ez="_body_sadpk_1",Cz="_interactionsList_sadpk_9",Az="_interactionItem_sadpk_17",jz="_interactionItemSelected_sadpk_36",wz="_interactionPrompt_sadpk_41",Mz="_interactionMeta_sadpk_49",zz="_interactionTraceId_sadpk_55",Rz="_interactionTime_sadpk_61",Oz="_interactionSpanCount_sadpk_66",Dz="_rightArea_sadpk_75",Lz="_waterfall_sadpk_84",Bz="_userPromptRow_sadpk_90",Iz="_userPromptText_sadpk_101",Uz="_waterfallRow_sadpk_108",Hz="_waterfallRowSelected_sadpk_122",qz="_spanIcon_sadpk_128",Vz="_spanLabel_sadpk_135",Gz="_barContainer_sadpk_145",$z="_bar_sadpk_145",Zz="_barInvocation_sadpk_160",Yz="_barAgent_sadpk_164",Fz="_barLlm_sadpk_168",Xz="_barTool_sadpk_172",Qz="_barOther_sadpk_176",Kz="_duration_sadpk_180",Jz="_detailPane_sadpk_190",Pz="_detailHeader_sadpk_197",Wz="_iconBtn_sadpk_209",eR="_tabBar_sadpk_224",tR="_tab_sadpk_224",nR="_tabActive_sadpk_244",aR="_detailBody_sadpk_249",lR="_attrTable_sadpk_254",iR="_attrKey_sadpk_265",rR="_attrValue_sadpk_273",sR="_emptyState_sadpk_280",Ue={body:Ez,interactionsList:Cz,interactionItem:Az,interactionItemSelected:jz,interactionPrompt:wz,interactionMeta:Mz,interactionTraceId:zz,interactionTime:Rz,interactionSpanCount:Oz,rightArea:Dz,waterfall:Lz,userPromptRow:Bz,userPromptText:Iz,waterfallRow:Uz,waterfallRowSelected:Hz,spanIcon:qz,spanLabel:Vz,barContainer:Gz,bar:$z,barInvocation:Zz,barAgent:Yz,barLlm:Fz,barTool:Xz,barOther:Qz,duration:Kz,detailPane:Jz,detailHeader:Pz,iconBtn:Wz,tabBar:eR,tab:tR,tabActive:nR,detailBody:aR,attrTable:lR,attrKey:iR,attrValue:rR,emptyState:sR};function oR({invocations:t,selectedTraceId:a,onSelect:l}){return t.length===0?p.jsx("div",{className:Ue.emptyState,children:"No interactions yet"}):p.jsx("div",{className:Ue.interactionsList,"data-testid":"trace-list",children:t.map(r=>p.jsxs("button",{className:`${Ue.interactionItem} ${a===r.traceId?Ue.interactionItemSelected:""}`,onClick:()=>l(r.traceId),"aria-label":`Trace ${r.traceId}`,children:[r.userPrompt&&p.jsx("span",{className:Ue.interactionPrompt,title:r.userPrompt,children:r.userPrompt}),p.jsxs("div",{className:Ue.interactionMeta,children:[p.jsxs("span",{className:Ue.interactionTraceId,children:[r.traceId.slice(0,12),"..."]}),p.jsx("span",{className:Ue.interactionSpanCount,children:r.spanCount})]}),p.jsx("span",{className:Ue.interactionTime,children:Po(r.timestamp)})]},r.traceId))})}function jo(t){if(typeof t=="string"){const a=Tn(t);return typeof a!="string"?jo(a)??t:t}if(Array.isArray(t)){const a=t.filter(l=>l.text).map(l=>String(l.text));if(a.length>0)return a.join(" ")}return null}function b1(t){var l;for(const r of t){if(!((l=r.name)!=null&&l.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=Yr(u.attributes),d=jo(c.content);if(d)return d}}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=Yr(u.attributes),d=jo(c.content);d&&(a=d)}}if(a)return a;for(const r of t){const o=r.attributes??{};if(o["gen_ai.content.prompt"]){const u=jo(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"?Tn(u):u;if(Array.isArray(c)){const d=c.find(m=>m.role==="user");if(d!=null&&d.parts&&Array.isArray(d.parts)){const m=d.parts.filter(g=>g.type==="text"&&g.content).map(g=>String(g.content));if(m.length>0)return m.join(" ")}}}}return null}function uR(t){switch(t){case 1:return"SERVER";case 2:return"CLIENT";case 3:return"PRODUCER";case 4:return"CONSUMER";default:return"INTERNAL"}}function cR(t){var u;const a={...t.attributes??{}},l=qt(t.startTimeUnixNano),o=qt(t.endTimeUnixNano)-l;return{attributes:a,status:t.status,kind:t.type==="span"?uR(t.kind):void 0,scope:(u=t.scope)==null?void 0:u.name,duration:o>0?`${o}ms`:void 0}}function fR(t){const a=t.events;if(a){let r=null;for(const o of a){const u=o.name,c=Yr(o.attributes);u==="gen_ai.user.message"&&(r={type:"genai",content:Tn(c.content)??c.content})}if(r)return r}const l=t.attributes??{};return l["gen_ai.content.prompt"]?{type:"genai",content:Tn(l["gen_ai.content.prompt"])}:l["gen_ai.tool.call.arguments"]?{type:"tool",content:Tn(l["gen_ai.tool.call.arguments"])}:l["gen_ai.input.messages"]?{type:"genai",content:Tn(l["gen_ai.input.messages"])}:l["gen_ai.task.input"]?{type:"raw",content:Tn(l["gen_ai.task.input"])}:t.type==="log"&&t.body?{type:"raw",content:t.body}:null}function dR(t){const a=t.events;if(a){let r=null;for(const o of a){const u=o.name,c=Yr(o.attributes);u==="gen_ai.choice"&&(r={type:"genai",content:Tn(c.message)??c})}if(r)return r}const l=t.attributes??{};if(l["tool.name"]&&a){for(const r of a)if(r.name==="gen_ai.tool.message"){const u=Yr(r.attributes);return{type:"tool",content:Tn(u.content)??u.content}}}return l["gen_ai.content.completion"]?{type:"genai",content:Tn(l["gen_ai.content.completion"])}:l["gen_ai.tool.call.result"]?{type:"tool",content:Tn(l["gen_ai.tool.call.result"])}:l["gen_ai.output.messages"]?{type:"genai",content:Tn(l["gen_ai.output.messages"])}:l["gen_ai.task.output"]?{type:"raw",content:Tn(l["gen_ai.task.output"])}:null}function hR({span:t,onClose:a}){const[l,r]=R.useState("event");return p.jsxs("div",{className:Ue.detailPane,children:[p.jsxs("div",{className:Ue.detailHeader,children:[p.jsx("div",{className:Ue.tabBar,children:["event","request","response"].map(o=>p.jsx("button",{className:`${Ue.tab} ${l===o?Ue.tabActive:""}`,onClick:()=>r(o),children:o.charAt(0).toUpperCase()+o.slice(1)},o))}),p.jsx("button",{className:Ue.iconBtn,onClick:a,"aria-label":"Close detail",children:p.jsx(Li,{size:14})})]}),p.jsxs("div",{className:Ue.detailBody,children:[l==="event"&&p.jsx(mR,{span:t}),l==="request"&&p.jsx(pR,{span:t}),l==="response"&&p.jsx(gR,{span:t})]})]})}function mR({span:t}){const a=cR(t),l=[];t.name&&l.push(["name",t.name]),a.kind&&l.push(["kind",a.kind]),a.scope&&l.push(["scope",a.scope]),a.duration&&l.push(["duration",a.duration]),a.status&&(l.push(["status.code",String(a.status.code??"OK")]),a.status.message&&l.push(["status.message",a.status.message]));const r=new Set(l.map(([o])=>o));for(const[o,u]of Object.entries(a.attributes))u!=null&&!r.has(o)&&l.push([o,typeof u=="object"?JSON.stringify(u):String(u)]);return l.length===0?p.jsx("div",{className:Ue.emptyState,children:"No event data"}):p.jsx("table",{className:Ue.attrTable,children:p.jsx("tbody",{children:l.map(([o,u])=>p.jsxs("tr",{children:[p.jsx("td",{className:Ue.attrKey,children:o}),p.jsx("td",{className:Ue.attrValue,children:u})]},o))})})}function pR({span:t}){const a=fR(t);return a?a.type==="genai"&&Array.isArray(a.content)?p.jsx(Ld,{content:a.content}):p.jsx(Dd,{body:a.content}):p.jsx("div",{className:Ue.emptyState,children:"No request data"})}function gR({span:t}){const a=dR(t);return a?a.type==="genai"&&Array.isArray(a.content)?p.jsx(Ld,{content:a.content}):p.jsx(Dd,{body:a.content}):p.jsx("div",{className:Ue.emptyState,children:"No response data"})}const yR=16,_R={invocation:p.jsx(pd,{size:12}),agent:p.jsx(Rx,{size:12}),llm:p.jsx(Yx,{size:12}),tool:p.jsx(za,{size:12}),other:p.jsx(Tx,{size:10})},vR={invocation:Ue.barInvocation,agent:Ue.barAgent,llm:Ue.barLlm,tool:Ue.barTool,other:Ue.barOther};function xR({tree:t,selectedSpanId:a,onSelectSpan:l,userPrompt:r}){const o=Fj(Xj(t));return o.length===0?p.jsx("div",{className:Ue.emptyState,children:"No spans"}):p.jsxs("div",{className:Ue.waterfall,children:[r&&p.jsxs("div",{className:Ue.userPromptRow,children:[p.jsx("span",{className:Ue.spanIcon,children:p.jsx(ab,{size:12})}),p.jsx("span",{className:Ue.userPromptText,title:r,children:r})]}),o.map((u,c)=>p.jsx(bR,{entry:u,isSelected:a===u.node.span.spanId,onSelect:()=>l(u.node.span)},u.node.span.spanId??c))]})}function bR({entry:t,isSelected:a,onSelect:l}){var _;const{node:r,offsetPercent:o,widthPercent:u}=t,c=Kj(r.span),d=_R[c],m=vR[c],g=r.span.name||((_=r.span.scope)==null?void 0:_.name)||"span";return p.jsxs("div",{className:`${Ue.waterfallRow} ${a?Ue.waterfallRowSelected:""}`,style:{paddingLeft:`${10+r.depth*yR}px`},onClick:l,role:"button",tabIndex:0,onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&l()},children:[p.jsx("span",{className:Ue.spanIcon,children:d}),p.jsx("span",{className:Ue.spanLabel,title:g,children:g}),p.jsx("div",{className:Ue.barContainer,children:p.jsx("div",{className:`${Ue.bar} ${m}`,style:{left:`${o}%`,width:`${u}%`}})}),p.jsx("span",{className:Ue.duration,children:Od(r.durationMs)})]})}function SR({traces:t}){const{invocations:a,selectedInvocation:l,isLoading:r,selectTrace:o,refresh:u}=t,[c,d]=R.useState(null);return R.useEffect(()=>{d(null)},[l==null?void 0:l.traceId]),p.jsx(Yo,{title:"Timeline view",status:r?"Loading...":void 0,onRefresh:u,children:p.jsxs("div",{className:Ue.body,children:[p.jsx(oR,{invocations:a,selectedTraceId:(l==null?void 0:l.traceId)??null,onSelect:o}),p.jsxs("div",{className:Ue.rightArea,children:[!l&&a.length>0&&p.jsx("div",{className:Ue.emptyState,children:"Select an interaction to view"}),l&&p.jsxs(p.Fragment,{children:[p.jsx(xR,{tree:l.tree,selectedSpanId:(c==null?void 0:c.spanId)??null,onSelectSpan:d,userPrompt:l.userPrompt}),c&&p.jsx(hR,{span:c,onClose:()=>d(null)})]})]})]})})}const kR="_error_1vxci_1",TR="_toolListItems_1vxci_7",NR="_toolItem_1vxci_14",ER="_toolItemSelected_1vxci_34",CR="_toolName_1vxci_39",AR="_toolDesc_1vxci_45",jR="_toolForm_1vxci_53",wR="_toolFormHeader_1vxci_58",MR="_toolFormDesc_1vxci_66",zR="_noParams_1vxci_72",RR="_field_1vxci_78",OR="_fieldLabel_1vxci_82",DR="_fieldType_1vxci_92",LR="_fieldInput_1vxci_98",BR="_fieldTextarea_1vxci_115",IR="_fieldHint_1vxci_122",UR="_callBtn_1vxci_128",HR="_spinning_1vxci_153",Ct={error:kR,toolListItems:TR,toolItem:NR,toolItemSelected:ER,toolName:CR,toolDesc:AR,toolForm:jR,toolFormHeader:wR,toolFormDesc:MR,noParams:zR,field:RR,fieldLabel:OR,fieldType:DR,fieldInput:LR,fieldTextarea:BR,fieldHint:IR,callBtn:UR,spinning:HR};function qR(t,a){if(a.type==="integer"){const l=parseInt(t,10);return Number.isNaN(l)?0:l}if(a.type==="number"){const l=parseFloat(t);return Number.isNaN(l)?0:l}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 VR(t){return t.type==="integer"||t.type==="number"?"number":"text"}function GR({tool:t,isCalling:a,onCall:l}){var g,_;const r=((g=t.inputSchema)==null?void 0:g.properties)??{},o=new Set(((_=t.inputSchema)==null?void 0:_.required)??[]),u=Object.keys(r),[c,d]=R.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]=qR(N,r[b]))}l(t.name,x)};return p.jsxs("form",{className:Ct.toolForm,onSubmit:m,children:[p.jsx("div",{className:Ct.toolFormHeader,children:t.name}),t.description&&p.jsx("div",{className:Ct.toolFormDesc,children:t.description}),u.length===0&&p.jsx("div",{className:Ct.noParams,children:"No parameters"}),u.map(y=>{const x=r[y],b=o.has(y);return p.jsxs("div",{className:Ct.field,children:[p.jsxs("label",{className:Ct.fieldLabel,children:[y,p.jsxs("span",{className:Ct.fieldType,children:[x.type,b?", required":""]})]}),x.enum?p.jsxs("select",{className:Ct.fieldInput,value:c[y],onChange:N=>d(O=>({...O,[y]:N.target.value})),children:[p.jsx("option",{value:"",children:"Select..."}),x.enum.map(N=>p.jsx("option",{value:N,children:N},N))]}):x.type==="boolean"?p.jsxs("select",{className:Ct.fieldInput,value:c[y],onChange:N=>d(O=>({...O,[y]:N.target.value})),children:[p.jsx("option",{value:"",children:"Select..."}),p.jsx("option",{value:"true",children:"true"}),p.jsx("option",{value:"false",children:"false"})]}):x.type==="object"||x.type==="array"?p.jsx("textarea",{className:`${Ct.fieldInput} ${Ct.fieldTextarea}`,value:c[y],onChange:N=>d(O=>({...O,[y]:N.target.value})),placeholder:"JSON",rows:3}):p.jsx("input",{className:Ct.fieldInput,type:VR(x),value:c[y],onChange:N=>d(O=>({...O,[y]:N.target.value})),placeholder:x.description??""}),x.description&&p.jsx("div",{className:Ct.fieldHint,children:x.description})]},y)}),p.jsx("button",{type:"submit",className:Ct.callBtn,disabled:a,children:a?p.jsxs(p.Fragment,{children:[p.jsx(o_,{size:14,className:Ct.spinning}),"Calling..."]}):"Call Tool"})]})}function $R({tools:t,isLoading:a,error:l,onRefresh:r,onCallTool:o,onToolCallMessage:u}){const[c,d]=R.useState(null),[m,g]=R.useState(!1),_=t.find(x=>x.name===c),y=async(x,b)=>{var D;g(!0);const N=Object.keys(b).length>0?`(${JSON.stringify(b)})`:"()",O=`Called ${x}${N}`;try{const k=await o(x,b),M=((D=k.content)==null?void 0:D.filter(K=>K.text!==void 0).map(K=>K.text))??[],j=M.length>0?M.join(`
|
|
280
|
+
`):JSON.stringify(k,null,2);u(O,j,k.isError)}catch(k){u(O,k.message,!0)}finally{g(!1)}};return p.jsxs(Yo,{title:`Tools (${t.length})`,onRefresh:r,isRefreshing:a,children:[l&&p.jsx("div",{className:Ct.error,children:l}),p.jsx("div",{className:Ct.toolListItems,children:t.map(x=>p.jsxs("button",{className:`${Ct.toolItem} ${c===x.name?Ct.toolItemSelected:""}`,onClick:()=>d(c===x.name?null:x.name),children:[p.jsx("span",{className:Ct.toolName,children:x.name}),p.jsx("span",{className:Ct.toolDesc,children:x.description??""})]},x.name))}),_&&p.jsx(GR,{tool:_,isCalling:m,onCall:y},_.name)]})}function ZR(t,a,l,r){const[o,u]=R.useState(null),[c,d]=R.useState(!1),[m,g]=R.useState(null);R.useEffect(()=>{u(null),g(null)},[a]);const _=R.useCallback(async()=>{if(!(!a||l!=="A2A")){d(!0),g(null);try{const y=await mn(`${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){g(y.message)}finally{d(!1)}}},[t,a,l]);return R.useEffect(()=>{a&&l==="A2A"&&r&&_()},[a,l,r,_]),{card:o,isLoading:c,error:m,fetchCard:_}}function YR(t){const[a,l]=R.useState([]),[r,o]=R.useState([]),[u,c]=R.useState([]),[d,m]=R.useState(void 0),[g,_]=R.useState(!1),[y,x]=R.useState(!1);return R.useEffect(()=>{let b,N=!1;async function O(){try{const k=await(await mn(`${t}/api/status`)).json();if(N)return;l(k.agents),o(k.harnesses??[]),c(k.errors??[]),m(M=>M??k.selectedAgent),_(!0),x(!0)}catch{if(N)return;_(!1)}N||(b=setTimeout(O,5e3))}return O(),()=>{N=!0,clearTimeout(b)}},[t]),{agents:a,harnesses:r,errors:u,selectedAgent:d,isConnected:g,hasConnected:y}}const FR=60;function XR(t,a){const l=R.useRef(null),r=R.useRef(!1),o=()=>{const d=l.current;return d?d.scrollHeight-d.scrollTop-d.clientHeight<=FR:!0},u=R.useCallback(()=>{const d=l.current;d&&(r.current=!1,d.scrollTop=d.scrollHeight)},[]),c=R.useCallback(()=>{const d=l.current;!d||r.current||(a?d.scrollTop=d.scrollHeight:d.scrollTo({top:d.scrollHeight,behavior:"smooth"}))},[a]);return R.useLayoutEffect(()=>{const d=l.current;if(!d)return;const m=()=>{requestAnimationFrame(()=>{l.current&&(r.current=!o())})},g=()=>{o()&&r.current&&(r.current=!1)};return d.addEventListener("wheel",m,{passive:!0}),d.addEventListener("touchmove",m,{passive:!0}),d.addEventListener("scroll",g,{passive:!0}),()=>{d.removeEventListener("wheel",m),d.removeEventListener("touchmove",m),d.removeEventListener("scroll",g)}},[]),R.useEffect(()=>{c()},[t,c]),{containerRef:l,forceScrollToBottom:u}}function QR(t){if(!t.startsWith("data: "))return null;const a=t.slice(6);try{const l=JSON.parse(a);return typeof l.type!="string"?null:l}catch{return null}}function KR(t,a,l){const[r,o]=R.useState([]),[u,c]=R.useState(!1),[d,m]=R.useState(null),[g,_]=R.useState({}),y=R.useRef(null),x=R.useRef({}),b=R.useRef(null);R.useEffect(()=>{_({})},[a]);const N=R.useCallback(async k=>{var j,K;(j=b.current)==null||j.abort();const M=new AbortController;b.current=M,c(!0);try{const Y=await mn(`${t}/invocations`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(k),signal:M.signal});if(!Y.ok){const W=await Y.text();o(ue=>{const Ne=[...ue];return Ne[Ne.length-1]={role:"assistant",content:W||`Error: ${Y.status}`,isError:!0},Ne});return}const I=Y.headers.get("x-session-id");if(I&&(y.current=I,m(I)),!Y.body){o(W=>{const ue=[...W];return ue[ue.length-1]={role:"assistant",content:"(empty response)"},ue});return}const U=Y.body.getReader(),re=new TextDecoder;let le="",z="",te=null,ae;const ge=new Map,ne=()=>{te=null;const W=Object.keys(x.current).length>0?{...x.current}:void 0;o(ue=>{const Ne=[...ue];return Ne[Ne.length-1]={role:"assistant",content:z,...W?{toolExecutions:W}:{}},Ne})},Z=()=>{te===null&&(te=requestAnimationFrame(ne))};for(;;){const{done:W,value:ue}=await U.read();if(W)break;le+=re.decode(ue,{stream:!0});const Ne=le.split(`
|
|
281
|
+
`);le=Ne.pop()||"";for(const E of Ne){const C=QR(E);if(!C)continue;const $=C,T=$.contentBlockIndex;switch(C.type){case"messageStart":break;case"contentBlockStart":{const J=$.start;if((J==null?void 0:J.type)==="toolUse"){const me=J.toolUse;x.current[me.toolUseId]={toolName:me.name,serverName:me.serverName,input:"",result:""},T!==void 0&&ge.set(T,me.toolUseId)}else if((J==null?void 0:J.type)==="toolResult"){const me=J.toolResult;me!=null&&me.toolUseId&&x.current[me.toolUseId]&&(me.status&&(x.current[me.toolUseId].resultStatus=me.status),T!==void 0&&ge.set(T,me.toolUseId))}Z();break}case"contentBlockDelta":{const J=$.delta;if((J==null?void 0:J.type)==="text")z+=J.text;else if((J==null?void 0:J.type)==="toolUse"){const me=T!==void 0?ge.get(T):void 0;me&&x.current[me]&&(x.current[me].input+=J.input)}else if((J==null?void 0:J.type)==="toolResult"){const me=T!==void 0?ge.get(T):void 0,X=J.results;if(me&&x.current[me]&&X)for(const _e of X)typeof _e.text=="string"&&(x.current[me].result+=_e.text)}Z();break}case"contentBlockStop":{const J=T!==void 0?ge.get(T):void 0;J&&((K=x.current[J])!=null&&K.result)&&(z+=`
|
|
277
282
|
|
|
278
|
-
\`\`\`${
|
|
283
|
+
\`\`\`${J}
|
|
279
284
|
|
|
280
285
|
\`\`\`
|
|
281
286
|
|
|
282
|
-
`),Z();break}case"metadata":{
|
|
283
|
-
Error: ${G.message}`,Z();break}default:break}}}ae!==null&&cancelAnimationFrame(ae);const U=Object.keys(x.current).length>0?{...x.current}:void 0;x.current={},o(P=>{const oe=[...P];return oe[oe.length-1]={role:"assistant",content:M||(U?"":"(empty response)"),...U?{toolExecutions:U}:{},...le?{tokenUsage:{inputTokens:le.inputTokens,outputTokens:le.outputTokens,totalTokens:le.totalTokens}}:{}},oe})}catch($){const B=$ instanceof Error&&$.message.includes("Failed to fetch")?"Connection failed — is the dev server running?":$ instanceof Error?$.message:"Unknown error";o(J=>{const de=[...J];return de[de.length-1]={role:"assistant",content:B,isError:!0},de})}finally{c(!1)}},[t]),L=R.useCallback(async k=>{var Q,$,B,J;if(!k||u||!a)return;x.current={},o(de=>[...de,{role:"user",content:k},{role:"assistant",content:""}]);const z=p.model,w=z&&(((Q=z.bedrockModelConfig)==null?void 0:Q.modelId)||(($=z.openAiModelConfig)==null?void 0:$.modelId)||((B=z.geminiModelConfig)==null?void 0:B.modelId));await N({harnessName:a,prompt:k,..._.current?{sessionId:_.current}:{},...i?{userId:i}:{},harnessOverrides:{...p,model:w?z:void 0,skills:(J=p.skills)==null?void 0:J.map(de=>({path:de}))}})},[a,u,i,p,N]),O=R.useCallback(()=>{var k;(k=b.current)==null||k.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:L,resetChat:O}}function yR(t){const a=c1(t.resourceSpans,t.resourceLogs),i=f1(a),r=g1(a);return{traceId:t.traceId,timestamp:t.timestamp,sessionId:t.sessionId,spanCount:t.spanCount,spans:a,tree:i,userPrompt:r}}function _R(t){let a=null;for(const i of t){const r=i["@message"];if(!r)continue;const o=r.body??r,u=o.input;if(u!=null&&u.messages){const h=u.messages.find(y=>y.role==="user");if(!(h!=null&&h.content))continue;const m=h.content,p=typeof m=="string"?m:m.content;if(!p)continue;try{const y=JSON.parse(p);if(Array.isArray(y)){const _=y.filter(x=>x.text).map(x=>x.text);_.length>0&&(a=_.join(" "))}}catch{a=p}}if(r.eventName==="gen_ai.user.message"){const h=o.content;if(Array.isArray(h)){const m=h.filter(p=>p.text).map(p=>p.text);m.length>0&&(a=m.join(" "))}}}return a}function vR(t){const a=new Map;for(const i of t){const r=i["@message"];if(!r)continue;const o=r.spanId;if(!o)continue;const u=r.events;if(u&&Array.isArray(u)){const h=a.get(o)??[];h.push(...u),a.set(o,h);continue}const c=r.eventName;if(c){const h=a.get(o)??[],m=r.body;h.push({name:c,attributes:m??{},timeUnixNano:r.observedTimeUnixNano??r.timeUnixNano}),a.set(o,h)}}return a}function xR(t,a){const i=a?vR(a):new Map;return t.map(r=>{const o=r.startTimeUnixNano?BigInt(r.startTimeUnixNano):void 0,u=o?Number(o/BigInt(1e6)):0;return{type:"span",traceId:r.traceId,spanId:r.spanId,parentSpanId:r.parentSpanId,name:r.name,startTimeUnixNano:r.startTimeUnixNano,endTimeUnixNano:r.endTimeUnixNano,attributes:{...r.inputTokens!==null&&r.inputTokens!==void 0?{"gen_ai.usage.input_tokens":r.inputTokens}:{},...r.outputTokens!==null&&r.outputTokens!==void 0?{"gen_ai.usage.output_tokens":r.outputTokens}:{},...r.totalTokens!==null&&r.totalTokens!==void 0?{"gen_ai.usage.total_tokens":r.totalTokens}:{},...r.sessionId?{"session.id":r.sessionId}:{}},events:i.get(r.spanId),status:r.statusCode?{code:r.statusCode}:void 0,timestampMs:u}})}function bR(t,a){const i=In,[r,o]=R.useState([]),[u,c]=R.useState(null),[h,m]=R.useState(!1),[p,y]=R.useState(null),[_,x]=R.useState(null),b=R.useCallback(async()=>{m(!0),y(null);try{const w=new URLSearchParams;t&&w.set("agentName",t);const Q=Date.now();w.set("startTime",String(Q-720*60*1e3)),w.set("endTime",String(Q));const B=await dn(`${i}/api/${a==="deployed"?"cloudwatch-traces":"traces"}?${w.toString()}`);if(B.status===404){x(!1),o([]);return}if(x(!0),a==="deployed"){const J=await B.json();if(J.success){const de=J.traces.map(async he=>{const ae=await(await dn(`${i}/api/cloudwatch-traces/${encodeURIComponent(he.traceId)}?${w.toString()}`)).json();if(ae.success&&ae.spans){const le=xR(ae.spans,ae.records),pe=f1(le),ne=_R(ae.records??[])??g1(le);return{traceId:he.traceId,timestamp:he.timestamp,sessionId:he.sessionId,spanCount:he.spanCount,spans:le,tree:pe,userPrompt:ne}}return{traceId:he.traceId,timestamp:he.timestamp,sessionId:he.sessionId,spanCount:he.spanCount,spans:[],tree:[],userPrompt:null}});o(await Promise.all(de))}else y(J.error),o([])}else{const J=await B.json();J.success?o(J.traces.map(yR)):(y(J.error),o([]))}}catch(w){y(w instanceof Error?w.message:"Failed to load traces"),o([])}finally{m(!1)}},[i,t,a]),N=r.find(w=>w.traceId===u)??null,L=R.useCallback(w=>{c(Q=>Q===w?Q:w)},[]),O=R.useCallback(()=>{c(null)},[]),k=R.useCallback(()=>{b()},[b]),z=R.useCallback(()=>{setTimeout(()=>b(),1500),setTimeout(()=>b(),5e3)},[b]);return R.useEffect(()=>{o([]),c(null),y(null),b()},[b]),{invocations:r,selectedInvocation:N,isLoading:h,error:p,isAvailable:_,selectTrace:L,deselectTrace:O,refresh:k,onInvocationComplete:z}}let Hf=1;function Yy(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 To(t,a,i,r,o){const u=o?`${t}/api/mcp?target=deployed`:`${t}/api/mcp`,c=await dn(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentName:a,body:i,sessionId:r})});if(!c.ok){const h=await c.text();throw new Error(`MCP proxy error (${c.status}): ${h}`)}return c.json()}function SR(t,a,i,r,o){const[u,c]=R.useState([]),[h,m]=R.useState(!1),[p,y]=R.useState(null),_=R.useRef(void 0),x=R.useRef(null);R.useEffect(()=>{c([]),y(null),_.current=void 0,x.current=null},[a]);const b=R.useCallback(O=>{if(x.current)return x.current;const k=(async()=>{const z=await To(t,O,{jsonrpc:"2.0",id:Hf++,method:"initialize",params:{protocolVersion:"2025-03-26",capabilities:{},clientInfo:{name:"agentcore-inspector",version:"1.0.0"}}},void 0,o);if(!z.success)throw new Error(z.error??"Failed to initialize MCP session");_.current=z.sessionId,await To(t,O,{jsonrpc:"2.0",method:"notifications/initialized"},_.current,o)})().catch(z=>{throw x.current=null,z});return x.current=k,k},[t,o]),N=R.useCallback(async()=>{if(!(!a||i!=="MCP")){m(!0),y(null);try{await b(a);const O=await To(t,a,{jsonrpc:"2.0",id:Hf++,method:"tools/list",params:{}},_.current,o);if(!O.success)throw new Error(O.error??"Failed to list tools");const z=Yy(O.result).result;c((z==null?void 0:z.tools)??[])}catch(O){y(O.message)}finally{m(!1)}}},[t,a,i,o,b]),L=R.useCallback(async(O,k)=>{if(!a)throw new Error("No agent selected");await b(a);const z=await To(t,a,{jsonrpc:"2.0",id:Hf++,method:"tools/call",params:{name:O,arguments:k}},_.current,o);if(!z.success)throw new Error(z.error??"Tool call failed");const w=Yy(z.result),Q=w.result,$=w.error;if($)throw new Error($.message);return Q??{content:[{type:"text",text:JSON.stringify(w)}]}},[t,a,b]);return R.useEffect(()=>{a&&i==="MCP"&&r&&N()},[a,i,r,N]),{tools:u,isLoading:h,error:p,fetchTools:N,callTool:L}}const kR=15e3;function TR(t){const[a,i]=R.useState(null),[r,o]=R.useState(!1),[u,c]=R.useState(null),h=R.useRef(void 0),m=R.useCallback(async()=>{o(p=>p||a===null),c(null);try{const y=await(await dn(`${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 R.useEffect(()=>(m(),h.current=setInterval(m,kR),()=>clearInterval(h.current)),[m]),{data:a,isLoading:r,error:u,fetch:m}}function NR(t){const[a,i]=R.useState(!1),[r,o]=R.useState(!1),[u,c]=R.useState(null),h=R.useCallback(async m=>{i(!0),o(!1),c(null);try{const y=await(await dn(`${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 Xy;(function(t){t.mergeShapes=(a,i)=>({...a,...i})})(Xy||(Xy={}));const ye=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 ye.undefined;case"string":return ye.string;case"number":return Number.isNaN(t)?ye.nan:ye.number;case"boolean":return ye.boolean;case"function":return ye.function;case"bigint":return ye.bigint;case"symbol":return ye.symbol;case"object":return Array.isArray(t)?ye.array:t===null?ye.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ye.promise:typeof Map<"u"&&t instanceof Map?ye.map:typeof Set<"u"&&t instanceof Set?ye.set:typeof Date<"u"&&t instanceof Date?ye.date:ye.object;default:return ye.unknown}},re=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 ja 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 ja))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()}}ja.create=t=>new ja(t);const nd=(t,a)=>{let i;switch(t.code){case re.invalid_type:t.received===ye.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case re.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,Je.jsonStringifyReplacer)}`;break;case re.unrecognized_keys:i=`Unrecognized key(s) in object: ${Je.joinValues(t.keys,", ")}`;break;case re.invalid_union:i="Invalid input";break;case re.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${Je.joinValues(t.options)}`;break;case re.invalid_enum_value:i=`Invalid enum value. Expected ${Je.joinValues(t.options)}, received '${t.received}'`;break;case re.invalid_arguments:i="Invalid function arguments";break;case re.invalid_return_type:i="Invalid function return type";break;case re.invalid_date:i="Invalid date";break;case re.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 re.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 re.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 re.custom:i="Invalid input";break;case re.invalid_intersection_types:i="Intersection results could not be merged";break;case re.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case re.not_finite:i="Number must be finite";break;default:i=a.defaultError,Je.assertNever(t)}return{message:i}};let ER=nd;function CR(){return ER}const AR=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 ge(t,a){const i=CR(),r=AR({issueData:a,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,i,i===nd?void 0:nd].filter(o=>!!o)});t.common.issues.push(r)}class en{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 Me;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 en.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 Me;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 Me=Object.freeze({status:"aborted"}),Ir=t=>({status:"dirty",value:t}),qn=t=>({status:"valid",value:t}),Fy=t=>t.status==="aborted",Qy=t=>t.status==="dirty",Oi=t=>t.status==="valid",Ro=t=>typeof Promise<"u"&&t instanceof Promise;var Te;(function(t){t.errToObj=a=>typeof a=="string"?{message:a}:a||{},t.toString=a=>typeof a=="string"?a:a==null?void 0:a.message})(Te||(Te={}));class la{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 Ky=(t,a)=>{if(Oi(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 ja(t.common.issues);return this._error=i,this._error}}};function He(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 Fe{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 en,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(Ro(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 Ky(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 Oi(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=>Oi(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(Ro(o)?o:Promise.resolve(o));return Ky(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:re.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:Re.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 Aa.create(this,this._def)}nullable(){return Ul.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return aa.create(this)}promise(){return Ho.create(this,this._def)}or(a){return Do.create([this,a],this._def)}and(a){return Lo.create(this,a,this._def)}transform(a){return new Bl({...He(this._def),schema:this,typeName:Re.ZodEffects,effect:{type:"transform",transform:a}})}default(a){const i=typeof a=="function"?a:()=>a;return new qo({...He(this._def),innerType:this,defaultValue:i,typeName:Re.ZodDefault})}brand(){return new x1({typeName:Re.ZodBranded,type:this,...He(this._def)})}catch(a){const i=typeof a=="function"?a:()=>a;return new Vo({...He(this._def),innerType:this,catchValue:i,typeName:Re.ZodCatch})}describe(a){const i=this.constructor;return new i({...this._def,description:a})}pipe(a){return Bd.create(this,a)}readonly(){return Go.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const wR=/^c[^\s-]{8,}$/i,jR=/^[0-9a-z]+$/,zR=/^[0-9A-HJKMNP-TV-Z]{26}$/i,MR=/^[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,RR=/^[a-z0-9_-]{21}$/i,OR=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,DR=/^[-+]?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)?)??$/,LR=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,BR="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let qf;const UR=/^(?:(?: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])$/,IR=/^(?:(?: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])$/,HR=/^(([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]))$/,qR=/^(([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])$/,VR=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,GR=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,y1="((\\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])))",$R=new RegExp(`^${y1}$`);function _1(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 ZR(t){return new RegExp(`^${_1(t)}$`)}function YR(t){let a=`${y1}T${_1(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 XR(t,a){return!!((a==="v4"||!a)&&UR.test(t)||(a==="v6"||!a)&&HR.test(t))}function FR(t,a){if(!OR.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 QR(t,a){return!!((a==="v4"||!a)&&IR.test(t)||(a==="v6"||!a)&&qR.test(t))}class Ca extends Fe{_parse(a){if(this._def.coerce&&(a.data=String(a.data)),this._getType(a)!==ye.string){const u=this._getOrReturnCtx(a);return ge(u,{code:re.invalid_type,expected:ye.string,received:u.parsedType}),Me}const r=new en;let o;for(const u of this._def.checks)if(u.kind==="min")a.data.length<u.value&&(o=this._getOrReturnCtx(a,o),ge(o,{code:re.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),ge(o,{code:re.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?ge(o,{code:re.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}):h&&ge(o,{code:re.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}),r.dirty())}else if(u.kind==="email")LR.test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"email",code:re.invalid_string,message:u.message}),r.dirty());else if(u.kind==="emoji")qf||(qf=new RegExp(BR,"u")),qf.test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"emoji",code:re.invalid_string,message:u.message}),r.dirty());else if(u.kind==="uuid")MR.test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"uuid",code:re.invalid_string,message:u.message}),r.dirty());else if(u.kind==="nanoid")RR.test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"nanoid",code:re.invalid_string,message:u.message}),r.dirty());else if(u.kind==="cuid")wR.test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"cuid",code:re.invalid_string,message:u.message}),r.dirty());else if(u.kind==="cuid2")jR.test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"cuid2",code:re.invalid_string,message:u.message}),r.dirty());else if(u.kind==="ulid")zR.test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"ulid",code:re.invalid_string,message:u.message}),r.dirty());else if(u.kind==="url")try{new URL(a.data)}catch{o=this._getOrReturnCtx(a,o),ge(o,{validation:"url",code:re.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),ge(o,{validation:"regex",code:re.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),ge(o,{code:re.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),ge(o,{code:re.invalid_string,validation:{startsWith:u.value},message:u.message}),r.dirty()):u.kind==="endsWith"?a.data.endsWith(u.value)||(o=this._getOrReturnCtx(a,o),ge(o,{code:re.invalid_string,validation:{endsWith:u.value},message:u.message}),r.dirty()):u.kind==="datetime"?YR(u).test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{code:re.invalid_string,validation:"datetime",message:u.message}),r.dirty()):u.kind==="date"?$R.test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{code:re.invalid_string,validation:"date",message:u.message}),r.dirty()):u.kind==="time"?ZR(u).test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{code:re.invalid_string,validation:"time",message:u.message}),r.dirty()):u.kind==="duration"?DR.test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"duration",code:re.invalid_string,message:u.message}),r.dirty()):u.kind==="ip"?XR(a.data,u.version)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"ip",code:re.invalid_string,message:u.message}),r.dirty()):u.kind==="jwt"?FR(a.data,u.alg)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"jwt",code:re.invalid_string,message:u.message}),r.dirty()):u.kind==="cidr"?QR(a.data,u.version)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"cidr",code:re.invalid_string,message:u.message}),r.dirty()):u.kind==="base64"?VR.test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"base64",code:re.invalid_string,message:u.message}),r.dirty()):u.kind==="base64url"?GR.test(a.data)||(o=this._getOrReturnCtx(a,o),ge(o,{validation:"base64url",code:re.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:re.invalid_string,...Te.errToObj(r)})}_addCheck(a){return new Ca({...this._def,checks:[...this._def.checks,a]})}email(a){return this._addCheck({kind:"email",...Te.errToObj(a)})}url(a){return this._addCheck({kind:"url",...Te.errToObj(a)})}emoji(a){return this._addCheck({kind:"emoji",...Te.errToObj(a)})}uuid(a){return this._addCheck({kind:"uuid",...Te.errToObj(a)})}nanoid(a){return this._addCheck({kind:"nanoid",...Te.errToObj(a)})}cuid(a){return this._addCheck({kind:"cuid",...Te.errToObj(a)})}cuid2(a){return this._addCheck({kind:"cuid2",...Te.errToObj(a)})}ulid(a){return this._addCheck({kind:"ulid",...Te.errToObj(a)})}base64(a){return this._addCheck({kind:"base64",...Te.errToObj(a)})}base64url(a){return this._addCheck({kind:"base64url",...Te.errToObj(a)})}jwt(a){return this._addCheck({kind:"jwt",...Te.errToObj(a)})}ip(a){return this._addCheck({kind:"ip",...Te.errToObj(a)})}cidr(a){return this._addCheck({kind:"cidr",...Te.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,...Te.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,...Te.errToObj(a==null?void 0:a.message)})}duration(a){return this._addCheck({kind:"duration",...Te.errToObj(a)})}regex(a,i){return this._addCheck({kind:"regex",regex:a,...Te.errToObj(i)})}includes(a,i){return this._addCheck({kind:"includes",value:a,position:i==null?void 0:i.position,...Te.errToObj(i==null?void 0:i.message)})}startsWith(a,i){return this._addCheck({kind:"startsWith",value:a,...Te.errToObj(i)})}endsWith(a,i){return this._addCheck({kind:"endsWith",value:a,...Te.errToObj(i)})}min(a,i){return this._addCheck({kind:"min",value:a,...Te.errToObj(i)})}max(a,i){return this._addCheck({kind:"max",value:a,...Te.errToObj(i)})}length(a,i){return this._addCheck({kind:"length",value:a,...Te.errToObj(i)})}nonempty(a){return this.min(1,Te.errToObj(a))}trim(){return new Ca({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ca({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ca({...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}}Ca.create=t=>new Ca({checks:[],typeName:Re.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...He(t)});function KR(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 Di extends Fe{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)!==ye.number){const u=this._getOrReturnCtx(a);return ge(u,{code:re.invalid_type,expected:ye.number,received:u.parsedType}),Me}let r;const o=new en;for(const u of this._def.checks)u.kind==="int"?Je.isInteger(a.data)||(r=this._getOrReturnCtx(a,r),ge(r,{code:re.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),ge(r,{code:re.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),ge(r,{code:re.too_big,maximum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),o.dirty()):u.kind==="multipleOf"?KR(a.data,u.value)!==0&&(r=this._getOrReturnCtx(a,r),ge(r,{code:re.not_multiple_of,multipleOf:u.value,message:u.message}),o.dirty()):u.kind==="finite"?Number.isFinite(a.data)||(r=this._getOrReturnCtx(a,r),ge(r,{code:re.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,Te.toString(i))}gt(a,i){return this.setLimit("min",a,!1,Te.toString(i))}lte(a,i){return this.setLimit("max",a,!0,Te.toString(i))}lt(a,i){return this.setLimit("max",a,!1,Te.toString(i))}setLimit(a,i,r,o){return new Di({...this._def,checks:[...this._def.checks,{kind:a,value:i,inclusive:r,message:Te.toString(o)}]})}_addCheck(a){return new Di({...this._def,checks:[...this._def.checks,a]})}int(a){return this._addCheck({kind:"int",message:Te.toString(a)})}positive(a){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(a)})}negative(a){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(a)})}nonpositive(a){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(a)})}nonnegative(a){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(a)})}multipleOf(a,i){return this._addCheck({kind:"multipleOf",value:a,message:Te.toString(i)})}finite(a){return this._addCheck({kind:"finite",message:Te.toString(a)})}safe(a){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(a)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.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)}}Di.create=t=>new Di({checks:[],typeName:Re.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...He(t)});class Yr extends Fe{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)!==ye.bigint)return this._getInvalidInput(a);let r;const o=new en;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),ge(r,{code:re.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),ge(r,{code:re.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),ge(r,{code:re.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 ge(i,{code:re.invalid_type,expected:ye.bigint,received:i.parsedType}),Me}gte(a,i){return this.setLimit("min",a,!0,Te.toString(i))}gt(a,i){return this.setLimit("min",a,!1,Te.toString(i))}lte(a,i){return this.setLimit("max",a,!0,Te.toString(i))}lt(a,i){return this.setLimit("max",a,!1,Te.toString(i))}setLimit(a,i,r,o){return new Yr({...this._def,checks:[...this._def.checks,{kind:a,value:i,inclusive:r,message:Te.toString(o)}]})}_addCheck(a){return new Yr({...this._def,checks:[...this._def.checks,a]})}positive(a){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(a)})}negative(a){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(a)})}nonpositive(a){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(a)})}nonnegative(a){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(a)})}multipleOf(a,i){return this._addCheck({kind:"multipleOf",value:a,message:Te.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}}Yr.create=t=>new Yr({checks:[],typeName:Re.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...He(t)});class ad extends Fe{_parse(a){if(this._def.coerce&&(a.data=!!a.data),this._getType(a)!==ye.boolean){const r=this._getOrReturnCtx(a);return ge(r,{code:re.invalid_type,expected:ye.boolean,received:r.parsedType}),Me}return qn(a.data)}}ad.create=t=>new ad({typeName:Re.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...He(t)});class Oo extends Fe{_parse(a){if(this._def.coerce&&(a.data=new Date(a.data)),this._getType(a)!==ye.date){const u=this._getOrReturnCtx(a);return ge(u,{code:re.invalid_type,expected:ye.date,received:u.parsedType}),Me}if(Number.isNaN(a.data.getTime())){const u=this._getOrReturnCtx(a);return ge(u,{code:re.invalid_date}),Me}const r=new en;let o;for(const u of this._def.checks)u.kind==="min"?a.data.getTime()<u.value&&(o=this._getOrReturnCtx(a,o),ge(o,{code:re.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),ge(o,{code:re.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 Oo({...this._def,checks:[...this._def.checks,a]})}min(a,i){return this._addCheck({kind:"min",value:a.getTime(),message:Te.toString(i)})}max(a,i){return this._addCheck({kind:"max",value:a.getTime(),message:Te.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}}Oo.create=t=>new Oo({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Re.ZodDate,...He(t)});class Jy extends Fe{_parse(a){if(this._getType(a)!==ye.symbol){const r=this._getOrReturnCtx(a);return ge(r,{code:re.invalid_type,expected:ye.symbol,received:r.parsedType}),Me}return qn(a.data)}}Jy.create=t=>new Jy({typeName:Re.ZodSymbol,...He(t)});class ld extends Fe{_parse(a){if(this._getType(a)!==ye.undefined){const r=this._getOrReturnCtx(a);return ge(r,{code:re.invalid_type,expected:ye.undefined,received:r.parsedType}),Me}return qn(a.data)}}ld.create=t=>new ld({typeName:Re.ZodUndefined,...He(t)});class id extends Fe{_parse(a){if(this._getType(a)!==ye.null){const r=this._getOrReturnCtx(a);return ge(r,{code:re.invalid_type,expected:ye.null,received:r.parsedType}),Me}return qn(a.data)}}id.create=t=>new id({typeName:Re.ZodNull,...He(t)});class rd extends Fe{constructor(){super(...arguments),this._any=!0}_parse(a){return qn(a.data)}}rd.create=t=>new rd({typeName:Re.ZodAny,...He(t)});class sd extends Fe{constructor(){super(...arguments),this._unknown=!0}_parse(a){return qn(a.data)}}sd.create=t=>new sd({typeName:Re.ZodUnknown,...He(t)});class fl extends Fe{_parse(a){const i=this._getOrReturnCtx(a);return ge(i,{code:re.invalid_type,expected:ye.never,received:i.parsedType}),Me}}fl.create=t=>new fl({typeName:Re.ZodNever,...He(t)});class Py extends Fe{_parse(a){if(this._getType(a)!==ye.undefined){const r=this._getOrReturnCtx(a);return ge(r,{code:re.invalid_type,expected:ye.void,received:r.parsedType}),Me}return qn(a.data)}}Py.create=t=>new Py({typeName:Re.ZodVoid,...He(t)});class aa extends Fe{_parse(a){const{ctx:i,status:r}=this._processInputParams(a),o=this._def;if(i.parsedType!==ye.array)return ge(i,{code:re.invalid_type,expected:ye.array,received:i.parsedType}),Me;if(o.exactLength!==null){const c=i.data.length>o.exactLength.value,h=i.data.length<o.exactLength.value;(c||h)&&(ge(i,{code:c?re.too_big:re.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&&(ge(i,{code:re.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&&(ge(i,{code:re.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 la(i,c,i.path,h)))).then(c=>en.mergeArray(r,c));const u=[...i.data].map((c,h)=>o.type._parseSync(new la(i,c,i.path,h)));return en.mergeArray(r,u)}get element(){return this._def.type}min(a,i){return new aa({...this._def,minLength:{value:a,message:Te.toString(i)}})}max(a,i){return new aa({...this._def,maxLength:{value:a,message:Te.toString(i)}})}length(a,i){return new aa({...this._def,exactLength:{value:a,message:Te.toString(i)}})}nonempty(a){return this.min(1,a)}}aa.create=(t,a)=>new aa({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Re.ZodArray,...He(a)});function zi(t){if(t instanceof Mt){const a={};for(const i in t.shape){const r=t.shape[i];a[i]=Aa.create(zi(r))}return new Mt({...t._def,shape:()=>a})}else return t instanceof aa?new aa({...t._def,type:zi(t.element)}):t instanceof Aa?Aa.create(zi(t.unwrap())):t instanceof Ul?Ul.create(zi(t.unwrap())):t instanceof Dl?Dl.create(t.items.map(a=>zi(a))):t}class Mt extends Fe{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)!==ye.object){const p=this._getOrReturnCtx(a);return ge(p,{code:re.invalid_type,expected:ye.object,received:p.parsedType}),Me}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 la(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&&(ge(o,{code:re.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 la(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=>en.mergeObjectSync(r,p)):en.mergeObjectSync(r,m)}get shape(){return this._def.shape()}strict(a){return Te.errToObj,new Mt({...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:Te.errToObj(a).message??o}:{message:o}}}:{}})}strip(){return new Mt({...this._def,unknownKeys:"strip"})}passthrough(){return new Mt({...this._def,unknownKeys:"passthrough"})}extend(a){return new Mt({...this._def,shape:()=>({...this._def.shape(),...a})})}merge(a){return new Mt({unknownKeys:a._def.unknownKeys,catchall:a._def.catchall,shape:()=>({...this._def.shape(),...a._def.shape()}),typeName:Re.ZodObject})}setKey(a,i){return this.augment({[a]:i})}catchall(a){return new Mt({...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 Mt({...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 Mt({...this._def,shape:()=>i})}deepPartial(){return zi(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 Mt({...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 Aa;)u=u._def.innerType;i[r]=u}return new Mt({...this._def,shape:()=>i})}keyof(){return v1(Je.objectKeys(this.shape))}}Mt.create=(t,a)=>new Mt({shape:()=>t,unknownKeys:"strip",catchall:fl.create(),typeName:Re.ZodObject,...He(a)});Mt.strictCreate=(t,a)=>new Mt({shape:()=>t,unknownKeys:"strict",catchall:fl.create(),typeName:Re.ZodObject,...He(a)});Mt.lazycreate=(t,a)=>new Mt({shape:t,unknownKeys:"strip",catchall:fl.create(),typeName:Re.ZodObject,...He(a)});class Do extends Fe{_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 ja(h.ctx.common.issues));return ge(i,{code:re.invalid_union,unionErrors:c}),Me}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 ja(m));return ge(i,{code:re.invalid_union,unionErrors:h}),Me}}get options(){return this._def.options}}Do.create=(t,a)=>new Do({options:t,typeName:Re.ZodUnion,...He(a)});const Ea=t=>t instanceof ud?Ea(t.schema):t instanceof Bl?Ea(t.innerType()):t instanceof Uo?[t.value]:t instanceof Ll?t.options:t instanceof Io?Je.objectValues(t.enum):t instanceof qo?Ea(t._def.innerType):t instanceof ld?[void 0]:t instanceof id?[null]:t instanceof Aa?[void 0,...Ea(t.unwrap())]:t instanceof Ul?[null,...Ea(t.unwrap())]:t instanceof x1||t instanceof Go?Ea(t.unwrap()):t instanceof Vo?Ea(t._def.innerType):[];class Ld extends Fe{_parse(a){const{ctx:i}=this._processInputParams(a);if(i.parsedType!==ye.object)return ge(i,{code:re.invalid_type,expected:ye.object,received:i.parsedType}),Me;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}):(ge(i,{code:re.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Me)}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=Ea(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 Ld({typeName:Re.ZodDiscriminatedUnion,discriminator:a,options:i,optionsMap:o,...He(r)})}}function od(t,a){const i=ul(t),r=ul(a);if(t===a)return{valid:!0,data:t};if(i===ye.object&&r===ye.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=od(t[h],a[h]);if(!m.valid)return{valid:!1};c[h]=m.data}return{valid:!0,data:c}}else if(i===ye.array&&r===ye.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=od(c,h);if(!m.valid)return{valid:!1};o.push(m.data)}return{valid:!0,data:o}}else return i===ye.date&&r===ye.date&&+t==+a?{valid:!0,data:t}:{valid:!1}}class Lo extends Fe{_parse(a){const{status:i,ctx:r}=this._processInputParams(a),o=(u,c)=>{if(Fy(u)||Fy(c))return Me;const h=od(u.value,c.value);return h.valid?((Qy(u)||Qy(c))&&i.dirty(),{status:i.value,value:h.data}):(ge(r,{code:re.invalid_intersection_types}),Me)};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}))}}Lo.create=(t,a,i)=>new Lo({left:t,right:a,typeName:Re.ZodIntersection,...He(i)});class Dl extends Fe{_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.parsedType!==ye.array)return ge(r,{code:re.invalid_type,expected:ye.array,received:r.parsedType}),Me;if(r.data.length<this._def.items.length)return ge(r,{code:re.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Me;!this._def.rest&&r.data.length>this._def.items.length&&(ge(r,{code:re.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 la(r,c,r.path,h)):null}).filter(c=>!!c);return r.common.async?Promise.all(u).then(c=>en.mergeArray(i,c)):en.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:Re.ZodTuple,rest:null,...He(a)})};class Bo extends Fe{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!==ye.object)return ge(r,{code:re.invalid_type,expected:ye.object,received:r.parsedType}),Me;const o=[],u=this._def.keyType,c=this._def.valueType;for(const h in r.data)o.push({key:u._parse(new la(r,h,r.path,h)),value:c._parse(new la(r,r.data[h],r.path,h)),alwaysSet:h in r.data});return r.common.async?en.mergeObjectAsync(i,o):en.mergeObjectSync(i,o)}get element(){return this._def.valueType}static create(a,i,r){return i instanceof Fe?new Bo({keyType:a,valueType:i,typeName:Re.ZodRecord,...He(r)}):new Bo({keyType:Ca.create(),valueType:a,typeName:Re.ZodRecord,...He(i)})}}class Wy extends Fe{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!==ye.map)return ge(r,{code:re.invalid_type,expected:ye.map,received:r.parsedType}),Me;const o=this._def.keyType,u=this._def.valueType,c=[...r.data.entries()].map(([h,m],p)=>({key:o._parse(new la(r,h,r.path,[p,"key"])),value:u._parse(new la(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 Me;(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 Me;(p.status==="dirty"||y.status==="dirty")&&i.dirty(),h.set(p.value,y.value)}return{status:i.value,value:h}}}}Wy.create=(t,a,i)=>new Wy({valueType:a,keyType:t,typeName:Re.ZodMap,...He(i)});class Xr extends Fe{_parse(a){const{status:i,ctx:r}=this._processInputParams(a);if(r.parsedType!==ye.set)return ge(r,{code:re.invalid_type,expected:ye.set,received:r.parsedType}),Me;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ge(r,{code:re.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&&(ge(r,{code:re.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 Me;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 la(r,m,r.path,p)));return r.common.async?Promise.all(h).then(m=>c(m)):c(h)}min(a,i){return new Xr({...this._def,minSize:{value:a,message:Te.toString(i)}})}max(a,i){return new Xr({...this._def,maxSize:{value:a,message:Te.toString(i)}})}size(a,i){return this.min(a,i).max(a,i)}nonempty(a){return this.min(1,a)}}Xr.create=(t,a)=>new Xr({valueType:t,minSize:null,maxSize:null,typeName:Re.ZodSet,...He(a)});class ud extends Fe{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})}}ud.create=(t,a)=>new ud({getter:t,typeName:Re.ZodLazy,...He(a)});class Uo extends Fe{_parse(a){if(a.data!==this._def.value){const i=this._getOrReturnCtx(a);return ge(i,{received:i.data,code:re.invalid_literal,expected:this._def.value}),Me}return{status:"valid",value:a.data}}get value(){return this._def.value}}Uo.create=(t,a)=>new Uo({value:t,typeName:Re.ZodLiteral,...He(a)});function v1(t,a){return new Ll({values:t,typeName:Re.ZodEnum,...He(a)})}class Ll extends Fe{_parse(a){if(typeof a.data!="string"){const i=this._getOrReturnCtx(a),r=this._def.values;return ge(i,{expected:Je.joinValues(r),received:i.parsedType,code:re.invalid_type}),Me}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 ge(i,{received:i.data,code:re.invalid_enum_value,options:r}),Me}return qn(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=v1;class Io extends Fe{_parse(a){const i=Je.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(a);if(r.parsedType!==ye.string&&r.parsedType!==ye.number){const o=Je.objectValues(i);return ge(r,{expected:Je.joinValues(o),received:r.parsedType,code:re.invalid_type}),Me}if(this._cache||(this._cache=new Set(Je.getValidEnumValues(this._def.values))),!this._cache.has(a.data)){const o=Je.objectValues(i);return ge(r,{received:r.data,code:re.invalid_enum_value,options:o}),Me}return qn(a.data)}get enum(){return this._def.values}}Io.create=(t,a)=>new Io({values:t,typeName:Re.ZodNativeEnum,...He(a)});class Ho extends Fe{unwrap(){return this._def.type}_parse(a){const{ctx:i}=this._processInputParams(a);if(i.parsedType!==ye.promise&&i.common.async===!1)return ge(i,{code:re.invalid_type,expected:ye.promise,received:i.parsedType}),Me;const r=i.parsedType===ye.promise?i.data:Promise.resolve(i.data);return qn(r.then(o=>this._def.type.parseAsync(o,{path:i.path,errorMap:i.common.contextualErrorMap})))}}Ho.create=(t,a)=>new Ho({type:t,typeName:Re.ZodPromise,...He(a)});class Bl extends Fe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Re.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=>{ge(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 Me;const m=await this._def.schema._parseAsync({data:h,path:r.path,parent:r});return m.status==="aborted"?Me:m.status==="dirty"||i.value==="dirty"?Ir(m.value):m});{if(i.value==="aborted")return Me;const h=this._def.schema._parseSync({data:c,path:r.path,parent:r});return h.status==="aborted"?Me:h.status==="dirty"||i.value==="dirty"?Ir(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"?Me:(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"?Me:(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(!Oi(c))return Me;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=>Oi(c)?Promise.resolve(o.transform(c.value,u)).then(h=>({status:i.value,value:h})):Me);Je.assertNever(o)}}Bl.create=(t,a,i)=>new Bl({schema:t,typeName:Re.ZodEffects,effect:a,...He(i)});Bl.createWithPreprocess=(t,a,i)=>new Bl({schema:a,effect:{type:"preprocess",transform:t},typeName:Re.ZodEffects,...He(i)});class Aa extends Fe{_parse(a){return this._getType(a)===ye.undefined?qn(void 0):this._def.innerType._parse(a)}unwrap(){return this._def.innerType}}Aa.create=(t,a)=>new Aa({innerType:t,typeName:Re.ZodOptional,...He(a)});class Ul extends Fe{_parse(a){return this._getType(a)===ye.null?qn(null):this._def.innerType._parse(a)}unwrap(){return this._def.innerType}}Ul.create=(t,a)=>new Ul({innerType:t,typeName:Re.ZodNullable,...He(a)});class qo extends Fe{_parse(a){const{ctx:i}=this._processInputParams(a);let r=i.data;return i.parsedType===ye.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}qo.create=(t,a)=>new qo({innerType:t,typeName:Re.ZodDefault,defaultValue:typeof a.default=="function"?a.default:()=>a.default,...He(a)});class Vo extends Fe{_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 Ro(o)?o.then(u=>({status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new ja(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new ja(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Vo.create=(t,a)=>new Vo({innerType:t,typeName:Re.ZodCatch,catchValue:typeof a.catch=="function"?a.catch:()=>a.catch,...He(a)});class e_ extends Fe{_parse(a){if(this._getType(a)!==ye.nan){const r=this._getOrReturnCtx(a);return ge(r,{code:re.invalid_type,expected:ye.nan,received:r.parsedType}),Me}return{status:"valid",value:a.data}}}e_.create=t=>new e_({typeName:Re.ZodNaN,...He(t)});class x1 extends Fe{_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 Bd extends Fe{_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"?Me:u.status==="dirty"?(i.dirty(),Ir(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"?Me: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 Bd({in:a,out:i,typeName:Re.ZodPipeline})}}class Go extends Fe{_parse(a){const i=this._def.innerType._parse(a),r=o=>(Oi(o)&&(o.value=Object.freeze(o.value)),o);return Ro(i)?i.then(o=>r(o)):r(i)}unwrap(){return this._def.innerType}}Go.create=(t,a)=>new Go({innerType:t,typeName:Re.ZodReadonly,...He(a)});var Re;(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"})(Re||(Re={}));const ie=Ca.create,cd=Di.create,Pe=ad.create,Nn=rd.create,Ii=sd.create;fl.create;const Qn=aa.create,nt=Mt.create,Po=Do.create,Wo=Ld.create;Lo.create;Dl.create;const Jr=Bo.create,be=Uo.create;Ll.create;const JR=Io.create;Ho.create;Aa.create;Ul.create;const PR=nt({name:ie(),arguments:ie()}),WR=nt({id:ie(),type:be("function"),function:PR,encryptedValue:ie().optional()}),eu=nt({id:ie(),role:ie(),content:ie().optional(),name:ie().optional(),encryptedValue:ie().optional()}),eO=nt({type:be("text"),text:ie()}),tO=nt({type:be("data"),value:ie(),mimeType:ie()}),nO=nt({type:be("url"),value:ie(),mimeType:ie().optional()}),tu=Wo("type",[tO,nO]),aO=nt({type:be("image"),source:tu,metadata:Ii().optional()}),lO=nt({type:be("audio"),source:tu,metadata:Ii().optional()}),iO=nt({type:be("video"),source:tu,metadata:Ii().optional()}),rO=nt({type:be("document"),source:tu,metadata:Ii().optional()}),b1=nt({type:be("binary"),mimeType:ie(),id:ie().optional(),url:ie().optional(),data:ie().optional(),filename:ie().optional()}),S1=(t,a)=>{!t.id&&!t.url&&!t.data&&a.addIssue({code:re.custom,message:"BinaryInputContent requires at least one of id, url, or data.",path:["id"]})};b1.superRefine((t,a)=>{S1(t,a)});const sO=Wo("type",[eO,aO,lO,iO,rO,b1]),oO=sO.superRefine((t,a)=>{t.type==="binary"&&S1(t,a)}),uO=eu.extend({role:be("developer"),content:ie()}),cO=eu.extend({role:be("system"),content:ie()}),fO=eu.extend({role:be("assistant"),content:ie().optional(),toolCalls:Qn(WR).optional()}),dO=eu.extend({role:be("user"),content:Po([ie(),Qn(oO)])}),hO=nt({id:ie(),content:ie(),role:be("tool"),toolCallId:ie(),error:ie().optional(),encryptedValue:ie().optional()}),mO=nt({id:ie(),role:be("activity"),activityType:ie(),content:Jr(Nn())}),pO=nt({id:ie(),role:be("reasoning"),content:ie(),encryptedValue:ie().optional()}),k1=Wo("role",[uO,cO,fO,dO,hO,mO,pO]);Po([be("developer"),be("system"),be("assistant"),be("user"),be("tool"),be("activity"),be("reasoning")]);const gO=nt({description:ie(),value:ie()}),T1=nt({name:ie(),description:ie(),parameters:Nn(),metadata:Jr(Nn()).optional()}),yO=nt({threadId:ie(),runId:ie(),parentRunId:ie().optional(),state:Nn(),messages:Qn(k1),tools:Qn(T1),context:Qn(gO),forwardedProps:Nn()}),_O=Nn(),vO=nt({name:ie(),description:ie().optional()}),xO=nt({name:ie().optional(),type:ie().optional(),description:ie().optional(),version:ie().optional(),provider:ie().optional(),documentationUrl:ie().optional(),metadata:Jr(Ii()).optional()}),bO=nt({streaming:Pe().optional(),websocket:Pe().optional(),httpBinary:Pe().optional(),pushNotifications:Pe().optional(),resumable:Pe().optional()}),SO=nt({supported:Pe().optional(),items:Qn(T1).optional(),parallelCalls:Pe().optional(),clientProvided:Pe().optional()}),kO=nt({structuredOutput:Pe().optional(),supportedMimeTypes:Qn(ie()).optional()}),TO=nt({snapshots:Pe().optional(),deltas:Pe().optional(),memory:Pe().optional(),persistentState:Pe().optional()}),NO=nt({supported:Pe().optional(),delegation:Pe().optional(),handoffs:Pe().optional(),subAgents:Qn(vO).optional()}),EO=nt({supported:Pe().optional(),streaming:Pe().optional(),encrypted:Pe().optional()}),CO=nt({image:Pe().optional(),audio:Pe().optional(),video:Pe().optional(),pdf:Pe().optional(),file:Pe().optional()}),AO=nt({image:Pe().optional(),audio:Pe().optional()}),wO=nt({input:CO.optional(),output:AO.optional()}),jO=nt({codeExecution:Pe().optional(),sandboxed:Pe().optional(),maxIterations:cd().optional(),maxExecutionTime:cd().optional()}),zO=nt({supported:Pe().optional(),approvals:Pe().optional(),interventions:Pe().optional(),feedback:Pe().optional()});nt({identity:xO.optional(),transport:bO.optional(),tools:SO.optional(),output:kO.optional(),state:TO.optional(),multiAgent:NO.optional(),reasoning:EO.optional(),multimodal:wO.optional(),execution:jO.optional(),humanInTheLoop:zO.optional(),custom:Jr(Ii()).optional()});const N1=Po([be("developer"),be("system"),be("assistant"),be("user")]);let Ze=(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:JR(Ze),timestamp:cd().optional(),rawEvent:Nn().optional()}).passthrough(),MO=at.extend({type:be(Ze.TEXT_MESSAGE_START),messageId:ie(),role:N1.default("assistant"),name:ie().optional()}),E1=at.extend({type:be(Ze.TEXT_MESSAGE_CONTENT),messageId:ie(),delta:ie()}),RO=at.extend({type:be(Ze.TEXT_MESSAGE_END),messageId:ie()}),OO=at.extend({type:be(Ze.TEXT_MESSAGE_CHUNK),messageId:ie().optional(),role:N1.optional(),delta:ie().optional(),name:ie().optional()}),DO=at.extend({type:be(Ze.THINKING_TEXT_MESSAGE_START)}),LO=E1.omit({messageId:!0,type:!0}).extend({type:be(Ze.THINKING_TEXT_MESSAGE_CONTENT)}),BO=at.extend({type:be(Ze.THINKING_TEXT_MESSAGE_END)}),UO=at.extend({type:be(Ze.TOOL_CALL_START),toolCallId:ie(),toolCallName:ie(),parentMessageId:ie().optional()}),IO=at.extend({type:be(Ze.TOOL_CALL_ARGS),toolCallId:ie(),delta:ie()}),HO=at.extend({type:be(Ze.TOOL_CALL_END),toolCallId:ie()}),qO=at.extend({messageId:ie(),type:be(Ze.TOOL_CALL_RESULT),toolCallId:ie(),content:ie(),role:be("tool").optional()}),VO=at.extend({type:be(Ze.TOOL_CALL_CHUNK),toolCallId:ie().optional(),toolCallName:ie().optional(),parentMessageId:ie().optional(),delta:ie().optional()}),GO=at.extend({type:be(Ze.THINKING_START),title:ie().optional()}),$O=at.extend({type:be(Ze.THINKING_END)}),ZO=at.extend({type:be(Ze.STATE_SNAPSHOT),snapshot:_O}),YO=at.extend({type:be(Ze.STATE_DELTA),delta:Qn(Nn())}),XO=at.extend({type:be(Ze.MESSAGES_SNAPSHOT),messages:Qn(k1)}),FO=at.extend({type:be(Ze.ACTIVITY_SNAPSHOT),messageId:ie(),activityType:ie(),content:Jr(Nn()),replace:Pe().optional().default(!0)}),QO=at.extend({type:be(Ze.ACTIVITY_DELTA),messageId:ie(),activityType:ie(),patch:Qn(Nn())}),KO=at.extend({type:be(Ze.RAW),event:Nn(),source:ie().optional()}),JO=at.extend({type:be(Ze.CUSTOM),name:ie(),value:Nn()}),PO=at.extend({type:be(Ze.RUN_STARTED),threadId:ie(),runId:ie(),parentRunId:ie().optional(),input:yO.optional()}),WO=at.extend({type:be(Ze.RUN_FINISHED),threadId:ie(),runId:ie(),result:Nn().optional()}),e5=at.extend({type:be(Ze.RUN_ERROR),message:ie(),code:ie().optional()}),t5=at.extend({type:be(Ze.STEP_STARTED),stepName:ie()}),n5=at.extend({type:be(Ze.STEP_FINISHED),stepName:ie()}),a5=Po([be("tool-call"),be("message")]),l5=at.extend({type:be(Ze.REASONING_START),messageId:ie()}),i5=at.extend({type:be(Ze.REASONING_MESSAGE_START),messageId:ie(),role:be("reasoning")}),r5=at.extend({type:be(Ze.REASONING_MESSAGE_CONTENT),messageId:ie(),delta:ie()}),s5=at.extend({type:be(Ze.REASONING_MESSAGE_END),messageId:ie()}),o5=at.extend({type:be(Ze.REASONING_MESSAGE_CHUNK),messageId:ie().optional(),delta:ie().optional()}),u5=at.extend({type:be(Ze.REASONING_END),messageId:ie()}),c5=at.extend({type:be(Ze.REASONING_ENCRYPTED_VALUE),subtype:a5,entityId:ie(),encryptedValue:ie()}),f5=Wo("type",[MO,E1,RO,OO,GO,$O,DO,LO,BO,UO,IO,HO,VO,qO,ZO,YO,XO,FO,QO,KO,JO,PO,WO,e5,t5,n5,l5,i5,r5,s5,o5,u5,c5]);function d5(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=f5.safeParse(a);if(!i.success)return"not-agui";switch(i.data.type){case Ze.TEXT_MESSAGE_CONTENT:case Ze.TEXT_MESSAGE_CHUNK:return{type:"data",content:i.data.delta??""};case Ze.RUN_ERROR:return{type:"data",content:`Error: ${i.data.message??"Unknown error"}`};default:return null}}function h5(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 m5(t,a){if(!t.startsWith("data: "))return null;const i=t.slice(6);if(a==="metadata")return{type:"metadata",content:i};const r=d5(i);return r!=="not-agui"?r:h5(i)}function p5(t,a,i,r){const[o,u]=R.useState([]),[c,h]=R.useState(!1),[m,p]=R.useState(null),y=R.useRef(null),_=async O=>{if(!(!O||c)){h(!0),u(k=>[...k,{role:"user",content:O},{role:"assistant",content:""}]);try{const k=r==="deployed"?`${t}/invocations?target=deployed`:`${t}/invocations`,z=await dn(k,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:O,...a?{agentName:a}:{},...y.current?{sessionId:y.current}:{},...i?{userId:i}:{}})});if(!z.ok){const ne=await z.text();u(Z=>{const U=[...Z];return U[U.length-1]={role:"assistant",content:ne||`Error: ${z.status}`,isError:!0},U});return}const w=z.headers.get("x-session-id");if(w&&(y.current=w,p(w)),!z.body){u(ne=>{const Z=[...ne];return Z[Z.length-1]={role:"assistant",content:"(empty response)"},Z});return}const Q=z.body.getReader(),$=new TextDecoder;let B="",J="",de=!1,he="",M=null;const ae=()=>{M=null,u(ne=>{const Z=[...ne];return Z[Z.length-1]={role:"assistant",content:J},Z})},le=()=>{M===null&&(M=requestAnimationFrame(ae))},pe=ne=>{if(ne.startsWith("event: ")||ne.startsWith("event:")){he=ne.slice(ne.indexOf(":")+1).trim();return}if(ne===""){he="";return}const Z=m5(ne,he);Z!==null&&(Z.type==="metadata"||(de=!0,J+=Z.content))};for(;;){const{done:ne,value:Z}=await Q.read();if(ne)break;B+=$.decode(Z,{stream:!0});const U=B.split(`
|
|
284
|
-
`);B
|
|
287
|
+
`),Z();break}case"metadata":{ae=$.usage;break}case"error":{z+=`
|
|
288
|
+
Error: ${$.message}`,Z();break}default:break}}}te!==null&&cancelAnimationFrame(te);const B=Object.keys(x.current).length>0?{...x.current}:void 0;x.current={},o(W=>{const ue=[...W];return ue[ue.length-1]={role:"assistant",content:z||(B?"":"(empty response)"),...B?{toolExecutions:B}:{},...ae?{tokenUsage:{inputTokens:ae.inputTokens,outputTokens:ae.outputTokens,totalTokens:ae.totalTokens}}:{}},ue})}catch(Y){const I=Y instanceof Error&&Y.message.includes("Failed to fetch")?"Connection failed — is the dev server running?":Y instanceof Error?Y.message:"Unknown error";o(U=>{const re=[...U];return re[re.length-1]={role:"assistant",content:I,isError:!0},re})}finally{c(!1)}},[t]),O=R.useCallback(async k=>{!k||u||!a||(x.current={},o(M=>[...M,{role:"user",content:k},{role:"assistant",content:""}]),await N({harnessName:a,prompt:k,...y.current?{sessionId:y.current}:{},...l?{userId:l}:{},harnessOverrides:g}))},[a,u,l,g,N]),D=R.useCallback(()=>{var k;(k=b.current)==null||k.abort(),b.current=null,o([]),m(null),y.current=null,x.current={},c(!1)},[]);return{messages:r,isStreaming:u,sessionId:d,harnessOverrides:g,setHarnessOverrides:_,sendMessage:O,resetChat:D}}function JR(t){const a=p1(t.resourceSpans,t.resourceLogs),l=g1(a),r=b1(a);return{traceId:t.traceId,timestamp:t.timestamp,sessionId:t.sessionId,spanCount:t.spanCount,spans:a,tree:l,userPrompt:r}}function PR(t){let a=null;for(const l of t){const r=l["@message"];if(!r)continue;const o=r.body??r,u=o.input;if(u!=null&&u.messages){const d=u.messages.find(_=>_.role==="user");if(!(d!=null&&d.content))continue;const m=d.content,g=typeof m=="string"?m:m.content;if(!g)continue;try{const _=JSON.parse(g);if(Array.isArray(_)){const y=_.filter(x=>x.text).map(x=>x.text);y.length>0&&(a=y.join(" "))}}catch{a=g}}if(r.eventName==="gen_ai.user.message"){const d=o.content;if(Array.isArray(d)){const m=d.filter(g=>g.text).map(g=>g.text);m.length>0&&(a=m.join(" "))}}}return a}function WR(t){const a=new Map;for(const l of t){const r=l["@message"];if(!r)continue;const o=r.spanId;if(!o)continue;const u=r.events;if(u&&Array.isArray(u)){const d=a.get(o)??[];d.push(...u),a.set(o,d);continue}const c=r.eventName;if(c){const d=a.get(o)??[],m=r.body;d.push({name:c,attributes:m??{},timeUnixNano:r.observedTimeUnixNano??r.timeUnixNano}),a.set(o,d)}}return a}function eO(t,a){const l=a?WR(a):new Map;return t.map(r=>{const o=r.startTimeUnixNano?BigInt(r.startTimeUnixNano):void 0,u=o?Number(o/BigInt(1e6)):0;return{type:"span",traceId:r.traceId,spanId:r.spanId,parentSpanId:r.parentSpanId,name:r.name,startTimeUnixNano:r.startTimeUnixNano,endTimeUnixNano:r.endTimeUnixNano,attributes:{...r.inputTokens!==null&&r.inputTokens!==void 0?{"gen_ai.usage.input_tokens":r.inputTokens}:{},...r.outputTokens!==null&&r.outputTokens!==void 0?{"gen_ai.usage.output_tokens":r.outputTokens}:{},...r.totalTokens!==null&&r.totalTokens!==void 0?{"gen_ai.usage.total_tokens":r.totalTokens}:{},...r.sessionId?{"session.id":r.sessionId}:{}},events:l.get(r.spanId),status:r.statusCode?{code:r.statusCode}:void 0,timestampMs:u}})}function tO(t,a){const l=Hn,[r,o]=R.useState([]),[u,c]=R.useState(null),[d,m]=R.useState(!1),[g,_]=R.useState(null),[y,x]=R.useState(null),b=R.useCallback(async()=>{m(!0),_(null);try{const j=new URLSearchParams;t&&j.set("agentName",t);const K=Date.now();j.set("startTime",String(K-720*60*1e3)),j.set("endTime",String(K));const I=await mn(`${l}/api/${a==="deployed"?"cloudwatch-traces":"traces"}?${j.toString()}`);if(I.status===404){x(!1),o([]);return}if(x(!0),a==="deployed"){const U=await I.json();if(U.success){const re=U.traces.map(async le=>{const te=await(await mn(`${l}/api/cloudwatch-traces/${encodeURIComponent(le.traceId)}?${j.toString()}`)).json();if(te.success&&te.spans){const ae=eO(te.spans,te.records),ge=g1(ae),ne=PR(te.records??[])??b1(ae);return{traceId:le.traceId,timestamp:le.timestamp,sessionId:le.sessionId,spanCount:le.spanCount,spans:ae,tree:ge,userPrompt:ne}}return{traceId:le.traceId,timestamp:le.timestamp,sessionId:le.sessionId,spanCount:le.spanCount,spans:[],tree:[],userPrompt:null}});o(await Promise.all(re))}else _(U.error),o([])}else{const U=await I.json();U.success?o(U.traces.map(JR)):(_(U.error),o([]))}}catch(j){_(j instanceof Error?j.message:"Failed to load traces"),o([])}finally{m(!1)}},[l,t,a]),N=r.find(j=>j.traceId===u)??null,O=R.useCallback(j=>{c(K=>K===j?K:j)},[]),D=R.useCallback(()=>{c(null)},[]),k=R.useCallback(()=>{b()},[b]),M=R.useCallback(()=>{setTimeout(()=>b(),1500),setTimeout(()=>b(),5e3)},[b]);return R.useEffect(()=>{o([]),c(null),_(null),b()},[b]),{invocations:r,selectedInvocation:N,isLoading:d,error:g,isAvailable:y,selectTrace:O,deselectTrace:D,refresh:k,onInvocationComplete:M}}let qf=1;function Ky(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 No(t,a,l,r,o){const u=o?`${t}/api/mcp?target=deployed`:`${t}/api/mcp`,c=await mn(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentName:a,body:l,sessionId:r})});if(!c.ok){const d=await c.text();throw new Error(`MCP proxy error (${c.status}): ${d}`)}return c.json()}function nO(t,a,l,r,o){const[u,c]=R.useState([]),[d,m]=R.useState(!1),[g,_]=R.useState(null),y=R.useRef(void 0),x=R.useRef(null);R.useEffect(()=>{c([]),_(null),y.current=void 0,x.current=null},[a]);const b=R.useCallback(D=>{if(x.current)return x.current;const k=(async()=>{const M=await No(t,D,{jsonrpc:"2.0",id:qf++,method:"initialize",params:{protocolVersion:"2025-03-26",capabilities:{},clientInfo:{name:"agentcore-inspector",version:"1.0.0"}}},void 0,o);if(!M.success)throw new Error(M.error??"Failed to initialize MCP session");y.current=M.sessionId,await No(t,D,{jsonrpc:"2.0",method:"notifications/initialized"},y.current,o)})().catch(M=>{throw x.current=null,M});return x.current=k,k},[t,o]),N=R.useCallback(async()=>{if(!(!a||l!=="MCP")){m(!0),_(null);try{await b(a);const D=await No(t,a,{jsonrpc:"2.0",id:qf++,method:"tools/list",params:{}},y.current,o);if(!D.success)throw new Error(D.error??"Failed to list tools");const M=Ky(D.result).result;c((M==null?void 0:M.tools)??[])}catch(D){_(D.message)}finally{m(!1)}}},[t,a,l,o,b]),O=R.useCallback(async(D,k)=>{if(!a)throw new Error("No agent selected");await b(a);const M=await No(t,a,{jsonrpc:"2.0",id:qf++,method:"tools/call",params:{name:D,arguments:k}},y.current,o);if(!M.success)throw new Error(M.error??"Tool call failed");const j=Ky(M.result),K=j.result,Y=j.error;if(Y)throw new Error(Y.message);return K??{content:[{type:"text",text:JSON.stringify(j)}]}},[t,a,b]);return R.useEffect(()=>{a&&l==="MCP"&&r&&N()},[a,l,r,N]),{tools:u,isLoading:d,error:g,fetchTools:N,callTool:O}}const aO=15e3;function lO(t){const[a,l]=R.useState(null),[r,o]=R.useState(!1),[u,c]=R.useState(null),d=R.useRef(void 0),m=R.useCallback(async()=>{o(g=>g||a===null),c(null);try{const _=await(await mn(`${t}/api/resources`)).json();_.success?l(_):c(_.error||"Failed to load resources")}catch(g){c(g instanceof Error?g.message:"Failed to load resources")}finally{o(!1)}},[t]);return R.useEffect(()=>(m(),d.current=setInterval(m,aO),()=>clearInterval(d.current)),[m]),{data:a,isLoading:r,error:u,fetch:m}}function iO(t){const[a,l]=R.useState(!1),[r,o]=R.useState(!1),[u,c]=R.useState(null),d=R.useCallback(async m=>{l(!0),o(!1),c(null);try{const _=await(await mn(`${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(g){return c(g instanceof Error?g.message:"Failed to start agent"),!1}finally{l(!1)}},[t]);return{isStarting:a,isReady:r,error:u,startAgent:d}}var We;(function(t){t.assertEqual=o=>{};function a(o){}t.assertIs=a;function l(o){throw new Error}t.assertNever=l,t.arrayToEnum=o=>{const u={};for(const c of o)u[c]=c;return u},t.getValidEnumValues=o=>{const u=t.objectKeys(o).filter(d=>typeof o[o[d]]!="number"),c={};for(const d of u)c[d]=o[d];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})(We||(We={}));var Jy;(function(t){t.mergeShapes=(a,l)=>({...a,...l})})(Jy||(Jy={}));const ve=We.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),fl=t=>{switch(typeof t){case"undefined":return ve.undefined;case"string":return ve.string;case"number":return Number.isNaN(t)?ve.nan:ve.number;case"boolean":return ve.boolean;case"function":return ve.function;case"bigint":return ve.bigint;case"symbol":return ve.symbol;case"object":return Array.isArray(t)?ve.array:t===null?ve.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?ve.promise:typeof Map<"u"&&t instanceof Map?ve.map:typeof Set<"u"&&t instanceof Set?ve.set:typeof Date<"u"&&t instanceof Date?ve.date:ve.object;default:return ve.unknown}},se=We.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 Ma 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 l=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,l):this.__proto__=l,this.name="ZodError",this.issues=a}format(a){const l=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(l(c));else{let d=r,m=0;for(;m<c.path.length;){const g=c.path[m];m===c.path.length-1?(d[g]=d[g]||{_errors:[]},d[g]._errors.push(l(c))):d[g]=d[g]||{_errors:[]},d=d[g],m++}}};return o(this),r}static assert(a){if(!(a instanceof Ma))throw new Error(`Not a ZodError: ${a}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,We.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(a=l=>l.message){const l={},r=[];for(const o of this.issues)if(o.path.length>0){const u=o.path[0];l[u]=l[u]||[],l[u].push(a(o))}else r.push(a(o));return{formErrors:r,fieldErrors:l}}get formErrors(){return this.flatten()}}Ma.create=t=>new Ma(t);const ad=(t,a)=>{let l;switch(t.code){case se.invalid_type:t.received===ve.undefined?l="Required":l=`Expected ${t.expected}, received ${t.received}`;break;case se.invalid_literal:l=`Invalid literal value, expected ${JSON.stringify(t.expected,We.jsonStringifyReplacer)}`;break;case se.unrecognized_keys:l=`Unrecognized key(s) in object: ${We.joinValues(t.keys,", ")}`;break;case se.invalid_union:l="Invalid input";break;case se.invalid_union_discriminator:l=`Invalid discriminator value. Expected ${We.joinValues(t.options)}`;break;case se.invalid_enum_value:l=`Invalid enum value. Expected ${We.joinValues(t.options)}, received '${t.received}'`;break;case se.invalid_arguments:l="Invalid function arguments";break;case se.invalid_return_type:l="Invalid function return type";break;case se.invalid_date:l="Invalid date";break;case se.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(l=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(l=`${l} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?l=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?l=`Invalid input: must end with "${t.validation.endsWith}"`:We.assertNever(t.validation):t.validation!=="regex"?l=`Invalid ${t.validation}`:l="Invalid";break;case se.too_small:t.type==="array"?l=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?l=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?l=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?l=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?l=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:l="Invalid input";break;case se.too_big:t.type==="array"?l=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?l=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?l=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?l=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?l=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:l="Invalid input";break;case se.custom:l="Invalid input";break;case se.invalid_intersection_types:l="Intersection results could not be merged";break;case se.not_multiple_of:l=`Number must be a multiple of ${t.multipleOf}`;break;case se.not_finite:l="Number must be finite";break;default:l=a.defaultError,We.assertNever(t)}return{message:l}};let rO=ad;function sO(){return rO}const oO=t=>{const{data:a,path:l,errorMaps:r,issueData:o}=t,u=[...l,...o.path||[]],c={...o,path:u};if(o.message!==void 0)return{...o,path:u,message:o.message};let d="";const m=r.filter(g=>!!g).slice().reverse();for(const g of m)d=g(c,{data:a,defaultError:d}).message;return{...o,path:u,message:d}};function ye(t,a){const l=sO(),r=oO({issueData:a,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,l,l===ad?void 0:ad].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,l){const r=[];for(const o of l){if(o.status==="aborted")return De;o.status==="dirty"&&a.dirty(),r.push(o.value)}return{status:a.value,value:r}}static async mergeObjectAsync(a,l){const r=[];for(const o of l){const u=await o.key,c=await o.value;r.push({key:u,value:c})}return nn.mergeObjectSync(a,r)}static mergeObjectSync(a,l){const r={};for(const o of l){const{key:u,value:c}=o;if(u.status==="aborted"||c.status==="aborted")return De;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 De=Object.freeze({status:"aborted"}),Hr=t=>({status:"dirty",value:t}),Vn=t=>({status:"valid",value:t}),Py=t=>t.status==="aborted",Wy=t=>t.status==="dirty",Oi=t=>t.status==="valid",Oo=t=>typeof Promise<"u"&&t instanceof Promise;var Te;(function(t){t.errToObj=a=>typeof a=="string"?{message:a}:a||{},t.toString=a=>typeof a=="string"?a:a==null?void 0:a.message})(Te||(Te={}));class ra{constructor(a,l,r,o){this._cachedPath=[],this.parent=a,this.data=l,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 e_=(t,a)=>{if(Oi(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 l=new Ma(t.common.issues);return this._error=l,this._error}}};function Ge(t){if(!t)return{};const{errorMap:a,invalid_type_error:l,required_error:r,description:o}=t;if(a&&(l||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,d)=>{const{message:m}=t;return c.code==="invalid_enum_value"?{message:m??d.defaultError}:typeof d.data>"u"?{message:m??r??d.defaultError}:c.code!=="invalid_type"?{message:d.defaultError}:{message:m??l??d.defaultError}},description:o}}class Ke{get description(){return this._def.description}_getType(a){return fl(a.data)}_getOrReturnCtx(a,l){return l||{common:a.parent.common,data:a.data,parsedType:fl(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:fl(a.data),schemaErrorMap:this._def.errorMap,path:a.path,parent:a.parent}}}_parseSync(a){const l=this._parse(a);if(Oo(l))throw new Error("Synchronous parse encountered promise.");return l}_parseAsync(a){const l=this._parse(a);return Promise.resolve(l)}parse(a,l){const r=this.safeParse(a,l);if(r.success)return r.data;throw r.error}safeParse(a,l){const r={common:{issues:[],async:(l==null?void 0:l.async)??!1,contextualErrorMap:l==null?void 0:l.errorMap},path:(l==null?void 0:l.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:a,parsedType:fl(a)},o=this._parseSync({data:a,path:r.path,parent:r});return e_(r,o)}"~validate"(a){var r,o;const l={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:a,parsedType:fl(a)};if(!this["~standard"].async)try{const u=this._parseSync({data:a,path:[],parent:l});return Oi(u)?{value:u.value}:{issues:l.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),l.common={issues:[],async:!0}}return this._parseAsync({data:a,path:[],parent:l}).then(u=>Oi(u)?{value:u.value}:{issues:l.common.issues})}async parseAsync(a,l){const r=await this.safeParseAsync(a,l);if(r.success)return r.data;throw r.error}async safeParseAsync(a,l){const r={common:{issues:[],contextualErrorMap:l==null?void 0:l.errorMap,async:!0},path:(l==null?void 0:l.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:a,parsedType:fl(a)},o=this._parse({data:a,path:r.path,parent:r}),u=await(Oo(o)?o:Promise.resolve(o));return e_(r,u)}refine(a,l){const r=o=>typeof l=="string"||typeof l>"u"?{message:l}:typeof l=="function"?l(o):l;return this._refinement((o,u)=>{const c=a(o),d=()=>u.addIssue({code:se.custom,...r(o)});return typeof Promise<"u"&&c instanceof Promise?c.then(m=>m?!0:(d(),!1)):c?!0:(d(),!1)})}refinement(a,l){return this._refinement((r,o)=>a(r)?!0:(o.addIssue(typeof l=="function"?l(r,o):l),!1))}_refinement(a){return new Hl({schema:this,typeName:Le.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:l=>this["~validate"](l)}}optional(){return ja.create(this,this._def)}nullable(){return ql.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ia.create(this)}promise(){return qo.create(this,this._def)}or(a){return Lo.create([this,a],this._def)}and(a){return Bo.create(this,a,this._def)}transform(a){return new Hl({...Ge(this._def),schema:this,typeName:Le.ZodEffects,effect:{type:"transform",transform:a}})}default(a){const l=typeof a=="function"?a:()=>a;return new Vo({...Ge(this._def),innerType:this,defaultValue:l,typeName:Le.ZodDefault})}brand(){return new N1({typeName:Le.ZodBranded,type:this,...Ge(this._def)})}catch(a){const l=typeof a=="function"?a:()=>a;return new Go({...Ge(this._def),innerType:this,catchValue:l,typeName:Le.ZodCatch})}describe(a){const l=this.constructor;return new l({...this._def,description:a})}pipe(a){return Id.create(this,a)}readonly(){return $o.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const uO=/^c[^\s-]{8,}$/i,cO=/^[0-9a-z]+$/,fO=/^[0-9A-HJKMNP-TV-Z]{26}$/i,dO=/^[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,hO=/^[a-z0-9_-]{21}$/i,mO=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,pO=/^[-+]?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)?)??$/,gO=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,yO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Vf;const _O=/^(?:(?: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])$/,vO=/^(?:(?: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])$/,xO=/^(([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]))$/,bO=/^(([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])$/,SO=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kO=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,S1="((\\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])))",TO=new RegExp(`^${S1}$`);function k1(t){let a="[0-5]\\d";t.precision?a=`${a}\\.\\d{${t.precision}}`:t.precision==null&&(a=`${a}(\\.\\d+)?`);const l=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${a})${l}`}function NO(t){return new RegExp(`^${k1(t)}$`)}function EO(t){let a=`${S1}T${k1(t)}`;const l=[];return l.push(t.local?"Z?":"Z"),t.offset&&l.push("([+-]\\d{2}:?\\d{2})"),a=`${a}(${l.join("|")})`,new RegExp(`^${a}$`)}function CO(t,a){return!!((a==="v4"||!a)&&_O.test(t)||(a==="v6"||!a)&&xO.test(t))}function AO(t,a){if(!mO.test(t))return!1;try{const[l]=t.split(".");if(!l)return!1;const r=l.replace(/-/g,"+").replace(/_/g,"/").padEnd(l.length+(4-l.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 jO(t,a){return!!((a==="v4"||!a)&&vO.test(t)||(a==="v6"||!a)&&bO.test(t))}class Aa extends Ke{_parse(a){if(this._def.coerce&&(a.data=String(a.data)),this._getType(a)!==ve.string){const u=this._getOrReturnCtx(a);return ye(u,{code:se.invalid_type,expected:ve.string,received:u.parsedType}),De}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),ye(o,{code:se.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),ye(o,{code:se.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,d=a.data.length<u.value;(c||d)&&(o=this._getOrReturnCtx(a,o),c?ye(o,{code:se.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}):d&&ye(o,{code:se.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}),r.dirty())}else if(u.kind==="email")gO.test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"email",code:se.invalid_string,message:u.message}),r.dirty());else if(u.kind==="emoji")Vf||(Vf=new RegExp(yO,"u")),Vf.test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"emoji",code:se.invalid_string,message:u.message}),r.dirty());else if(u.kind==="uuid")dO.test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"uuid",code:se.invalid_string,message:u.message}),r.dirty());else if(u.kind==="nanoid")hO.test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"nanoid",code:se.invalid_string,message:u.message}),r.dirty());else if(u.kind==="cuid")uO.test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"cuid",code:se.invalid_string,message:u.message}),r.dirty());else if(u.kind==="cuid2")cO.test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"cuid2",code:se.invalid_string,message:u.message}),r.dirty());else if(u.kind==="ulid")fO.test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"ulid",code:se.invalid_string,message:u.message}),r.dirty());else if(u.kind==="url")try{new URL(a.data)}catch{o=this._getOrReturnCtx(a,o),ye(o,{validation:"url",code:se.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),ye(o,{validation:"regex",code:se.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),ye(o,{code:se.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),ye(o,{code:se.invalid_string,validation:{startsWith:u.value},message:u.message}),r.dirty()):u.kind==="endsWith"?a.data.endsWith(u.value)||(o=this._getOrReturnCtx(a,o),ye(o,{code:se.invalid_string,validation:{endsWith:u.value},message:u.message}),r.dirty()):u.kind==="datetime"?EO(u).test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{code:se.invalid_string,validation:"datetime",message:u.message}),r.dirty()):u.kind==="date"?TO.test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{code:se.invalid_string,validation:"date",message:u.message}),r.dirty()):u.kind==="time"?NO(u).test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{code:se.invalid_string,validation:"time",message:u.message}),r.dirty()):u.kind==="duration"?pO.test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"duration",code:se.invalid_string,message:u.message}),r.dirty()):u.kind==="ip"?CO(a.data,u.version)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"ip",code:se.invalid_string,message:u.message}),r.dirty()):u.kind==="jwt"?AO(a.data,u.alg)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"jwt",code:se.invalid_string,message:u.message}),r.dirty()):u.kind==="cidr"?jO(a.data,u.version)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"cidr",code:se.invalid_string,message:u.message}),r.dirty()):u.kind==="base64"?SO.test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"base64",code:se.invalid_string,message:u.message}),r.dirty()):u.kind==="base64url"?kO.test(a.data)||(o=this._getOrReturnCtx(a,o),ye(o,{validation:"base64url",code:se.invalid_string,message:u.message}),r.dirty()):We.assertNever(u);return{status:r.value,value:a.data}}_regex(a,l,r){return this.refinement(o=>a.test(o),{validation:l,code:se.invalid_string,...Te.errToObj(r)})}_addCheck(a){return new Aa({...this._def,checks:[...this._def.checks,a]})}email(a){return this._addCheck({kind:"email",...Te.errToObj(a)})}url(a){return this._addCheck({kind:"url",...Te.errToObj(a)})}emoji(a){return this._addCheck({kind:"emoji",...Te.errToObj(a)})}uuid(a){return this._addCheck({kind:"uuid",...Te.errToObj(a)})}nanoid(a){return this._addCheck({kind:"nanoid",...Te.errToObj(a)})}cuid(a){return this._addCheck({kind:"cuid",...Te.errToObj(a)})}cuid2(a){return this._addCheck({kind:"cuid2",...Te.errToObj(a)})}ulid(a){return this._addCheck({kind:"ulid",...Te.errToObj(a)})}base64(a){return this._addCheck({kind:"base64",...Te.errToObj(a)})}base64url(a){return this._addCheck({kind:"base64url",...Te.errToObj(a)})}jwt(a){return this._addCheck({kind:"jwt",...Te.errToObj(a)})}ip(a){return this._addCheck({kind:"ip",...Te.errToObj(a)})}cidr(a){return this._addCheck({kind:"cidr",...Te.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,...Te.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,...Te.errToObj(a==null?void 0:a.message)})}duration(a){return this._addCheck({kind:"duration",...Te.errToObj(a)})}regex(a,l){return this._addCheck({kind:"regex",regex:a,...Te.errToObj(l)})}includes(a,l){return this._addCheck({kind:"includes",value:a,position:l==null?void 0:l.position,...Te.errToObj(l==null?void 0:l.message)})}startsWith(a,l){return this._addCheck({kind:"startsWith",value:a,...Te.errToObj(l)})}endsWith(a,l){return this._addCheck({kind:"endsWith",value:a,...Te.errToObj(l)})}min(a,l){return this._addCheck({kind:"min",value:a,...Te.errToObj(l)})}max(a,l){return this._addCheck({kind:"max",value:a,...Te.errToObj(l)})}length(a,l){return this._addCheck({kind:"length",value:a,...Te.errToObj(l)})}nonempty(a){return this.min(1,Te.errToObj(a))}trim(){return new Aa({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Aa({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Aa({...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 l of this._def.checks)l.kind==="min"&&(a===null||l.value>a)&&(a=l.value);return a}get maxLength(){let a=null;for(const l of this._def.checks)l.kind==="max"&&(a===null||l.value<a)&&(a=l.value);return a}}Aa.create=t=>new Aa({checks:[],typeName:Le.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...Ge(t)});function wO(t,a){const l=(t.toString().split(".")[1]||"").length,r=(a.toString().split(".")[1]||"").length,o=l>r?l:r,u=Number.parseInt(t.toFixed(o).replace(".","")),c=Number.parseInt(a.toFixed(o).replace(".",""));return u%c/10**o}class Di extends Ke{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)!==ve.number){const u=this._getOrReturnCtx(a);return ye(u,{code:se.invalid_type,expected:ve.number,received:u.parsedType}),De}let r;const o=new nn;for(const u of this._def.checks)u.kind==="int"?We.isInteger(a.data)||(r=this._getOrReturnCtx(a,r),ye(r,{code:se.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),ye(r,{code:se.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),ye(r,{code:se.too_big,maximum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),o.dirty()):u.kind==="multipleOf"?wO(a.data,u.value)!==0&&(r=this._getOrReturnCtx(a,r),ye(r,{code:se.not_multiple_of,multipleOf:u.value,message:u.message}),o.dirty()):u.kind==="finite"?Number.isFinite(a.data)||(r=this._getOrReturnCtx(a,r),ye(r,{code:se.not_finite,message:u.message}),o.dirty()):We.assertNever(u);return{status:o.value,value:a.data}}gte(a,l){return this.setLimit("min",a,!0,Te.toString(l))}gt(a,l){return this.setLimit("min",a,!1,Te.toString(l))}lte(a,l){return this.setLimit("max",a,!0,Te.toString(l))}lt(a,l){return this.setLimit("max",a,!1,Te.toString(l))}setLimit(a,l,r,o){return new Di({...this._def,checks:[...this._def.checks,{kind:a,value:l,inclusive:r,message:Te.toString(o)}]})}_addCheck(a){return new Di({...this._def,checks:[...this._def.checks,a]})}int(a){return this._addCheck({kind:"int",message:Te.toString(a)})}positive(a){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Te.toString(a)})}negative(a){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Te.toString(a)})}nonpositive(a){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Te.toString(a)})}nonnegative(a){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Te.toString(a)})}multipleOf(a,l){return this._addCheck({kind:"multipleOf",value:a,message:Te.toString(l)})}finite(a){return this._addCheck({kind:"finite",message:Te.toString(a)})}safe(a){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Te.toString(a)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Te.toString(a)})}get minValue(){let a=null;for(const l of this._def.checks)l.kind==="min"&&(a===null||l.value>a)&&(a=l.value);return a}get maxValue(){let a=null;for(const l of this._def.checks)l.kind==="max"&&(a===null||l.value<a)&&(a=l.value);return a}get isInt(){return!!this._def.checks.find(a=>a.kind==="int"||a.kind==="multipleOf"&&We.isInteger(a.value))}get isFinite(){let a=null,l=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(l===null||r.value>l)&&(l=r.value):r.kind==="max"&&(a===null||r.value<a)&&(a=r.value)}return Number.isFinite(l)&&Number.isFinite(a)}}Di.create=t=>new Di({checks:[],typeName:Le.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ge(t)});class Fr extends Ke{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)!==ve.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),ye(r,{code:se.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),ye(r,{code:se.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),ye(r,{code:se.not_multiple_of,multipleOf:u.value,message:u.message}),o.dirty()):We.assertNever(u);return{status:o.value,value:a.data}}_getInvalidInput(a){const l=this._getOrReturnCtx(a);return ye(l,{code:se.invalid_type,expected:ve.bigint,received:l.parsedType}),De}gte(a,l){return this.setLimit("min",a,!0,Te.toString(l))}gt(a,l){return this.setLimit("min",a,!1,Te.toString(l))}lte(a,l){return this.setLimit("max",a,!0,Te.toString(l))}lt(a,l){return this.setLimit("max",a,!1,Te.toString(l))}setLimit(a,l,r,o){return new Fr({...this._def,checks:[...this._def.checks,{kind:a,value:l,inclusive:r,message:Te.toString(o)}]})}_addCheck(a){return new Fr({...this._def,checks:[...this._def.checks,a]})}positive(a){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Te.toString(a)})}negative(a){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Te.toString(a)})}nonpositive(a){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Te.toString(a)})}nonnegative(a){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Te.toString(a)})}multipleOf(a,l){return this._addCheck({kind:"multipleOf",value:a,message:Te.toString(l)})}get minValue(){let a=null;for(const l of this._def.checks)l.kind==="min"&&(a===null||l.value>a)&&(a=l.value);return a}get maxValue(){let a=null;for(const l of this._def.checks)l.kind==="max"&&(a===null||l.value<a)&&(a=l.value);return a}}Fr.create=t=>new Fr({checks:[],typeName:Le.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...Ge(t)});class ld extends Ke{_parse(a){if(this._def.coerce&&(a.data=!!a.data),this._getType(a)!==ve.boolean){const r=this._getOrReturnCtx(a);return ye(r,{code:se.invalid_type,expected:ve.boolean,received:r.parsedType}),De}return Vn(a.data)}}ld.create=t=>new ld({typeName:Le.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ge(t)});class Do extends Ke{_parse(a){if(this._def.coerce&&(a.data=new Date(a.data)),this._getType(a)!==ve.date){const u=this._getOrReturnCtx(a);return ye(u,{code:se.invalid_type,expected:ve.date,received:u.parsedType}),De}if(Number.isNaN(a.data.getTime())){const u=this._getOrReturnCtx(a);return ye(u,{code:se.invalid_date}),De}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),ye(o,{code:se.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),ye(o,{code:se.too_big,message:u.message,inclusive:!0,exact:!1,maximum:u.value,type:"date"}),r.dirty()):We.assertNever(u);return{status:r.value,value:new Date(a.data.getTime())}}_addCheck(a){return new Do({...this._def,checks:[...this._def.checks,a]})}min(a,l){return this._addCheck({kind:"min",value:a.getTime(),message:Te.toString(l)})}max(a,l){return this._addCheck({kind:"max",value:a.getTime(),message:Te.toString(l)})}get minDate(){let a=null;for(const l of this._def.checks)l.kind==="min"&&(a===null||l.value>a)&&(a=l.value);return a!=null?new Date(a):null}get maxDate(){let a=null;for(const l of this._def.checks)l.kind==="max"&&(a===null||l.value<a)&&(a=l.value);return a!=null?new Date(a):null}}Do.create=t=>new Do({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Le.ZodDate,...Ge(t)});class t_ extends Ke{_parse(a){if(this._getType(a)!==ve.symbol){const r=this._getOrReturnCtx(a);return ye(r,{code:se.invalid_type,expected:ve.symbol,received:r.parsedType}),De}return Vn(a.data)}}t_.create=t=>new t_({typeName:Le.ZodSymbol,...Ge(t)});class id extends Ke{_parse(a){if(this._getType(a)!==ve.undefined){const r=this._getOrReturnCtx(a);return ye(r,{code:se.invalid_type,expected:ve.undefined,received:r.parsedType}),De}return Vn(a.data)}}id.create=t=>new id({typeName:Le.ZodUndefined,...Ge(t)});class rd extends Ke{_parse(a){if(this._getType(a)!==ve.null){const r=this._getOrReturnCtx(a);return ye(r,{code:se.invalid_type,expected:ve.null,received:r.parsedType}),De}return Vn(a.data)}}rd.create=t=>new rd({typeName:Le.ZodNull,...Ge(t)});class sd extends Ke{constructor(){super(...arguments),this._any=!0}_parse(a){return Vn(a.data)}}sd.create=t=>new sd({typeName:Le.ZodAny,...Ge(t)});class od extends Ke{constructor(){super(...arguments),this._unknown=!0}_parse(a){return Vn(a.data)}}od.create=t=>new od({typeName:Le.ZodUnknown,...Ge(t)});class hl extends Ke{_parse(a){const l=this._getOrReturnCtx(a);return ye(l,{code:se.invalid_type,expected:ve.never,received:l.parsedType}),De}}hl.create=t=>new hl({typeName:Le.ZodNever,...Ge(t)});class n_ extends Ke{_parse(a){if(this._getType(a)!==ve.undefined){const r=this._getOrReturnCtx(a);return ye(r,{code:se.invalid_type,expected:ve.void,received:r.parsedType}),De}return Vn(a.data)}}n_.create=t=>new n_({typeName:Le.ZodVoid,...Ge(t)});class ia extends Ke{_parse(a){const{ctx:l,status:r}=this._processInputParams(a),o=this._def;if(l.parsedType!==ve.array)return ye(l,{code:se.invalid_type,expected:ve.array,received:l.parsedType}),De;if(o.exactLength!==null){const c=l.data.length>o.exactLength.value,d=l.data.length<o.exactLength.value;(c||d)&&(ye(l,{code:c?se.too_big:se.too_small,minimum:d?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&&l.data.length<o.minLength.value&&(ye(l,{code:se.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),r.dirty()),o.maxLength!==null&&l.data.length>o.maxLength.value&&(ye(l,{code:se.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),r.dirty()),l.common.async)return Promise.all([...l.data].map((c,d)=>o.type._parseAsync(new ra(l,c,l.path,d)))).then(c=>nn.mergeArray(r,c));const u=[...l.data].map((c,d)=>o.type._parseSync(new ra(l,c,l.path,d)));return nn.mergeArray(r,u)}get element(){return this._def.type}min(a,l){return new ia({...this._def,minLength:{value:a,message:Te.toString(l)}})}max(a,l){return new ia({...this._def,maxLength:{value:a,message:Te.toString(l)}})}length(a,l){return new ia({...this._def,exactLength:{value:a,message:Te.toString(l)}})}nonempty(a){return this.min(1,a)}}ia.create=(t,a)=>new ia({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Le.ZodArray,...Ge(a)});function wi(t){if(t instanceof Rt){const a={};for(const l in t.shape){const r=t.shape[l];a[l]=ja.create(wi(r))}return new Rt({...t._def,shape:()=>a})}else return t instanceof ia?new ia({...t._def,type:wi(t.element)}):t instanceof ja?ja.create(wi(t.unwrap())):t instanceof ql?ql.create(wi(t.unwrap())):t instanceof Il?Il.create(t.items.map(a=>wi(a))):t}class Rt extends Ke{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(),l=We.objectKeys(a);return this._cached={shape:a,keys:l},this._cached}_parse(a){if(this._getType(a)!==ve.object){const g=this._getOrReturnCtx(a);return ye(g,{code:se.invalid_type,expected:ve.object,received:g.parsedType}),De}const{status:r,ctx:o}=this._processInputParams(a),{shape:u,keys:c}=this._getCached(),d=[];if(!(this._def.catchall instanceof hl&&this._def.unknownKeys==="strip"))for(const g in o.data)c.includes(g)||d.push(g);const m=[];for(const g of c){const _=u[g],y=o.data[g];m.push({key:{status:"valid",value:g},value:_._parse(new ra(o,y,o.path,g)),alwaysSet:g in o.data})}if(this._def.catchall instanceof hl){const g=this._def.unknownKeys;if(g==="passthrough")for(const _ of d)m.push({key:{status:"valid",value:_},value:{status:"valid",value:o.data[_]}});else if(g==="strict")d.length>0&&(ye(o,{code:se.unrecognized_keys,keys:d}),r.dirty());else if(g!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const g=this._def.catchall;for(const _ of d){const y=o.data[_];m.push({key:{status:"valid",value:_},value:g._parse(new ra(o,y,o.path,_)),alwaysSet:_ in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const g=[];for(const _ of m){const y=await _.key,x=await _.value;g.push({key:y,value:x,alwaysSet:_.alwaysSet})}return g}).then(g=>nn.mergeObjectSync(r,g)):nn.mergeObjectSync(r,m)}get shape(){return this._def.shape()}strict(a){return Te.errToObj,new Rt({...this._def,unknownKeys:"strict",...a!==void 0?{errorMap:(l,r)=>{var u,c;const o=((c=(u=this._def).errorMap)==null?void 0:c.call(u,l,r).message)??r.defaultError;return l.code==="unrecognized_keys"?{message:Te.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:Le.ZodObject})}setKey(a,l){return this.augment({[a]:l})}catchall(a){return new Rt({...this._def,catchall:a})}pick(a){const l={};for(const r of We.objectKeys(a))a[r]&&this.shape[r]&&(l[r]=this.shape[r]);return new Rt({...this._def,shape:()=>l})}omit(a){const l={};for(const r of We.objectKeys(this.shape))a[r]||(l[r]=this.shape[r]);return new Rt({...this._def,shape:()=>l})}deepPartial(){return wi(this)}partial(a){const l={};for(const r of We.objectKeys(this.shape)){const o=this.shape[r];a&&!a[r]?l[r]=o:l[r]=o.optional()}return new Rt({...this._def,shape:()=>l})}required(a){const l={};for(const r of We.objectKeys(this.shape))if(a&&!a[r])l[r]=this.shape[r];else{let u=this.shape[r];for(;u instanceof ja;)u=u._def.innerType;l[r]=u}return new Rt({...this._def,shape:()=>l})}keyof(){return T1(We.objectKeys(this.shape))}}Rt.create=(t,a)=>new Rt({shape:()=>t,unknownKeys:"strip",catchall:hl.create(),typeName:Le.ZodObject,...Ge(a)});Rt.strictCreate=(t,a)=>new Rt({shape:()=>t,unknownKeys:"strict",catchall:hl.create(),typeName:Le.ZodObject,...Ge(a)});Rt.lazycreate=(t,a)=>new Rt({shape:t,unknownKeys:"strip",catchall:hl.create(),typeName:Le.ZodObject,...Ge(a)});class Lo extends Ke{_parse(a){const{ctx:l}=this._processInputParams(a),r=this._def.options;function o(u){for(const d of u)if(d.result.status==="valid")return d.result;for(const d of u)if(d.result.status==="dirty")return l.common.issues.push(...d.ctx.common.issues),d.result;const c=u.map(d=>new Ma(d.ctx.common.issues));return ye(l,{code:se.invalid_union,unionErrors:c}),De}if(l.common.async)return Promise.all(r.map(async u=>{const c={...l,common:{...l.common,issues:[]},parent:null};return{result:await u._parseAsync({data:l.data,path:l.path,parent:c}),ctx:c}})).then(o);{let u;const c=[];for(const m of r){const g={...l,common:{...l.common,issues:[]},parent:null},_=m._parseSync({data:l.data,path:l.path,parent:g});if(_.status==="valid")return _;_.status==="dirty"&&!u&&(u={result:_,ctx:g}),g.common.issues.length&&c.push(g.common.issues)}if(u)return l.common.issues.push(...u.ctx.common.issues),u.result;const d=c.map(m=>new Ma(m));return ye(l,{code:se.invalid_union,unionErrors:d}),De}}get options(){return this._def.options}}Lo.create=(t,a)=>new Lo({options:t,typeName:Le.ZodUnion,...Ge(a)});const Ca=t=>t instanceof cd?Ca(t.schema):t instanceof Hl?Ca(t.innerType()):t instanceof Uo?[t.value]:t instanceof Ul?t.options:t instanceof Ho?We.objectValues(t.enum):t instanceof Vo?Ca(t._def.innerType):t instanceof id?[void 0]:t instanceof rd?[null]:t instanceof ja?[void 0,...Ca(t.unwrap())]:t instanceof ql?[null,...Ca(t.unwrap())]:t instanceof N1||t instanceof $o?Ca(t.unwrap()):t instanceof Go?Ca(t._def.innerType):[];class Bd extends Ke{_parse(a){const{ctx:l}=this._processInputParams(a);if(l.parsedType!==ve.object)return ye(l,{code:se.invalid_type,expected:ve.object,received:l.parsedType}),De;const r=this.discriminator,o=l.data[r],u=this.optionsMap.get(o);return u?l.common.async?u._parseAsync({data:l.data,path:l.path,parent:l}):u._parseSync({data:l.data,path:l.path,parent:l}):(ye(l,{code:se.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),De)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(a,l,r){const o=new Map;for(const u of l){const c=Ca(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 d of c){if(o.has(d))throw new Error(`Discriminator property ${String(a)} has duplicate value ${String(d)}`);o.set(d,u)}}return new Bd({typeName:Le.ZodDiscriminatedUnion,discriminator:a,options:l,optionsMap:o,...Ge(r)})}}function ud(t,a){const l=fl(t),r=fl(a);if(t===a)return{valid:!0,data:t};if(l===ve.object&&r===ve.object){const o=We.objectKeys(a),u=We.objectKeys(t).filter(d=>o.indexOf(d)!==-1),c={...t,...a};for(const d of u){const m=ud(t[d],a[d]);if(!m.valid)return{valid:!1};c[d]=m.data}return{valid:!0,data:c}}else if(l===ve.array&&r===ve.array){if(t.length!==a.length)return{valid:!1};const o=[];for(let u=0;u<t.length;u++){const c=t[u],d=a[u],m=ud(c,d);if(!m.valid)return{valid:!1};o.push(m.data)}return{valid:!0,data:o}}else return l===ve.date&&r===ve.date&&+t==+a?{valid:!0,data:t}:{valid:!1}}class Bo extends Ke{_parse(a){const{status:l,ctx:r}=this._processInputParams(a),o=(u,c)=>{if(Py(u)||Py(c))return De;const d=ud(u.value,c.value);return d.valid?((Wy(u)||Wy(c))&&l.dirty(),{status:l.value,value:d.data}):(ye(r,{code:se.invalid_intersection_types}),De)};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}))}}Bo.create=(t,a,l)=>new Bo({left:t,right:a,typeName:Le.ZodIntersection,...Ge(l)});class Il extends Ke{_parse(a){const{status:l,ctx:r}=this._processInputParams(a);if(r.parsedType!==ve.array)return ye(r,{code:se.invalid_type,expected:ve.array,received:r.parsedType}),De;if(r.data.length<this._def.items.length)return ye(r,{code:se.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),De;!this._def.rest&&r.data.length>this._def.items.length&&(ye(r,{code:se.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),l.dirty());const u=[...r.data].map((c,d)=>{const m=this._def.items[d]||this._def.rest;return m?m._parse(new ra(r,c,r.path,d)):null}).filter(c=>!!c);return r.common.async?Promise.all(u).then(c=>nn.mergeArray(l,c)):nn.mergeArray(l,u)}get items(){return this._def.items}rest(a){return new Il({...this._def,rest:a})}}Il.create=(t,a)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Il({items:t,typeName:Le.ZodTuple,rest:null,...Ge(a)})};class Io extends Ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(a){const{status:l,ctx:r}=this._processInputParams(a);if(r.parsedType!==ve.object)return ye(r,{code:se.invalid_type,expected:ve.object,received:r.parsedType}),De;const o=[],u=this._def.keyType,c=this._def.valueType;for(const d in r.data)o.push({key:u._parse(new ra(r,d,r.path,d)),value:c._parse(new ra(r,r.data[d],r.path,d)),alwaysSet:d in r.data});return r.common.async?nn.mergeObjectAsync(l,o):nn.mergeObjectSync(l,o)}get element(){return this._def.valueType}static create(a,l,r){return l instanceof Ke?new Io({keyType:a,valueType:l,typeName:Le.ZodRecord,...Ge(r)}):new Io({keyType:Aa.create(),valueType:a,typeName:Le.ZodRecord,...Ge(l)})}}class a_ extends Ke{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(a){const{status:l,ctx:r}=this._processInputParams(a);if(r.parsedType!==ve.map)return ye(r,{code:se.invalid_type,expected:ve.map,received:r.parsedType}),De;const o=this._def.keyType,u=this._def.valueType,c=[...r.data.entries()].map(([d,m],g)=>({key:o._parse(new ra(r,d,r.path,[g,"key"])),value:u._parse(new ra(r,m,r.path,[g,"value"]))}));if(r.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const m of c){const g=await m.key,_=await m.value;if(g.status==="aborted"||_.status==="aborted")return De;(g.status==="dirty"||_.status==="dirty")&&l.dirty(),d.set(g.value,_.value)}return{status:l.value,value:d}})}else{const d=new Map;for(const m of c){const g=m.key,_=m.value;if(g.status==="aborted"||_.status==="aborted")return De;(g.status==="dirty"||_.status==="dirty")&&l.dirty(),d.set(g.value,_.value)}return{status:l.value,value:d}}}}a_.create=(t,a,l)=>new a_({valueType:a,keyType:t,typeName:Le.ZodMap,...Ge(l)});class Xr extends Ke{_parse(a){const{status:l,ctx:r}=this._processInputParams(a);if(r.parsedType!==ve.set)return ye(r,{code:se.invalid_type,expected:ve.set,received:r.parsedType}),De;const o=this._def;o.minSize!==null&&r.data.size<o.minSize.value&&(ye(r,{code:se.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),l.dirty()),o.maxSize!==null&&r.data.size>o.maxSize.value&&(ye(r,{code:se.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),l.dirty());const u=this._def.valueType;function c(m){const g=new Set;for(const _ of m){if(_.status==="aborted")return De;_.status==="dirty"&&l.dirty(),g.add(_.value)}return{status:l.value,value:g}}const d=[...r.data.values()].map((m,g)=>u._parse(new ra(r,m,r.path,g)));return r.common.async?Promise.all(d).then(m=>c(m)):c(d)}min(a,l){return new Xr({...this._def,minSize:{value:a,message:Te.toString(l)}})}max(a,l){return new Xr({...this._def,maxSize:{value:a,message:Te.toString(l)}})}size(a,l){return this.min(a,l).max(a,l)}nonempty(a){return this.min(1,a)}}Xr.create=(t,a)=>new Xr({valueType:t,minSize:null,maxSize:null,typeName:Le.ZodSet,...Ge(a)});class cd extends Ke{get schema(){return this._def.getter()}_parse(a){const{ctx:l}=this._processInputParams(a);return this._def.getter()._parse({data:l.data,path:l.path,parent:l})}}cd.create=(t,a)=>new cd({getter:t,typeName:Le.ZodLazy,...Ge(a)});class Uo extends Ke{_parse(a){if(a.data!==this._def.value){const l=this._getOrReturnCtx(a);return ye(l,{received:l.data,code:se.invalid_literal,expected:this._def.value}),De}return{status:"valid",value:a.data}}get value(){return this._def.value}}Uo.create=(t,a)=>new Uo({value:t,typeName:Le.ZodLiteral,...Ge(a)});function T1(t,a){return new Ul({values:t,typeName:Le.ZodEnum,...Ge(a)})}class Ul extends Ke{_parse(a){if(typeof a.data!="string"){const l=this._getOrReturnCtx(a),r=this._def.values;return ye(l,{expected:We.joinValues(r),received:l.parsedType,code:se.invalid_type}),De}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(a.data)){const l=this._getOrReturnCtx(a),r=this._def.values;return ye(l,{received:l.data,code:se.invalid_enum_value,options:r}),De}return Vn(a.data)}get options(){return this._def.values}get enum(){const a={};for(const l of this._def.values)a[l]=l;return a}get Values(){const a={};for(const l of this._def.values)a[l]=l;return a}get Enum(){const a={};for(const l of this._def.values)a[l]=l;return a}extract(a,l=this._def){return Ul.create(a,{...this._def,...l})}exclude(a,l=this._def){return Ul.create(this.options.filter(r=>!a.includes(r)),{...this._def,...l})}}Ul.create=T1;class Ho extends Ke{_parse(a){const l=We.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(a);if(r.parsedType!==ve.string&&r.parsedType!==ve.number){const o=We.objectValues(l);return ye(r,{expected:We.joinValues(o),received:r.parsedType,code:se.invalid_type}),De}if(this._cache||(this._cache=new Set(We.getValidEnumValues(this._def.values))),!this._cache.has(a.data)){const o=We.objectValues(l);return ye(r,{received:r.data,code:se.invalid_enum_value,options:o}),De}return Vn(a.data)}get enum(){return this._def.values}}Ho.create=(t,a)=>new Ho({values:t,typeName:Le.ZodNativeEnum,...Ge(a)});class qo extends Ke{unwrap(){return this._def.type}_parse(a){const{ctx:l}=this._processInputParams(a);if(l.parsedType!==ve.promise&&l.common.async===!1)return ye(l,{code:se.invalid_type,expected:ve.promise,received:l.parsedType}),De;const r=l.parsedType===ve.promise?l.data:Promise.resolve(l.data);return Vn(r.then(o=>this._def.type.parseAsync(o,{path:l.path,errorMap:l.common.contextualErrorMap})))}}qo.create=(t,a)=>new qo({type:t,typeName:Le.ZodPromise,...Ge(a)});class Hl extends Ke{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Le.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(a){const{status:l,ctx:r}=this._processInputParams(a),o=this._def.effect||null,u={addIssue:c=>{ye(r,c),c.fatal?l.abort():l.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 d=>{if(l.value==="aborted")return De;const m=await this._def.schema._parseAsync({data:d,path:r.path,parent:r});return m.status==="aborted"?De:m.status==="dirty"||l.value==="dirty"?Hr(m.value):m});{if(l.value==="aborted")return De;const d=this._def.schema._parseSync({data:c,path:r.path,parent:r});return d.status==="aborted"?De:d.status==="dirty"||l.value==="dirty"?Hr(d.value):d}}if(o.type==="refinement"){const c=d=>{const m=o.refinement(d,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 d};if(r.common.async===!1){const d=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return d.status==="aborted"?De:(d.status==="dirty"&&l.dirty(),c(d.value),{status:l.value,value:d.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(d=>d.status==="aborted"?De:(d.status==="dirty"&&l.dirty(),c(d.value).then(()=>({status:l.value,value:d.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(!Oi(c))return De;const d=o.transform(c.value,u);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:l.value,value:d}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(c=>Oi(c)?Promise.resolve(o.transform(c.value,u)).then(d=>({status:l.value,value:d})):De);We.assertNever(o)}}Hl.create=(t,a,l)=>new Hl({schema:t,typeName:Le.ZodEffects,effect:a,...Ge(l)});Hl.createWithPreprocess=(t,a,l)=>new Hl({schema:a,effect:{type:"preprocess",transform:t},typeName:Le.ZodEffects,...Ge(l)});class ja extends Ke{_parse(a){return this._getType(a)===ve.undefined?Vn(void 0):this._def.innerType._parse(a)}unwrap(){return this._def.innerType}}ja.create=(t,a)=>new ja({innerType:t,typeName:Le.ZodOptional,...Ge(a)});class ql extends Ke{_parse(a){return this._getType(a)===ve.null?Vn(null):this._def.innerType._parse(a)}unwrap(){return this._def.innerType}}ql.create=(t,a)=>new ql({innerType:t,typeName:Le.ZodNullable,...Ge(a)});class Vo extends Ke{_parse(a){const{ctx:l}=this._processInputParams(a);let r=l.data;return l.parsedType===ve.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:l.path,parent:l})}removeDefault(){return this._def.innerType}}Vo.create=(t,a)=>new Vo({innerType:t,typeName:Le.ZodDefault,defaultValue:typeof a.default=="function"?a.default:()=>a.default,...Ge(a)});class Go extends Ke{_parse(a){const{ctx:l}=this._processInputParams(a),r={...l,common:{...l.common,issues:[]}},o=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Oo(o)?o.then(u=>({status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new Ma(r.common.issues)},input:r.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Ma(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Go.create=(t,a)=>new Go({innerType:t,typeName:Le.ZodCatch,catchValue:typeof a.catch=="function"?a.catch:()=>a.catch,...Ge(a)});class l_ extends Ke{_parse(a){if(this._getType(a)!==ve.nan){const r=this._getOrReturnCtx(a);return ye(r,{code:se.invalid_type,expected:ve.nan,received:r.parsedType}),De}return{status:"valid",value:a.data}}}l_.create=t=>new l_({typeName:Le.ZodNaN,...Ge(t)});class N1 extends Ke{_parse(a){const{ctx:l}=this._processInputParams(a),r=l.data;return this._def.type._parse({data:r,path:l.path,parent:l})}unwrap(){return this._def.type}}class Id extends Ke{_parse(a){const{status:l,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"?De:u.status==="dirty"?(l.dirty(),Hr(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"?De:o.status==="dirty"?(l.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:r.path,parent:r})}}static create(a,l){return new Id({in:a,out:l,typeName:Le.ZodPipeline})}}class $o extends Ke{_parse(a){const l=this._def.innerType._parse(a),r=o=>(Oi(o)&&(o.value=Object.freeze(o.value)),o);return Oo(l)?l.then(o=>r(o)):r(l)}unwrap(){return this._def.innerType}}$o.create=(t,a)=>new $o({innerType:t,typeName:Le.ZodReadonly,...Ge(a)});var Le;(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"})(Le||(Le={}));const ie=Aa.create,fd=Di.create,et=ld.create,En=sd.create,Ui=od.create;hl.create;const Qn=ia.create,it=Rt.create,Wo=Lo.create,eu=Bd.create;Bo.create;Il.create;const Pr=Io.create,Se=Uo.create;Ul.create;const MO=Ho.create;qo.create;ja.create;ql.create;const zO=it({name:ie(),arguments:ie()}),RO=it({id:ie(),type:Se("function"),function:zO,encryptedValue:ie().optional()}),tu=it({id:ie(),role:ie(),content:ie().optional(),name:ie().optional(),encryptedValue:ie().optional()}),OO=it({type:Se("text"),text:ie()}),DO=it({type:Se("data"),value:ie(),mimeType:ie()}),LO=it({type:Se("url"),value:ie(),mimeType:ie().optional()}),nu=eu("type",[DO,LO]),BO=it({type:Se("image"),source:nu,metadata:Ui().optional()}),IO=it({type:Se("audio"),source:nu,metadata:Ui().optional()}),UO=it({type:Se("video"),source:nu,metadata:Ui().optional()}),HO=it({type:Se("document"),source:nu,metadata:Ui().optional()}),E1=it({type:Se("binary"),mimeType:ie(),id:ie().optional(),url:ie().optional(),data:ie().optional(),filename:ie().optional()}),C1=(t,a)=>{!t.id&&!t.url&&!t.data&&a.addIssue({code:se.custom,message:"BinaryInputContent requires at least one of id, url, or data.",path:["id"]})};E1.superRefine((t,a)=>{C1(t,a)});const qO=eu("type",[OO,BO,IO,UO,HO,E1]),VO=qO.superRefine((t,a)=>{t.type==="binary"&&C1(t,a)}),GO=tu.extend({role:Se("developer"),content:ie()}),$O=tu.extend({role:Se("system"),content:ie()}),ZO=tu.extend({role:Se("assistant"),content:ie().optional(),toolCalls:Qn(RO).optional()}),YO=tu.extend({role:Se("user"),content:Wo([ie(),Qn(VO)])}),FO=it({id:ie(),content:ie(),role:Se("tool"),toolCallId:ie(),error:ie().optional(),encryptedValue:ie().optional()}),XO=it({id:ie(),role:Se("activity"),activityType:ie(),content:Pr(En())}),QO=it({id:ie(),role:Se("reasoning"),content:ie(),encryptedValue:ie().optional()}),A1=eu("role",[GO,$O,ZO,YO,FO,XO,QO]);Wo([Se("developer"),Se("system"),Se("assistant"),Se("user"),Se("tool"),Se("activity"),Se("reasoning")]);const KO=it({description:ie(),value:ie()}),j1=it({name:ie(),description:ie(),parameters:En(),metadata:Pr(En()).optional()}),JO=it({threadId:ie(),runId:ie(),parentRunId:ie().optional(),state:En(),messages:Qn(A1),tools:Qn(j1),context:Qn(KO),forwardedProps:En()}),PO=En(),WO=it({name:ie(),description:ie().optional()}),e5=it({name:ie().optional(),type:ie().optional(),description:ie().optional(),version:ie().optional(),provider:ie().optional(),documentationUrl:ie().optional(),metadata:Pr(Ui()).optional()}),t5=it({streaming:et().optional(),websocket:et().optional(),httpBinary:et().optional(),pushNotifications:et().optional(),resumable:et().optional()}),n5=it({supported:et().optional(),items:Qn(j1).optional(),parallelCalls:et().optional(),clientProvided:et().optional()}),a5=it({structuredOutput:et().optional(),supportedMimeTypes:Qn(ie()).optional()}),l5=it({snapshots:et().optional(),deltas:et().optional(),memory:et().optional(),persistentState:et().optional()}),i5=it({supported:et().optional(),delegation:et().optional(),handoffs:et().optional(),subAgents:Qn(WO).optional()}),r5=it({supported:et().optional(),streaming:et().optional(),encrypted:et().optional()}),s5=it({image:et().optional(),audio:et().optional(),video:et().optional(),pdf:et().optional(),file:et().optional()}),o5=it({image:et().optional(),audio:et().optional()}),u5=it({input:s5.optional(),output:o5.optional()}),c5=it({codeExecution:et().optional(),sandboxed:et().optional(),maxIterations:fd().optional(),maxExecutionTime:fd().optional()}),f5=it({supported:et().optional(),approvals:et().optional(),interventions:et().optional(),feedback:et().optional()});it({identity:e5.optional(),transport:t5.optional(),tools:n5.optional(),output:a5.optional(),state:l5.optional(),multiAgent:i5.optional(),reasoning:r5.optional(),multimodal:u5.optional(),execution:c5.optional(),humanInTheLoop:f5.optional(),custom:Pr(Ui()).optional()});const w1=Wo([Se("developer"),Se("system"),Se("assistant"),Se("user")]);let Fe=(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 rt=it({type:MO(Fe),timestamp:fd().optional(),rawEvent:En().optional()}).passthrough(),d5=rt.extend({type:Se(Fe.TEXT_MESSAGE_START),messageId:ie(),role:w1.default("assistant"),name:ie().optional()}),M1=rt.extend({type:Se(Fe.TEXT_MESSAGE_CONTENT),messageId:ie(),delta:ie()}),h5=rt.extend({type:Se(Fe.TEXT_MESSAGE_END),messageId:ie()}),m5=rt.extend({type:Se(Fe.TEXT_MESSAGE_CHUNK),messageId:ie().optional(),role:w1.optional(),delta:ie().optional(),name:ie().optional()}),p5=rt.extend({type:Se(Fe.THINKING_TEXT_MESSAGE_START)}),g5=M1.omit({messageId:!0,type:!0}).extend({type:Se(Fe.THINKING_TEXT_MESSAGE_CONTENT)}),y5=rt.extend({type:Se(Fe.THINKING_TEXT_MESSAGE_END)}),_5=rt.extend({type:Se(Fe.TOOL_CALL_START),toolCallId:ie(),toolCallName:ie(),parentMessageId:ie().optional()}),v5=rt.extend({type:Se(Fe.TOOL_CALL_ARGS),toolCallId:ie(),delta:ie()}),x5=rt.extend({type:Se(Fe.TOOL_CALL_END),toolCallId:ie()}),b5=rt.extend({messageId:ie(),type:Se(Fe.TOOL_CALL_RESULT),toolCallId:ie(),content:ie(),role:Se("tool").optional()}),S5=rt.extend({type:Se(Fe.TOOL_CALL_CHUNK),toolCallId:ie().optional(),toolCallName:ie().optional(),parentMessageId:ie().optional(),delta:ie().optional()}),k5=rt.extend({type:Se(Fe.THINKING_START),title:ie().optional()}),T5=rt.extend({type:Se(Fe.THINKING_END)}),N5=rt.extend({type:Se(Fe.STATE_SNAPSHOT),snapshot:PO}),E5=rt.extend({type:Se(Fe.STATE_DELTA),delta:Qn(En())}),C5=rt.extend({type:Se(Fe.MESSAGES_SNAPSHOT),messages:Qn(A1)}),A5=rt.extend({type:Se(Fe.ACTIVITY_SNAPSHOT),messageId:ie(),activityType:ie(),content:Pr(En()),replace:et().optional().default(!0)}),j5=rt.extend({type:Se(Fe.ACTIVITY_DELTA),messageId:ie(),activityType:ie(),patch:Qn(En())}),w5=rt.extend({type:Se(Fe.RAW),event:En(),source:ie().optional()}),M5=rt.extend({type:Se(Fe.CUSTOM),name:ie(),value:En()}),z5=rt.extend({type:Se(Fe.RUN_STARTED),threadId:ie(),runId:ie(),parentRunId:ie().optional(),input:JO.optional()}),R5=rt.extend({type:Se(Fe.RUN_FINISHED),threadId:ie(),runId:ie(),result:En().optional()}),O5=rt.extend({type:Se(Fe.RUN_ERROR),message:ie(),code:ie().optional()}),D5=rt.extend({type:Se(Fe.STEP_STARTED),stepName:ie()}),L5=rt.extend({type:Se(Fe.STEP_FINISHED),stepName:ie()}),B5=Wo([Se("tool-call"),Se("message")]),I5=rt.extend({type:Se(Fe.REASONING_START),messageId:ie()}),U5=rt.extend({type:Se(Fe.REASONING_MESSAGE_START),messageId:ie(),role:Se("reasoning")}),H5=rt.extend({type:Se(Fe.REASONING_MESSAGE_CONTENT),messageId:ie(),delta:ie()}),q5=rt.extend({type:Se(Fe.REASONING_MESSAGE_END),messageId:ie()}),V5=rt.extend({type:Se(Fe.REASONING_MESSAGE_CHUNK),messageId:ie().optional(),delta:ie().optional()}),G5=rt.extend({type:Se(Fe.REASONING_END),messageId:ie()}),$5=rt.extend({type:Se(Fe.REASONING_ENCRYPTED_VALUE),subtype:B5,entityId:ie(),encryptedValue:ie()}),Z5=eu("type",[d5,M1,h5,m5,k5,T5,p5,g5,y5,_5,v5,x5,S5,b5,N5,E5,C5,A5,j5,w5,M5,z5,R5,O5,D5,L5,I5,U5,H5,q5,V5,G5,$5]);function Y5(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 l=Z5.safeParse(a);if(!l.success)return"not-agui";switch(l.data.type){case Fe.TEXT_MESSAGE_CONTENT:case Fe.TEXT_MESSAGE_CHUNK:return{type:"data",content:l.data.delta??""};case Fe.RUN_ERROR:return{type:"data",content:`Error: ${l.data.message??"Unknown error"}`};default:return null}}function F5(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 X5(t,a){if(!t.startsWith("data: "))return null;const l=t.slice(6);if(a==="metadata")return{type:"metadata",content:l};const r=Y5(l);return r!=="not-agui"?r:F5(l)}function Q5(t,a,l,r){const[o,u]=R.useState([]),[c,d]=R.useState(!1),[m,g]=R.useState(null),_=R.useRef(null),y=async D=>{if(!(!D||c)){d(!0),u(k=>[...k,{role:"user",content:D},{role:"assistant",content:""}]);try{const k=r==="deployed"?`${t}/invocations?target=deployed`:`${t}/invocations`,M=await mn(k,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:D,...a?{agentName:a}:{},..._.current?{sessionId:_.current}:{},...l?{userId:l}:{}})});if(!M.ok){const ne=await M.text();u(Z=>{const B=[...Z];return B[B.length-1]={role:"assistant",content:ne||`Error: ${M.status}`,isError:!0},B});return}const j=M.headers.get("x-session-id");if(j&&(_.current=j,g(j)),!M.body){u(ne=>{const Z=[...ne];return Z[Z.length-1]={role:"assistant",content:"(empty response)"},Z});return}const K=M.body.getReader(),Y=new TextDecoder;let I="",U="",re=!1,le="",z=null;const te=()=>{z=null,u(ne=>{const Z=[...ne];return Z[Z.length-1]={role:"assistant",content:U},Z})},ae=()=>{z===null&&(z=requestAnimationFrame(te))},ge=ne=>{if(ne.startsWith("event: ")||ne.startsWith("event:")){le=ne.slice(ne.indexOf(":")+1).trim();return}if(ne===""){le="";return}const Z=X5(ne,le);Z!==null&&(Z.type==="metadata"||(re=!0,U+=Z.content))};for(;;){const{done:ne,value:Z}=await K.read();if(ne)break;I+=Y.decode(Z,{stream:!0});const B=I.split(`
|
|
289
|
+
`);I=B.pop()||"";for(const W of B)ge(W);re&&ae()}if(z!==null&&cancelAnimationFrame(z),I&&ge(I),!re){const ne=U||I||Y.decode();try{const Z=JSON.parse(ne);U=Z.result!==null&&Z.result!==void 0?typeof Z.result=="string"?Z.result:JSON.stringify(Z.result,null,2):JSON.stringify(Z,null,2)}catch{U=ne}}u(ne=>{const Z=[...ne];return Z[Z.length-1]={role:"assistant",content:U||"(empty response)"},Z})}catch(k){const M=k instanceof Error&&k.message.includes("Failed to fetch")?"Connection failed — is the agent server running?":k instanceof Error?k.message:"Unknown error";u(j=>{const K=[...j];return K[K.length-1]={role:"assistant",content:M,isError:!0},K})}finally{d(!1)}}},x=R.useCallback((...D)=>{u(k=>[...k,...D])},[]),b=R.useCallback((D,k,M)=>{u(j=>{const K=[...j];for(let Y=K.length-1;Y>=0;Y--)if(K[Y].role==="assistant"&&!K[Y].toolCalls){K[Y]={...K[Y],toolCalls:D,traceId:k,...M?{tokenUsage:M}:{}};break}return K})},[]);return{messages:o,isStreaming:c,sessionId:m,sendMessage:y,resetChat:()=>{u([]),g(null),_.current=null},addMessages:x,enrichLastAssistantMessage:b,setExternalSessionId:D=>{_.current=D,g(D)}}}function K5(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 l=new Set(a.map(y=>y.spanId).filter(Boolean));let r=a.filter(y=>!y.parentSpanId||!l.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,d=0,m=0,g=!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),d+=Number(x["gen_ai.usage.total_tokens"]??0),x["gen_ai.usage.cache_read.input_tokens"]!==void 0&&(g=!0,m+=Number(x["gen_ai.usage.cache_read.input_tokens"])),_||(_=x["gen_ai.response.model"]??x["gen_ai.request.model"])}return d===0&&(d=u+c),{inputTokens:u,outputTokens:c,totalTokens:d,...g?{cacheReadInputTokens:m}:{},model:_}}function i_(t,a){var o;const l=t.attributes;if(!Array.isArray(l))return;const r=l.find(u=>u.key===a);return(o=r==null?void 0:r.value)==null?void 0:o.stringValue}function J5(t){if(!t||!Array.isArray(t))return{};let a,l;for(const r of t){const o=r,u=o.name;u==="gen_ai.tool.message"?a=a??i_(o,"content"):u==="gen_ai.choice"&&(l=l??i_(o,"message"))}return{input:a,output:l}}function P5(t){if(t.type!=="span")return!1;const a=(t.name??"").toLowerCase(),l=t.attributes??{};return a==="tool_use"||a==="tool_call"||a.startsWith("execute_tool")||!!l["tool.name"]||!!l["gen_ai.tool.name"]}function W5(t){const a=t.filter(P5),l=new Set(a.map(r=>r.spanId).filter(Boolean));return a.filter(r=>!r.parentSpanId||!l.has(r.parentSpanId)).map(r=>{const o=r.attributes??{},u=qt(r.startTimeUnixNano),c=qt(r.endTimeUnixNano);let d=o["gen_ai.tool.call.arguments"],m=o["gen_ai.tool.call.result"];if(!d||!m){const g=J5(r.events);d=d??g.input,m=m??g.output}return{name:o["gen_ai.tool.name"]??o["tool.name"]??r.name??"unknown",input:d,output:m,durationMs:u&&c?c-u:void 0,spanId:r.spanId??"",traceId:r.traceId??""}})}function e6(){var Q,ce;const{agents:t,harnesses:a,errors:l,selectedAgent:r,isConnected:o,hasConnected:u}=YR(Hn),[c,d]=R.useState(void 0),[m,g]=R.useState(void 0),[_,y]=R.useState("local"),{isStarting:x,isReady:b,error:N,startAgent:O}=iO(Hn),D=lO(Hn),[k,M]=R.useState(!0),j=t.find(de=>de.name===c)??t[0],K=a.find(de=>de.name===m),Y=K!==void 0,I=l.find(de=>de.name===(j==null?void 0:j.name)),U=_==="deployed",re=(Q=D.data)==null?void 0:Q.agents.find(de=>de.name===(j==null?void 0:j.name)),le=(ce=D.data)==null?void 0:ce.harnesses.find(de=>de.name===(K==null?void 0:K.name)),z=(re==null?void 0:re.deploymentStatus)==="deployed",te=!Y&&!U&&t.length>0&&(x||!b&&!N&&!I),ae=async de=>{const we=c;d(de),g(void 0),y("local"),E(),J.resetChat(),await O(de)||d(we)},ge=de=>{g(de),d(void 0),E(),J.resetChat()},ne=de=>{y(de),E()};R.useEffect(()=>{if(t.length>0&&!c&&!m&&!b&&!x&&!N&&!I){const de=t.find(we=>we.name===r)??t[0];O(de.name).then(we=>{we&&d(de.name)})}},[t,c,m,b,x,N,O,I,r]),R.useEffect(()=>{t.length===0&&a.length>0&&!c&&!m&&g(a[0].name)},[t,a,c,m]);const[Z]=R.useState("default-user"),{messages:B,isStreaming:W,sessionId:ue,sendMessage:Ne,resetChat:E,addMessages:C,enrichLastAssistantMessage:$,setExternalSessionId:T}=Q5(Hn,j==null?void 0:j.name,Z,_),J=KR(Hn,K==null?void 0:K.name,Z),me=R.useRef(null);R.useEffect(()=>{if(!le){me.current=null;return}if(me.current===le.name)return;me.current=le.name;const de=le.skills;if(!de||de.length===0)return;const we=de.map(Me=>{var Ft;return"s3"in Me||"awsSkills"in Me?Me:"git"in Me?{git:{url:Me.git.url,...Me.git.path&&{path:Me.git.path},...((Ft=Me.git.auth)==null?void 0:Ft.credentialArn)&&{auth:{credentialArn:Me.git.auth.credentialArn,username:Me.git.auth.username}}}}:Me});J.setHarnessOverrides({skills:we})},[le]);const X=Y?J.messages:B,_e=Y?J.isStreaming:W,He=Y?J.sessionId:ue,fe=Y?J.sendMessage:Ne,ct=Y?J.resetChat:E,{tools:Bt,isLoading:an,error:Kn,fetchTools:pe,callTool:_t}=nO(Hn,j==null?void 0:j.name,j==null?void 0:j.protocol,b,_==="deployed"),{card:St,isLoading:Cn,error:pl,fetchCard:Oa}=ZR(Hn,j==null?void 0:j.name,j==null?void 0:j.protocol,b),Da=R.useCallback((de,we,Me)=>{C({role:"user",content:de},{role:"assistant",content:we,isError:Me})},[C]),{containerRef:gl,forceScrollToBottom:Hi}=XR(X,_e),Jn=tO(j==null?void 0:j.name,_),It=R.useRef(!1);R.useEffect(()=>{It.current&&!_e&&Jn.onInvocationComplete(),It.current=_e},[_e,Jn.onInvocationComplete]);const yl=R.useRef(new Set);return R.useEffect(()=>{yl.current.clear()},[c]),R.useEffect(()=>{if(Jn.invocations.length===0)return;const de=Jn.invocations[0];if(yl.current.has(de.traceId))return;const we=W5(de.spans),Me=K5(de.spans);(we.length>0||Me)&&(yl.current.add(de.traceId),$(we,de.traceId,Me??void 0))},[Jn.invocations,$]),p.jsxs("div",{className:"appLayout",children:[p.jsxs("div",{className:"app",children:[p.jsx(Ik,{isConnected:o,hasConnected:u,hasError:!!I||!!N,onToggleResources:()=>M(de=>!de),isResourcesOpen:k}),I&&!Y&&p.jsx("div",{className:"startError",children:p.jsx(Zf,{content:I.message})}),N&&!I&&!Y&&p.jsx("div",{className:"startError",children:p.jsx(Zf,{content:N})}),u&&!o?p.jsxs("div",{className:"disconnectedView",children:[p.jsx("div",{className:"disconnectedIcon",children:p.jsx(u_,{size:36})}),p.jsx("div",{className:"disconnectedTitle",children:"Server disconnected"}),p.jsx("p",{className:"disconnectedText",children:"Start the dev server to reconnect:"}),p.jsx("code",{className:"disconnectedCmd",children:"agentcore dev"})]}):p.jsxs(p.Fragment,{children:[p.jsx(IS,{agents:t,harnesses:a,errors:l,selectedAgentName:Y||j==null?void 0:j.name,selectedHarnessName:m,isStarting:x,isReady:Y?!0:U||b,startError:N,sessionId:He,onSelectAgent:ae,onSelectHarness:ge,onResetChat:ct,isAgentDeployed:z,invocationTarget:_,onToggleTarget:ne,onSetSessionId:U?T:void 0}),p.jsx(jw,{ref:gl,messages:X,isStreaming:_e,isStarting:Y?!1:te,agentName:Y?K==null?void 0:K.name:j==null?void 0:j.name,agentBuildType:Y?"Harness":j==null?void 0:j.buildType,agentProtocol:Y?"Harness":j==null?void 0:j.protocol,isDeployed:Y||U,hasAvailableTargets:t.length>0||a.length>0}),Y&&p.jsx(jk,{overrides:J.harnessOverrides,onChange:J.setHarnessOverrides,tools:(le==null?void 0:le.tools)??[],modelConfig:le==null?void 0:le.modelConfig}),!Y&&(j==null?void 0:j.protocol)==="MCP"&&(Bt.length>0||Kn)&&p.jsx($R,{tools:Bt,isLoading:an,error:Kn,onRefresh:pe,onCallTool:_t,onToolCallMessage:Da}),!Y&&(j==null?void 0:j.protocol)==="A2A"&&(St||pl||Cn)&&p.jsx(Ob,{card:St,isLoading:Cn,error:pl,onRefresh:Oa}),(j&&j.protocol!=="MCP"&&!Y||Y)&&p.jsx(Ub,{isStreaming:_e||!Y&&te,isStarting:Y?!1:te,onSend:de=>{Hi(),fe(de)}}),!Y&&(j==null?void 0:j.protocol)!=="MCP"&&p.jsx(SR,{traces:Jn})]})]}),k&&p.jsx(Sz,{resources:D,sessionId:He,userId:Z,onClose:()=>M(!1)})]})}ax.createRoot(document.getElementById("root")).render(p.jsx(Q0.StrictMode,{children:p.jsx(e6,{})}));
|