agent-flow-app 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,47 @@
1
+ (function(){var e=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),t=e((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,D());else{var t=n(l);t!==null&&O(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&O(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?D():S=!1}}}var D;if(typeof y==`function`)D=function(){y(ee)};else if(typeof MessageChannel<`u`){var te=new MessageChannel,ne=te.port2;te.port1.onmessage=ee,D=function(){ne.postMessage(null)}}else D=function(){_(ee,0)};function O(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,O(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,D()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),n=e(((e,n)=>{n.exports=t()})),r=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function te(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ne=/\/+/g;function O(e,t){return typeof e==`object`&&e&&e.key!=null?te(``+e.key):t.toString(36)}function re(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ie(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ie(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+O(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(ne,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ne,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+O(a,u),c+=ie(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+O(a,u++),c+=ie(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ie(re(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function k(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function A(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var j=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},M={map:k,forEach:function(e,t,n){k(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return k(e,function(){t++}),t},toArray:function(e){return k(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=M,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:A}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,j)}catch(e){j(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.4`})),i=e(((e,t)=>{t.exports=r()})),a=e((e=>{var t=i();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.4`})),o=e(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=a()})),s=e((e=>{var t=n(),r=i(),a=o();function s(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(s(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(s(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return f(i),e;if(a===r)return f(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o){for(c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(n.tag!==3)throw Error(s(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),ee=Symbol.for(`react.memo`),D=Symbol.for(`react.lazy`),te=Symbol.for(`react.activity`),ne=Symbol.for(`react.memo_cache_sentinel`),O=Symbol.iterator;function re(e){return typeof e!=`object`||!e?null:(e=O&&e[O]||e[`@@iterator`],typeof e==`function`?e:null)}var ie=Symbol.for(`react.client.reference`);function k(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case te:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ee:return t=e.displayName||null,t===null?k(e.type)||`Memo`:t;case D:t=e._payload,e=e._init;try{return k(e(t))}catch{}}return null}var A=Array.isArray,j=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N={pending:!1,data:null,method:null,action:null},ae=[],P=-1;function F(e){return{current:e}}function I(e){0>P||(e.current=ae[P],ae[P]=null,P--)}function L(e,t){P++,ae[P]=e.current,e.current=t}var oe=F(null),se=F(null),ce=F(null),le=F(null);function ue(e,t){switch(L(ce,t),L(se,e),L(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}I(oe),L(oe,e)}function de(){I(oe),I(se),I(ce)}function fe(e){e.memoizedState!==null&&L(le,e);var t=oe.current,n=Hd(t,e.type);t!==n&&(L(se,e),L(oe,n))}function pe(e){se.current===e&&(I(oe),I(se)),le.current===e&&(I(le),Qf._currentValue=N)}var me,he;function ge(e){if(me===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||``,he=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+me+e+he}var _e=!1;function ve(e,t){if(!e||_e)return``;_e=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,`name`,{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{_e=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ge(n):``}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge(`Lazy`);case 13:return e.child!==t&&t!==null?ge(`Suspense Fallback`):ge(`Suspense`);case 19:return ge(`SuspenseList`);case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return ge(`Activity`);default:return``}}function be(e){try{var t=``,n=null;do t+=ye(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var xe=Object.prototype.hasOwnProperty,Se=t.unstable_scheduleCallback,Ce=t.unstable_cancelCallback,we=t.unstable_shouldYield,Te=t.unstable_requestPaint,Ee=t.unstable_now,De=t.unstable_getCurrentPriorityLevel,Oe=t.unstable_ImmediatePriority,ke=t.unstable_UserBlockingPriority,Ae=t.unstable_NormalPriority,je=t.unstable_LowPriority,Me=t.unstable_IdlePriority,Ne=t.log,Pe=t.unstable_setDisableYieldValue,Fe=null,Ie=null;function Le(e){if(typeof Ne==`function`&&Pe(e),Ie&&typeof Ie.setStrictMode==`function`)try{Ie.setStrictMode(Fe,e)}catch{}}var Re=Math.clz32?Math.clz32:Ve,ze=Math.log,Be=Math.LN2;function Ve(e){return e>>>=0,e===0?32:31-(ze(e)/Be|0)|0}var He=256,Ue=262144,We=4194304;function Ge(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ke(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ge(n))):i=Ge(o):i=Ge(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ge(n))):i=Ge(o)):i=Ge(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Je(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ye(){var e=We;return We<<=1,!(We&62914560)&&(We=4194304),e}function Xe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qe(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Re(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&$e(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function $e(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Re(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function et(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Re(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function tt(e,t){var n=t&-t;return n=n&42?1:nt(n),(n&(e.suspendedLanes|t))===0?n:0}function nt(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 rt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function it(){var e=M.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function at(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var ot=Math.random().toString(36).slice(2),st=`__reactFiber$`+ot,ct=`__reactProps$`+ot,lt=`__reactContainer$`+ot,ut=`__reactEvents$`+ot,dt=`__reactListeners$`+ot,ft=`__reactHandles$`+ot,pt=`__reactResources$`+ot,mt=`__reactMarker$`+ot;function ht(e){delete e[st],delete e[ct],delete e[ut],delete e[dt],delete e[ft]}function gt(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[lt]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=df(e);e!==null;){if(n=e[st])return n;e=df(e)}return t}e=n,n=e.parentNode}return null}function _t(e){if(e=e[st]||e[lt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function vt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function yt(e){var t=e[pt];return t||=e[pt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function bt(e){e[mt]=!0}var xt=new Set,St={};function Ct(e,t){wt(e,t),wt(e+`Capture`,t)}function wt(e,t){for(St[e]=t,e=0;e<t.length;e++)xt.add(t[e])}var Tt=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]*$`),Et={},Dt={};function Ot(e){return xe.call(Dt,e)?!0:xe.call(Et,e)?!1:Tt.test(e)?Dt[e]=!0:(Et[e]=!0,!1)}function kt(e,t,n){if(Ot(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function R(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function At(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Mt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Nt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Pt(e){if(!e._valueTracker){var t=Mt(e)?`checked`:`value`;e._valueTracker=Nt(e,t,``+e[t])}}function Ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Mt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function It(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Lt=/[\n"\\]/g;function z(e){return e.replace(Lt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Rt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+jt(t)):e.value!==``+jt(t)&&(e.value=``+jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Bt(e,o,jt(n)):Bt(e,o,jt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+jt(s):e.removeAttribute(`name`)}function zt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Pt(e);return}n=n==null?``:``+jt(n),t=t==null?n:``+jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Pt(e)}function Bt(e,t,n){t===`number`&&It(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function B(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+jt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Vt(e,t,n){if(t!=null&&(t=``+jt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+jt(n)}function Ht(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(s(92));if(A(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}n??=``,t=n}n=jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Pt(e)}function Ut(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Wt=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 Gt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||Wt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Kt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(s(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&Gt(e,i,r)}else for(var a in t)t.hasOwnProperty(a)&&Gt(e,a,t[a])}function qt(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 Jt=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`]]),Yt=/^[\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 Xt(e){return Yt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Zt(){}var Qt=null;function $t(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var en=null,tn=null;function nn(e){var t=_t(e);if(t&&(e=t.stateNode)){var n=e[ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Rt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+z(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[ct]||null;if(!i)throw Error(s(90));Rt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ft(r)}break a;case`textarea`:Vt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&B(e,!!n.multiple,t,!1)}}}var rn=!1;function an(e,t,n){if(rn)return e(t,n);rn=!0;try{return e(t)}finally{if(rn=!1,(en!==null||tn!==null)&&(bu(),en&&(t=en,e=tn,tn=en=null,nn(t),e)))for(t=0;t<e.length;t++)nn(e[t])}}function on(e,t){var n=e.stateNode;if(n===null)return null;var r=n[ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(s(231,t,typeof n));return n}var sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),cn=!1;if(sn)try{var ln={};Object.defineProperty(ln,`passive`,{get:function(){cn=!0}}),window.addEventListener(`test`,ln,ln),window.removeEventListener(`test`,ln,ln)}catch{cn=!1}var un=null,dn=null,fn=null;function pn(){if(fn)return fn;var e,t=dn,n=t.length,r,i=`value`in un?un.value:un.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return fn=i.slice(e,1<r?1-r:void 0)}function mn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function hn(){return!0}function gn(){return!1}function _n(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?hn:gn,this.isPropagationStopped=gn,this}return h(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=hn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=hn)},persist:function(){},isPersistent:hn}),t}var vn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yn=_n(vn),bn=h({},vn,{view:0,detail:0}),xn=_n(bn),Sn,Cn,wn,Tn=h({},bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:In,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!==wn&&(wn&&e.type===`mousemove`?(Sn=e.screenX-wn.screenX,Cn=e.screenY-wn.screenY):Cn=Sn=0,wn=e),Sn)},movementY:function(e){return`movementY`in e?e.movementY:Cn}}),En=_n(Tn),Dn=_n(h({},Tn,{dataTransfer:0})),On=_n(h({},bn,{relatedTarget:0})),kn=_n(h({},vn,{animationName:0,elapsedTime:0,pseudoElement:0})),An=_n(h({},vn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),jn=_n(h({},vn,{data:0})),Mn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Nn={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`},Pn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Fn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pn[e])?!!t[e]:!1}function In(){return Fn}var Ln=_n(h({},bn,{key:function(e){if(e.key){var t=Mn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Nn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:In,charCode:function(e){return e.type===`keypress`?mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Rn=_n(h({},Tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),zn=_n(h({},bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:In})),Bn=_n(h({},vn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Vn=_n(h({},Tn,{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})),Hn=_n(h({},vn,{newState:0,oldState:0})),Un=[9,13,27,32],Wn=sn&&`CompositionEvent`in window,Gn=null;sn&&`documentMode`in document&&(Gn=document.documentMode);var Kn=sn&&`TextEvent`in window&&!Gn,qn=sn&&(!Wn||Gn&&8<Gn&&11>=Gn),Jn=` `,Yn=!1;function Xn(e,t){switch(e){case`keyup`:return Un.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Qn=!1;function $n(e,t){switch(e){case`compositionend`:return Zn(t);case`keypress`:return t.which===32?(Yn=!0,Jn):null;case`textInput`:return e=t.data,e===Jn&&Yn?null:e;default:return null}}function er(e,t){if(Qn)return e===`compositionend`||!Wn&&Xn(e,t)?(e=pn(),fn=dn=un=null,Qn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return qn&&t.locale!==`ko`?null:t.data;default:return null}}var tr={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 nr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!tr[e.type]:t===`textarea`}function rr(e,t,n,r){en?tn?tn.push(r):tn=[r]:en=r,t=Ed(t,`onChange`),0<t.length&&(n=new yn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ir=null,ar=null;function or(e){yd(e,0)}function sr(e){if(Ft(vt(e)))return e}function cr(e,t){if(e===`change`)return t}var lr=!1;if(sn){var ur;if(sn){var dr=`oninput`in document;if(!dr){var fr=document.createElement(`div`);fr.setAttribute(`oninput`,`return;`),dr=typeof fr.oninput==`function`}ur=dr}else ur=!1;lr=ur&&(!document.documentMode||9<document.documentMode)}function pr(){ir&&(ir.detachEvent(`onpropertychange`,mr),ar=ir=null)}function mr(e){if(e.propertyName===`value`&&sr(ar)){var t=[];rr(t,ar,e,$t(e)),an(or,t)}}function hr(e,t,n){e===`focusin`?(pr(),ir=t,ar=n,ir.attachEvent(`onpropertychange`,mr)):e===`focusout`&&pr()}function gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return sr(ar)}function _r(e,t){if(e===`click`)return sr(t)}function vr(e,t){if(e===`input`||e===`change`)return sr(t)}function yr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var br=typeof Object.is==`function`?Object.is:yr;function xr(e,t){if(br(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!xe.call(t,i)||!br(e[i],t[i]))return!1}return!0}function Sr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cr(e,t){var n=Sr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Sr(n)}}function wr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?wr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=It(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=It(e.document)}return t}function Er(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Dr=sn&&`documentMode`in document&&11>=document.documentMode,Or=null,kr=null,Ar=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Or==null||Or!==It(r)||(r=Or,`selectionStart`in r&&Er(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ar&&xr(Ar,r)||(Ar=r,r=Ed(kr,`onSelect`),0<r.length&&(t=new yn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Or)))}function Nr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var V={animationend:Nr(`Animation`,`AnimationEnd`),animationiteration:Nr(`Animation`,`AnimationIteration`),animationstart:Nr(`Animation`,`AnimationStart`),transitionrun:Nr(`Transition`,`TransitionRun`),transitionstart:Nr(`Transition`,`TransitionStart`),transitioncancel:Nr(`Transition`,`TransitionCancel`),transitionend:Nr(`Transition`,`TransitionEnd`)},Pr={},Fr={};sn&&(Fr=document.createElement(`div`).style,`AnimationEvent`in window||(delete V.animationend.animation,delete V.animationiteration.animation,delete V.animationstart.animation),`TransitionEvent`in window||delete V.transitionend.transition);function Ir(e){if(Pr[e])return Pr[e];if(!V[e])return e;var t=V[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Fr)return Pr[e]=t[n];return e}var Lr=Ir(`animationend`),Rr=Ir(`animationiteration`),zr=Ir(`animationstart`),Br=Ir(`transitionrun`),Vr=Ir(`transitionstart`),Hr=Ir(`transitioncancel`),Ur=Ir(`transitionend`),Wr=new Map,Gr=`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(` `);Gr.push(`scrollEnd`);function Kr(e,t){Wr.set(e,t),Ct(t,[e])}var qr=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Jr=[],Yr=0,Xr=0;function Zr(){for(var e=Yr,t=Xr=Yr=0;t<e;){var n=Jr[t];Jr[t++]=null;var r=Jr[t];Jr[t++]=null;var i=Jr[t];Jr[t++]=null;var a=Jr[t];if(Jr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&ti(n,i,a)}}function Qr(e,t,n,r){Jr[Yr++]=e,Jr[Yr++]=t,Jr[Yr++]=n,Jr[Yr++]=r,Xr|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function $r(e,t,n,r){return Qr(e,t,n,r),ni(e)}function ei(e,t){return Qr(e,null,null,t),ni(e)}function ti(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Re(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function ni(e){if(50<du)throw du=0,fu=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ri={};function ii(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ai(e,t,n,r){return new ii(e,t,n,r)}function oi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function si(e,t){var n=e.alternate;return n===null?(n=ai(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ci(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function li(e,t,n,r,i,a){var o=0;if(r=e,typeof e==`function`)oi(e)&&(o=1);else if(typeof e==`string`)o=Uf(e,n,oe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case te:return e=ai(31,n,t,i),e.elementType=te,e.lanes=a,e;case y:return ui(n.children,i,a,t);case b:o=8,i|=24;break;case x:return e=ai(12,n,t,i|2),e.elementType=x,e.lanes=a,e;case T:return e=ai(13,n,t,i),e.elementType=T,e.lanes=a,e;case E:return e=ai(19,n,t,i),e.elementType=E,e.lanes=a,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:o=10;break a;case S:o=9;break a;case w:o=11;break a;case ee:o=14;break a;case D:o=16,r=null;break a}o=29,n=Error(s(130,e===null?`null`:typeof e,``)),r=null}return t=ai(o,n,t,i),t.elementType=e,t.type=r,t.lanes=a,t}function ui(e,t,n,r){return e=ai(7,e,r,t),e.lanes=n,e}function di(e,t,n){return e=ai(6,e,null,t),e.lanes=n,e}function fi(e){var t=ai(18,null,null,0);return t.stateNode=e,t}function pi(e,t,n){return t=ai(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var mi=new WeakMap;function hi(e,t){if(typeof e==`object`&&e){var n=mi.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},mi.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}var gi=[],_i=0,vi=null,yi=0,bi=[],xi=0,Si=null,Ci=1,wi=``;function Ti(e,t){gi[_i++]=yi,gi[_i++]=vi,vi=e,yi=t}function Ei(e,t,n){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Si=e;var r=Ci;e=wi;var i=32-Re(r)-1;r&=~(1<<i),n+=1;var a=32-Re(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ci=1<<32-Re(t)+i|n<<i|r,wi=a+e}else Ci=1<<a|n<<i|r,wi=e}function Di(e){e.return!==null&&(Ti(e,1),Ei(e,1,0))}function Oi(e){for(;e===vi;)vi=gi[--_i],gi[_i]=null,yi=gi[--_i],gi[_i]=null;for(;e===Si;)Si=bi[--xi],bi[xi]=null,wi=bi[--xi],bi[xi]=null,Ci=bi[--xi],bi[xi]=null}function ki(e,t){bi[xi++]=Ci,bi[xi++]=wi,bi[xi++]=Si,Ci=t.id,wi=t.overflow,Si=e}var Ai=null,H=null,U=!1,ji=null,Mi=!1,Ni=Error(s(519));function Pi(e){throw Bi(hi(Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Ni}function Fi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[st]=e,t[ct]=r,n){case`dialog`:Q(`cancel`,t),Q(`close`,t);break;case`iframe`:case`object`:case`embed`:Q(`load`,t);break;case`video`:case`audio`:for(n=0;n<_d.length;n++)Q(_d[n],t);break;case`source`:Q(`error`,t);break;case`img`:case`image`:case`link`:Q(`error`,t),Q(`load`,t);break;case`details`:Q(`toggle`,t);break;case`input`:Q(`invalid`,t),zt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Q(`invalid`,t);break;case`textarea`:Q(`invalid`,t),Ht(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(Q(`beforetoggle`,t),Q(`toggle`,t)),r.onScroll!=null&&Q(`scroll`,t),r.onScrollEnd!=null&&Q(`scrollend`,t),r.onClick!=null&&(t.onclick=Zt),t=!0):t=!1,t||Pi(e,!0)}function Ii(e){for(Ai=e.return;Ai;)switch(Ai.tag){case 5:case 31:case 13:Mi=!1;return;case 27:case 3:Mi=!0;return;default:Ai=Ai.return}}function Li(e){if(e!==Ai)return!1;if(!U)return Ii(e),U=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Ud(e.type,e.memoizedProps)),n=!n),n&&H&&Pi(e),Ii(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));H=uf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(317));H=uf(e)}else t===27?(t=H,Zd(e.type)?(e=lf,lf=null,H=e):H=t):H=Ai?cf(e.stateNode.nextSibling):null;return!0}function Ri(){H=Ai=null,U=!1}function zi(){var e=ji;return e!==null&&(Zl===null?Zl=e:Zl.push.apply(Zl,e),ji=null),e}function Bi(e){ji===null?ji=[e]:ji.push(e)}var Vi=F(null),Hi=null,Ui=null;function Wi(e,t,n){L(Vi,t._currentValue),t._currentValue=n}function Gi(e){e._currentValue=Vi.current,I(Vi)}function Ki(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function qi(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var o=i.child;a=a.firstContext;a:for(;a!==null;){var c=a;a=i;for(var l=0;l<t.length;l++)if(c.context===t[l]){a.lanes|=n,c=a.alternate,c!==null&&(c.lanes|=n),Ki(a.return,n,e),r||(o=null);break a}a=c.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(s(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Ki(o,n,e),o=null}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function Ji(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(s(387));if(o=o.memoizedProps,o!==null){var c=i.type;br(i.pendingProps.value,o.value)||(e===null?e=[c]:e.push(c))}}else if(i===le.current){if(o=i.alternate,o===null)throw Error(s(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}i=i.return}e!==null&&qi(t,e,n,r),t.flags|=262144}function Yi(e){for(e=e.firstContext;e!==null;){if(!br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Xi(e){Hi=e,Ui=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Zi(e){return $i(Hi,e)}function Qi(e,t){return Hi===null&&Xi(e),$i(e,t)}function $i(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Ui===null){if(e===null)throw Error(s(308));Ui=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Ui=Ui.next=t;return n}var ea=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ta=t.unstable_scheduleCallback,na=t.unstable_NormalPriority,ra={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ia(){return{controller:new ea,data:new Map,refCount:0}}function aa(e){e.refCount--,e.refCount===0&&ta(na,function(){e.controller.abort()})}var oa=null,sa=0,ca=0,la=null;function ua(e,t){if(oa===null){var n=oa=[];sa=0,ca=dd(),la={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return sa++,t.then(da,da),t}function da(){if(--sa===0&&oa!==null){la!==null&&(la.status=`fulfilled`);var e=oa;oa=null,ca=0,la=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var pa=j.S;j.S=function(e,t){eu=Ee(),typeof t==`object`&&t&&typeof t.then==`function`&&ua(e,t),pa!==null&&pa(e,t)};var ma=F(null);function ha(){var e=ma.current;return e===null?q.pooledCache:e}function ga(e,t){t===null?L(ma,ma.current):L(ma,t.pool)}function _a(){var e=ha();return e===null?null:{parent:ra._currentValue,pool:e}}var va=Error(s(460)),ya=Error(s(474)),ba=Error(s(542)),xa={then:function(){}};function Sa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Ca(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Zt,Zt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Da(e),e;default:if(typeof t.status==`string`)t.then(Zt,Zt);else{if(e=q,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Da(e),e}throw Ta=t,va}}function wa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ta=e,va):e}}var Ta=null;function Ea(){if(Ta===null)throw Error(s(459));var e=Ta;return Ta=null,e}function Da(e){if(e===va||e===ba)throw Error(s(483))}var Oa=null,ka=0;function Aa(e){var t=ka;return ka+=1,Oa===null&&(Oa=[]),Ca(Oa,e,t)}function ja(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ma(e,t){throw t.$$typeof===g?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Na(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function i(e,t){return e=si(e,t),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function o(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=di(n,e.mode,r),t.return=e,t):(t=i(t,n),t.return=e,t)}function l(e,t,n,r){var a=n.type;return a===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===a||typeof a==`object`&&a&&a.$$typeof===D&&wa(a)===t.type)?(t=i(t,n.props),ja(t,n),t.return=e,t):(t=li(n.type,n.key,n.props,null,e.mode,r),ja(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=pi(n,e.mode,r),t.return=e,t):(t=i(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,a){return t===null||t.tag!==7?(t=ui(n,e.mode,r,a),t.return=e,t):(t=i(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=li(t.type,t.key,t.props,null,e.mode,n),ja(n,t),n.return=e,n;case v:return t=pi(t,e.mode,n),t.return=e,t;case D:return t=wa(t),f(e,t,n)}if(A(t)||re(t))return t=ui(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Aa(t),n);if(t.$$typeof===C)return f(e,Qi(e,t),n);Ma(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case D:return n=wa(n),p(e,t,n,r)}if(A(n)||re(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Aa(n),r);if(n.$$typeof===C)return p(e,t,Qi(e,n),r);Ma(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case D:return r=wa(r),m(e,t,n,r,i)}if(A(r)||re(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Aa(r),i);if(r.$$typeof===C)return m(e,t,n,Qi(t,r),i);Ma(t,r)}return null}function h(i,o,s,c){for(var l=null,u=null,d=o,h=o=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),o=a(_,o,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),U&&Ti(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(o=a(d,o,h),u===null?l=d:u.sibling=d,u=d);return U&&Ti(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),o=a(g,o,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),U&&Ti(i,h),l}function g(i,o,c,l){if(c==null)throw Error(s(151));for(var u=null,d=null,h=o,g=o=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(i,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(i,h),o=a(y,o,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(i,h),U&&Ti(i,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(i,v.value,l),v!==null&&(o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return U&&Ti(i,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,i,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),o=a(v,o,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(i,e)}),U&&Ti(i,g),u}function b(e,r,a,c){if(typeof a==`object`&&a&&a.type===y&&a.key===null&&(a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case _:a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===y){if(r.tag===7){n(e,r.sibling),c=i(r,a.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===D&&wa(l)===r.type){n(e,r.sibling),c=i(r,a.props),ja(c,a),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}a.type===y?(c=ui(a.props.children,e.mode,c,a.key),c.return=e,e=c):(c=li(a.type,a.key,a.props,null,e.mode,c),ja(c,a),c.return=e,e=c)}return o(e);case v:a:{for(l=a.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===a.containerInfo&&r.stateNode.implementation===a.implementation){n(e,r.sibling),c=i(r,a.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=pi(a,e.mode,c),c.return=e,e=c}return o(e);case D:return a=wa(a),b(e,r,a,c)}if(A(a))return h(e,r,a,c);if(re(a)){if(l=re(a),typeof l!=`function`)throw Error(s(150));return a=l.call(a),g(e,r,a,c)}if(typeof a.then==`function`)return b(e,r,Aa(a),c);if(a.$$typeof===C)return b(e,r,Qi(e,a),c);Ma(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(a=``+a,r!==null&&r.tag===6?(n(e,r.sibling),c=i(r,a),c.return=e,e=c):(n(e,r),c=di(a,e.mode,c),c.return=e,e=c),o(e)):n(e,r)}return function(e,t,n,r){try{ka=0;var i=b(e,t,n,r);return Oa=null,i}catch(t){if(t===va||t===ba)throw t;var a=ai(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Pa=Na(!0),Fa=Na(!1),Ia=!1;function La(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ra(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,K&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ni(e),ti(e,null,n),t}return Qr(e,r,t,n),ni(e)}function Va(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}function Ha(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ua=!1;function Wa(){if(Ua){var e=la;if(e!==null)throw e}}function Ga(e,t,n,r){Ua=!1;var i=e.updateQueue;Ia=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Y&f)===f:(r&f)===f){f!==0&&f===ca&&(Ua=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(m=g.payload,typeof m==`function`){d=m.call(_,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=g.payload,f=typeof m==`function`?m.call(_,d,f):m,f==null)break a;d=h({},d,f);break a;case 2:Ia=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Gl|=o,e.lanes=o,e.memoizedState=d}}function Ka(e,t){if(typeof e!=`function`)throw Error(s(191,e));e.call(t)}function qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ka(n[e],t)}var Ja=F(null),Ya=F(0);function Xa(e,t){e=Ul,L(Ya,e),L(Ja,t),Ul=e|t.baseLanes}function Za(){L(Ya,Ul),L(Ja,Ja.current)}function Qa(){Ul=Ya.current,I(Ja),I(Ya)}var $a=F(null),eo=null;function to(e){var t=e.alternate;L(oo,oo.current&1),L($a,e),eo===null&&(t===null||Ja.current!==null||t.memoizedState!==null)&&(eo=e)}function no(e){L(oo,oo.current),L($a,e),eo===null&&(eo=e)}function ro(e){e.tag===22?(L(oo,oo.current),L($a,e),eo===null&&(eo=e)):io(e)}function io(){L(oo,oo.current),L($a,$a.current)}function ao(e){I($a),eo===e&&(eo=null),I(oo)}var oo=F(0);function so(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||af(n)||of(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var co=0,W=null,G=null,lo=null,uo=!1,fo=!1,po=!1,mo=0,ho=0,go=null,_o=0;function vo(){throw Error(s(321))}function yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!br(e[n],t[n]))return!1;return!0}function bo(e,t,n,r,i,a){return co=a,W=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,j.H=e===null||e.memoizedState===null?Ls:Rs,po=!1,a=n(r,i),po=!1,fo&&(a=So(t,n,r,i)),xo(e),a}function xo(e){j.H=Is;var t=G!==null&&G.next!==null;if(co=0,lo=G=W=null,uo=!1,ho=0,go=null,t)throw Error(s(300));e===null||tc||(e=e.dependencies,e!==null&&Yi(e)&&(tc=!0))}function So(e,t,n,r){W=e;var i=0;do{if(fo&&(go=null),ho=0,fo=!1,25<=i)throw Error(s(301));if(i+=1,lo=G=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}j.H=zs,a=t(n,r)}while(fo);return a}function Co(){var e=j.H,t=e.useState()[0];return t=typeof t.then==`function`?Ao(t):t,e=e.useState()[0],(G===null?null:G.memoizedState)!==e&&(W.flags|=1024),t}function wo(){var e=mo!==0;return mo=0,e}function To(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Eo(e){if(uo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}uo=!1}co=0,lo=G=W=null,fo=!1,ho=mo=0,go=null}function Do(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lo===null?W.memoizedState=lo=e:lo=lo.next=e,lo}function Oo(){if(G===null){var e=W.alternate;e=e===null?null:e.memoizedState}else e=G.next;var t=lo===null?W.memoizedState:lo.next;if(t!==null)lo=t,G=e;else{if(e===null)throw W.alternate===null?Error(s(467)):Error(s(310));G=e,e={memoizedState:G.memoizedState,baseState:G.baseState,baseQueue:G.baseQueue,queue:G.queue,next:null},lo===null?W.memoizedState=lo=e:lo=lo.next=e}return lo}function ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ao(e){var t=ho;return ho+=1,go===null&&(go=[]),e=Ca(go,e,t),t=W,(lo===null?t.memoizedState:lo.next)===null&&(t=t.alternate,j.H=t===null||t.memoizedState===null?Ls:Rs),e}function jo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Ao(e);if(e.$$typeof===C)return Zi(e)}throw Error(s(438,String(e)))}function Mo(e){var t=null,n=W.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=W.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=ko(),W.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ne;return t.index++,n}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){return Fo(Oo(),G,e)}function Fo(e,t,n){var r=e.queue;if(r===null)throw Error(s(311));r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var c=o=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(co&f)===f:(Y&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ca&&(d=!0);else if((co&p)===p){u=u.next,p===ca&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,o=a):l=l.next=f,W.lanes|=p,Gl|=p;f=u.action,po&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,o=a):l=l.next=p,W.lanes|=f,Gl|=f;u=u.next}while(u!==null&&u!==t);if(l===null?o=a:l.next=c,!br(a,e.memoizedState)&&(tc=!0,d&&(n=la,n!==null)))throw n;e.memoizedState=a,e.baseState=o,e.baseQueue=l,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Io(e){var t=Oo(),n=t.queue;if(n===null)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);br(a,t.memoizedState)||(tc=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Lo(e,t,n){var r=W,i=Oo(),a=U;if(a){if(n===void 0)throw Error(s(407));n=n()}else n=t();var o=!br((G||i).memoizedState,n);if(o&&(i.memoizedState=n,tc=!0),i=i.queue,cs(Bo.bind(null,r,i,e),[e]),i.getSnapshot!==t||o||lo!==null&&lo.memoizedState.tag&1){if(r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,i,n,t),null),q===null)throw Error(s(349));a||co&127||Ro(r,t,n)}return n}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=W.updateQueue,t===null?(t=ko(),W.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!br(e,n)}catch{return!0}}function Ho(e){var t=ei(e,2);t!==null&&hu(t,e,2)}function Uo(e){var t=Do();if(typeof e==`function`){var n=e;if(e=n(),po){Le(!0);try{n()}finally{Le(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t}function Wo(e,t,n,r){return e.baseState=n,Fo(e,G,typeof r==`function`?r:No)}function Go(e,t,n,r,i){if(Ns(e))throw Error(s(485));if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};j.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,Ko(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Ko(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=j.T,o={};j.T=o;try{var s=n(i,r),c=j.S;c!==null&&c(o,s),qo(e,t,s)}catch(n){Yo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),j.T=a}}else try{a=n(i,r),qo(e,t,a)}catch(n){Yo(e,t,n)}}function qo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Jo(e,t,n)},function(n){return Yo(e,t,n)}):Jo(e,t,n)}function Jo(e,t,n){t.status=`fulfilled`,t.value=n,Xo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ko(e,n)))}function Yo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Xo(t),t=t.next;while(t!==r)}e.action=null}function Xo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Zo(e,t){return t}function Qo(e,t){if(U){var n=q.formState;if(n!==null){a:{var r=W;if(U){if(H){b:{for(var i=H,a=Mi;i.nodeType!==8;){if(!a){i=null;break b}if(i=cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){H=cf(i.nextSibling),r=i.data===`F!`;break a}}Pi(r)}r=!1}r&&(t=n[0])}}return n=Do(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:t},n.queue=r,n=As.bind(null,W,r),r.dispatch=n,r=Uo(!1),a=Ms.bind(null,W,!1,r.queue),r=Do(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Go.bind(null,W,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function $o(e){return es(Oo(),G,e)}function es(e,t,n){if(t=Fo(e,t,Zo)[0],e=Po(No)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Ao(t)}catch(e){throw e===va?ba:e}else r=t;t=Oo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(W.flags|=2048,rs(9,{destroy:void 0},ts.bind(null,i,n),null)),[r,a,e]}function ts(e,t){e.action=t}function ns(e){var t=Oo(),n=G;if(n!==null)return es(t,n,e);Oo(),t=t.memoizedState,n=Oo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function rs(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=W.updateQueue,t===null&&(t=ko(),W.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function is(){return Oo().memoizedState}function as(e,t,n,r){var i=Do();W.flags|=e,i.memoizedState=rs(1|t,{destroy:void 0},n,r===void 0?null:r)}function os(e,t,n,r){var i=Oo();r=r===void 0?null:r;var a=i.memoizedState.inst;G!==null&&r!==null&&yo(r,G.memoizedState.deps)?i.memoizedState=rs(t,a,n,r):(W.flags|=e,i.memoizedState=rs(1|t,a,n,r))}function ss(e,t){as(8390656,8,e,t)}function cs(e,t){os(2048,8,e,t)}function ls(e){W.flags|=4;var t=W.updateQueue;if(t===null)t=ko(),W.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function us(e){var t=Oo().memoizedState;return ls({ref:t,nextImpl:e}),function(){if(K&2)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function ds(e,t){return os(4,2,e,t)}function fs(e,t){return os(4,4,e,t)}function ps(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ms(e,t,n){n=n==null?null:n.concat([e]),os(4,4,ps.bind(null,t,e),n)}function hs(){}function gs(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function _s(e,t){var n=Oo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&yo(t,r[1]))return r[0];if(r=e(),po){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r}function vs(e,t,n){return n===void 0||co&1073741824&&!(Y&261930)?e.memoizedState=t:(e.memoizedState=n,e=mu(),W.lanes|=e,Gl|=e,n)}function ys(e,t,n,r){return br(n,t)?n:Ja.current===null?!(co&42)||co&1073741824&&!(Y&261930)?(tc=!0,e.memoizedState=n):(e=mu(),W.lanes|=e,Gl|=e,t):(e=vs(e,n,r),br(e,t)||(tc=!0),e)}function bs(e,t,n,r,i){var a=M.p;M.p=a!==0&&8>a?a:8;var o=j.T,s={};j.T=s,Ms(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?js(e,t,fa(c,r),pu(e)):js(e,t,r,pu(e))}catch(n){js(e,t,{then:function(){},status:`rejected`,reason:n},pu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function xs(){}function Ss(e,t,n,r){if(e.tag!==5)throw Error(s(476));var i=Cs(e).queue;bs(e,i,t,N,n===null?xs:function(){return ws(e),n(r)})}function Cs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:N,baseState:N,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:N},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ws(e){var t=Cs(e);t.next===null&&(t=e.alternate.memoizedState),js(e,t.next.queue,{},pu())}function Ts(){return Zi(Qf)}function Es(){return Oo().memoizedState}function Ds(){return Oo().memoizedState}function Os(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=pu();e=za(n);var r=Ba(t,e,n);r!==null&&(hu(r,t,n),Va(r,t,n)),t={cache:ia()},e.payload=t;return}t=t.return}}function ks(e,t,n){var r=pu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ns(e)?Ps(t,n):(n=$r(e,t,n,r),n!==null&&(hu(n,e,r),Fs(n,t,r)))}function As(e,t,n){js(e,t,n,pu())}function js(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ns(e))Ps(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,br(s,o))return Qr(e,t,i,0),q===null&&Zr(),!1}catch{}if(n=$r(e,t,i,r),n!==null)return hu(n,e,r),Fs(n,t,r),!0}return!1}function Ms(e,t,n,r){if(r={lane:2,revertLane:dd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ns(e)){if(t)throw Error(s(479))}else t=$r(e,n,r,2),t!==null&&hu(t,e,2)}function Ns(e){var t=e.alternate;return e===W||t!==null&&t===W}function Ps(e,t){fo=uo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Fs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,et(e,n)}}var Is={readContext:Zi,use:jo,useCallback:vo,useContext:vo,useEffect:vo,useImperativeHandle:vo,useLayoutEffect:vo,useInsertionEffect:vo,useMemo:vo,useReducer:vo,useRef:vo,useState:vo,useDebugValue:vo,useDeferredValue:vo,useTransition:vo,useSyncExternalStore:vo,useId:vo,useHostTransitionStatus:vo,useFormState:vo,useActionState:vo,useOptimistic:vo,useMemoCache:vo,useCacheRefresh:vo};Is.useEffectEvent=vo;var Ls={readContext:Zi,use:jo,useCallback:function(e,t){return Do().memoizedState=[e,t===void 0?null:t],e},useContext:Zi,useEffect:ss,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),as(4194308,4,ps.bind(null,t,e),n)},useLayoutEffect:function(e,t){return as(4194308,4,e,t)},useInsertionEffect:function(e,t){as(4,2,e,t)},useMemo:function(e,t){var n=Do();t=t===void 0?null:t;var r=e();if(po){Le(!0);try{e()}finally{Le(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Do();if(n!==void 0){var i=n(t);if(po){Le(!0);try{n(t)}finally{Le(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ks.bind(null,W,e),[r.memoizedState,e]},useRef:function(e){var t=Do();return e={current:e},t.memoizedState=e},useState:function(e){e=Uo(e);var t=e.queue,n=As.bind(null,W,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:hs,useDeferredValue:function(e,t){return vs(Do(),e,t)},useTransition:function(){var e=Uo(!1);return e=bs.bind(null,W,e.queue,!0,!1),Do().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=W,i=Do();if(U){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),q===null)throw Error(s(349));Y&127||Ro(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,ss(Bo.bind(null,r,a,e),[e]),r.flags|=2048,rs(9,{destroy:void 0},zo.bind(null,r,a,n,t),null),n},useId:function(){var e=Do(),t=q.identifierPrefix;if(U){var n=wi,r=Ci;n=(r&~(1<<32-Re(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=mo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=_o++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ts,useFormState:Qo,useActionState:Qo,useOptimistic:function(e){var t=Do();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ms.bind(null,W,!0,n),n.dispatch=t,[e,t]},useMemoCache:Mo,useCacheRefresh:function(){return Do().memoizedState=Os.bind(null,W)},useEffectEvent:function(e){var t=Do(),n={impl:e};return t.memoizedState=n,function(){if(K&2)throw Error(s(440));return n.impl.apply(void 0,arguments)}}},Rs={readContext:Zi,use:jo,useCallback:gs,useContext:Zi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Po,useRef:is,useState:function(){return Po(No)},useDebugValue:hs,useDeferredValue:function(e,t){return ys(Oo(),G.memoizedState,e,t)},useTransition:function(){var e=Po(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:$o,useActionState:$o,useOptimistic:function(e,t){return Wo(Oo(),G,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};Rs.useEffectEvent=us;var zs={readContext:Zi,use:jo,useCallback:gs,useContext:Zi,useEffect:cs,useImperativeHandle:ms,useInsertionEffect:ds,useLayoutEffect:fs,useMemo:_s,useReducer:Io,useRef:is,useState:function(){return Io(No)},useDebugValue:hs,useDeferredValue:function(e,t){var n=Oo();return G===null?vs(n,e,t):ys(n,G.memoizedState,e,t)},useTransition:function(){var e=Io(No)[0],t=Oo().memoizedState;return[typeof e==`boolean`?e:Ao(e),t]},useSyncExternalStore:Lo,useId:Es,useHostTransitionStatus:Ts,useFormState:ns,useActionState:ns,useOptimistic:function(e,t){var n=Oo();return G===null?(n.baseState=e,[e,n.queue.dispatch]):Wo(n,G,e,t)},useMemoCache:Mo,useCacheRefresh:Ds};zs.useEffectEvent=us;function Bs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:h({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Vs={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=pu(),i=za(r);i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(hu(t,e,r),Va(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=pu(),i=za(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ba(e,i,r),t!==null&&(hu(t,e,r),Va(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=pu(),r=za(n);r.tag=2,t!=null&&(r.callback=t),t=Ba(e,r,n),t!==null&&(hu(t,e,n),Va(t,e,n))}};function Hs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!xr(n,r)||!xr(i,a):!0}function Us(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Vs.enqueueReplaceState(t,t.state,null)}function Ws(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=h({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Gs(e){qr(e)}function Ks(e){console.error(e)}function qs(e){qr(e)}function Js(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Ys(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Xs(e,t,n){return n=za(n),n.tag=3,n.payload={element:null},n.callback=function(){Js(e,t)},n}function Zs(e){return e=za(e),e.tag=3,e}function Qs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Ys(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Ys(t,n,r),typeof i!=`function`&&(ru===null?ru=new Set([this]):ru.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function $s(e,t,n,r,i){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Ji(t,n,i,!0),n=$a.current,n!==null){switch(n.tag){case 31:case 13:return eo===null?Du():n.alternate===null&&Wl===0&&(Wl=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===xa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Gu(e,r,i)),!1;case 22:return n.flags|=65536,r===xa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Gu(e,r,i)),!1}throw Error(s(435,n.tag))}return Gu(e,r,i),Du(),!1}if(U)return t=$a.current,t===null?(r!==Ni&&(t=Error(s(423),{cause:r}),Bi(hi(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=hi(r,n),i=Xs(e.stateNode,r,i),Ha(e,i),Wl!==4&&(Wl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Ni&&(e=Error(s(422),{cause:r}),Bi(hi(e,n)))),!1;var a=Error(s(520),{cause:r});if(a=hi(a,n),Xl===null?Xl=[a]:Xl.push(a),Wl!==4&&(Wl=2),t===null)return!0;r=hi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Xs(n.stateNode,r,e),Ha(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(ru===null||!ru.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Zs(i),Qs(i,e,n,r),Ha(n,i),!1}n=n.return}while(n!==null);return!1}var ec=Error(s(461)),tc=!1;function nc(e,t,n,r){t.child=e===null?Fa(t,null,n,r):Pa(t,e.child,n,r)}function rc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Xi(t),r=bo(e,t,n,o,a,i),s=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(U&&s&&Di(t),t.flags|=1,nc(e,t,r,i),t.child)}function ic(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!oi(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,ac(e,t,a,r,i)):(e=li(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Oc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?xr:n,n(o,r)&&e.ref===t.ref)return Dc(e,t,i)}return t.flags|=1,e=si(a,r),e.ref=t.ref,e.return=t,t.child=e}function ac(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(xr(a,r)&&e.ref===t.ref)if(tc=!1,t.pendingProps=r=a,Oc(e,i))e.flags&131072&&(tc=!0);else return t.lanes=e.lanes,Dc(e,t,i)}return pc(e,t,n,r,i)}function oc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return cc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ga(t,a===null?null:a.cachePool),a===null?Za():Xa(t,a),ro(t);else return r=t.lanes=536870912,cc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ga(t,null),Za(),io(t)):(ga(t,a.cachePool),Xa(t,a),io(t),t.memoizedState=null);return nc(e,t,i,n),t.child}function sc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function cc(e,t,n,r,i){var a=ha();return a=a===null?null:{parent:ra._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ga(t,null),Za(),ro(t),e!==null&&Ji(e,t,r,!0),t.childLanes=i,null}function lc(e,t){return t=Sc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function uc(e,t,n){return Pa(t,e.child,null,n),e=lc(t,t.pendingProps),e.flags|=2,ao(t),t.memoizedState=null,e}function dc(e,t,n){var r=t.pendingProps,i=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(U){if(r.mode===`hidden`)return e=lc(t,r),t.lanes=536870912,sc(null,e);if(no(t),(e=H)?(e=rf(e,Mi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,H=null)):e=null,e===null)throw Pi(t);return t.lanes=536870912,null}return lc(t,r)}var a=e.memoizedState;if(a!==null){var o=a.dehydrated;if(no(t),i)if(t.flags&256)t.flags&=-257,t=uc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(tc||Ji(e,t,n,!1),i=(n&e.childLanes)!==0,tc||i){if(r=q,r!==null&&(o=tt(r,n),o!==0&&o!==a.retryLane))throw a.retryLane=o,ei(e,o),hu(r,e,o),ec;Du(),t=uc(e,t,n)}else e=a.treeContext,H=cf(o.nextSibling),Ai=t,U=!0,ji=null,Mi=!1,e!==null&&ki(t,e),t=lc(t,r),t.flags|=4096;return t}return e=si(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(s(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function pc(e,t,n,r,i){return Xi(t),n=bo(e,t,n,r,void 0,i),r=wo(),e!==null&&!tc?(To(e,t,i),Dc(e,t,i)):(U&&r&&Di(t),t.flags|=1,nc(e,t,n,i),t.child)}function mc(e,t,n,r,i,a){return Xi(t),t.updateQueue=null,n=So(t,r,n,i),xo(e),r=wo(),e!==null&&!tc?(To(e,t,a),Dc(e,t,a)):(U&&r&&Di(t),t.flags|=1,nc(e,t,n,a),t.child)}function hc(e,t,n,r,i){if(Xi(t),t.stateNode===null){var a=ri,o=n.contextType;typeof o==`object`&&o&&(a=Zi(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Vs,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},La(t),o=n.contextType,a.context=typeof o==`object`&&o?Zi(o):ri,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Bs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Vs.enqueueReplaceState(a,a.state,null),Ga(t,r,a,i),Wa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ws(n,s);a.props=c;var l=a.context,u=n.contextType;o=ri,typeof u==`object`&&u&&(o=Zi(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Us(t,a,r,o),Ia=!1;var f=t.memoizedState;a.state=f,Ga(t,r,a,i),Wa(),l=t.memoizedState,s||f!==l||Ia?(typeof d==`function`&&(Bs(t,n,d,r),l=t.memoizedState),(c=Ia||Hs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ra(e,t),o=t.memoizedProps,u=Ws(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ri,typeof l==`object`&&l&&(c=Zi(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Us(t,a,r,c),Ia=!1,f=t.memoizedState,a.state=f,Ga(t,r,a,i),Wa();var p=t.memoizedState;o!==d||f!==p||Ia||e!==null&&e.dependencies!==null&&Yi(e.dependencies)?(typeof s==`function`&&(Bs(t,n,s,r),p=t.memoizedState),(u=Ia||Hs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Yi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,fc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Pa(t,e.child,null,i),t.child=Pa(t,null,n,i)):nc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Dc(e,t,i),e}function gc(e,t,n,r){return Ri(),t.flags|=256,nc(e,t,n,r),t.child}var _c={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function vc(e){return{baseLanes:e,cachePool:_a()}}function yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Jl),e}function bc(e,t,n){var r=t.pendingProps,i=!1,a=(t.flags&128)!=0,o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:(oo.current&2)!=0),o&&(i=!0,t.flags&=-129),o=(t.flags&32)!=0,t.flags&=-33,e===null){if(U){if(i?to(t):io(t),(e=H)?(e=rf(e,Mi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Si===null?null:{id:Ci,overflow:wi},retryLane:536870912,hydrationErrors:null},n=fi(e),n.return=t,t.child=n,Ai=t,H=null)):e=null,e===null)throw Pi(t);return of(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,i?(io(t),i=t.mode,c=Sc({mode:`hidden`,children:c},i),r=ui(r,i,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,o,n),t.memoizedState=_c,sc(null,r)):(to(t),xc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(a)t.flags&256?(to(t),t.flags&=-257,t=Cc(e,t,n)):t.memoizedState===null?(io(t),c=r.fallback,i=t.mode,r=Sc({mode:`visible`,children:r.children},i),c=ui(c,i,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Pa(t,e.child,null,n),r=t.child,r.memoizedState=vc(n),r.childLanes=yc(e,o,n),t.memoizedState=_c,t=sc(null,r)):(io(t),t.child=e.child,t.flags|=128,t=null);else if(to(t),of(c)){if(o=c.nextSibling&&c.nextSibling.dataset,o)var u=o.dgst;o=u,r=Error(s(419)),r.stack=``,r.digest=o,Bi({value:r,source:null,stack:null}),t=Cc(e,t,n)}else if(tc||Ji(e,t,n,!1),o=(n&e.childLanes)!==0,tc||o){if(o=q,o!==null&&(r=tt(o,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ei(e,r),hu(o,e,r),ec;af(c)||Du(),t=Cc(e,t,n)}else af(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,H=cf(c.nextSibling),Ai=t,U=!0,ji=null,Mi=!1,e!==null&&ki(t,e),t=xc(t,r.children),t.flags|=4096);return t}return i?(io(t),c=r.fallback,i=t.mode,l=e.child,u=l.sibling,r=si(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ui(c,i,n,null),c.flags|=2):c=si(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,sc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=vc(n):(i=c.cachePool,i===null?i=_a():(l=ra._currentValue,i=i.parent===l?i:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:i}),r.memoizedState=c,r.childLanes=yc(e,o,n),t.memoizedState=_c,sc(e.child,r)):(to(t),n=e.child,e=n.sibling,n=si(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function xc(e,t){return t=Sc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Sc(e,t){return e=ai(22,e,null,t),e.lanes=0,e}function Cc(e,t,n){return Pa(t,e.child,null,n),e=xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ki(e.return,t,n)}function Tc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Ec(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=oo.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,L(oo,o),nc(e,t,r,n),r=U?yi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wc(e,n,t);else if(e.tag===19)wc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&so(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Tc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&so(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Tc(t,!0,n,null,a,r);break;case`together`:Tc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Dc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Gl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ji(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=si(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=si(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Oc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Yi(e))):!0}function kc(e,t,n){switch(t.tag){case 3:ue(t,t.stateNode.containerInfo),Wi(t,ra,e.memoizedState.cache),Ri();break;case 27:case 5:fe(t);break;case 4:ue(t,t.stateNode.containerInfo);break;case 10:Wi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,no(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(to(t),e=Dc(e,t,n),e===null?null:e.sibling):bc(e,t,n):(to(t),t.flags|=128,null);to(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Ji(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ec(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),L(oo,oo.current),r)break;return null;case 22:return t.lanes=0,oc(e,t,n,t.pendingProps);case 24:Wi(t,ra,e.memoizedState.cache)}return Dc(e,t,n)}function Ac(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)tc=!0;else{if(!Oc(e,n)&&!(t.flags&128))return tc=!1,kc(e,t,n);tc=!!(e.flags&131072)}else tc=!1,U&&t.flags&1048576&&Ei(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=wa(t.elementType),t.type=e,typeof e==`function`)oi(e)?(r=Ws(e,r),t.tag=1,t=hc(null,t,e,r,n)):(t.tag=0,t=pc(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===w){t.tag=11,t=rc(null,t,e,r,n);break a}else if(i===ee){t.tag=14,t=ic(null,t,e,r,n);break a}}throw t=k(e)||e,Error(s(306,t,``))}}return t;case 0:return pc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Ws(r,t.pendingProps),hc(e,t,r,i,n);case 3:a:{if(ue(t,t.stateNode.containerInfo),e===null)throw Error(s(387));r=t.pendingProps;var a=t.memoizedState;i=a.element,Ra(e,t),Ga(t,r,null,n);var o=t.memoizedState;if(r=o.cache,Wi(t,ra,r),r!==a.cache&&qi(t,[ra],n,!0),Wa(),r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=gc(e,t,r,n);break a}else if(r!==i){i=hi(Error(s(424)),t),Bi(i),t=gc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(H=cf(e.firstChild),Ai=t,U=!0,ji=null,Mi=!0,n=Fa(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ri(),r===i){t=Dc(e,t,n);break a}nc(e,t,r,n)}t=t.child}return t;case 26:return fc(e,t),e===null?(n=kf(t.type,null,t.pendingProps,null))?t.memoizedState=n:U||(n=t.type,e=t.pendingProps,r=Bd(ce.current).createElement(n),r[st]=t,r[ct]=e,Pd(r,n,e),bt(r),t.stateNode=r):t.memoizedState=kf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&U&&(r=t.stateNode=ff(t.type,t.pendingProps,ce.current),Ai=t,Mi=!0,i=H,Zd(t.type)?(lf=i,H=cf(r.firstChild)):H=i),nc(e,t,t.pendingProps.children,n),fc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&U&&((i=r=H)&&(r=tf(r,t.type,t.pendingProps,Mi),r===null?i=!1:(t.stateNode=r,Ai=t,H=cf(r.firstChild),Mi=!1,i=!0)),i||Pi(t)),fe(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,r=a.children,Ud(i,a)?r=null:o!==null&&Ud(i,o)&&(t.flags|=32),t.memoizedState!==null&&(i=bo(e,t,Co,null,null,n),Qf._currentValue=i),fc(e,t),nc(e,t,r,n),t.child;case 6:return e===null&&U&&((e=n=H)&&(n=nf(n,t.pendingProps,Mi),n===null?e=!1:(t.stateNode=n,Ai=t,H=null,e=!0)),e||Pi(t)),null;case 13:return bc(e,t,n);case 4:return ue(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Pa(t,null,r,n):nc(e,t,r,n),t.child;case 11:return rc(e,t,t.type,t.pendingProps,n);case 7:return nc(e,t,t.pendingProps,n),t.child;case 8:return nc(e,t,t.pendingProps.children,n),t.child;case 12:return nc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Wi(t,t.type,r.value),nc(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,Xi(t),i=Zi(i),r=r(i),t.flags|=1,nc(e,t,r,n),t.child;case 14:return ic(e,t,t.type,t.pendingProps,n);case 15:return ac(e,t,t.type,t.pendingProps,n);case 19:return Ec(e,t,n);case 31:return dc(e,t,n);case 22:return oc(e,t,n,t.pendingProps);case 24:return Xi(t),r=Zi(ra),e===null?(i=ha(),i===null&&(i=q,a=ia(),i.pooledCache=a,a.refCount++,a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},La(t),Wi(t,ra,i)):((e.lanes&n)!==0&&(Ra(e,t),Ga(t,null,null,n),Wa()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,Wi(t,ra,r),r!==i.cache&&qi(t,[ra],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Wi(t,ra,r))),nc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function jc(e){e.flags|=4}function Mc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(wu())e.flags|=8192;else throw Ta=xa,ya}else e.flags&=-16777217}function Nc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Wf(t))if(wu())e.flags|=8192;else throw Ta=xa,ya}function Pc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Ye(),e.lanes|=t,Yl|=t)}function Fc(e,t){if(!U)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ic(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Lc(e,t,n){var r=t.pendingProps;switch(Oi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ic(t),null;case 1:return Ic(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Gi(ra),de(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Li(t)?jc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,zi())),Ic(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(jc(t),a===null?(Ic(t),Mc(t,i,null,r,n)):(Ic(t),Nc(t,a))):a?a===e.memoizedState?(Ic(t),t.flags&=-16777217):(jc(t),Ic(t),Nc(t,a)):(e=e.memoizedProps,e!==r&&jc(t),Ic(t),Mc(t,i,e,r,n)),null;case 27:if(pe(t),n=ce.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Ic(t),null}e=oe.current,Li(t)?Fi(t,e):(e=ff(i,r,n),t.stateNode=e,jc(t))}return Ic(t),null;case 5:if(pe(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Ic(t),null}if(a=oe.current,Li(t))Fi(t,a);else{var o=Bd(ce.current);switch(a){case 1:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case 2:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;default:switch(i){case`svg`:a=o.createElementNS(`http://www.w3.org/2000/svg`,i);break;case`math`:a=o.createElementNS(`http://www.w3.org/1998/Math/MathML`,i);break;case`script`:a=o.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?o.createElement(`select`,{is:r.is}):o.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?o.createElement(i,{is:r.is}):o.createElement(i)}}a[st]=t,a[ct]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(Pd(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&jc(t)}}return Ic(t),Mc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&jc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(s(166));if(e=ce.current,Li(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=Ai,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||Pi(t,!0)}else e=Bd(e).createTextNode(r),e[st]=t,t.stateNode=e}return Ic(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Li(t),n!==null){if(e===null){if(!r)throw Error(s(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(s(557));e[st]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),e=!1}else n=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(s(558))}return Ic(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Li(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(s(318));if(i=t.memoizedState,i=i===null?null:i.dehydrated,!i)throw Error(s(317));i[st]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ic(t),i=!1}else i=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pc(t,t.updateQueue),Ic(t),null);case 4:return de(),e===null&&Sd(t.stateNode.containerInfo),Ic(t),null;case 10:return Gi(t.type),Ic(t),null;case 19:if(I(oo),r=t.memoizedState,r===null)return Ic(t),null;if(i=(t.flags&128)!=0,a=r.rendering,a===null)if(i)Fc(r,!1);else{if(Wl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=so(e),a!==null){for(t.flags|=128,Fc(r,!1),e=a.updateQueue,t.updateQueue=e,Pc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ci(n,e),n=n.sibling;return L(oo,oo.current&1|2),U&&Ti(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ee()>tu&&(t.flags|=128,i=!0,Fc(r,!1),t.lanes=4194304)}else{if(!i)if(e=so(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Pc(t,e),Fc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!U)return Ic(t),null}else 2*Ee()-r.renderingStartTime>tu&&n!==536870912&&(t.flags|=128,i=!0,Fc(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(Ic(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ee(),e.sibling=null,n=oo.current,L(oo,i?n&1|2:n&1),U&&Ti(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Ic(t),t.subtreeFlags&6&&(t.flags|=8192)):Ic(t),n=t.updateQueue,n!==null&&Pc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&I(ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Gi(ra),Ic(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Rc(e,t){switch(Oi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gi(ra),de(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(s(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(oo),null;case 4:return de(),null;case 10:return Gi(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&I(ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Gi(ra),null;case 25:return null;default:return null}}function zc(e,t){switch(Oi(t),t.tag){case 3:Gi(ra),de();break;case 26:case 27:case 5:pe(t);break;case 4:de();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:I(oo);break;case 10:Gi(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&I(ma);break;case 24:Gi(ra)}}function Bc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Z(t,t.return,e)}}function Vc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Z(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Z(t,t.return,e)}}function Hc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{qa(t,n)}catch(t){Z(e,e.return,t)}}}function Uc(e,t,n){n.props=Ws(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Z(e,t,n)}}function Wc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Z(e,t,n)}}function Gc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Z(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Z(e,t,n)}else n.current=null}function Kc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Z(e,e.return,t)}}function qc(e,t,n){try{var r=e.stateNode;Fd(r,e.type,n,t),r[ct]=t}catch(t){Z(e,e.return,t)}}function Jc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Zd(e.type)||e.tag===4}function Yc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Jc(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&&Zd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zt));else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Xc(e,t,n),e=e.sibling;e!==null;)Xc(e,t,n),e=e.sibling}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Zd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Pd(t,r,n),t[st]=e,t[ct]=n}catch(t){Z(e,e.return,t)}}var $c=!1,el=!1,tl=!1,nl=typeof WeakSet==`function`?WeakSet:Set,rl=null;function il(e,t){if(e=e.containerInfo,Rd=sp,e=Tr(e),Er(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(c=o+i),f!==a||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===i&&(c=o),p===a&&++d===r&&(l=o),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(zd={focusedElem:e,selectionRange:n},sp=!1,rl=t;rl!==null;)if(t=rl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,rl=e;else for(;rl!==null;){switch(t=rl,a=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&a!==null){e=void 0,n=t,i=a.memoizedProps,a=a.memoizedState,r=n.stateNode;try{var h=Ws(n.type,i);e=r.getSnapshotBeforeUpdate(h,a),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Z(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ef(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ef(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,rl=e;break}rl=t.return}}function al(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bl(e,n),r&4&&Bc(5,n);break;case 1:if(bl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Z(n,n.return,e)}else{var i=Ws(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Z(n,n.return,e)}}r&64&&Hc(n),r&512&&Wc(n,n.return);break;case 3:if(bl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{qa(e,t)}catch(e){Z(n,n.return,e)}}break;case 27:t===null&&r&4&&Qc(n);case 26:case 5:bl(e,n),t===null&&r&4&&Kc(n),r&512&&Wc(n,n.return);break;case 12:bl(e,n);break;case 31:bl(e,n),r&4&&dl(e,n);break;case 13:bl(e,n),r&4&&fl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Ju.bind(null,n),sf(e,n))));break;case 22:if(r=n.memoizedState!==null||$c,!r){t=t!==null&&t.memoizedState!==null||el,i=$c;var a=el;$c=r,(el=t)&&!a?Sl(e,n,(n.subtreeFlags&8772)!=0):bl(e,n),$c=i,el=a}break;case 30:break;default:bl(e,n)}}function ol(e){var t=e.alternate;t!==null&&(e.alternate=null,ol(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ht(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var sl=null,cl=!1;function ll(e,t,n){for(n=n.child;n!==null;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(Ie&&typeof Ie.onCommitFiberUnmount==`function`)try{Ie.onCommitFiberUnmount(Fe,n)}catch{}switch(n.tag){case 26:el||Gc(n,t),ll(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:el||Gc(n,t);var r=sl,i=cl;Zd(n.type)&&(sl=n.stateNode,cl=!1),ll(e,t,n),pf(n.stateNode),sl=r,cl=i;break;case 5:el||Gc(n,t);case 6:if(r=sl,i=cl,sl=null,ll(e,t,n),sl=r,cl=i,sl!==null)if(cl)try{(sl.nodeType===9?sl.body:sl.nodeName===`HTML`?sl.ownerDocument.body:sl).removeChild(n.stateNode)}catch(e){Z(n,t,e)}else try{sl.removeChild(n.stateNode)}catch(e){Z(n,t,e)}break;case 18:sl!==null&&(cl?(e=sl,Qd(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):Qd(sl,n.stateNode));break;case 4:r=sl,i=cl,sl=n.stateNode.containerInfo,cl=!0,ll(e,t,n),sl=r,cl=i;break;case 0:case 11:case 14:case 15:Vc(2,n,t),el||Vc(4,n,t),ll(e,t,n);break;case 1:el||(Gc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Uc(n,t,r)),ll(e,t,n);break;case 21:ll(e,t,n);break;case 22:el=(r=el)||n.memoizedState!==null,ll(e,t,n),el=r;break;default:ll(e,t,n)}}function dl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Z(t,t.return,e)}}}function fl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Z(t,t.return,e)}}function pl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nl),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nl),t;default:throw Error(s(435,e.tag))}}function ml(e,t){var n=pl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Yu.bind(null,e,t);t.then(r,r)}})}function hl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],a=e,o=t,c=o;a:for(;c!==null;){switch(c.tag){case 27:if(Zd(c.type)){sl=c.stateNode,cl=!1;break a}break;case 5:sl=c.stateNode,cl=!1;break a;case 3:case 4:sl=c.stateNode.containerInfo,cl=!0;break a}c=c.return}if(sl===null)throw Error(s(160));ul(a,o,i),sl=null,cl=!1,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)_l(t,e),t=t.sibling}var gl=null;function _l(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:hl(t,e),vl(e),r&4&&(Vc(3,e,e.return),Bc(3,e),Vc(5,e,e.return));break;case 1:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&64&&$c&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=gl;if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),r&4){var a=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;b:switch(r){case`title`:a=i.getElementsByTagName(`title`)[0],(!a||a[mt]||a[st]||a.namespaceURI===`http://www.w3.org/2000/svg`||a.hasAttribute(`itemprop`))&&(a=i.createElement(r),i.head.insertBefore(a,i.querySelector(`head > title`))),Pd(a,r,n),a[st]=e,bt(a),r=a;break a;case`link`:var o=Vf(`link`,`href`,i).get(r+(n.href||``));if(o){for(var c=0;c<o.length;c++)if(a=o[c],a.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&a.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&a.getAttribute(`title`)===(n.title==null?null:n.title)&&a.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;case`meta`:if(o=Vf(`meta`,`content`,i).get(r+(n.content||``))){for(c=0;c<o.length;c++)if(a=o[c],a.getAttribute(`content`)===(n.content==null?null:``+n.content)&&a.getAttribute(`name`)===(n.name==null?null:n.name)&&a.getAttribute(`property`)===(n.property==null?null:n.property)&&a.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(c,1);break b}}a=i.createElement(r),Pd(a,r,n),i.head.appendChild(a);break;default:throw Error(s(468,r))}a[st]=e,bt(a),r=a}e.stateNode=r}else Hf(i,e.type,e.stateNode);else e.stateNode=If(i,r,e.memoizedProps);else a===r?r===null&&e.stateNode!==null&&qc(e,e.memoizedProps,n.memoizedProps):(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,r===null?Hf(i,e.type,e.stateNode):If(i,r,e.memoizedProps))}break;case 27:hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),n!==null&&r&4&&qc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(hl(t,e),vl(e),r&512&&(el||n===null||Gc(n,n.return)),e.flags&32){i=e.stateNode;try{Ut(i,``)}catch(t){Z(e,e.return,t)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,qc(e,i,n===null?i:n.memoizedProps)),r&1024&&(tl=!0);break;case 6:if(hl(t,e),vl(e),r&4){if(e.stateNode===null)throw Error(s(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Z(e,e.return,t)}}break;case 3:if(Bf=null,i=gl,gl=gf(t.containerInfo),hl(t,e),gl=i,vl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Z(e,e.return,t)}tl&&(tl=!1,yl(e));break;case 4:r=gl,gl=gf(e.stateNode.containerInfo),hl(t,e),vl(e),gl=r;break;case 12:hl(t,e),vl(e);break;case 31:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 13:hl(t,e),vl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&($l=Ee()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=$c,d=el;if($c=u||i,el=d||l,hl(t,e),el=d,$c=u,vl(e),r&8192)a:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||$c||el||xl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(a=l.stateNode,i)o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Z(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?``:l.memoizedProps}catch(e){Z(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;i?$d(m,!0):$d(l.stateNode,!1)}catch(e){Z(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,ml(e,n))));break;case 19:hl(t,e),vl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,ml(e,r)));break;case 30:break;case 21:break;default:hl(t,e),vl(e)}}function vl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Jc(r)){n=r;break}r=r.return}if(n==null)throw Error(s(160));switch(n.tag){case 27:var i=n.stateNode;Zc(e,Yc(e),i);break;case 5:var a=n.stateNode;n.flags&32&&(Ut(a,``),n.flags&=-33),Zc(e,Yc(e),a);break;case 3:case 4:var o=n.stateNode.containerInfo;Xc(e,Yc(e),o);break;default:throw Error(s(161))}}catch(t){Z(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)al(e,t.alternate,t),t=t.sibling}function xl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Vc(4,t,t.return),xl(t);break;case 1:Gc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Uc(t,t.return,n),xl(t);break;case 27:pf(t.stateNode);case 26:case 5:Gc(t,t.return),xl(t);break;case 22:t.memoizedState===null&&xl(t);break;case 30:xl(t);break;default:xl(t)}e=e.sibling}}function Sl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:Sl(i,a,n),Bc(4,a);break;case 1:if(Sl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Z(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ka(c[i],s)}catch(e){Z(r,r.return,e)}}n&&o&64&&Hc(a),Wc(a,a.return);break;case 27:Qc(a);case 26:case 5:Sl(i,a,n),n&&r===null&&o&4&&Kc(a),Wc(a,a.return);break;case 12:Sl(i,a,n);break;case 31:Sl(i,a,n),n&&o&4&&dl(i,a);break;case 13:Sl(i,a,n),n&&o&4&&fl(i,a);break;case 22:a.memoizedState===null&&Sl(i,a,n),Wc(a,a.return);break;case 30:break;default:Sl(i,a,n)}t=t.sibling}}function Cl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&aa(n))}function wl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&aa(e))}function Tl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)El(e,t,n,r),t=t.sibling}function El(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Tl(e,t,n,r),i&2048&&Bc(9,t);break;case 1:Tl(e,t,n,r);break;case 3:Tl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&aa(e)));break;case 12:if(i&2048){Tl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Z(t,t.return,e)}}else Tl(e,t,n,r);break;case 31:Tl(e,t,n,r);break;case 13:Tl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Tl(e,t,n,r):(a._visibility|=2,Dl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Tl(e,t,n,r):Ol(e,t),i&2048&&Cl(o,t);break;case 24:Tl(e,t,n,r),i&2048&&wl(t.alternate,t);break;default:Tl(e,t,n,r)}}function Dl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Dl(a,o,s,c,i),Bc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Dl(a,o,s,c,i)):u._visibility&2?Dl(a,o,s,c,i):Ol(a,o),i&&l&2048&&Cl(o.alternate,o);break;case 24:Dl(a,o,s,c,i),i&&l&2048&&wl(o.alternate,o);break;default:Dl(a,o,s,c,i)}t=t.sibling}}function Ol(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ol(n,r),i&2048&&Cl(r.alternate,r);break;case 24:Ol(n,r),i&2048&&wl(r.alternate,r);break;default:Ol(n,r)}t=t.sibling}}var kl=8192;function Al(e,t,n){if(e.subtreeFlags&kl)for(e=e.child;e!==null;)jl(e,t,n),e=e.sibling}function jl(e,t,n){switch(e.tag){case 26:Al(e,t,n),e.flags&kl&&e.memoizedState!==null&&Gf(n,gl,e.memoizedState,e.memoizedProps);break;case 5:Al(e,t,n);break;case 3:case 4:var r=gl;gl=gf(e.stateNode.containerInfo),Al(e,t,n),gl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=kl,kl=16777216,Al(e,t,n),kl=r):Al(e,t,n));break;default:Al(e,t,n)}}function Ml(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Nl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pl(e),e=e.sibling}function Pl(e){switch(e.tag){case 0:case 11:case 15:Nl(e),e.flags&2048&&Vc(9,e,e.return);break;case 3:Nl(e);break;case 12:Nl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fl(e)):Nl(e);break;default:Nl(e)}}function Fl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];rl=r,Il(r,e)}Ml(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Vc(8,t,t.return),Fl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Fl(t));break;default:Fl(t)}e=e.sibling}}function Il(e,t){for(;rl!==null;){var n=rl;switch(n.tag){case 0:case 11:case 15:Vc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:aa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,rl=r;else a:for(n=e;rl!==null;){r=rl;var i=r.sibling,a=r.return;if(ol(r),r===n){rl=null;break a}if(i!==null){i.return=a,rl=i;break a}rl=a}}}var Ll={getCacheForType:function(e){var t=Zi(ra),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Zi(ra).controller.signal}},Rl=typeof WeakMap==`function`?WeakMap:Map,K=0,q=null,J=null,Y=0,X=0,zl=null,Bl=!1,Vl=!1,Hl=!1,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=0,Yl=0,Xl=null,Zl=null,Ql=!1,$l=0,eu=0,tu=1/0,nu=null,ru=null,iu=0,au=null,ou=null,su=0,cu=0,lu=null,uu=null,du=0,fu=null;function pu(){return K&2&&Y!==0?Y&-Y:j.T===null?it():dd()}function mu(){if(Jl===0)if(!(Y&536870912)||U){var e=Ue;Ue<<=1,!(Ue&3932160)&&(Ue=262144),Jl=e}else Jl=536870912;return e=$a.current,e!==null&&(e.flags|=32),Jl}function hu(e,t,n){(e===q&&(X===2||X===9)||e.cancelPendingCommit!==null)&&(Su(e,0),yu(e,Y,Jl,!1)),Ze(e,n),(!(K&2)||e!==q)&&(e===q&&(!(K&2)&&(Kl|=n),Wl===4&&yu(e,Y,Jl,!1)),rd(e))}function gu(e,t,n){if(K&6)throw Error(s(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||qe(e,t),i=r?Au(e,t):Ou(e,t,!0),a=r;do{if(i===0){Vl&&!r&&yu(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!vu(n)){i=Ou(e,t,!1),a=!1;continue}if(i===2){if(a=t,e.errorRecoveryDisabledLanes&a)var o=0;else o=e.pendingLanes&-536870913,o=o===0?o&536870912?536870912:0:o;if(o!==0){t=o;a:{var c=e;i=Xl;var l=c.current.memoizedState.isDehydrated;if(l&&(Su(c,o).flags|=256),o=Ou(c,o,!1),o!==2){if(Hl&&!l){c.errorRecoveryDisabledLanes|=a,Kl|=a,i=4;break a}a=Zl,Zl=i,a!==null&&(Zl===null?Zl=a:Zl.push.apply(Zl,a))}i=o}if(a=!1,i!==2)continue}}if(i===1){Su(e,0),yu(e,t,0,!0);break}a:{switch(r=e,a=i,a){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:yu(r,t,Jl,!Bl);break a;case 2:Zl=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(i=$l+300-Ee(),10<i)){if(yu(r,t,Jl,!Bl),Ke(r,0,!0)!==0)break a;su=t,r.timeoutHandle=Kd(_u.bind(null,r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,a,`Throttled`,-0,0),i);break a}_u(r,n,Zl,nu,Ql,t,Jl,Kl,Yl,Bl,a,null,-0,0)}}break}while(1);rd(e)}function _u(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zt},jl(t,a,d);var m=(a&62914560)===a?$l-Ee():(a&4194048)===a?eu-Ee():0;if(m=qf(d,m),m!==null){su=a,e.cancelPendingCommit=m(Lu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),yu(e,a,o,!l);return}}Lu(e,t,a,n,r,i,o,s,c)}function vu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!br(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function yu(e,t,n,r){t&=~ql,t&=~Kl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Re(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&$e(e,n,t)}function bu(){return K&6?!0:(id(0,!1),!1)}function xu(){if(J!==null){if(X===0)var e=J.return;else e=J,Ui=Hi=null,Eo(e),Oa=null,ka=0,e=J;for(;e!==null;)zc(e.alternate,e),e=e.return;J=null}}function Su(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,qd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),su=0,xu(),q=e,J=n=si(e.current,null),Y=t,X=0,zl=null,Bl=!1,Vl=qe(e,t),Hl=!1,Yl=Jl=ql=Kl=Gl=Wl=0,Zl=Xl=null,Ql=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Re(r),a=1<<i;t|=e[i],r&=~a}return Ul=t,Zr(),n}function Cu(e,t){W=null,j.H=Is,t===va||t===ba?(t=Ea(),X=3):t===ya?(t=Ea(),X=4):X=t===ec?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,zl=t,J===null&&(Wl=1,Js(e,hi(t,e.current)))}function wu(){var e=$a.current;return e===null?!0:(Y&4194048)===Y?eo===null:(Y&62914560)===Y||Y&536870912?e===eo:!1}function Tu(){var e=j.H;return j.H=Is,e===null?Is:e}function Eu(){var e=j.A;return j.A=Ll,e}function Du(){Wl=4,Bl||(Y&4194048)!==Y&&$a.current!==null||(Vl=!0),!(Gl&134217727)&&!(Kl&134217727)||q===null||yu(q,Y,Jl,!1)}function Ou(e,t,n){var r=K;K|=2;var i=Tu(),a=Eu();(q!==e||Y!==t)&&(nu=null,Su(e,t)),t=!1;var o=Wl;a:do try{if(X!==0&&J!==null){var s=J,c=zl;switch(X){case 8:xu(),o=6;break a;case 3:case 2:case 9:case 6:$a.current===null&&(t=!0);var l=X;if(X=0,zl=null,Pu(e,s,c,l),n&&Vl){o=0;break a}break;default:l=X,X=0,zl=null,Pu(e,s,c,l)}}ku(),o=Wl;break}catch(t){Cu(e,t)}while(1);return t&&e.shellSuspendCounter++,Ui=Hi=null,K=r,j.H=i,j.A=a,J===null&&(q=null,Y=0,Zr()),o}function ku(){for(;J!==null;)Mu(J)}function Au(e,t){var n=K;K|=2;var r=Tu(),i=Eu();q!==e||Y!==t?(nu=null,tu=Ee()+500,Su(e,t)):Vl=qe(e,t);a:do try{if(X!==0&&J!==null){t=J;var a=zl;b:switch(X){case 1:X=0,zl=null,Pu(e,t,a,1);break;case 2:case 9:if(Sa(a)){X=0,zl=null,Nu(t);break}t=function(){X!==2&&X!==9||q!==e||(X=7),rd(e)},a.then(t,t);break a;case 3:X=7;break a;case 4:X=5;break a;case 7:Sa(a)?(X=0,zl=null,Nu(t)):(X=0,zl=null,Pu(e,t,a,7));break;case 5:var o=null;switch(J.tag){case 26:o=J.memoizedState;case 5:case 27:var c=J;if(o?Wf(o):c.stateNode.complete){X=0,zl=null;var l=c.sibling;if(l!==null)J=l;else{var u=c.return;u===null?J=null:(J=u,Fu(u))}break b}}X=0,zl=null,Pu(e,t,a,5);break;case 6:X=0,zl=null,Pu(e,t,a,6);break;case 8:xu(),Wl=6;break a;default:throw Error(s(462))}}ju();break}catch(t){Cu(e,t)}while(1);return Ui=Hi=null,j.H=r,j.A=i,K=n,J===null?(q=null,Y=0,Zr(),Wl):0}function ju(){for(;J!==null&&!we();)Mu(J)}function Mu(e){var t=Ac(e.alternate,e,Ul);e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Nu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=mc(n,t,t.pendingProps,t.type,void 0,Y);break;case 11:t=mc(n,t,t.pendingProps,t.type.render,t.ref,Y);break;case 5:Eo(t);default:zc(n,t),t=J=ci(t,Ul),t=Ac(n,t,Ul)}e.memoizedProps=e.pendingProps,t===null?Fu(e):J=t}function Pu(e,t,n,r){Ui=Hi=null,Eo(t),Oa=null,ka=0;var i=t.return;try{if($s(e,i,t,n,Y)){Wl=1,Js(e,hi(n,e.current)),J=null;return}}catch(t){if(i!==null)throw J=i,t;Wl=1,Js(e,hi(n,e.current)),J=null;return}t.flags&32768?(U||r===1?e=!0:Vl||Y&536870912?e=!1:(Bl=e=!0,(r===2||r===9||r===3||r===6)&&(r=$a.current,r!==null&&r.tag===13&&(r.flags|=16384))),Iu(t,e)):Fu(t)}function Fu(e){var t=e;do{if(t.flags&32768){Iu(t,Bl);return}e=t.return;var n=Lc(t.alternate,t,Ul);if(n!==null){J=n;return}if(t=t.sibling,t!==null){J=t;return}J=t=e}while(t!==null);Wl===0&&(Wl=5)}function Iu(e,t){do{var n=Rc(e.alternate,e);if(n!==null){n.flags&=32767,J=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){J=e;return}J=e=n}while(e!==null);Wl=6,J=null}function Lu(e,t,n,r,i,a,o,c,l){e.cancelPendingCommit=null;do Hu();while(iu!==0);if(K&6)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(a=t.lanes|t.childLanes,a|=Xr,Qe(e,n,a,o,c,l),e===q&&(J=q=null,Y=0),ou=t,au=e,su=n,cu=a,lu=i,uu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Xu(Ae,function(){return Uu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=j.T,j.T=null,i=M.p,M.p=2,o=K,K|=4;try{il(e,t,n)}finally{K=o,M.p=i,j.T=r}}iu=1,Ru(),zu(),Bu()}}function Ru(){if(iu===1){iu=0;var e=au,t=ou,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=K;K|=4;try{_l(t,e);var a=zd,o=Tr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&wr(s.ownerDocument.documentElement,s)){if(c!==null&&Er(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Cr(s,h),v=Cr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!Rd,zd=Rd=null}finally{K=i,M.p=r,j.T=n}}e.current=t,iu=2}}function zu(){if(iu===2){iu=0;var e=au,t=ou,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=j.T,j.T=null;var r=M.p;M.p=2;var i=K;K|=4;try{al(e,t.alternate,t)}finally{K=i,M.p=r,j.T=n}}iu=3}}function Bu(){if(iu===4||iu===3){iu=0,Te();var e=au,t=ou,n=su,r=uu;t.subtreeFlags&10256||t.flags&10256?iu=5:(iu=0,ou=au=null,Vu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ru=null),rt(n),t=t.stateNode,Ie&&typeof Ie.onCommitFiberRoot==`function`)try{Ie.onCommitFiberRoot(Fe,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=j.T,i=M.p,M.p=2,j.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{j.T=t,M.p=i}}su&3&&Hu(),rd(e),i=e.pendingLanes,n&261930&&i&42?e===fu?du++:(du=0,fu=e):du=0,id(0,!1)}}function Vu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,aa(t)))}function Hu(){return Ru(),zu(),Bu(),Uu()}function Uu(){if(iu!==5)return!1;var e=au,t=cu;cu=0;var n=rt(su),r=j.T,i=M.p;try{M.p=32>n?32:n,j.T=null,n=lu,lu=null;var a=au,o=su;if(iu=0,ou=au=null,su=0,K&6)throw Error(s(331));var c=K;if(K|=4,Pl(a.current),El(a,a.current,o,n),K=c,id(0,!1),Ie&&typeof Ie.onPostCommitFiberRoot==`function`)try{Ie.onPostCommitFiberRoot(Fe,a)}catch{}return!0}finally{M.p=i,j.T=r,Vu(e,t)}}function Wu(e,t,n){t=hi(n,t),t=Xs(e.stateNode,t,2),e=Ba(e,t,2),e!==null&&(Ze(e,2),rd(e))}function Z(e,t,n){if(e.tag===3)Wu(e,e,n);else for(;t!==null;){if(t.tag===3){Wu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ru===null||!ru.has(r))){e=hi(n,e),n=Zs(2),r=Ba(t,n,2),r!==null&&(Qs(n,r,t,e),Ze(r,2),rd(r));break}}t=t.return}}function Gu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Rl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Hl=!0,i.add(n),e=Ku.bind(null,e,t,n),t.then(e,e))}function Ku(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,q===e&&(Y&n)===n&&(Wl===4||Wl===3&&(Y&62914560)===Y&&300>Ee()-$l?!(K&2)&&Su(e,0):ql|=n,Yl===Y&&(Yl=0)),rd(e)}function qu(e,t){t===0&&(t=Ye()),e=ei(e,t),e!==null&&(Ze(e,t),rd(e))}function Ju(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),qu(e,n)}function Yu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}r!==null&&r.delete(t),qu(e,n)}function Xu(e,t){return Se(e,t)}var Zu=null,Qu=null,$u=!1,ed=!1,td=!1,nd=0;function rd(e){e!==Qu&&e.next===null&&(Qu===null?Zu=Qu=e:Qu=Qu.next=e),ed=!0,$u||($u=!0,ud())}function id(e,t){if(!td&&ed){td=!0;do for(var n=!1,r=Zu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Re(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ld(r,a))}else a=Y,a=Ke(r,r===q?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||qe(r,a)||(n=!0,ld(r,a));r=r.next}while(n);td=!1}}function ad(){od()}function od(){ed=$u=!1;var e=0;nd!==0&&Gd()&&(e=nd);for(var t=Ee(),n=null,r=Zu;r!==null;){var i=r.next,a=sd(r,t);a===0?(r.next=null,n===null?Zu=i:n.next=i,i===null&&(Qu=n)):(n=r,(e!==0||a&3)&&(ed=!0)),r=i}iu!==0&&iu!==5||id(e,!1),nd!==0&&(nd=0)}function sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Re(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Je(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=q,n=Y,n=Ke(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(X===2||X===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ce(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||qe(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ce(r),rt(n)){case 2:case 8:n=ke;break;case 32:n=Ae;break;case 268435456:n=Me;break;default:n=Ae}return r=cd.bind(null,e),n=Se(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ce(r),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,t){if(iu!==0&&iu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Hu()&&e.callbackNode!==n)return null;var r=Y;return r=Ke(e,e===q?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(gu(e,r,t),sd(e,Ee()),e.callbackNode!=null&&e.callbackNode===n?cd.bind(null,e):null)}function ld(e,t){if(Hu())return null;gu(e,t,!0)}function ud(){Yd(function(){K&6?Se(Oe,ad):od()})}function dd(){if(nd===0){var e=ca;e===0&&(e=He,He<<=1,!(He&261888)&&(He=256)),nd=e}return nd}function fd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Xt(``+e)}function pd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function md(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=fd((i[ct]||null).action),o=r.submitter;o&&(t=(t=o[ct]||null)?fd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new yn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(nd!==0){var e=o?pd(i,o):new FormData(i);Ss(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?pd(i,o):new FormData(i),Ss(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var hd=0;hd<Gr.length;hd++){var gd=Gr[hd];Kr(gd.toLowerCase(),`on`+(gd[0].toUpperCase()+gd.slice(1)))}Kr(Lr,`onAnimationEnd`),Kr(Rr,`onAnimationIteration`),Kr(zr,`onAnimationStart`),Kr(`dblclick`,`onDoubleClick`),Kr(`focusin`,`onFocus`),Kr(`focusout`,`onBlur`),Kr(Br,`onTransitionRun`),Kr(Vr,`onTransitionStart`),Kr(Hr,`onTransitionCancel`),Kr(Ur,`onTransitionEnd`),wt(`onMouseEnter`,[`mouseout`,`mouseover`]),wt(`onMouseLeave`,[`mouseout`,`mouseover`]),wt(`onPointerEnter`,[`pointerout`,`pointerover`]),wt(`onPointerLeave`,[`pointerout`,`pointerover`]),Ct(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ct(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ct(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ct(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ct(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var _d=`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(` `),vd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(_d));function yd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){qr(e)}i.currentTarget=null,a=c}}}}function Q(e,t){var n=t[ut];n===void 0&&(n=t[ut]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,xt.forEach(function(t){t!==`selectionchange`&&(vd.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!cn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=gt(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}an(function(){var r=a,i=$t(n),o=[];a:{var s=Wr.get(e);if(s!==void 0){var c=yn,u=e;switch(e){case`keypress`:if(mn(n)===0)break a;case`keydown`:case`keyup`:c=Ln;break;case`focusin`:u=`focus`,c=On;break;case`focusout`:u=`blur`,c=On;break;case`beforeblur`:case`afterblur`:c=On;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=En;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Dn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=zn;break;case Lr:case Rr:case zr:c=kn;break;case Ur:c=Bn;break;case`scroll`:case`scrollend`:c=xn;break;case`wheel`:c=Vn;break;case`copy`:case`cut`:case`paste`:c=An;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Rn;break;case`toggle`:case`beforetoggle`:c=Hn}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?s===null?null:s+`Capture`:s;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=on(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(s=new c(s,u,null,n,i),o.push({event:s,listeners:d}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Qt&&(u=n.relatedTarget||n.fromElement)&&(gt(u)||u[lt]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(u=n.relatedTarget||n.toElement,c=r,u=u?gt(u):null,u!==null&&(f=l(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(c=null,u=r),c!==u)){if(d=En,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Rn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?s:vt(c),h=u==null?s:vt(u),s=new d(g,m+`leave`,c,n,i),s.target=f,s.relatedTarget=h,g=null,gt(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,c&&u)b:{for(d=Dd,p=c,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;c!==null&&Od(o,s,c,d,!1),u!==null&&f!==null&&Od(o,f,u,d,!0)}}a:{if(s=r?vt(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var v=cr;else if(nr(s))if(lr)v=vr;else{v=gr;var y=hr}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&qt(r.elementType)&&(v=cr):v=_r;if(v&&=v(e,r)){rr(o,v,n,i);break a}y&&y(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&Bt(s,`number`,s.value)}switch(y=r?vt(r):window,e){case`focusin`:(nr(y)||y.contentEditable===`true`)&&(Or=y,kr=r,Ar=null);break;case`focusout`:Ar=kr=Or=null;break;case`mousedown`:jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:jr=!1,Mr(o,n,i);break;case`selectionchange`:if(Dr)break;case`keydown`:case`keyup`:Mr(o,n,i)}var b;if(Wn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Qn?Xn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(qn&&n.locale!==`ko`&&(Qn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Qn&&(b=pn()):(un=i,dn=`value`in un?un.value:un.textContent,Qn=!0)),y=Ed(r,x),0<y.length&&(x=new jn(x,e,null,n,i),o.push({event:x,listeners:y}),b?x.data=b:(b=Zn(n),b!==null&&(x.data=b)))),(b=Kn?$n(e,n):er(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new jn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:y,listeners:x}),y.data=b)),md(o,e,r,n,i)}yd(o,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=on(e,n),i!=null&&r.unshift(Td(e,i,a)),i=on(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=on(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=on(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
9
+ `).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function $(e,t,n,r,i,a){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Ut(e,``+r);break;case`className`:R(e,`class`,r);break;case`tabIndex`:R(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:R(e,n,r);break;case`style`:Kt(e,r,a);break;case`data`:if(t!==`object`){R(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Xt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof a==`function`&&(n===`formAction`?(t!==`input`&&$(e,t,`name`,i.name,i,null),$(e,t,`formEncType`,i.formEncType,i,null),$(e,t,`formMethod`,i.formMethod,i,null),$(e,t,`formTarget`,i.formTarget,i,null)):($(e,t,`encType`,i.encType,i,null),$(e,t,`method`,i.method,i,null),$(e,t,`target`,i.target,i,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Xt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Xt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Q(`beforetoggle`,e),Q(`toggle`,e),kt(e,`popover`,r);break;case`xlinkActuate`:At(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:At(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:At(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:At(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:At(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:At(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:kt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Jt.get(n)||n,kt(e,n,r))}}function Nd(e,t,n,r,i,a){switch(n){case`style`:Kt(e,r,a);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(s(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(s(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Ut(e,r):(typeof r==`number`||typeof r==`bigint`)&&Ut(e,``+r);break;case`onScroll`:r!=null&&Q(`scroll`,e);break;case`onScrollEnd`:r!=null&&Q(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Zt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!St.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),a=e[ct]||null,a=a==null?null:a[n],typeof a==`function`&&e.removeEventListener(t,a,i),typeof r==`function`)){typeof a!=`function`&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):kt(e,n,r)}}}function Pd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Q(`error`,e),Q(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var o=n[a];if(o!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(s(137,t));default:$(e,t,a,o,n,null)}}i&&$(e,t,`srcSet`,n.srcSet,n,null),r&&$(e,t,`src`,n.src,n,null);return;case`input`:Q(`invalid`,e);var c=a=o=i=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:i=d;break;case`type`:o=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:a=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(s(137,t));break;default:$(e,t,r,d,n,null)}}zt(e,a,c,l,u,o,i,!1);return;case`select`:for(i in Q(`invalid`,e),r=o=a=null,n)if(n.hasOwnProperty(i)&&(c=n[i],c!=null))switch(i){case`value`:a=c;break;case`defaultValue`:o=c;break;case`multiple`:r=c;default:$(e,t,i,c,n,null)}t=a,n=o,e.multiple=!!r,t==null?n!=null&&B(e,!!r,n,!0):B(e,!!r,t,!1);return;case`textarea`:for(o in Q(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(o)&&(c=n[o],c!=null))switch(o){case`value`:r=c;break;case`defaultValue`:i=c;break;case`children`:a=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(s(91));break;default:$(e,t,o,c,n,null)}Ht(e,r,i,a);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:$(e,t,l,r,n,null)}return;case`dialog`:Q(`beforetoggle`,e),Q(`toggle`,e),Q(`cancel`,e),Q(`close`,e);break;case`iframe`:case`object`:Q(`load`,e);break;case`video`:case`audio`:for(r=0;r<_d.length;r++)Q(_d[r],e);break;case`image`:Q(`error`,e),Q(`load`,e);break;case`details`:Q(`toggle`,e);break;case`embed`:case`source`:case`link`:Q(`error`,e),Q(`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(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(s(137,t));default:$(e,t,u,r,n,null)}return;default:if(qt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Nd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&$(e,t,c,r,n,null))}function Fd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,a=null,o=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||$(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:a=m;break;case`name`:i=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:o=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(s(137,t));break;default:m!==f&&$(e,t,p,m,r,f)}}Rt(e,o,c,l,u,d,a,i);return;case`select`:for(a in m=o=c=p=null,n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(a)||$(e,t,a,null,r,l)}for(i in r)if(a=r[i],l=n[i],r.hasOwnProperty(i)&&(a!=null||l!=null))switch(i){case`value`:p=a;break;case`defaultValue`:c=a;break;case`multiple`:o=a;default:a!==l&&$(e,t,i,a,r,l)}t=c,n=o,r=m,p==null?!!r!=!!n&&(t==null?B(e,!!n,n?[]:``,!1):B(e,!!n,t,!0)):B(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(i=n[c],n.hasOwnProperty(c)&&i!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:$(e,t,c,null,r,i)}for(o in r)if(i=r[o],a=n[o],r.hasOwnProperty(o)&&(i!=null||a!=null))switch(o){case`value`:p=i;break;case`defaultValue`:m=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error(s(91));break;default:i!==a&&$(e,t,o,i,r,a)}Vt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:$(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:$(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&$(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(s(137,t));break;default:$(e,t,u,p,r,m)}return;default:if(qt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Nd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Nd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&$(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||$(e,t,f,p,r,m)}function Id(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Ld(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Id(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Id(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Rd=null,zd=null;function Bd(e){return e.nodeType===9?e:e.ownerDocument}function Vd(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 Hd(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Ud(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Wd=null;function Gd(){var e=window.event;return e&&e.type===`popstate`?e===Wd?!1:(Wd=e,!0):(Wd=null,!1)}var Kd=typeof setTimeout==`function`?setTimeout:void 0,qd=typeof clearTimeout==`function`?clearTimeout:void 0,Jd=typeof Promise==`function`?Promise:void 0,Yd=typeof queueMicrotask==`function`?queueMicrotask:Jd===void 0?Kd:function(e){return Jd.resolve(null).then(e).catch(Xd)};function Xd(e){setTimeout(function(){throw e})}function Zd(e){return e===`head`}function Qd(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)pf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,pf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[mt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&pf(e.ownerDocument.body);n=i}while(n);Np(t)}function $d(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function ef(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:ef(n),ht(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function tf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[mt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=cf(e.nextSibling),e===null)break}return null}function nf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=cf(e.nextSibling),e===null))return null;return e}function rf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=cf(e.nextSibling),e===null))return null;return e}function af(e){return e.data===`$?`||e.data===`$~`}function of(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function sf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function cf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var lf=null;function uf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function df(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function ff(e,t,n){switch(t=Bd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(s(452));return e;case`head`:if(e=t.head,!e)throw Error(s(453));return e;case`body`:if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function pf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ht(e)}var mf=new Map,hf=new Set;function gf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _f=M.d;M.d={f:vf,r:yf,D:Sf,C:Cf,L:wf,m:Tf,X:Df,S:Ef,M:Of};function vf(){var e=_f.f(),t=bu();return e||t}function yf(e){var t=_t(e);t!==null&&t.tag===5&&t.type===`form`?ws(t):_f.r(e)}var bf=typeof document>`u`?null:document;function xf(e,t,n){var r=bf;if(r&&typeof t==`string`&&t){var i=z(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),hf.has(i)||(hf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Pd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Sf(e){_f.D(e),xf(`dns-prefetch`,e,null)}function Cf(e,t){_f.C(e,t),xf(`preconnect`,e,t)}function wf(e,t,n){_f.L(e,t,n);var r=bf;if(r&&e&&t){var i=`link[rel="preload"][as="`+z(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+z(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+z(n.imageSizes)+`"]`)):i+=`[href="`+z(e)+`"]`;var a=i;switch(t){case`style`:a=Af(e);break;case`script`:a=Pf(e)}mf.has(a)||(e=h({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),mf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(jf(a))||t===`script`&&r.querySelector(Ff(a))||(t=r.createElement(`link`),Pd(t,`link`,e),bt(t),r.head.appendChild(t)))}}function Tf(e,t){_f.m(e,t);var n=bf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+z(r)+`"][href="`+z(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Pf(e)}if(!mf.has(a)&&(e=h({rel:`modulepreload`,href:e},t),mf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Ff(a)))return}r=n.createElement(`link`),Pd(r,`link`,e),bt(r),n.head.appendChild(r)}}}function Ef(e,t,n){_f.S(e,t,n);var r=bf;if(r&&e){var i=yt(r).hoistableStyles,a=Af(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(jf(a)))s.loading=5;else{e=h({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=mf.get(a))&&Rf(e,n);var c=o=r.createElement(`link`);bt(c),Pd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Lf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Df(e,t){_f.X(e,t);var n=bf;if(n&&e){var r=yt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),bt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Of(e,t){_f.M(e,t);var n=bf;if(n&&e){var r=yt(n).hoistableScripts,i=Pf(e),a=r.get(i);a||(a=n.querySelector(Ff(i)),a||(e=h({src:e,async:!0,type:`module`},t),(t=mf.get(i))&&zf(e,t),a=n.createElement(`script`),bt(a),Pd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t,n,r){var i=(i=ce.current)?gf(i):null;if(!i)throw Error(s(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Af(n.href),n=yt(i).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Af(n.href);var a=yt(i).hoistableStyles,o=a.get(e);if(o||(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},a.set(e,o),(a=i.querySelector(jf(e)))&&!a._p&&(o.instance=a,o.state.loading=5),mf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},mf.set(e,n),a||Nf(i,e,n,o.state))),t&&r===null)throw Error(s(528,``));return o}if(t&&r!==null)throw Error(s(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Pf(n),n=yt(i).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Af(e){return`href="`+z(e)+`"`}function jf(e){return`link[rel="stylesheet"][`+e+`]`}function Mf(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function Nf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Pd(t,`link`,n),bt(t),e.head.appendChild(t))}function Pf(e){return`[src="`+z(e)+`"]`}function Ff(e){return`script[async]`+e}function If(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+z(n.href)+`"]`);if(r)return t.instance=r,bt(r),r;var i=h({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),bt(r),Pd(r,`style`,i),Lf(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Af(n.href);var a=e.querySelector(jf(i));if(a)return t.state.loading|=4,t.instance=a,bt(a),a;r=Mf(n),(i=mf.get(i))&&Rf(r,i),a=(e.ownerDocument||e).createElement(`link`),bt(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),t.state.loading|=4,Lf(a,n.precedence,e),t.instance=a;case`script`:return a=Pf(n.src),(i=e.querySelector(Ff(a)))?(t.instance=i,bt(i),i):(r=n,(i=mf.get(a))&&(r=h({},n),zf(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),bt(i),Pd(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(s(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Lf(r,n.precedence,e));return t.instance}function Lf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Rf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Bf=null;function Vf(e,t,n){if(Bf===null){var r=new Map,i=Bf=new Map;i.set(n,r)}else i=Bf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[mt]||a[st]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Hf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Uf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Wf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Gf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Af(r.href),a=t.querySelector(jf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,bt(a);return}a=t.ownerDocument||t,r=Mf(r),(i=mf.get(i))&&Rf(r,i),a=a.createElement(`link`),bt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Pd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var Kf=0;function qf(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&Kf===0&&(Kf=62500*Ld());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>Kf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:N,_currentValue2:N,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Xe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xe(0),this.hiddenUpdates=Xe(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ai(3,null,null,t),e.current=a,a.stateNode=e,t=ia(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},La(a),e}function tp(e){return e?(e=ri,e):ri}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=za(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ba(e,r,t),n!==null&&(hu(n,e,t),Va(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=ei(e,67108864);t!==null&&hu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=pu();t=nt(t);var n=ei(e,t);n!==null&&hu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=2,up(e,t,n,r)}finally{M.p=a,j.T=i}}function lp(e,t,n,r){var i=j.T;j.T=null;var a=M.p;try{M.p=8,up(e,t,n,r)}finally{M.p=a,j.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=_t(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ge(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Re(o);s.entanglements[1]|=c,o&=~c}rd(a),!(K&6)&&(tu=Ee()+500,id(0,!1))}}break;case 31:case 13:s=ei(a,2),s!==null&&hu(s,a,2),bu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=$t(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=gt(e),e!==null){var t=l(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=u(t),e!==null)return e;e=null}else if(n===31){if(e=d(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(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(De()){case Oe:return 2;case ke:return 8;case Ae:case je:return 32;case Me:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`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 Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=_t(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=gt(e.target);if(t!==null){var n=l(t);if(n!==null){if(t=n.tag,t===13){if(t=u(n),t!==null){e.blockedOn=t,at(e.priority,function(){op(n)});return}}else if(t===31){if(t=d(n),t!==null){e.blockedOn=t,at(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qt=r,n.target.dispatchEvent(r),Qt=null}else return t=_t(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=_t(n);a!==null&&(e.splice(t,3),t-=3,Ss(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[ct]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[ct]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var n=t.current;np(n,pu(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),bu(),t[lt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=it();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=r.version;if(Lp!==`19.2.4`)throw Error(s(527,Lp,`19.2.4`));M.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(s(188)):(e=Object.keys(e).join(`,`),Error(s(268,e)));return e=p(t),e=e===null?null:m(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:j,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Fe=zp.inject(Rp),Ie=zp}catch{}}e.createRoot=function(e,t){if(!c(e))throw Error(s(299));var n=!1,r=``,i=Gs,a=Ks,o=qs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,i,a,o,Pp),e[lt]=t.current,Sd(e),new Fp(t)}})),c=e(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()}))(),l=i(),u={waves:8,subagentsPerWave:6,toolCallsPerSubagent:10,messagesPerSubagent:4,orchestratorToolCallsPerWave:3},d=[`Read`,`Write`,`Edit`,`Grep`,`Glob`,`Bash`,`WebSearch`,`WebFetch`,`TodoWrite`],f=[`src/services/auth.ts`,`src/services/payment.ts`,`src/routes/api.ts`,`src/models/user.ts`,`src/utils/crypto.ts`,`src/middleware/cors.ts`,`src/config/database.ts`,`src/workers/email.ts`,`src/hooks/useAuth.tsx`,`src/components/Dashboard.tsx`,`src/lib/cache.ts`,`src/routes/webhook.ts`,`tests/integration/auth.test.ts`,`tests/unit/payment.test.ts`],p=[`Refactor authentication middleware`,`Analyze database query performance`,`Research API rate limiting strategies`,`Implement caching layer`,`Fix race condition in worker queue`,`Update payment webhooks`,`Add CORS configuration`,`Write integration tests for auth flow`,`Migrate to new SDK version`,`Profile memory usage in workers`,`Investigate slow query in dashboard`,`Add input validation layer`];function m(e,t){return e[t%e.length]}function h(e={}){let t={...u,...e},n=[],r=0,i=(e,t,i=.1)=>{r+=i,n.push({time:r,type:e,payload:t})};i(`agent_spawn`,{name:`orchestrator`,isMain:!0,task:`Stress test: multi-wave parallel agent work`}),i(`message`,{agent:`orchestrator`,role:`user`,content:`Run comprehensive analysis and refactoring across the entire codebase with parallel agents`}),i(`context_update`,{agent:`orchestrator`,tokens:3e3,breakdown:{systemPrompt:1500,userMessages:1500,toolResults:0,reasoning:0,subagentResults:0}});let a=0;for(let e=0;e<t.waves;e++){i(`message`,{agent:`orchestrator`,role:`thinking`,content:`Planning wave ${e+1}: dispatching ${t.subagentsPerWave} agents for parallel work...`},.5),i(`message`,{agent:`orchestrator`,content:`Starting wave ${e+1} of ${t.waves}...`},.3);for(let n=0;n<t.orchestratorToolCallsPerWave;n++){let t=m(d,e*10+n),r=m(f,e*10+n);i(`tool_call_start`,{agent:`orchestrator`,tool:t,args:r,inputData:{file_path:r}},.2),i(`tool_call_end`,{agent:`orchestrator`,tool:t,result:`Processed ${r} — ${50+e*n*7%200} lines`,tokenCost:300+e*100},.3)}i(`context_update`,{agent:`orchestrator`,tokens:3e3+e*5e3,breakdown:{systemPrompt:1500,userMessages:1500,toolResults:1e3*(e+1),reasoning:500*(e+1),subagentResults:e*3e3}},.1);let n=[];for(let r=0;r<t.subagentsPerWave;r++){a++;let t=`agent-w${e}-s${r}`,o=m(p,a);n.push(t),i(`subagent_dispatch`,{parent:`orchestrator`,child:t,task:o},.05),i(`agent_spawn`,{name:t,parent:`orchestrator`,task:o},.05),i(`context_update`,{agent:t,tokens:1800,breakdown:{systemPrompt:1400,userMessages:400,toolResults:0,reasoning:0,subagentResults:0}},.05)}for(let r=0;r<t.toolCallsPerSubagent;r++)for(let o=0;o<t.subagentsPerWave;o++){let s=n[o],c=m(d,a*100+r*10+o),l=m(f,r*t.subagentsPerWave+o);i(`tool_call_start`,{agent:s,tool:c,args:l,inputData:{file_path:l}},.05),i(`tool_call_end`,{agent:s,tool:c,result:`Result from ${l}: ${20+r*o*3%150} matches`,tokenCost:200+r*50,...r===0&&o===0?{discovery:{type:`finding`,label:`Wave ${e} finding`,content:`Important pattern found in ${l}`}}:{}},.1),r%Math.max(1,Math.floor(t.toolCallsPerSubagent/t.messagesPerSubagent))===0&&i(`message`,{agent:s,role:`thinking`,content:`Analyzing ${l} for patterns...`},.05),r===Math.floor(t.toolCallsPerSubagent/2)&&i(`message`,{agent:s,content:`Found ${3+o} relevant patterns so far...`},.05)}for(let e=0;e<t.subagentsPerWave;e++)i(`context_update`,{agent:n[e],tokens:1800+t.toolCallsPerSubagent*300,breakdown:{systemPrompt:1400,userMessages:400,toolResults:t.toolCallsPerSubagent*200,reasoning:t.toolCallsPerSubagent*100,subagentResults:0}},.02);for(let e=0;e<t.subagentsPerWave;e++)i(`subagent_return`,{child:n[e],parent:`orchestrator`,summary:`Completed analysis: found ${3+e} patterns, modified ${1+e%3} files`},.1),i(`agent_complete`,{name:n[e]},.05)}return i(`message`,{agent:`orchestrator`,content:`All ${t.waves} waves complete. ${a} agents spawned, comprehensive analysis done.`},.5),i(`context_update`,{agent:`orchestrator`,tokens:8e4,breakdown:{systemPrompt:1500,userMessages:1500,toolResults:15e3,reasoning:22e3,subagentResults:4e4}},.2),i(`agent_complete`,{name:`orchestrator`},1),n}var g={light:()=>h({waves:2,subagentsPerWave:3,toolCallsPerSubagent:5}),medium:()=>h({waves:8,subagentsPerWave:6,toolCallsPerSubagent:10}),heavy:()=>h({waves:15,subagentsPerWave:8,toolCallsPerSubagent:15,messagesPerSubagent:6}),extreme:()=>h({waves:20,subagentsPerWave:12,toolCallsPerSubagent:20,messagesPerSubagent:8,orchestratorToolCallsPerWave:5})};function _(){if(typeof window>`u`)return null;let e=new URLSearchParams(window.location.search).get(`stress`);return e&&e in g?e:null}var v=_();v&&console.log(`[stress-test] Loading ${v} stress scenario...`);var y=v?g[v]():[{time:0,type:`agent_spawn`,payload:{name:`orchestrator`,isMain:!0,task:`Waiting for instructions...`}},{time:.2,type:`message`,payload:{agent:`orchestrator`,role:`user`,content:`Refactor the payment system to support Stripe and PayPal, add webhook handling, and write integration tests`}},{time:.4,type:`context_update`,payload:{agent:`orchestrator`,tokens:2200,breakdown:{systemPrompt:1500,userMessages:700,toolResults:0,reasoning:0,subagentResults:0}}},{time:1,type:`message`,payload:{agent:`orchestrator`,role:`thinking`,content:`This is a multi-part task: refactor payments, add Stripe + PayPal, webhooks, and tests. I should start by understanding the existing payment code before planning the implementation.`}},{time:2.5,type:`message`,payload:{agent:`orchestrator`,content:`I'll analyze the codebase and plan the payment system refactoring. Let me start by understanding the current structure.`}},{time:3,type:`context_update`,payload:{agent:`orchestrator`,tokens:3e3,breakdown:{systemPrompt:1500,userMessages:700,toolResults:0,reasoning:800,subagentResults:0}}},{time:4,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Glob`,args:`src/**/*.ts`,inputData:{pattern:`src/**/*.ts`}}},{time:4.3,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Glob`,result:`47 files matched`,tokenCost:500}},{time:4.3,type:`context_update`,payload:{agent:`orchestrator`,tokens:4200,breakdown:{systemPrompt:1500,userMessages:700,toolResults:500,reasoning:1500,subagentResults:0}}},{time:4.5,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Read`,args:`src/services/payment.ts`,inputData:{file_path:`src/services/payment.ts`}}},{time:4.8,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Read`,result:`payment.ts — 234 lines, legacy payment processor with direct Stripe v2 API calls`,tokenCost:3500,discovery:{type:`file`,label:`src/services/payment.ts`,content:`Legacy processor, 234 lines
10
+ Direct Stripe v2 calls (outdated)
11
+ No PayPal support`}}},{time:5,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Read`,args:`src/routes/checkout.ts`,inputData:{file_path:`src/routes/checkout.ts`}}},{time:5.3,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Read`,result:`checkout.ts — 89 lines, Express routes for /checkout and /payment-status`,tokenCost:1800}},{time:5.5,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Grep`,args:`"stripe|paypal|payment" --type ts`,inputData:{pattern:`stripe|paypal|payment`,type:`ts`}}},{time:5.8,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Grep`,result:`28 matches in 9 files — concentrated in services/ and routes/`,tokenCost:700,discovery:{type:`pattern`,label:`Payment references`,content:`28 matches across 9 files
12
+ Concentrated in services/ and routes/
13
+ No webhook handling found`}}},{time:6,type:`context_update`,payload:{agent:`orchestrator`,tokens:11500,breakdown:{systemPrompt:1500,userMessages:700,toolResults:6500,reasoning:2800,subagentResults:0}}},{time:8,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`TodoWrite`,args:`planning implementation`,inputData:{todos:[{content:`Analyze existing payment code`,status:`completed`,activeForm:`Analyzing existing payment code`},{content:`Research Stripe & PayPal APIs`,status:`in_progress`,activeForm:`Researching Stripe & PayPal APIs`},{content:`Create payment gateway abstraction`,status:`pending`,activeForm:`Creating payment gateway abstraction`},{content:`Implement Stripe adapter`,status:`pending`,activeForm:`Implementing Stripe adapter`},{content:`Implement PayPal adapter`,status:`pending`,activeForm:`Implementing PayPal adapter`},{content:`Add webhook handling`,status:`pending`,activeForm:`Adding webhook handling`},{content:`Write integration tests`,status:`pending`,activeForm:`Writing integration tests`},{content:`Run tests and verify`,status:`pending`,activeForm:`Running tests and verifying`}]}}},{time:8.2,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`TodoWrite`,result:`Todos updated — 8 items`,tokenCost:80}},{time:9.7,type:`message`,payload:{agent:`orchestrator`,content:`Dispatching agents for parallel research and schema analysis...`}},{time:9.9,type:`subagent_dispatch`,payload:{parent:`orchestrator`,child:`explore-agent`,task:`Deep-dive into payment flow and DB schema`}},{time:9.9,type:`subagent_dispatch`,payload:{parent:`orchestrator`,child:`research-agent`,task:`Research Stripe & PayPal API patterns`}},{time:10.2,type:`agent_spawn`,payload:{name:`explore-agent`,parent:`orchestrator`,task:`Analyze payment flow and database schema`}},{time:10.2,type:`agent_spawn`,payload:{name:`research-agent`,parent:`orchestrator`,task:`Research Stripe & PayPal integration patterns`}},{time:10.5,type:`context_update`,payload:{agent:`explore-agent`,tokens:1800,breakdown:{systemPrompt:1400,userMessages:400,toolResults:0,reasoning:0,subagentResults:0}}},{time:10.5,type:`context_update`,payload:{agent:`research-agent`,tokens:1800,breakdown:{systemPrompt:1400,userMessages:400,toolResults:0,reasoning:0,subagentResults:0}}},{time:12,type:`tool_call_start`,payload:{agent:`explore-agent`,tool:`Read`,args:`src/models/payment.model.ts`,inputData:{file_path:`src/models/payment.model.ts`}}},{time:12.3,type:`tool_call_end`,payload:{agent:`explore-agent`,tool:`Read`,result:`Prisma schema: Payment { id, amount, currency, status, provider, customerId, metadata }`,tokenCost:1200,discovery:{type:`code`,label:`Payment Model`,content:`Payment { id, amount, currency,
14
+ status, provider, customerId }`}}},{time:12.5,type:`tool_call_start`,payload:{agent:`explore-agent`,tool:`Read`,args:`src/config/environment.ts`,inputData:{file_path:`src/config/environment.ts`}}},{time:12.8,type:`tool_call_end`,payload:{agent:`explore-agent`,tool:`Read`,result:`Environment config: DATABASE_URL, STRIPE_KEY (v2), no PayPal keys configured`,tokenCost:800}},{time:13,type:`tool_call_start`,payload:{agent:`explore-agent`,tool:`Grep`,args:`"catch|error|throw" src/services/`,inputData:{pattern:`catch|error|throw`,path:`src/services/`}}},{time:13.3,type:`tool_call_end`,payload:{agent:`explore-agent`,tool:`Grep`,result:`15 matches — minimal error handling, no retry logic`,tokenCost:500,discovery:{type:`finding`,label:`Weak error handling`,content:`No retry logic in payment flow
15
+ Generic catch blocks only
16
+ No idempotency keys`}}},{time:13.5,type:`context_update`,payload:{agent:`explore-agent`,tokens:6500,breakdown:{systemPrompt:1400,userMessages:400,toolResults:2500,reasoning:2200,subagentResults:0}}},{time:14,type:`subagent_return`,payload:{child:`explore-agent`,parent:`orchestrator`,summary:`Legacy Stripe v2 direct calls, Prisma Payment model, weak error handling, no webhooks`}},{time:14,type:`agent_complete`,payload:{name:`explore-agent`}},{time:12.5,type:`tool_call_start`,payload:{agent:`research-agent`,tool:`WebSearch`,args:`Stripe PaymentIntents Node.js TypeScript 2026`,inputData:{query:`Stripe PaymentIntents Node.js TypeScript 2026`}}},{time:15,type:`tool_call_end`,payload:{agent:`research-agent`,tool:`WebSearch`,result:`12 results — Stripe PaymentIntents is the recommended API`,tokenCost:2500}},{time:15.2,type:`tool_call_start`,payload:{agent:`research-agent`,tool:`WebFetch`,args:`stripe.com/docs/payments/accept-a-payment`,inputData:{url:`https://stripe.com/docs/payments/accept-a-payment`,prompt:`Extract key steps for PaymentIntents implementation`}}},{time:18.2,type:`tool_call_end`,payload:{agent:`research-agent`,tool:`WebFetch`,result:`PaymentIntents flow: 1) Create intent, 2) Confirm client-side, 3) Handle webhooks for async events`,tokenCost:4e3}},{time:18.4,type:`tool_call_start`,payload:{agent:`research-agent`,tool:`WebSearch`,args:`PayPal Orders API v2 Node.js SDK`,inputData:{query:`PayPal Orders API v2 Node.js SDK 2026`}}},{time:20.7,type:`tool_call_end`,payload:{agent:`research-agent`,tool:`WebSearch`,result:`8 results — PayPal Checkout Server SDK with Orders API v2`,tokenCost:2e3}},{time:21,type:`context_update`,payload:{agent:`research-agent`,tokens:12e3,breakdown:{systemPrompt:1400,userMessages:400,toolResults:8500,reasoning:1700,subagentResults:0}}},{time:21.5,type:`subagent_return`,payload:{child:`research-agent`,parent:`orchestrator`,summary:`Stripe PaymentIntents + webhooks, PayPal Orders API v2, both have Node.js SDKs`}},{time:21.5,type:`agent_complete`,payload:{name:`research-agent`}},{time:22,type:`context_update`,payload:{agent:`orchestrator`,tokens:25e3,breakdown:{systemPrompt:1500,userMessages:700,toolResults:6500,reasoning:6300,subagentResults:1e4}}},{time:22.5,type:`message`,payload:{agent:`orchestrator`,role:`thinking`,content:`Both agents returned. I'll use the strategy pattern — a PaymentGateway with adapters for Stripe (PaymentIntents) and PayPal (Orders API v2). Need to install SDKs first, then write the abstraction layer.`}},{time:23.5,type:`message`,payload:{agent:`orchestrator`,content:`Research complete. Installing dependencies and implementing the payment gateway...`}},{time:24,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Bash`,args:`npm install stripe @paypal/checkout-server-sdk`,inputData:{command:`npm install stripe @paypal/checkout-server-sdk`,description:`Install Stripe and PayPal SDKs`}}},{time:29,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Bash`,result:`added 23 packages in 4.2s
17
+ + stripe@14.2.0
18
+ + @paypal/checkout-server-sdk@2.0.1`,tokenCost:300}},{time:29.2,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Write`,args:`src/services/stripe-adapter.ts`,inputData:{file_path:`src/services/stripe-adapter.ts`}}},{time:29.5,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Write`,result:`Created src/services/stripe-adapter.ts — 94 lines`,tokenCost:250,discovery:{type:`code`,label:`NEW: stripe-adapter.ts`,content:`createPayment()
19
+ capturePayment()
20
+ refundPayment()
21
+ verifyWebhook()`}}},{time:29.7,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Write`,args:`src/services/paypal-adapter.ts`,inputData:{file_path:`src/services/paypal-adapter.ts`}}},{time:30,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Write`,result:`Created src/services/paypal-adapter.ts — 78 lines`,tokenCost:220}},{time:30.2,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Write`,args:`src/services/payment-gateway.ts`,inputData:{file_path:`src/services/payment-gateway.ts`}}},{time:30.5,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Write`,result:`Created src/services/payment-gateway.ts — 112 lines, strategy pattern with retry logic`,tokenCost:300,discovery:{type:`code`,label:`NEW: payment-gateway.ts`,content:`Strategy pattern: IPaymentAdapter
22
+ Retry with exponential backoff
23
+ Idempotency key support`}}},{time:30.7,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Edit`,args:`src/services/payment.ts`,inputData:{file_path:`src/services/payment.ts`,old_string:`const stripe = require("stripe")(STRIPE_KEY)`,new_string:`import { PaymentGateway } from "./payment-gateway"`}}},{time:31,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Edit`,result:`Refactored payment.ts — replaced direct Stripe calls with PaymentGateway`,tokenCost:350}},{time:31.2,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Write`,args:`src/webhooks/stripe-webhook.ts`,inputData:{file_path:`src/webhooks/stripe-webhook.ts`}}},{time:31.5,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Write`,result:`Created stripe-webhook.ts — 67 lines, handles payment_intent.succeeded/failed/canceled`,tokenCost:200}},{time:31.7,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Edit`,args:`src/routes/checkout.ts`,inputData:{file_path:`src/routes/checkout.ts`,old_string:`router.post('/checkout')`,new_string:`router.post('/checkout')
24
+ router.post('/webhooks/stripe', stripeWebhook)
25
+ router.post('/webhooks/paypal', paypalWebhook)`}}},{time:32,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Edit`,result:`Added webhook routes to checkout.ts`,tokenCost:180}},{time:32.2,type:`context_update`,payload:{agent:`orchestrator`,tokens:38e3,breakdown:{systemPrompt:1500,userMessages:700,toolResults:12500,reasoning:13300,subagentResults:1e4}}},{time:33,type:`message`,payload:{agent:`orchestrator`,content:`Core implementation done. Dispatching test agent for comprehensive testing...`}},{time:33.5,type:`subagent_dispatch`,payload:{parent:`orchestrator`,child:`test-runner`,task:`Write and run integration tests for payment adapters and webhooks`}},{time:33.8,type:`agent_spawn`,payload:{name:`test-runner`,parent:`orchestrator`,task:`Write and run payment integration tests`}},{time:34,type:`context_update`,payload:{agent:`test-runner`,tokens:2e3,breakdown:{systemPrompt:1400,userMessages:600,toolResults:0,reasoning:0,subagentResults:0}}},{time:35.5,type:`tool_call_start`,payload:{agent:`test-runner`,tool:`Write`,args:`src/__tests__/stripe-adapter.test.ts`,inputData:{file_path:`src/__tests__/stripe-adapter.test.ts`}}},{time:35.8,type:`tool_call_end`,payload:{agent:`test-runner`,tool:`Write`,result:`Created stripe-adapter.test.ts — 145 lines, 8 test cases`,tokenCost:350}},{time:36,type:`tool_call_start`,payload:{agent:`test-runner`,tool:`Write`,args:`src/__tests__/payment-gateway.test.ts`,inputData:{file_path:`src/__tests__/payment-gateway.test.ts`}}},{time:36.3,type:`tool_call_end`,payload:{agent:`test-runner`,tool:`Write`,result:`Created payment-gateway.test.ts — 110 lines, 6 test cases`,tokenCost:280}},{time:36.5,type:`tool_call_start`,payload:{agent:`test-runner`,tool:`Write`,args:`src/__tests__/webhook.test.ts`,inputData:{file_path:`src/__tests__/webhook.test.ts`}}},{time:36.8,type:`tool_call_end`,payload:{agent:`test-runner`,tool:`Write`,result:`Created webhook.test.ts — 85 lines, 4 test cases`,tokenCost:220}},{time:37,type:`tool_call_start`,payload:{agent:`test-runner`,tool:`Bash`,args:`npm test -- --coverage 2>&1 | tail -30`,inputData:{command:`npm test -- --coverage 2>&1 | tail -30`,description:`Run tests with coverage`}}},{time:41.5,type:`tool_call_end`,payload:{agent:`test-runner`,tool:`Bash`,result:`FAIL: StripeAdapter > createPayment > should handle API errors
26
+ Error: STRIPE_SECRET_KEY is not defined
27
+
28
+ 6 passed, 3 failed`,tokenCost:400,isError:!0,errorMessage:`STRIPE_SECRET_KEY is not defined — 3 tests failed`}},{time:42,type:`message`,payload:{agent:`test-runner`,role:`thinking`,content:`The failing tests are trying to initialize the real Stripe SDK. I need a test setup file that stubs STRIPE_SECRET_KEY and mocks the SDK clients before any test imports run.`}},{time:43,type:`message`,payload:{agent:`test-runner`,content:`Tests need environment variables. Adding test setup with mocks...`}},{time:43.5,type:`tool_call_start`,payload:{agent:`test-runner`,tool:`Write`,args:`src/__tests__/setup.ts`,inputData:{file_path:`src/__tests__/setup.ts`}}},{time:43.8,type:`tool_call_end`,payload:{agent:`test-runner`,tool:`Write`,result:`Created test setup with mock env vars and SDK stubs`,tokenCost:180}},{time:44,type:`tool_call_start`,payload:{agent:`test-runner`,tool:`Edit`,args:`jest.config.ts`,inputData:{file_path:`jest.config.ts`,old_string:`preset: "ts-jest"`,new_string:`preset: "ts-jest",
29
+ setupFiles: ["./src/__tests__/setup.ts"]`}}},{time:44.3,type:`tool_call_end`,payload:{agent:`test-runner`,tool:`Edit`,result:`Updated jest.config.ts with setup file reference`,tokenCost:100}},{time:44.5,type:`tool_call_start`,payload:{agent:`test-runner`,tool:`Bash`,args:`npm test -- --coverage 2>&1 | tail -30`,inputData:{command:`npm test -- --coverage 2>&1 | tail -30`,description:`Re-running tests with mock configuration`}}},{time:49,type:`tool_call_end`,payload:{agent:`test-runner`,tool:`Bash`,result:`FAIL: Webhook > verifySignature > should reject tampered payloads
30
+ Expected: SIGNATURE_MISMATCH
31
+ Received: INVALID_PAYLOAD
32
+
33
+ 17 passed, 1 failed`,tokenCost:400,isError:!0,errorMessage:`Webhook signature test: expected SIGNATURE_MISMATCH, got INVALID_PAYLOAD`}},{time:50.5,type:`message`,payload:{agent:`test-runner`,content:`One test still failing — webhook signature returns wrong error type. Fixing...`}},{time:51,type:`tool_call_start`,payload:{agent:`test-runner`,tool:`Edit`,args:`src/webhooks/stripe-webhook.ts`,inputData:{file_path:`src/webhooks/stripe-webhook.ts`,old_string:`throw new Error("INVALID_PAYLOAD")`,new_string:`throw new WebhookError("SIGNATURE_MISMATCH", "Webhook signature verification failed")`}}},{time:51.3,type:`tool_call_end`,payload:{agent:`test-runner`,tool:`Edit`,result:`Fixed webhook error classification in stripe-webhook.ts`,tokenCost:120}},{time:51.5,type:`tool_call_start`,payload:{agent:`test-runner`,tool:`Bash`,args:`npm test -- --coverage 2>&1 | tail -30`,inputData:{command:`npm test -- --coverage 2>&1 | tail -30`,description:`Final test run`}}},{time:56,type:`tool_call_end`,payload:{agent:`test-runner`,tool:`Bash`,result:`Test Suites: 3 passed, 3 total
34
+ Tests: 18 passed, 18 total
35
+ Coverage: 91.3% stmts, 87.2% branches`,tokenCost:400,discovery:{type:`finding`,label:`All 18 tests pass`,content:`18/18 tests passing
36
+ 91.3% statement coverage
37
+ 87.2% branch coverage`}}},{time:56.3,type:`context_update`,payload:{agent:`test-runner`,tokens:8500,breakdown:{systemPrompt:1400,userMessages:600,toolResults:3500,reasoning:3e3,subagentResults:0}}},{time:56.5,type:`subagent_return`,payload:{child:`test-runner`,parent:`orchestrator`,summary:`18 tests passing with 91% coverage, fixed webhook error classification`}},{time:56.5,type:`agent_complete`,payload:{name:`test-runner`}},{time:57,type:`context_update`,payload:{agent:`orchestrator`,tokens:48e3,breakdown:{systemPrompt:1500,userMessages:700,toolResults:12500,reasoning:16800,subagentResults:16500}}},{time:58,type:`message`,payload:{agent:`orchestrator`,content:`Tests passing. Running type check and final verification...`}},{time:58.5,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`Bash`,args:`npx tsc --noEmit 2>&1`,inputData:{command:`npx tsc --noEmit 2>&1`,description:`TypeScript type checking`}}},{time:62,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`Bash`,result:`No errors found. Build clean.`,tokenCost:200}},{time:62.2,type:`tool_call_start`,payload:{agent:`orchestrator`,tool:`TodoWrite`,args:`marking all complete`,inputData:{todos:[{content:`Analyze existing payment code`,status:`completed`,activeForm:`Analyzing existing payment code`},{content:`Research Stripe & PayPal APIs`,status:`completed`,activeForm:`Researching Stripe & PayPal APIs`},{content:`Create payment gateway abstraction`,status:`completed`,activeForm:`Creating payment gateway abstraction`},{content:`Implement Stripe adapter`,status:`completed`,activeForm:`Implementing Stripe adapter`},{content:`Implement PayPal adapter`,status:`completed`,activeForm:`Implementing PayPal adapter`},{content:`Add webhook handling`,status:`completed`,activeForm:`Adding webhook handling`},{content:`Write integration tests`,status:`completed`,activeForm:`Writing integration tests`},{content:`Run tests and verify`,status:`completed`,activeForm:`Running tests and verifying`}]}}},{time:62.4,type:`tool_call_end`,payload:{agent:`orchestrator`,tool:`TodoWrite`,result:`All 8 tasks completed`,tokenCost:80}},{time:62.7,type:`context_update`,payload:{agent:`orchestrator`,tokens:5e4,breakdown:{systemPrompt:1500,userMessages:700,toolResults:12780,reasoning:18520,subagentResults:16500}}},{time:64,type:`message`,payload:{agent:`orchestrator`,content:`Payment system refactored successfully. Created Stripe and PayPal adapters with a unified gateway using the strategy pattern, added webhook handling with signature verification, and all 18 integration tests pass with 91% coverage.`}},{time:65,type:`agent_complete`,payload:{name:`orchestrator`}}],b=y.length>0?y[y.length-1].time+10:0,x={"opus-4-6":1e6,"sonnet-4-6":1e6},S=2e5,C=1e6,w=.05,T=`agent-viz-sound`,E=.3,ee=1.5,D={agentFadeIn:3,agentScaleIn:4,agentFadeOut:.4,agentScaleOut:.05,toolFadeIn:4,toolFadeOut:1.5,edgeFadeIn:4,discoveryFadeIn:2,discoveryFadeOut:.5,particleSpeed:1.2,maxDeltaTime:.1,defaultDeltaTime:.016,minFrameInterval:1e3/60-1},te={zoomStepDown:.92,zoomStepUp:1.08,minZoom:.2,maxZoom:4,velocityScale:.016},ne={chargeStrength:-1200,centerStrength:.03,collideRadius:140,linkDistance:350,linkStrength:.4,alphaDecay:.02,velocityDecay:.4},O={maxRings:5,baseDistance:100,ringIncrement:35,baseSteps:5,stepsPerRing:2,fallbackDistance:90},re=5.5;function ie(e,t){let n=Math.max(...t.map(e=>e.length*re),e.length*6);return{cardW:Math.min(Math.max(80,n+16),150),cardH:16+t.length*11}}var k={bubbleAnchorOffset:14,bubbleCursorY:-20,glowPadding:20,outerRingOffset:3,shadowBlur:15,shadowOffsetX:3,shadowOffsetY:5,labelYOffset:8,labelWidthMultiplier:3,scanlineHalfH:4,scanlineWidth:8,waitingDashSpeed:25,orbitParticleOffset:12,orbitParticleSize:1.5,rippleInnerOffset:5,rippleMaxExpand:45,rippleMaxAlpha:.4,waitingOrbitOffset:14,waitingOrbitParticleSize:2,waitingOrbitSpeed:.8,waitingBreatheSpeed:1.2,waitingBreatheAmp:.08,sparkScale:.45,sparkViewBox:256,subIconScale:.45},A={minWidth:60,widthMultiplier:2.2,barHeight:6,yOffset:22,borderRadius:3,fontSize:7,labelPadding:9},j={ringOffset:8,ringWidth:4,warningThreshold:.8,criticalThreshold:.9,percentLabelThreshold:.7,glowPadding:4,glowLineWidth:2,glowBlur:12,percentYOffset:10},M={yOffset:25,boxWidth:70,boxHeight:18,borderRadius:3,fontSize:8,textPaddingY:4},N={fontSize:8,borderRadius:4,expandedHeight:30,collapsedHeight:24,errorGlowBase:8,errorGlowPulse:4,spinRingPadding:4,spinSpeed:3,spinArc:Math.PI*1.2,errorFontSize:6,tokenFontSize:6,twoLineOffset:5},ae={minDisplayCost:1e-4,pillYOffset:22,pillPadding:12,pillHeight:16,pillRadius:8,miniBarHeight:3,miniBarRadius:1.5,miniBarGap:3,miniBarMaxExtra:10,miniBarMax:80},P={width:200,xMargin:16,yStart:48,lineHeight:16,headerHeight:28,sectionGap:8,maxRows:5,borderRadius:8,contentPadding:10,barInset:4,barRadius:3},F={thinking:{fontSize:5.5,labelSize:5,lineH:7.5,padding:5,headerH:10},normal:{fontSize:7,labelSize:6,lineH:10,padding:6,headerH:12},triOffset:4,triWidth:5,borderRadius:5},I={ringStart:10,ringExpand:60,maxAlpha:.7,flashThreshold:.3,flashAlpha:.6,flashBaseRadius:20,flashMinRadius:5,particleCount:8,particleSize:1.5},L={ringStart:20,ringExpand:80,maxAlpha:.6,flashThreshold:.2,flashAlpha:.8,flashRadius:30,lineWidthMax:3,glowInner:5,glowOuter:10},oe={glowRadius:15,coreHighlightScale:.4,labelMinT:.2,labelMaxT:.8,labelFontSize:8,labelYOffset:-12},se=typeof window<`u`&&(()=>{let e=new URLSearchParams(window.location.search);return e.has(`perf`)||e.has(`stress`)})(),ce={x:8,y:8,width:260,height:140,padding:8,lineHeight:18,font:`12px monospace`,maxFrameSamples:120,fpsWarning:30,fpsCaution:50,updateIntervalMs:1e3,bgColor:`rgba(0, 0, 0, 0.75)`,fpsGoodColor:`#44ff44`,fpsCautionColor:`#ffaa00`,fpsWarningColor:`#ff4444`,textColor:`#cccccc`},le={toolCharWidth:4.5,bubbleCharWidth:4.2,toolExpandedH:34,toolCollapsedH:24};function ue(e,t){var n,r=1;e??=0,t??=0;function i(){var i,a=n.length,o,s=0,c=0;for(i=0;i<a;++i)o=n[i],s+=o.x,c+=o.y;for(s=(s/a-e)*r,c=(c/a-t)*r,i=0;i<a;++i)o=n[i],o.x-=s,o.y-=c}return i.initialize=function(e){n=e},i.x=function(t){return arguments.length?(e=+t,i):e},i.y=function(e){return arguments.length?(t=+e,i):t},i.strength=function(e){return arguments.length?(r=+e,i):r},i}function de(e){let t=+this._x.call(null,e),n=+this._y.call(null,e);return fe(this.cover(t,n),t,n,e)}function fe(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,c=e._y0,l=e._x1,u=e._y1,d,f,p,m,h,g,_,v;if(!a)return e._root=o,e;for(;a.length;)if((h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f,i=a,!(a=a[_=g<<1|h]))return i[_]=o,e;if(p=+e._x.call(null,a.data),m=+e._y.call(null,a.data),t===p&&n===m)return o.next=a,i?i[_]=o:e._root=o,e;do i=i?i[_]=[,,,,]:e._root=[,,,,],(h=t>=(d=(s+l)/2))?s=d:l=d,(g=n>=(f=(c+u)/2))?c=f:u=f;while((_=g<<1|h)==(v=(m>=f)<<1|p>=d));return i[v]=a,i[_]=o,e}function pe(e){var t,n,r=e.length,i,a,o=Array(r),s=Array(r),c=1/0,l=1/0,u=-1/0,d=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,s[n]=a,i<c&&(c=i),i>u&&(u=i),a<l&&(l=a),a>d&&(d=a));if(c>u||l>d)return this;for(this.cover(c,l).cover(u,d),n=0;n<r;++n)fe(this,o[n],s[n],e[n]);return this}function me(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,s=this._root,c,l;n>e||e>=i||r>t||t>=a;)switch(l=(t<r)<<1|e<n,c=[,,,,],c[l]=s,s=c,o*=2,l){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function he(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function ge(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function _e(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}function ve(e,t,n){var r,i=this._x0,a=this._y0,o,s,c,l,u=this._x1,d=this._y1,f=[],p=this._root,m,h;for(p&&f.push(new _e(p,i,a,u,d)),n==null?n=1/0:(i=e-n,a=t-n,u=e+n,d=t+n,n*=n);m=f.pop();)if(!(!(p=m.node)||(o=m.x0)>u||(s=m.y0)>d||(c=m.x1)<i||(l=m.y1)<a))if(p.length){var g=(o+c)/2,_=(s+l)/2;f.push(new _e(p[3],g,_,c,l),new _e(p[2],o,_,g,l),new _e(p[1],g,s,c,_),new _e(p[0],o,s,g,_)),(h=(t>=_)<<1|e>=g)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-h],f[f.length-1-h]=m)}else{var v=e-+this._x.call(null,p.data),y=t-+this._y.call(null,p.data),b=v*v+y*y;if(b<n){var x=Math.sqrt(n=b);i=e-x,a=t-x,u=e+x,d=t+x,r=p.data}}return r}function ye(e){if(isNaN(u=+this._x.call(null,e))||isNaN(d=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,s=this._y0,c=this._x1,l=this._y1,u,d,f,p,m,h,g,_;if(!n)return this;if(n.length)for(;;){if((m=u>=(f=(o+c)/2))?o=f:c=f,(h=d>=(p=(s+l)/2))?s=p:l=p,t=n,!(n=n[g=h<<1|m]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,_=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[g]=a:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[_]=n:this._root=n),this):(this._root=a,this)}function be(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function xe(){return this._root}function Se(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function Ce(e){var t=[],n,r=this._root,i,a,o,s,c;for(r&&t.push(new _e(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,s=n.x1,c=n.y1)&&r.length){var l=(a+s)/2,u=(o+c)/2;(i=r[3])&&t.push(new _e(i,l,u,s,c)),(i=r[2])&&t.push(new _e(i,a,u,l,c)),(i=r[1])&&t.push(new _e(i,l,o,s,u)),(i=r[0])&&t.push(new _e(i,a,o,l,u))}return this}function we(e){var t=[],n=[],r;for(this._root&&t.push(new _e(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,c=r.x1,l=r.y1,u=(o+c)/2,d=(s+l)/2;(a=i[0])&&t.push(new _e(a,o,s,u,d)),(a=i[1])&&t.push(new _e(a,u,s,c,d)),(a=i[2])&&t.push(new _e(a,o,d,u,l)),(a=i[3])&&t.push(new _e(a,u,d,c,l))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function Te(e){return e[0]}function Ee(e){return arguments.length?(this._x=e,this):this._x}function De(e){return e[1]}function Oe(e){return arguments.length?(this._y=e,this):this._y}function ke(e,t,n){var r=new Ae(t??Te,n??De,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Ae(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function je(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var Me=ke.prototype=Ae.prototype;Me.copy=function(){var e=new Ae(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=je(t),e;for(n=[{source:t,target:e._root=[,,,,]}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=[,,,,]}):t.target[i]=je(r));return e},Me.add=de,Me.addAll=pe,Me.cover=me,Me.data=he,Me.extent=ge,Me.find=ve,Me.remove=ye,Me.removeAll=be,Me.root=xe,Me.size=Se,Me.visit=Ce,Me.visitAfter=we,Me.x=Ee,Me.y=Oe;function Ne(e){return function(){return e}}function Pe(e){return(e()-.5)*1e-6}function Fe(e){return e.x+e.vx}function Ie(e){return e.y+e.vy}function Le(e){var t,n,r,i=1,a=1;typeof e!=`function`&&(e=Ne(e==null?1:+e));function o(){for(var e,o=t.length,c,l,u,d,f,p,m=0;m<a;++m)for(c=ke(t,Fe,Ie).visitAfter(s),e=0;e<o;++e)l=t[e],f=n[l.index],p=f*f,u=l.x+l.vx,d=l.y+l.vy,c.visit(h);function h(e,t,n,a,o){var s=e.data,c=e.r,m=f+c;if(s){if(s.index>l.index){var h=u-s.x-s.vx,g=d-s.y-s.vy,_=h*h+g*g;_<m*m&&(h===0&&(h=Pe(r),_+=h*h),g===0&&(g=Pe(r),_+=g*g),_=(m-(_=Math.sqrt(_)))/_*i,l.vx+=(h*=_)*(m=(c*=c)/(p+c)),l.vy+=(g*=_)*m,s.vx-=h*(m=1-m),s.vy-=g*m)}return}return t>u+m||a<u-m||n>d+m||o<d-m}}function s(e){if(e.data)return e.r=n[e.data.index];for(var t=e.r=0;t<4;++t)e[t]&&e[t].r>e.r&&(e.r=e[t].r)}function c(){if(t){var r,i=t.length,a;for(n=Array(i),r=0;r<i;++r)a=t[r],n[a.index]=+e(a,r,t)}}return o.initialize=function(e,n){t=e,r=n,c()},o.iterations=function(e){return arguments.length?(a=+e,o):a},o.strength=function(e){return arguments.length?(i=+e,o):i},o.radius=function(t){return arguments.length?(e=typeof t==`function`?t:Ne(+t),c(),o):e},o}function Re(e){return e.index}function ze(e,t){var n=e.get(t);if(!n)throw Error(`node not found: `+t);return n}function Be(e){var t=Re,n=d,r,i=Ne(30),a,o,s,c,l,u=1;e??=[];function d(e){return 1/Math.min(s[e.source.index],s[e.target.index])}function f(t){for(var n=0,i=e.length;n<u;++n)for(var o=0,s,d,f,p,m,h,g;o<i;++o)s=e[o],d=s.source,f=s.target,p=f.x+f.vx-d.x-d.vx||Pe(l),m=f.y+f.vy-d.y-d.vy||Pe(l),h=Math.sqrt(p*p+m*m),h=(h-a[o])/h*t*r[o],p*=h,m*=h,f.vx-=p*(g=c[o]),f.vy-=m*g,d.vx+=p*(g=1-g),d.vy+=m*g}function p(){if(o){var n,i=o.length,l=e.length,u=new Map(o.map((e,n)=>[t(e,n,o),e])),d;for(n=0,s=Array(i);n<l;++n)d=e[n],d.index=n,typeof d.source!=`object`&&(d.source=ze(u,d.source)),typeof d.target!=`object`&&(d.target=ze(u,d.target)),s[d.source.index]=(s[d.source.index]||0)+1,s[d.target.index]=(s[d.target.index]||0)+1;for(n=0,c=Array(l);n<l;++n)d=e[n],c[n]=s[d.source.index]/(s[d.source.index]+s[d.target.index]);r=Array(l),m(),a=Array(l),h()}}function m(){if(o)for(var t=0,i=e.length;t<i;++t)r[t]=+n(e[t],t,e)}function h(){if(o)for(var t=0,n=e.length;t<n;++t)a[t]=+i(e[t],t,e)}return f.initialize=function(e,t){o=e,l=t,p()},f.links=function(t){return arguments.length?(e=t,p(),f):e},f.id=function(e){return arguments.length?(t=e,f):t},f.iterations=function(e){return arguments.length?(u=+e,f):u},f.strength=function(e){return arguments.length?(n=typeof e==`function`?e:Ne(+e),m(),f):n},f.distance=function(e){return arguments.length?(i=typeof e==`function`?e:Ne(+e),h(),f):i},f}var Ve={value:()=>{}};function He(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new Ue(n)}function Ue(e){this._=e}function We(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}Ue.prototype=He.prototype={constructor:Ue,on:function(e,t){var n=this._,r=We(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=Ge(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Ke(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Ke(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ue(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function Ge(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Ke(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Ve,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var qe=0,Je=0,Ye=0,Xe=1e3,Ze,Qe,$e=0,et=0,tt=0,nt=typeof performance==`object`&&performance.now?performance:Date,rt=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function it(){return et||=(rt(at),nt.now()+tt)}function at(){et=0}function ot(){this._call=this._time=this._next=null}ot.prototype=st.prototype={constructor:ot,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?it():+n)+(t==null?0:+t),!this._next&&Qe!==this&&(Qe?Qe._next=this:Ze=this,Qe=this),this._call=e,this._time=n,ft()},stop:function(){this._call&&(this._call=null,this._time=1/0,ft())}};function st(e,t,n){var r=new ot;return r.restart(e,t,n),r}function ct(){it(),++qe;for(var e=Ze,t;e;)(t=et-e._time)>=0&&e._call.call(void 0,t),e=e._next;--qe}function lt(){et=($e=nt.now())+tt,qe=Je=0;try{ct()}finally{qe=0,dt(),et=0}}function ut(){var e=nt.now(),t=e-$e;t>Xe&&(tt-=t,$e=e)}function dt(){for(var e,t=Ze,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ze=n);Qe=e,ft(r)}function ft(e){qe||(Je&&=clearTimeout(Je),e-et>24?(e<1/0&&(Je=setTimeout(lt,e-nt.now()-tt)),Ye&&=clearInterval(Ye)):(Ye||=($e=nt.now(),setInterval(ut,Xe)),qe=1,rt(lt)))}var pt=1664525,mt=1013904223,ht=4294967296;function gt(){let e=1;return()=>(e=(pt*e+mt)%ht)/ht}function _t(e){return e.x}function vt(e){return e.y}var yt=10,bt=Math.PI*(3-Math.sqrt(5));function xt(e){var t,n=1,r=.001,i=1-r**(1/300),a=0,o=.6,s=new Map,c=st(d),l=He(`tick`,`end`),u=gt();e??=[];function d(){f(),l.call(`tick`,t),n<r&&(c.stop(),l.call(`end`,t))}function f(r){var c,l=e.length,u;r===void 0&&(r=1);for(var d=0;d<r;++d)for(n+=(a-n)*i,s.forEach(function(e){e(n)}),c=0;c<l;++c)u=e[c],u.fx==null?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),u.fy==null?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return t}function p(){for(var t=0,n=e.length,r;t<n;++t){if(r=e[t],r.index=t,r.fx!=null&&(r.x=r.fx),r.fy!=null&&(r.y=r.fy),isNaN(r.x)||isNaN(r.y)){var i=yt*Math.sqrt(.5+t),a=t*bt;r.x=i*Math.cos(a),r.y=i*Math.sin(a)}(isNaN(r.vx)||isNaN(r.vy))&&(r.vx=r.vy=0)}}function m(t){return t.initialize&&t.initialize(e,u),t}return p(),t={tick:f,restart:function(){return c.restart(d),t},stop:function(){return c.stop(),t},nodes:function(n){return arguments.length?(e=n,p(),s.forEach(m),t):e},alpha:function(e){return arguments.length?(n=+e,t):n},alphaMin:function(e){return arguments.length?(r=+e,t):r},alphaDecay:function(e){return arguments.length?(i=+e,t):+i},alphaTarget:function(e){return arguments.length?(a=+e,t):a},velocityDecay:function(e){return arguments.length?(o=1-e,t):1-o},randomSource:function(e){return arguments.length?(u=e,s.forEach(m),t):u},force:function(e,n){return arguments.length>1?(n==null?s.delete(e):s.set(e,m(n)),t):s.get(e)},find:function(t,n,r){var i=0,a=e.length,o,s,c,l,u;for(r==null?r=1/0:r*=r,i=0;i<a;++i)l=e[i],o=t-l.x,s=n-l.y,c=o*o+s*s,c<r&&(u=l,r=c);return u},on:function(e,n){return arguments.length>1?(l.on(e,n),t):l.on(e)}}}function St(){var e,t,n,r,i=Ne(-30),a,o=1,s=1/0,c=.81;function l(n){var i,a=e.length,o=ke(e,_t,vt).visitAfter(d);for(r=n,i=0;i<a;++i)t=e[i],o.visit(f)}function u(){if(e){var t,n=e.length,r;for(a=Array(n),t=0;t<n;++t)r=e[t],a[r.index]=+i(r,t,e)}}function d(e){var t=0,n,r,i=0,o,s,c;if(e.length){for(o=s=c=0;c<4;++c)(n=e[c])&&(r=Math.abs(n.value))&&(t+=n.value,i+=r,o+=r*n.x,s+=r*n.y);e.x=o/i,e.y=s/i}else{n=e,n.x=n.data.x,n.y=n.data.y;do t+=a[n.data.index];while(n=n.next)}e.value=t}function f(e,i,l,u){if(!e.value)return!0;var d=e.x-t.x,f=e.y-t.y,p=u-i,m=d*d+f*f;if(p*p/c<m)return m<s&&(d===0&&(d=Pe(n),m+=d*d),f===0&&(f=Pe(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)),t.vx+=d*e.value*r/m,t.vy+=f*e.value*r/m),!0;if(!(e.length||m>=s)){(e.data!==t||e.next)&&(d===0&&(d=Pe(n),m+=d*d),f===0&&(f=Pe(n),m+=f*f),m<o&&(m=Math.sqrt(o*m)));do e.data!==t&&(p=a[e.data.index]*r/m,t.vx+=d*p,t.vy+=f*p);while(e=e.next)}}return l.initialize=function(t,r){e=t,n=r,u()},l.strength=function(e){return arguments.length?(i=typeof e==`function`?e:Ne(+e),u(),l):i},l.distanceMin=function(e){return arguments.length?(o=e*e,l):Math.sqrt(o)},l.distanceMax=function(e){return arguments.length?(s=e*e,l):Math.sqrt(s)},l.theta=function(e){return arguments.length?(c=e*e,l):Math.sqrt(c)},l}function Ct(e){return{agents:new Map,toolCalls:new Map,particles:[],edges:[],discoveries:[],fileAttention:new Map,timelineEntries:new Map,conversations:new Map,currentTime:0,isPlaying:!1,speed:1,eventIndex:0,eventLog:[],maxTimeReached:0,...e}}var wt=0;function Tt(){return`msg-${wt++}`}function Et(){wt=0}var Dt=5e3;function Ot(e,t,n){let r={id:n.id??Tt(),...n},i=[...e.get(t)||[],r];e.set(t,i.length>200?i.slice(-200):i)}function kt(e,t){return`edge-${e}-${t}`}function R(e,t=``){return typeof e==`string`?e:t}function At(e,t=0){return typeof e==`number`?e:t}function jt(e,t=!1){return typeof e==`boolean`?e:t}var Mt={radiusMain:28,radiusSub:20},Nt={detail:{width:240,height:200},chat:{width:300,maxHeight:360,messagesMinHeight:100,messagesMaxHeight:240},transcript:{width:380},margin:8,offsetX:40,offsetY:-80},Pt={info:10,sidePanel:40,controlBar:50,chatPanel:50,transcriptPanel:60,detailCard:100,contextMenu:200},Ft={controlBarHideMs:3e3,glassAnimMs:200,contextMenuDelayMs:50,chatFocusDelayMs:300,autoPlayDelayMs:500,resumeLiveDelayMs:20,seekCompleteDelayMs:50,livePulseMs:1e3},It={inertiaDecay:.94,inertiaThreshold:.5,dragLerp:.25,autoFitLerp:.06,dragThresholdPx:5,viewportPadding:120,breathe:{thinkingSpeed:2,thinkingAmp:.03,idleSpeed:.7,idleAmp:.015},scanline:{thinking:40,normal:15},orbitSpeed:1.5,pulseSpeed:4},Lt={spawnDuration:.8,completeDuration:1,shatterDuration:.8,shatterCount:12,shatterSpeed:{min:30,range:60},shatterSize:{min:1,range:2},trailSegments:8},z={curvature:.15,cp1:.33,cp2:.66,segments:16,parentChild:{startW:3,endW:1},tool:{startW:1.5,endW:.5},glowExtra:{startW:3,endW:1,alpha:.08},idleAlpha:.08,activeAlpha:.3,wobble:{amp:3,freq:10,timeFreq:3,trailOffset:.15}},Rt={alpha:.7,strokeAlpha:`80`,lineWidth:1,dash:[6,4],dotRadius:3,curveOffset:20},zt={tool:{width:320,estimatedHeight:200},discovery:{width:300,estimatedHeight:160},controlBarMaxWidth:680};function Bt(){return{systemPrompt:0,userMessages:0,toolResults:0,reasoning:0,subagentResults:0}}var B={void:`#050510`,hexGrid:`#0d0d1f`,holoBase:`#66ccff`,holoBright:`#aaeeff`,holoHot:`#ffffff`,idle:`#66ccff`,thinking:`#66ccff`,tool_calling:`#ffbb44`,complete:`#66ffaa`,error:`#ff5566`,paused:`#888899`,waiting_permission:`#ffaa33`,dispatch:`#cc88ff`,return:`#66ffaa`,tool:`#ffbb44`,message:`#66ccff`,contextSystem:`#555577`,contextUser:`#66ccff`,contextToolResults:`#ffbb44`,contextReasoning:`#cc88ff`,contextSubagent:`#66ffaa`,nodeInterior:`rgba(10, 15, 40, 0.5)`,textPrimary:`#aaeeff`,textDim:`#66ccff90`,textMuted:`#66ccff50`,glassBg:`rgba(10, 15, 30, 0.7)`,glassBorder:`rgba(100, 200, 255, 0.15)`,glassHighlight:`rgba(100, 200, 255, 0.08)`,holoBg03:`rgba(100, 200, 255, 0.03)`,holoBg05:`rgba(100, 200, 255, 0.05)`,holoBg10:`rgba(100, 200, 255, 0.1)`,holoBorder06:`rgba(100, 200, 255, 0.06)`,holoBorder08:`rgba(100, 200, 255, 0.08)`,holoBorder10:`rgba(100, 200, 255, 0.1)`,holoBorder12:`rgba(100, 200, 255, 0.12)`,panelBg:`rgba(8, 12, 24, 0.85)`,panelSeparator:`rgba(100, 200, 255, 0.04)`,toggleActive:`rgba(100, 200, 255, 0.15)`,toggleInactive:`rgba(100, 200, 255, 0.05)`,toggleBorder:`rgba(100, 200, 255, 0.1)`,liveDot:`#ff4444`,liveText:`#ff6666`,liveResumeBg:`rgba(255, 68, 68, 0.15)`,liveResumeBorder:`rgba(255, 68, 68, 0.35)`,discoveryFile:`#66ccff`,discoveryPattern:`#cc88ff`,discoveryFinding:`#66ffaa`,discoveryCode:`#ffbb44`,tabSelectedBg:`rgba(100, 200, 255, 0.15)`,tabInactiveBg:`rgba(100, 200, 255, 0.03)`,tabSelectedBorder:`rgba(100, 200, 255, 0.3)`,tabInactiveBorder:`rgba(100, 200, 255, 0.08)`,tabClose:`#ff6688`,roleAssistantBg:`rgba(80, 160, 220, 0.12)`,roleAssistantBgSelected:`rgba(80, 160, 220, 0.2)`,roleAssistantText:`#a0d4f0`,roleThinkingBg:`rgba(140, 100, 200, 0.12)`,roleThinkingBgSelected:`rgba(140, 100, 200, 0.2)`,roleThinkingText:`#c0a0e0`,roleUserBg:`rgba(200, 160, 80, 0.12)`,roleUserBgSelected:`rgba(200, 160, 80, 0.2)`,roleUserText:`#e0c888`,resultBg:`rgba(102, 255, 170, 0.05)`,resultBorder:`rgba(102, 255, 170, 0.1)`,unreadDot:`#ff6666`,playBtnBg:`rgba(102, 204, 255, 0.12)`,playBtnActiveBg:`rgba(102, 204, 255, 0.2)`,playBtnBorder:`rgba(102, 204, 255, 0.4)`,playBtnGlow:`0 0 12px rgba(102, 204, 255, 0.15)`,scrubberFill:`linear-gradient(90deg, rgba(102,204,255,0.3), rgba(102,204,255,0.6))`,scrubberHeadGlow:`0 0 10px rgba(102, 204, 255, 0.6), 0 0 20px rgba(102, 204, 255, 0.2)`,reviewBtnBorder:`rgba(102, 204, 255, 0.25)`,costActiveBg:`rgba(102, 255, 170, 0.15)`,bubbleThinkingBase:`rgba(140, 100, 200,`,bubbleUserBase:`rgba(200, 160, 80,`,bubbleAssistantBase:`rgba(80, 160, 220,`,toolCardErrorBase:`rgba(40, 10, 15,`,toolCardSelectedBase:`rgba(100, 200, 255,`,toolCardBase:`rgba(10, 15, 30,`,cardBgDark:`rgba(5, 5, 16, 0.8)`,cardBg:`rgba(10, 15, 30, 0.6)`,cardBgSelected:`rgba(10, 15, 30, 0.8)`,cardBgError:`rgba(40, 10, 15, 0.8)`,cardBgSelectedHolo:`rgba(100, 200, 255, 0.15)`,cardBgFaintOverlay:`rgba(0, 0, 0, 0.01)`,toolIndicatorBg:`rgba(255, 187, 68, 0.1)`,toolIndicatorBorder:`rgba(255, 187, 68, 0.2)`,toolIndicatorText:`#ffbb44`,costText:`#66ffaa`,costTextDim:`#66ffaa80`,costPillBg:`rgba(10, 20, 40, 0.75)`,costPillStroke:`rgba(102, 255, 170, 0.3)`,barFillMain:`rgba(102, 204, 255, 0.15)`,barFillSub:`rgba(204, 136, 255, 0.15)`,userMsgBg:`rgba(255, 187, 68, 0.06)`,userMsgBorder:`rgba(255, 187, 68, 0.12)`,userLabel:`#ffbb4490`,userText:`#ffcc66`,assistantLabel:`#66ccff80`,assistantText:`#aaeeff`,thinkingBgExpanded:`rgba(180, 140, 255, 0.06)`,thinkingBgCollapsed:`rgba(180, 140, 255, 0.03)`,thinkingBorder:`rgba(180, 140, 255, 0.08)`,thinkingLabel:`#bb99ff70`,thinkingArrow:`#bb99ff55`,thinkingPreview:`#bb99ff`,thinkingTextExpanded:`#bb99ff80`,thinkingBorderLeft:`rgba(180, 140, 255, 0.15)`,toolCallBg:`rgba(255, 187, 68, 0.05)`,toolCallBorder:`rgba(255, 187, 68, 0.1)`,bashResultBg:`rgba(0,0,0,0.25)`,toolResultBg:`rgba(102, 255, 170, 0.04)`,bashResultBorder:`rgba(255, 187, 68, 0.1)`,toolResultBorder:`rgba(102, 255, 170, 0.08)`,bashResultText:`#aaeeff80`,toolResultText:`#66ffaa80`,textFaint:`#aaeeff60`,searchHighlightBg:`rgba(255,187,68,0.3)`,codeBlockBg:`rgba(0,0,0,0.3)`,diffRemoved:`#ff6666`,diffRemovedBg:`rgba(255,80,80,0.08)`,diffAdded:`#66ff88`,diffAddedBg:`rgba(80,255,120,0.08)`,filePathActive:`#66ccff`,filePathInactive:`#66ccff90`,todoCompleted:`#66ffaa`,todoCompletedText:`#66ffaa90`,todoPending:`#66ccff60`,contentDim:`#aaeeff90`,searchIcon:`#66ccff60`,panelLabel:`#66ccff90`,panelLabelDim:`#66ccff65`,scrollBtnText:`#66ccff`,scrollbarThumb:`rgba(100,200,255,0.15)`},Vt={assistant:{bg:B.roleAssistantBg,bgSelected:B.roleAssistantBgSelected,text:B.roleAssistantText,label:`CLAUDE`},thinking:{bg:B.roleThinkingBg,bgSelected:B.roleThinkingBgSelected,text:B.roleThinkingText,label:`THINKING`},user:{bg:B.roleUserBg,bgSelected:B.roleUserBgSelected,text:B.roleUserText,label:`USER`}};function Ht(e){switch(e){case`idle`:return B.idle;case`thinking`:return B.thinking;case`tool_calling`:return B.tool_calling;case`complete`:return B.complete;case`error`:return B.error;case`paused`:return B.paused;case`waiting_permission`:return B.waiting_permission}}function Ut(e){switch(e){case`file`:return B.discoveryFile;case`pattern`:return B.discoveryPattern;case`finding`:return B.discoveryFinding;default:return B.discoveryCode}}function Wt(e,t){return`${e} ${t})`}function Gt(e){return[{value:e.systemPrompt,color:B.contextSystem},{value:e.userMessages,color:B.contextUser},{value:e.toolResults,color:B.contextToolResults},{value:e.reasoning,color:B.contextReasoning},{value:e.subagentResults,color:B.contextSubagent}]}function Kt(e,t,n,r){let i=R(e.name),a=typeof e.parent==`string`?e.parent:void 0,o=jt(e.isMain),s=typeof e.task==`string`?e.task:void 0,c=typeof e.model==`string`?e.model:void 0,l=n.agents.get(i);if(l){n.agents.set(i,{...l,state:`idle`,...s?{task:s}:{},...c?{tokensMax:r.getContextWindowSize(c)}:{}});return}let u=0,d=0;if(a){let e=n.agents.get(a);if(e){let t=[];for(let r of n.agents.values())r.parentId===a&&r.id!==i&&t.push(Math.atan2(r.y-e.y,r.x-e.x));let r;if(t.length===0){let e=i.split(``).reduce((e,t)=>(e<<5)-e+t.charCodeAt(0),0);r=Math.abs(e)%360*(Math.PI/180)}else{t.sort((e,t)=>e-t);let e=0,n=0;for(let r=0;r<t.length;r++){let i=(r+1<t.length?t[r+1]:t[0]+Math.PI*2)-t[r];i>e&&(e=i,n=t[r]+i/2)}r=n}u=e.x+Math.cos(r)*250,d=e.y+Math.sin(r)*250}}let f={id:i,name:i,state:`idle`,parentId:a||null,tokensUsed:0,tokensMax:r.getContextWindowSize(c),contextBreakdown:Bt(),toolCalls:0,timeAlive:0,x:u,y:d,vx:0,vy:0,pinned:!1,isMain:o,task:s,spawnTime:t,opacity:0,scale:.3,messageBubbles:[]};n.agents.set(i,f),a&&n.edges.push({id:kt(a,i),from:a,to:i,type:`parent-child`,opacity:0});let p={id:`timeline-${i}`,agentId:i,agentName:i,startTime:t,blocks:[]};an(p,t,{type:`idle`,label:`Starting`,color:B.idle},r),n.timelineEntries.set(i,p),n.conversations.set(i,[]),r.skipForceSync||setTimeout(()=>r.syncForceSimulation(n.agents,n.edges),0)}function qt(e,t,n,r){let i=R(e.name),a=n.agents.get(i);if(a&&a.state!==`complete`){n.agents.set(i,{...a,state:`complete`,completeTime:t});let e=n.timelineEntries.get(i);e&&(an(e,t,{type:`complete`,label:`Done`,color:B.complete,endTime:t},r),e.endTime=t);let o=[i];for(let[e,a]of n.agents)if(a.parentId===i&&a.state!==`complete`){n.agents.set(e,{...a,state:`complete`,completeTime:t}),o.push(e);let i=n.timelineEntries.get(e);i&&(an(i,t,{type:`complete`,label:`Done`,color:B.complete,endTime:t},r),i.endTime=t)}for(let[e,r]of n.toolCalls)o.includes(r.agentId)&&r.state===`running`&&n.toolCalls.set(e,{...r,state:`complete`,completeTime:t})}}function Jt(e,t,n,r){let i=R(e.agent,`Orchestrator`),a=n.agents.get(i);if(a&&a.state!==`complete`){n.agents.set(i,{...a,state:`waiting_permission`});let e=n.timelineEntries.get(i);e&&an(e,t,{type:`idle`,label:`Permission`,color:B.waiting_permission},r)}}function Yt(e,t){let n=R(e.name),r=t.agents.get(n);r&&(r.state===`tool_calling`||r.state===`waiting_permission`)&&t.agents.set(n,{...r,state:`thinking`,currentTool:void 0})}function Xt(e,t,n){let r=R(e.agent),i=R(e.model),a=t.agents.get(r);a&&t.agents.set(r,{...a,tokensMax:n.getContextWindowSize(i)})}function Zt(e,t){return R(e?.file_path)||t?.split(` `)[0]||``}function Qt(e,t,n,r){let i=R(e.agent),a=R(e.tool),o=R(e.args),s=e.inputData&&typeof e.inputData==`object`&&!Array.isArray(e.inputData)?e.inputData:void 0,c=n.agents.get(i);if(c){let e=!1;for(let r of n.toolCalls.values())if(r.agentId===i&&r.toolName===a&&r.state===`running`&&t-r.startTime<3){e=!0;break}if(e)return;n.agents.set(i,{...c,state:`tool_calling`,currentTool:a,toolCalls:c.toolCalls+1});let l=`tool-${i}-${a}-${t}`,u=r.findToolSlot(c,n.agents,n.toolCalls,t);n.toolCalls.set(l,{id:l,agentId:i,toolName:a,state:`running`,args:o,inputData:s,x:u.x,y:u.y,startTime:t,opacity:0}),n.edges.push({id:`edge-${l}`,from:i,to:l,type:`tool`,opacity:0}),n.particles.push({id:`p-tc-${t}-${l}`,edgeId:`edge-${l}`,progress:0,type:`tool_call`,color:B.tool,size:4,trailLength:.15,label:`${a} ${o}`.slice(0,30)});let d=n.timelineEntries.get(i);if(d&&an(d,t,{type:`tool_call`,label:`${a}: ${o}`.slice(0,40),color:B.tool},r),a===`Read`||a===`Edit`||a===`Write`){let e=Zt(s,o);if(e){let r=n.fileAttention.get(e),o=r?{...r,agents:[...r.agents]}:{path:e,reads:0,edits:0,totalTokens:0,lastAccessed:t,agents:[]};a===`Read`?o.reads++:o.edits++,o.lastAccessed=t,o.agents.includes(i)||o.agents.push(i),n.fileAttention.set(e,o)}}Ot(n.conversations,i,{type:`tool_call`,content:`> ${a} ${o}`,timestamp:t,toolName:a,inputData:s})}}function $t(e,t,n,r){let i=R(e.agent),a=R(e.tool),o=R(e.result,`Done`),s=typeof e.tokenCost==`number`?e.tokenCost:void 0,c=jt(e.isError),l=typeof e.errorMessage==`string`?e.errorMessage:void 0,u=n.agents.get(i);if(u){n.agents.set(i,{...u,state:c?`error`:`thinking`,currentTool:void 0,tokensUsed:u.tokensUsed+(s??0)});let e=c?`error`:`complete`;for(let[r,u]of n.toolCalls)if(u.agentId===i&&u.toolName===a&&u.state===`running`){n.toolCalls.set(r,{...u,state:e,completeTime:t,result:o,tokenCost:s,errorMessage:c?l||o:void 0});let i=`edge-${r}`,a=n.particles.findIndex(e=>e.edgeId===i&&e.type===`tool_call`);a!==-1&&(n.particles[a]={...n.particles[a],progress:.95}),n.particles.push({id:`p-tr-${t}-${r}`,edgeId:i,progress:1,type:`tool_return`,color:B.return,size:4,trailLength:.15,label:o.slice(0,30)});break}let d=n.timelineEntries.get(i);if(d){if(c){let e=d.blocks[d.blocks.length-1];e&&!e.endTime&&(e.color=B.error,e.label=`${a}: FAILED`)}an(d,t,{type:`thinking`,label:`Thinking...`,color:B.thinking},r)}if(s){let e=Array.from(n.toolCalls.values()).find(e=>e.agentId===i&&e.toolName===a),t=Zt(e?.inputData,e?.args);if(t){let e=n.fileAttention.get(t);e&&n.fileAttention.set(t,{...e,totalTokens:e.totalTokens+s})}}Ot(n.conversations,i,{type:`tool_result`,content:`< ${o}${s?` (${s} tokens)`:``}`,timestamp:t,toolName:a})}}function en(e,t,n){let r=R(e.agent),i=R(e.content),a=typeof e.role==`string`?e.role:void 0,o=a===`user`?`user`:a===`thinking`?`thinking`:`assistant`;if(a===`user`){let e=n.agents.get(r);if(e&&e.isMain&&e.name===r){let t=i.slice(0,40).replace(/\n/g,` `).trim();n.agents.set(r,{...e,name:t||r,task:i.slice(0,120)})}}let s=n.agents.get(r);if(s){let e=a===`user`?`user`:a===`thinking`?`thinking`:`assistant`,o={};{let n=e===`thinking`?i.slice(0,200)+(i.length>200?`...`:``):i,r=s.messageBubbles[s.messageBubbles.length-1];if(!r||r.text!==n){let r=[...s.messageBubbles,{text:n,time:t,role:e}];o.messageBubbles=r.length>20?r.slice(-20):r}}s.state!==`complete`&&s.state!==`tool_calling`&&(a===`user`||a===`thinking`||a===`assistant`)&&(o.state=`thinking`),Object.keys(o).length>0&&n.agents.set(r,{...s,...o})}Ot(n.conversations,r,{type:o,content:i,timestamp:t})}function tn(e,t){let n=R(e.agent),r=At(e.tokens),i=e.breakdown,a=i&&typeof i==`object`&&`systemPrompt`in i?i:void 0,o=t.agents.get(n);o&&t.agents.set(n,{...o,tokensUsed:r,contextBreakdown:a||o.contextBreakdown,state:o.state===`complete`?`complete`:`thinking`})}function nn(e,t,n){let r=kt(R(e.parent),R(e.child)),i=R(e.task);n.particles.push({id:`p-disp-${t}-${r}`,edgeId:r,progress:0,type:`dispatch`,color:B.dispatch,size:6,trailLength:.2,label:i.slice(0,25)})}function rn(e,t,n){let r=kt(R(e.parent),R(e.child)),i=R(e.summary);n.particles.push({id:`p-ret-${t}-${r}`,edgeId:r,progress:1,type:`return`,color:B.return,size:5,trailLength:.2,label:i.slice(0,25)})}function an(e,t,n,r){let i=e.blocks[e.blocks.length-1];i&&!i.endTime&&(i.endTime=t),e.blocks.push({id:`block-${r.blockIdCounter.current++}`,type:n.type,startTime:t,endTime:n.endTime,label:n.label,color:n.color})}function on(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e)if(t.get(n)!==r)return!1;return!0}function sn(e,t,n){let r={agents:new Map(t.agents),toolCalls:new Map(t.toolCalls),particles:[...t.particles],edges:[...t.edges],discoveries:[...t.discoveries],fileAttention:new Map(t.fileAttention),timelineEntries:new Map(t.timelineEntries),conversations:new Map(t.conversations)};switch(e.type){case`agent_spawn`:Kt(e.payload,t.currentTime,r,n);break;case`agent_complete`:qt(e.payload,t.currentTime,r,n);break;case`agent_idle`:Yt(e.payload,r);break;case`model_detected`:Xt(e.payload,r,n);break;case`tool_call_start`:Qt(e.payload,t.currentTime,r,n);break;case`tool_call_end`:$t(e.payload,t.currentTime,r,n);break;case`message`:en(e.payload,t.currentTime,r);break;case`context_update`:tn(e.payload,r);break;case`subagent_dispatch`:nn(e.payload,t.currentTime,r);break;case`subagent_return`:rn(e.payload,t.currentTime,r);break;case`permission_requested`:Jt(e.payload,t.currentTime,r,n);break}return{...t,agents:r.agents,toolCalls:r.toolCalls,particles:r.particles,edges:r.edges,discoveries:r.discoveries,fileAttention:on(t.fileAttention,r.fileAttention)?t.fileAttention:r.fileAttention,timelineEntries:on(t.timelineEntries,r.timelineEntries)?t.timelineEntries:r.timelineEntries,conversations:on(t.conversations,r.conversations)?t.conversations:r.conversations}}function cn(e,t,n){let r=e;for(let[i,a]of e){let o=!1,s=a.opacity,c=a.scale,l=a.timeAlive,u=a.messageBubbles;if(a.state!==`complete`&&s<1&&(s=Math.min(1,s+t*D.agentFadeIn),o=!0),a.state!==`complete`&&c<1&&(c=Math.min(1,c+t*D.agentScaleIn),o=!0),a.state===`complete`&&!a.isMain&&(s>0&&(s=Math.max(0,s-t*D.agentFadeOut),o=!0),c>.8&&(c=Math.max(.8,c-t*D.agentScaleOut),o=!0)),a.state!==`complete`&&(l+=t,o=!0),u.length>0){let e=u.filter(e=>n-e.time<=12);e.length!==u.length&&(u=e,o=!0)}o&&(r===e&&(r=new Map(e)),r.set(i,{...a,opacity:s,scale:c,timeAlive:l,messageBubbles:u}))}return r}function ln(e,t){return e.some(e=>e.opacity<1)?e.map(e=>e.opacity<1?{...e,opacity:Math.min(1,e.opacity+t*D.edgeFadeIn)}:e):e}function un(e,t,n){let r=e;for(let[i,a]of e){let o=a.opacity;o=a.state===`running`?n-a.startTime>10?Math.max(0,a.opacity-t*D.toolFadeOut):Math.min(1,a.opacity+t*D.toolFadeIn):n-(a.completeTime??0)<4?Math.min(1,a.opacity+t*D.toolFadeIn):Math.max(0,a.opacity-t*D.toolFadeOut),o!==a.opacity&&(r===e&&(r=new Map(e)),r.set(i,{...a,opacity:o}))}return r}function dn(e,t,n,r,i){let a=e,o=t,s=n,c=[];for(let[e,t]of a)!t.isMain&&t.state===`complete`&&t.opacity<=0&&c.push(e);if(c.length>0){a===r&&(a=new Map(r));let e=new Set(c);for(let e of c)a.delete(e);s=s.filter(t=>!e.has(t.from)&&!e.has(t.to))}let l=[];for(let[e,t]of o)t.opacity<=0&&l.push(e);if(l.length>0){o===i&&(o=new Map(i));let e=new Set(l);for(let e of l)o.delete(e);s=s.filter(t=>!(t.type===`tool`&&e.has(t.to)))}return s.length,s=s.filter(e=>a.has(e.from)?a.has(e.to)||o.has(e.to):!1),{agents:a,toolCalls:o,edges:s}}function fn(e,t,n){return e.map(e=>{let r=n-e.timestamp,i=Math.min(1,t*3),a=e.x+(e.targetX-e.x)*i,o=e.y+(e.targetY-e.y)*i;return r<8?{...e,x:a,y:o,opacity:Math.min(.9,e.opacity+t*D.discoveryFadeIn)}:{...e,x:a,y:o,opacity:Math.max(0,e.opacity-t*D.discoveryFadeOut)}}).filter(e=>e.opacity>0)}function pn(e,t,n){let r=D.particleSpeed*n;return e.map(e=>e.type===`return`||e.type===`tool_return`?{...e,progress:Math.max(0,e.progress-t*r)}:{...e,progress:Math.min(1,e.progress+t*r)}).filter(e=>!((e.type===`return`||e.type===`tool_return`)&&e.progress<=0||(e.type===`dispatch`||e.type===`tool_call`||e.type===`message`)&&e.progress>=1))}function mn(e,t,n,r,i,a){let o=cn(i.agents,t,i.currentTime),s=ln(i.edges,t),{agents:c,toolCalls:l,edges:u}=dn(o,un(i.toolCalls,t,n),s,i.agents,i.toolCalls),d=fn(i.discoveries,t,n),f=pn(i.particles,t,i.speed);return a.useMockData&&i.eventIndex>=a.mockScenarioLength&&n>a.mockScenarioEndTime+8?{...i,currentTime:n,eventIndex:i.eventIndex,agents:c,toolCalls:l,particles:f,edges:u,discoveries:d,maxTimeReached:r,isPlaying:!1}:{...i,currentTime:n,eventIndex:i.eventIndex,agents:c,toolCalls:l,particles:f,edges:u,discoveries:d,maxTimeReached:r}}function hn(e,t){let n=new Map(e.agents);for(let[e,r]of n){if(r.state===`complete`&&!r.isMain){n.delete(e);continue}let i={...r};r.state===`complete`?(i.opacity=.5,i.scale=1):(i.opacity=1,i.scale=1,i.timeAlive=t-r.spawnTime),i.messageBubbles=r.messageBubbles.filter(e=>t-e.time<=12),n.set(e,i)}let r=new Map(e.toolCalls);for(let[e,n]of r){let i={...n};n.state===`running`?i.opacity=t-n.startTime>10?0:1:i.opacity=t-(n.completeTime??0)<4?1:0,r.set(e,i)}let i=e.edges.map(e=>{let t=n.get(e.from),i=n.get(e.to),a=r.get(e.to),o=t&&t.opacity>.05,s=i&&i.opacity>.05||a&&a.opacity>.05;return{...e,opacity:o&&s?1:0}}).filter(e=>e.opacity>0),a=e.discoveries.map(e=>{let n=t-e.timestamp;return{...e,x:e.targetX,y:e.targetY,opacity:n<8?.9:0}}).filter(e=>e.opacity>0);return{...e,agents:n,toolCalls:r,edges:i,particles:[],discoveries:a}}var gn=250;function _n(e={}){let{useMockData:t=!0,externalEvents:n,onExternalEventsConsumed:r,sessionFilter:i,sessionFilterRef:a}=e,o=(0,l.useRef)(i);o.current=i;let s=a??o,[c,u]=(0,l.useState)(Ct),d=(0,l.useRef)(Ct()),f=(0,l.useCallback)(e=>{d.current=e,u(e)},[]),p=(0,l.useRef)(0),m=(0,l.useRef)(0),h=(0,l.useRef)(null),g=(0,l.useRef)(0),_=(0,l.useRef)(!1),v=(0,l.useRef)(()=>{}),b=(0,l.useRef)(0);(0,l.useEffect)(()=>{let e=xt([]).force(`charge`,St().strength(ne.chargeStrength)).force(`center`,ue(0,0).strength(ne.centerStrength)).force(`collide`,Le(ne.collideRadius)).force(`link`,Be([]).id(e=>e.id).distance(ne.linkDistance).strength(ne.linkStrength)).alphaDecay(ne.alphaDecay).velocityDecay(ne.velocityDecay).on(`tick`,()=>{let t=d.current,n=new Map(t.agents),r=!1;for(let t of e.nodes()){let e=n.get(t.id);e&&!e.pinned&&t.x!==void 0&&t.y!==void 0&&(Math.abs(e.x-t.x)>.1||Math.abs(e.y-t.y)>.1)&&(n.set(t.id,{...e,x:t.x,y:t.y}),r=!0)}r&&(d.current={...t,agents:n})});return e.stop(),h.current=e,()=>{e.stop(),h.current=null}},[]);let w=(0,l.useCallback)((e,t)=>{let n=h.current;if(!n)return;let r=Array.from(e.values()).map(e=>({id:e.id,x:e.x,y:e.y,vx:e.vx,vy:e.vy,fx:e.pinned?e.x:void 0,fy:e.pinned?e.y:void 0})),i=t.filter(e=>e.type===`parent-child`).map(e=>({id:e.id,source:e.from,target:e.to}));n.nodes(r);let a=n.force(`link`);a&&a.links(i),n.alpha(.3).restart();for(let e=0;e<15;e++)n.tick();n.stop()},[]),T=(0,l.useCallback)((e,t,n,r)=>{let i=e.messageBubbles.filter(e=>r-e.time<=12),a=i.length>0?{x1:e.x+30,y1:e.y-30,x2:e.x+300,y2:e.y-20+i.length*60+20}:null,o=(e,t)=>{if(a&&e+170/2>a.x1&&e-170/2<a.x2&&t+36/2>a.y1&&t-36/2<a.y2)return!0;for(let r of n.values())if(Math.abs(e-r.x)<170&&Math.abs(t-r.y)<36)return!0;return!1},s=-Math.PI/2;if(e.parentId){let n=t.get(e.parentId);n&&(s=Math.atan2(e.y-n.y,e.x-n.x))}for(let t=1;t<=O.maxRings;t++){let n=O.baseDistance+t*O.ringIncrement,r=O.baseSteps+t*O.stepsPerRing;for(let t=0;t<r;t++){let i=(t/(r-1)-.5)*Math.PI,a=s+i,c=e.x+Math.cos(a)*n,l=e.y+Math.sin(a)*n;if(!o(c,l))return{x:c,y:l}}}return{x:e.x+Math.cos(s)*O.fallbackDistance,y:e.y+Math.sin(s)*O.fallbackDistance}},[]),E=(0,l.useCallback)(e=>{if(!e)return C;let t=e.toLowerCase();for(let[e,n]of Object.entries(x))if(t.includes(e))return n;return S},[]),ee=(0,l.useCallback)((e,t)=>sn(e,t,{syncForceSimulation:w,findToolSlot:T,getContextWindowSize:E,blockIdCounter:g,skipForceSync:_.current}),[w,T,E]);v.current=(0,l.useCallback)(e=>{let i=e-m.current;if(m.current&&i<D.minFrameInterval){p.current=requestAnimationFrame(v.current);return}m.current||=e;let a=Math.min((e-m.current)/1e3,D.maxDeltaTime);m.current=e;let o=null;n&&n.length>0&&!t&&(o=n.slice(),r?.());let c=d.current;if(!c.isPlaying){p.current=requestAnimationFrame(v.current);return}let l=c.currentTime+a*c.speed,f=Math.max(c.maxTimeReached,l),g=c.eventIndex,_=c,x=[];if(t)for(;g<y.length&&y[g].time<=l;){let e=y[g];_=ee(e,_),x.push(e),g++}else for(;g<_.eventLog.length&&_.eventLog[g].time<=l;){let e=_.eventLog[g];_=ee(e,_),g++}if(o){for(let e of o){let t=s.current;if(t&&e.sessionId&&e.sessionId!==t)continue;let n=Math.max(e.time||l,l),r={...e,time:n};_={..._,currentTime:n},_=ee(r,_),x.push(r)}l=Math.max(l,_.currentTime),f=Math.max(f,l)}if(x.length>0){let e=_.eventLog.concat(x);e.length>5e3&&(e=e.slice(e.length-Dt)),t||(g=e.length),_={..._,eventLog:e}}_={..._,eventIndex:g},d.current=mn(c,a,l,f,_,{useMockData:t,mockScenarioLength:y.length,mockScenarioEndTime:y.length>0?y[y.length-1].time:0}),h.current&&h.current.tick(),x.length>0&&(!b.current||e-b.current>=gn)&&(u(d.current),b.current=e),p.current=requestAnimationFrame(v.current)},[ee,t,n,r]),(0,l.useEffect)(()=>(c.isPlaying?(m.current=0,p.current=requestAnimationFrame(e=>v.current(e))):p.current&&cancelAnimationFrame(p.current),()=>{p.current&&cancelAnimationFrame(p.current)}),[c.isPlaying]);let te=(0,l.useCallback)(()=>{f({...d.current,isPlaying:!0})},[f]),re=(0,l.useCallback)(()=>{f({...d.current,isPlaying:!1})},[f]),ie=(0,l.useCallback)(e=>{d.current={...d.current,speed:e},u(t=>({...t,speed:e}))},[]),k=(0,l.useCallback)((e=!1)=>{if(g.current=0,Et(),!e){f(Ct({isPlaying:!0,speed:d.current.speed}));return}let t=d.current,n=new Map;for(let[e,r]of t.agents)r.state!==`complete`&&n.set(e,{...r,toolCalls:0,messageBubbles:[],timeAlive:0});let r=t.edges.filter(e=>e.type===`parent-child`&&n.has(e.from)&&n.has(e.to)),i=new Map;for(let[e,r]of t.timelineEntries)n.has(e)&&i.set(e,{...r,blocks:[]});let a=new Map;for(let e of n.keys())a.set(e,[]);let o=t.eventLog.filter(e=>e.type===`agent_spawn`&&n.has(e.payload?.name)),s={...Ct({isPlaying:!0,speed:t.speed}),agents:n,edges:r,timelineEntries:i,conversations:a,eventLog:o,eventIndex:o.length};f(s),setTimeout(()=>w(s.agents,s.edges),0)},[w,f]),A=(0,l.useCallback)((e,t,n)=>{let r=d.current,i=new Map(r.agents),a=i.get(e);if(a&&i.set(e,{...a,x:t,y:n,pinned:!0}),d.current={...r,agents:i},h.current){let r=h.current.nodes().find(t=>t.id===e);r&&(r.fx=t,r.fy=n)}},[]),j=(0,l.useCallback)(e=>{let n=d.current,r=t?y:n.eventLog,i=Ct({speed:n.speed,eventLog:n.eventLog,maxTimeReached:n.maxTimeReached});_.current=!0,g.current=0;let a=0;for(let t of r){if(t.time>e)break;i.currentTime=t.time,i={...ee(t,i),currentTime:t.time},a++}_.current=!1,i=hn(i,e),i.currentTime=e,i.eventIndex=a,f(i),setTimeout(()=>w(i.agents,i.edges),0)},[ee,t,w,f]),M=(0,l.useCallback)(()=>({simState:d.current,blockId:g.current}),[]),N=(0,l.useCallback)(e=>{g.current=e.blockId,f({...e.simState,isPlaying:!0}),setTimeout(()=>w(e.simState.agents,e.simState.edges),0)},[w,f]);return{frameRef:d,agents:c.agents,toolCalls:c.toolCalls,particles:c.particles,edges:c.edges,discoveries:c.discoveries,fileAttention:c.fileAttention,timelineEntries:c.timelineEntries,currentTime:c.currentTime,isPlaying:c.isPlaying,speed:c.speed,maxTimeReached:c.maxTimeReached,conversations:c.conversations,play:te,pause:re,restart:k,setSpeed:ie,seekToTime:j,updateAgentPosition:A,saveSnapshot:M,restoreSnapshot:N}}var vn=typeof window<`u`?new class{constructor(){this._isVSCode=!1,this._status=`disconnected`,this._source=``,this.initListeners=[],this.eventListeners=[],this.statusListeners=[],this.configListeners=[],this.sessionListeners=[],this.handleMessage=e=>{let t=e.data;if(!(!t||typeof t.type!=`string`))switch(t.type){case`__vscode-bridge-init`:this._isVSCode=!0,this.postToExtension({type:`ready`});for(let e of this.initListeners)e();this.initListeners=[];break;case`agent-event`:for(let e of this.eventListeners)e(t.event);break;case`agent-event-batch`:for(let e of t.events)for(let t of this.eventListeners)t(e);break;case`connection-status`:this._status=t.status,this._source=t.source||``;for(let e of this.statusListeners)e(this._status,this._source);break;case`config`:for(let e of this.configListeners)e(t.config);break;case`reset`:for(let e of this.sessionListeners)e(`reset`,t.reason||`panel-reopened`);break;case`session-list`:for(let e of this.sessionListeners)e(`list`,t.sessions);break;case`session-started`:for(let e of this.sessionListeners)e(`started`,t.session);break;case`session-ended`:for(let e of this.sessionListeners)e(`ended`,t.sessionId);break;case`session-updated`:for(let e of this.sessionListeners)e(`updated`,{sessionId:t.sessionId,label:t.label});break}},typeof window<`u`&&window.addEventListener(`message`,this.handleMessage)}get isVSCode(){return this._isVSCode}subscribe(e,t){return e.push(t),()=>{let n=e.indexOf(t);n>=0&&e.splice(n,1)}}onInit(e){return this._isVSCode?(e(),()=>{}):this.subscribe(this.initListeners,e)}onEvent(e){return this.subscribe(this.eventListeners,e)}onStatus(e){return this.subscribe(this.statusListeners,e)}onConfig(e){return this.subscribe(this.configListeners,e)}onSession(e){return this.subscribe(this.sessionListeners,e)}openFile(e,t){this.postToExtension({type:`open-file`,filePath:e,line:t})}postToExtension(e){this._isVSCode&&typeof window<`u`&&window.parent.postMessage(e,`*`)}configureWebviewApi(e){this._isVSCode=!0,this.postToExtension=t=>{e(t)};for(let e of this.initListeners)e();this.initListeners=[]}dispose(){typeof window<`u`&&window.removeEventListener(`message`,this.handleMessage),this.initListeners=[],this.eventListeners=[],this.statusListeners=[],this.configListeners=[],this.sessionListeners=[]}}:null;function yn(){let[e,t]=(0,l.useState)(!1),[n,r]=(0,l.useState)(`disconnected`),[i,a]=(0,l.useState)(!1),o=(0,l.useRef)([]),[,s]=(0,l.useState)(0),[c,u]=(0,l.useState)([]),[d,f]=(0,l.useState)(null),p=(0,l.useRef)(null),m=(0,l.useRef)(new Map),h=(0,l.useRef)(!1),[g,_]=(0,l.useState)(new Set);(0,l.useEffect)(()=>{if(typeof window>`u`)return;let e=vn;if(!e||e.isVSCode)return;let t=new EventSource(`/events`);return t.onopen=()=>{r(`connected`),a(!1)},t.onmessage=e=>{try{let t=JSON.parse(e.data);window.postMessage(t,`*`)}catch{}},t.onerror=()=>{r(`disconnected`)},()=>{t.close()}},[]),(0,l.useEffect)(()=>{let e=vn;if(!e)return;let n=e.onInit(()=>{t(!0),a(!1)}),i=e.onEvent(e=>{let t={time:e.time,type:e.type,payload:e.payload,sessionId:e.sessionId};if(e.sessionId){let n=m.current.get(e.sessionId)||[];n.push(t),m.current.set(e.sessionId,n)}let n=p.current;if(n&&e.sessionId===n&&!h.current?(o.current.push(t),s(e=>e+1)):e.sessionId&&e.sessionId!==n&&_(t=>{if(t.has(e.sessionId))return t;let n=new Set(t);return n.add(e.sessionId),n}),e.sessionId&&S.current.has(e.sessionId)){let t=S.current.get(e.sessionId);S.current.delete(e.sessionId),t&&u(e=>e.find(e=>e.id===t.id)?e:[...e,{...t,status:`active`,lastActivityTime:Date.now()}])}}),c=e.onStatus(e=>{r(e)}),l=e.onConfig(e=>{a(e.showMockData)}),d=e.onSession((e,t)=>{if(e===`reset`){u([]),f(null),p.current=null,o.current.length=0,m.current.clear(),_(new Set),S.current.clear(),s(e=>e+1);return}if(e===`list`){let e=t;if(u(e),!p.current&&e.length>0){let t=[...e].sort((e,t)=>{let n=e.status===`active`?1:0,r=t.status===`active`?1:0;return n===r?t.lastActivityTime-e.lastActivityTime:r-n})[0].id;h.current=!0,o.current.length=0,p.current=t,f(t)}}else if(e===`started`){let e=t;u(t=>t.find(t=>t.id===e.id)?t.map(t=>t.id===e.id?{...t,status:`active`,lastActivityTime:Date.now()}:t):[...t,e]),h.current=!0,o.current.length=0,p.current=e.id,f(e.id)}else if(e===`updated`){let{sessionId:e,label:n}=t;u(t=>t.map(t=>t.id===e?{...t,label:n}:t))}else if(e===`ended`){let e=t;u(t=>t.map(t=>t.id===e?{...t,status:`completed`}:t))}});return()=>{n(),i(),c(),l(),d()}},[]);let v=(0,l.useCallback)(()=>{o.current.length=0},[]),y=(0,l.useCallback)(e=>{h.current=!0,o.current.length=0,p.current=e,f(e),e&&_(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]),b=(0,l.useCallback)((e,t=0)=>{h.current=!1;let n=m.current.get(e)||[];o.current.length=0,o.current.push(...n.slice(t)),s(e=>e+1)},[]),x=(0,l.useCallback)(e=>m.current.get(e)?.length??0,[]),S=(0,l.useRef)(new Map),C=(0,l.useCallback)(e=>{u(t=>{let n=t.find(t=>t.id===e);return n&&S.current.set(e,n),t.filter(t=>t.id!==e)}),_(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]),w=(0,l.useCallback)((e,t)=>{vn?.openFile(e,t)},[]);return{isVSCode:e,connectionStatus:n,pendingEvents:o.current,consumeEvents:v,useMockData:i,bridgeOpenFile:w,sessions:c,selectedSessionId:d,selectedSessionIdRef:p,selectSession:y,flushSessionEvents:b,getSessionEventCount:x,sessionsWithActivity:g,removeSession:C}}function bn(e){let{agents:t,toolCalls:n,discoveries:r}=e,[i,a]=(0,l.useState)(null),[o,s]=(0,l.useState)(null),[c,u]=(0,l.useState)(null),[d,f]=(0,l.useState)(null),[p,m]=(0,l.useState)(null),[h,g]=(0,l.useState)(null),[_,v]=(0,l.useState)(null),[y,b]=(0,l.useState)(null),[x,S]=(0,l.useState)(null),[C,w]=(0,l.useState)(null),T=(0,l.useCallback)(()=>{a(null),u(null)},[]),E=(0,l.useCallback)(()=>{f(null),m(null),g(null)},[]),ee=(0,l.useCallback)(()=>{v(null),b(null),S(null)},[]),D=(0,l.useCallback)(e=>{e!==`agent`&&T(),e!==`tool`&&E(),e!==`discovery`&&ee(),w(null)},[T,E,ee]);return{selectedAgentId:i,hoveredAgentId:o,setHoveredAgentId:s,selectedAgentWorldPos:c,selectedToolCallId:d,selectedToolScreenPos:p,selectedToolData:h,selectedDiscoveryId:_,selectedDiscoveryScreenPos:y,selectedDiscoveryData:x,contextMenu:C,setContextMenu:w,handleAgentClick:(0,l.useCallback)(e=>{if(a(e),D(`agent`),e){let n=t.get(e);n&&u({x:n.x,y:n.y})}else u(null)},[t,D]),handleToolCallClick:(0,l.useCallback)(e=>{if(f(e),e){D(`tool`);let t=n.get(e);t&&(m({x:t.x,y:t.y}),g({id:t.id,toolName:t.toolName,state:t.state,args:t.args,result:t.result,tokenCost:t.tokenCost,inputData:t.inputData}))}else m(null),g(null)},[n,D]),handleDiscoveryClick:(0,l.useCallback)(e=>{if(v(e),e){D(`discovery`);let t=r.find(t=>t.id===e);t&&(b({x:t.x,y:t.y}),S({id:t.id,type:t.type,label:t.label,content:t.content,agentId:t.agentId}))}else b(null),S(null)},[r,D]),handleContextMenu:(0,l.useCallback)((e,t,n)=>{w(t===`agent`&&n?{x:e.clientX,y:e.clientY,agentId:n}:t===`canvas`?{x:e.clientX,y:e.clientY}:null)},[]),clearAgent:T,clearTool:E,clearDiscovery:ee,clearAllSelections:(0,l.useCallback)(()=>{T(),E(),ee(),w(null)},[T,E,ee])}}function xn(e){let t=(0,l.useRef)(e);t.current=e,(0,l.useEffect)(()=>{let e=e=>{if(e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement)return;let n=t.current;switch(e.key){case` `:e.preventDefault(),n.togglePlayPause();break;case`f`:n.toggleFilePanel();break;case`F`:n.zoomToFit();break;case`t`:case`T`:n.toggleTimeline();break;case`Delete`:case`Backspace`:n.selectedAgentId&&n.deselectAgent();break;case`Escape`:n.clearSelection(),n.closeTranscript();break;case`c`:case`C`:n.toggleTranscript();break;case`g`:case`G`:n.toggleHexGrid();break;case`s`:case`S`:n.toggleStats();break;case`$`:n.toggleCostOverlay();break;case`m`:case`M`:n.toggleMute();break;case`1`:n.setSpeed(.5);break;case`2`:n.setSpeed(1);break;case`3`:n.setSpeed(2);break;case`4`:n.setSpeed(4);break}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[])}var Sn=class{constructor(e=.6){this.intensity=e,this.bloomCanvas=document.createElement(`canvas`),this.tempCanvas=document.createElement(`canvas`);let t=this.bloomCanvas.getContext(`2d`),n=this.tempCanvas.getContext(`2d`);this.enabled=!!(t&&n),this.bloomCtx=t,this.tempCtx=n}resize(e,t){let n=.5;this.bloomCanvas.width=e*n,this.bloomCanvas.height=t*n,this.tempCanvas.width=e*n,this.tempCanvas.height=t*n}apply(e,t){let n=this.bloomCanvas.width,r=this.bloomCanvas.height;n===0||r===0||!this.enabled||(this.bloomCtx.clearRect(0,0,n,r),this.bloomCtx.drawImage(e,0,0,n,r),this.boxBlur(this.bloomCtx,this.tempCtx,n,r,8),this.boxBlur(this.bloomCtx,this.tempCtx,n,r,6),this.boxBlur(this.bloomCtx,this.tempCtx,n,r,4),t.save(),t.globalCompositeOperation=`lighter`,t.globalAlpha=this.intensity,t.drawImage(this.bloomCanvas,0,0,e.width,e.height),t.restore())}boxBlur(e,t,n,r,i){t.clearRect(0,0,n,r),t.filter=`blur(${i}px)`,t.drawImage(e.canvas,0,0),t.filter=`none`,e.clearRect(0,0,n,r),e.drawImage(t.canvas,0,0)}setIntensity(e){this.intensity=Math.max(0,Math.min(1,e))}};function Cn(e){return Math.floor(e*255).toString(16).padStart(2,`0`)}function wn(e){return`${Math.floor(e/1e3)}k`}function Tn(e,t=3){return e.split(`/`).slice(-t).join(`/`)}var En=80,Dn=60;function On(e,t){let n=[];for(let r=0;r<En;r++)n.push({x:Math.random()*e*2-e*.5,y:Math.random()*t*2-t*.5,size:Math.random()*1.5+.5,brightness:Math.random()*.3+.05,speed:Math.random()*.15+.05,depth:Math.random()});return n}function kn(e,t,n,r){for(let i of e)i.x+=i.speed*t*10*(1-i.depth*.5),i.y-=i.speed*t*5*(1-i.depth*.3),i.x>n*1.5&&(i.x=-n*.5),i.y<-r*.5&&(i.y=r*1.5)}function An(e,t,n,r,i,a,o,s){if(e.fillStyle=B.void,e.fillRect(0,0,t,n),s){let r=s.x*i.scale+i.x,a=s.y*i.scale+i.y,o=e.createRadialGradient(r,a,0,r,a,300);o.addColorStop(0,s.color+`08`),o.addColorStop(1,`transparent`),e.fillStyle=o,e.fillRect(0,0,t,n)}for(let t of r){let n=.3+t.depth*.7,r=t.x+i.x*n*.1,a=t.y+i.y*n*.1,o=t.size*(.5+t.depth*.5),s=t.brightness*(.5+t.depth*.5);e.beginPath(),e.fillStyle=B.holoBase+Cn(s),e.arc(r,a,o,0,Math.PI*2),e.fill()}a&&Mn(e,t,n,i,o)}var jn=Array.from({length:6},(e,t)=>{let n=Math.PI/3*t-Math.PI/2;return{cos:Math.cos(n),sin:Math.sin(n)}});function Mn(e,t,n,r,i){e.save(),e.translate(r.x,r.y),e.scale(r.scale,r.scale);let a=Dn,o=a*Math.sqrt(3),s=Math.floor(-r.x/r.scale/(a*1.5))*(a*1.5)-a*3,c=Math.floor(-r.y/r.scale/o)*o-o*2,l=s+t/r.scale+a*6,u=c+n/r.scale+o*4,d=a*.4;e.strokeStyle=B.hexGrid,e.lineWidth=.5;let f=new Map,p=i*.5;for(let e=s;e<l;e+=a*1.5)for(let t=c;t<u;t+=o){let n=(e-s)/(a*1.5)%2==0?0:o/2,r=e,i=t+n,c=Math.sqrt(r*r+i*i),l=Math.sin(p+c*.005)*.3+.7,u=Math.round(.15*l*40)/40,d=f.get(u);d||(d=[],f.set(u,d)),d.push([r,i])}for(let[t,n]of f){e.globalAlpha=t,e.beginPath();for(let[t,r]of n){e.moveTo(t+d*jn[0].cos,r+d*jn[0].sin);for(let n=1;n<6;n++)e.lineTo(t+d*jn[n].cos,r+d*jn[n].sin);e.closePath()}e.stroke()}e.globalAlpha=1,e.restore()}var Nn=new Map;function Pn(e,t,n,r){let i=Math.ceil(t),a=`${e}|${i}|${n}|${r}`,o=Nn.get(a);if(o)return o;let s=i*2;o=document.createElement(`canvas`),o.width=s,o.height=s;let c=o.getContext(`2d`),l=c.createRadialGradient(i,i,0,i,i,i);return l.addColorStop(0,e+n),l.addColorStop(1,e+r),c.fillStyle=l,c.fillRect(0,0,s,s),Nn.set(a,o),o}function Fn(e,t,n,r){let i=Math.round(t),a=Math.ceil(n),o=`ag|${e}|${i}|${a}|${r}`,s=Nn.get(o);if(s)return s;let c=a*2;s=document.createElement(`canvas`),s.width=c,s.height=c;let l=s.getContext(`2d`),u=l.createRadialGradient(a,a,i,a,a,a);return u.addColorStop(0,e+r),u.addColorStop(1,e+`00`),l.fillStyle=u,l.fillRect(0,0,c,c),Nn.set(o,s),s}var In=new Map,Ln=2e3;function Rn(e,t){let n=e.font+`|`+t,r=In.get(n);return r===void 0?(r=e.measureText(t).width,In.size>Ln&&In.clear(),In.set(n,r),r):r}function zn(e,t,n){if(Rn(e,t)<=n)return t;let r=0,i=t.length;for(;r<i;){let a=r+i+1>>1;Rn(e,t.slice(0,a)+`…`)<=n?r=a:i=a-1}return r>0?t.slice(0,r)+`…`:`…`}function Bn(e,t,n,r){let i=t.isMain?Mt.radiusMain:Mt.radiusSub,a=Nt.margin,o=Math.max(100,(r-Nt.detail.height)/2),s=(a-n.x)/n.scale,c=(o+Nt.detail.height*.3-n.y)/n.scale,l=Math.atan2(c-t.y,s-t.x),u=t.x+Math.cos(l)*i,d=t.y+Math.sin(l)*i;e.save(),e.globalAlpha=Rt.alpha,e.strokeStyle=B.holoBase+Rt.strokeAlpha,e.lineWidth=Rt.lineWidth,e.setLineDash(Rt.dash),e.beginPath(),e.moveTo(u,d);let f=(u+s)/2,p=Math.min(d,c)-Rt.curveOffset;e.quadraticCurveTo(f,p,s,c),e.stroke(),e.setLineDash([]),e.beginPath(),e.fillStyle=B.holoBase+`90`,e.arc(s,c,Rt.dotRadius,0,Math.PI*2),e.fill(),e.restore()}function Vn(e,t,n,r){e.beginPath();for(let i=0;i<6;i++){let a=Math.PI/3*i-Math.PI/2,o=t+r*Math.cos(a),s=n+r*Math.sin(a);i===0?e.moveTo(o,s):e.lineTo(o,s)}e.closePath()}var Hn=`M142.27 316.619l73.655-41.326 1.238-3.589-1.238-1.996-3.589-.001-12.31-.759-42.084-1.138-36.498-1.516-35.361-1.896-8.897-1.895-8.34-10.995.859-5.484 7.482-5.03 10.717.935 23.683 1.617 35.537 2.452 25.782 1.517 38.193 3.968h6.064l.86-2.451-2.073-1.517-1.618-1.517-36.776-24.922-39.81-26.338-20.852-15.166-11.273-7.683-5.687-7.204-2.451-15.721 10.237-11.273 13.75.935 3.513.936 13.928 10.716 29.749 23.027 38.848 28.612 5.687 4.727 2.275-1.617.278-1.138-2.553-4.271-21.13-38.193-22.546-38.848-10.035-16.101-2.654-9.655c-.935-3.968-1.617-7.304-1.617-11.374l11.652-15.823 6.445-2.073 15.545 2.073 6.547 5.687 9.655 22.092 15.646 34.78 24.265 47.291 7.103 14.028 3.791 12.992 1.416 3.968 2.449-.001v-2.275l1.997-26.641 3.69-32.707 3.589-42.084 1.239-11.854 5.863-14.206 11.652-7.683 9.099 4.348 7.482 10.716-1.036 6.926-4.449 28.915-8.72 45.294-5.687 30.331h3.313l3.792-3.791 15.342-20.372 25.782-32.227 11.374-12.789 13.27-14.129 8.517-6.724 16.1-.001 11.854 17.617-5.307 18.199-16.581 21.029-13.75 17.819-19.716 26.54-12.309 21.231 1.138 1.694 2.932-.278 44.536-9.479 24.062-4.347 28.714-4.928 12.992 6.066 1.416 6.167-5.106 12.613-30.71 7.583-36.018 7.204-53.636 12.689-.657.48.758.935 24.164 2.275 10.337.556h25.301l47.114 3.514 12.309 8.139 7.381 9.959-1.238 7.583-18.957 9.655-25.579-6.066-59.702-14.205-20.474-5.106-2.83-.001v1.694l17.061 16.682 31.266 28.233 39.152 36.397 1.997 8.999-5.03 7.102-5.307-.758-34.401-25.883-13.27-11.651-30.053-25.302-1.996-.001v2.654l6.926 10.136 36.574 54.975 1.895 16.859-2.653 5.485-9.479 3.311-10.414-1.895-21.408-30.054-22.092-33.844-17.819-30.331-2.173 1.238-10.515 113.261-4.929 5.788-11.374 4.348-9.478-7.204-5.03-11.652 5.03-23.027 6.066-30.052 4.928-23.886 4.449-29.674 2.654-9.858-.177-.657-2.173.278-22.37 30.71-34.021 45.977-26.919 28.815-6.445 2.553-11.173-5.789 1.037-10.337 6.243-9.2 37.257-47.392 22.47-29.371 14.508-16.961-.101-2.451h-.859l-98.954 64.251-17.618 2.275-7.583-7.103.936-11.652 3.589-3.791 29.749-20.474-.101.102.024.101z`;function Un(e,t){for(let n of t){let t=n.age/n.duration;switch(e.save(),n.type){case`spawn`:{let r=I.ringStart+t*I.ringExpand,i=(1-t)*I.maxAlpha;if(t<I.flashThreshold){let r=(1-t/I.flashThreshold)*I.flashAlpha;e.beginPath(),e.arc(n.x,n.y,I.flashBaseRadius*(1-t/I.flashThreshold)+I.flashMinRadius,0,Math.PI*2),e.fillStyle=B.holoHot+Cn(r),e.fill()}e.globalAlpha=i,Vn(e,n.x,n.y,r),e.strokeStyle=n.color,e.lineWidth=2*(1-t),e.stroke();for(let a=0;a<I.particleCount;a++){let o=a/I.particleCount*Math.PI*2,s=r*.8+t*20,c=n.x+Math.cos(o)*s,l=n.y+Math.sin(o)*s;e.beginPath(),e.fillStyle=n.color+Cn(200/255*i),e.arc(c,l,I.particleSize*(1-t),0,Math.PI*2),e.fill()}break}case`complete`:{let r=L.ringStart+t*L.ringExpand,i=(1-t)*L.maxAlpha;if(t<L.flashThreshold){let r=(1-t/L.flashThreshold)*L.flashAlpha,i=e.createRadialGradient(n.x,n.y,0,n.x,n.y,L.flashRadius);i.addColorStop(0,B.holoHot+Cn(r)),i.addColorStop(1,B.holoHot+`00`),e.fillStyle=i,e.fillRect(n.x-L.flashRadius,n.y-L.flashRadius,L.flashRadius*2,L.flashRadius*2)}e.globalAlpha=i,e.beginPath(),e.arc(n.x,n.y,r,0,Math.PI*2),e.strokeStyle=n.color,e.lineWidth=L.lineWidthMax*(1-t),e.stroke();let a=e.createRadialGradient(n.x,n.y,r-L.glowInner,n.x,n.y,r+L.glowOuter);a.addColorStop(0,n.color+`00`),a.addColorStop(.5,n.color+Cn(100/255*i)),a.addColorStop(1,n.color+`00`),e.fillStyle=a,e.beginPath(),e.arc(n.x,n.y,r+L.glowOuter,0,Math.PI*2),e.fill();break}case`shatter`:if(!n.particles)break;e.globalAlpha=(1-t)*.8;for(let r of n.particles){let i=r.speed*n.age,a=n.x+Math.cos(r.angle)*i,o=n.y+Math.sin(r.angle)*i,s=r.size*(1-t*.7);e.beginPath(),e.fillStyle=n.color,e.arc(a,o,s,0,Math.PI*2),e.fill(),e.beginPath();let c=e.createRadialGradient(a,o,0,a,o,s*3);c.addColorStop(0,n.color+`40`),c.addColorStop(1,n.color+`00`),e.fillStyle=c,e.arc(a,o,s*3,0,Math.PI*2),e.fill()}break}e.restore()}}var Wn=null;function Gn(){return Wn||=new Path2D(Hn),Wn}function Kn(e,t,n,r,i){e.save(),e.translate(t,n);let a=r*k.sparkScale/k.sparkViewBox;e.scale(a,a),e.translate(-k.sparkViewBox,-k.sparkViewBox+1),e.fillStyle=i,e.shadowColor=i,e.shadowBlur=6/a,e.fill(Gn()),e.restore()}function qn(e,t,n){let r=t.contextBreakdown,i=t.tokensUsed;if(i<=0)return;let a=Math.max(A.minWidth,n*A.widthMultiplier),o=A.barHeight,s=t.x-a/2,c=t.y+n+A.yOffset;e.fillStyle=B.cardBgDark,e.beginPath(),e.roundRect(s-2,c-2,a+4,o+14,A.borderRadius),e.fill(),e.fillStyle=B.textMuted,e.font=`${A.fontSize}px monospace`,e.textAlign=`center`,e.fillText(`${wn(i)} / ${wn(t.tokensMax)} tokens`,t.x,c+o+A.labelPadding);let l=Gt(r),u=s,d=a*(i/t.tokensMax);for(let t of l){if(t.value<=0)continue;let n=t.value/i*d;e.fillStyle=t.color,e.fillRect(u,c,n,o),u+=n}u<s+a&&(e.fillStyle=B.holoBg05,e.fillRect(u,c,s+a-u,o)),e.strokeStyle=B.glassBorder,e.lineWidth=.5,e.strokeRect(s,c,a,o)}function Jn(e,t,n,r){let i=t.contextBreakdown,a=t.tokensUsed;if(a<=0)return;let o=a/t.tokensMax,s=n+j.ringOffset,c=j.ringWidth,l=-Math.PI/2;e.beginPath(),e.arc(t.x,t.y,s,0,Math.PI*2),e.strokeStyle=B.holoBorder06,e.lineWidth=c,e.stroke();let u=Gt(i),d=l;for(let n of u){if(n.value<=0)continue;let r=n.value/t.tokensMax*Math.PI*2;e.beginPath(),e.arc(t.x,t.y,s,d,d+r),e.strokeStyle=n.color,e.lineWidth=c,e.stroke(),d+=r}if(o>j.warningThreshold){let n=o>j.criticalThreshold?B.error:B.tool,i=o>j.criticalThreshold?.35+Math.sin(r*6)*.2:.15+Math.sin(r*3)*.1;e.save(),e.beginPath(),e.arc(t.x,t.y,s+j.glowPadding,0,Math.PI*2),e.strokeStyle=n,e.lineWidth=j.glowLineWidth,e.globalAlpha=i,e.shadowColor=n,e.shadowBlur=j.glowBlur,e.stroke(),e.restore()}o>j.percentLabelThreshold&&(e.font=`${A.fontSize}px monospace`,e.textAlign=`center`,e.textBaseline=`bottom`,e.fillStyle=o>j.criticalThreshold?B.error:o>j.warningThreshold?B.tool:B.textDim,e.fillText(`${Math.floor(o*100)}%`,t.x,t.y-n-j.percentYOffset))}function Yn(e,t,n){e.save(),e.shadowColor=`rgba(0, 0, 0, 0.5)`,e.shadowBlur=k.shadowBlur,e.shadowOffsetX=k.shadowOffsetX,e.shadowOffsetY=k.shadowOffsetY,Vn(e,t.x,t.y,n*.9),e.fillStyle=B.cardBgFaintOverlay,e.fill(),e.restore()}function Xn(e,t,n,r,i,a,o){let s=n+k.glowPadding,c=i||a?.35:o?.3:t.state===`thinking`?.2:.1,l=Fn(r,Math.round(n*.5),Math.ceil(s),Cn(c));e.drawImage(l,t.x-Math.ceil(s),t.y-Math.ceil(s)),Vn(e,t.x,t.y,n+k.outerRingOffset),e.strokeStyle=r+`25`,e.lineWidth=1,e.stroke(),Vn(e,t.x,t.y,n),e.fillStyle=B.nodeInterior,e.fill()}function Zn(e,t,n,r,i,a,o){let s=t.state===`thinking`||i||a?It.scanline.thinking:It.scanline.normal,c=t.y-n+o*s%(n*2);e.save(),Vn(e,t.x,t.y,n),e.clip();let l=e.createLinearGradient(t.x,c-k.scanlineHalfH,t.x,c+k.scanlineHalfH),u=i?`35`:`20`;l.addColorStop(0,r+`00`),l.addColorStop(.5,r+u),l.addColorStop(1,r+`00`),e.fillStyle=l,e.fillRect(t.x-n,c-k.scanlineHalfH,n*2,k.scanlineWidth),e.restore()}function Qn(e,t,n,r,i,a,o,s){Vn(e,t.x,t.y,n),e.strokeStyle=r,e.lineWidth=a||i?2.5:2,t.state===`complete`?(e.setLineDash([4,4]),e.strokeStyle=r+`60`):o&&(e.setLineDash([6,4]),e.lineDashOffset=-s*k.waitingDashSpeed,e.lineWidth=2.5),e.stroke(),e.setLineDash([]),e.lineDashOffset=0}function $n(e,t,n,r,i){if(i){let i=n*.3;e.save(),e.strokeStyle=r+`90`,e.fillStyle=r+`90`,e.lineWidth=1.5,e.beginPath(),e.roundRect(t.x-i*.6,t.y-i*.1,i*1.2,i*1,2),e.fill(),e.beginPath(),e.arc(t.x,t.y-i*.15,i*.4,Math.PI,0),e.stroke(),e.restore()}else t.isMain?Kn(e,t.x,t.y,n,r+`90`):(e.fillStyle=r+`90`,e.font=`${n*k.subIconScale}px monospace`,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(t.state===`tool_calling`?`⚙`:`◇`,t.x,t.y))}function er(e,t,n,r,i){for(let a=0;a<4;a++){let o=i*It.orbitSpeed+a/4*Math.PI*2;e.beginPath(),e.fillStyle=r+`80`,e.arc(t.x+Math.cos(o)*(n+k.orbitParticleOffset),t.y+Math.sin(o)*(n+k.orbitParticleOffset),k.orbitParticleSize,0,Math.PI*2),e.fill()}}function tr(e,t,n,r,i){for(let a=0;a<2;a++){let o=(i*.65+a*.5)%1,s=n+k.rippleInnerOffset+o*k.rippleMaxExpand,c=(1-o)*k.rippleMaxAlpha;e.beginPath(),Vn(e,t.x,t.y,s),e.strokeStyle=r+Cn(c),e.lineWidth=1.5*(1-o),e.stroke()}for(let a=0;a<3;a++){let o=i*k.waitingOrbitSpeed+a/3*Math.PI*2;e.beginPath(),e.fillStyle=r+`70`,e.arc(t.x+Math.cos(o)*(n+k.waitingOrbitOffset),t.y+Math.sin(o)*(n+k.waitingOrbitOffset),k.waitingOrbitParticleSize,0,Math.PI*2),e.fill()}}function nr(e,t,n,r){e.fillStyle=r?B.textPrimary:B.textDim,e.font=`10px monospace`,e.textAlign=`center`,e.textBaseline=`top`;let i=n*k.labelWidthMultiplier,a=zn(e,t.name,i);e.fillText(a,t.x,t.y+n+k.labelYOffset)}function rr(e,t,n){let r=t.y-n-M.yOffset;e.fillStyle=B.cardBgDark,e.beginPath(),e.roundRect(t.x-M.boxWidth/2,r,M.boxWidth,M.boxHeight,M.borderRadius),e.fill(),e.strokeStyle=B.glassBorder,e.lineWidth=.5,e.stroke(),e.fillStyle=B.textMuted,e.font=`${M.fontSize}px monospace`,e.textAlign=`center`,e.textBaseline=`top`,e.fillText(`${t.toolCalls} tools \u00B7 ${t.timeAlive.toFixed(1)}s`,t.x,r+M.textPaddingY)}function ir(e,t,n,r,i,a){for(let[o,s]of t){let t=s.isMain?Mt.radiusMain:Mt.radiusSub,c=Ht(s.state),l=o===r,u=o===n,d=s.state===`waiting_permission`,f=t*(d?Math.sin(a*k.waitingBreatheSpeed)*k.waitingBreatheAmp+1:s.state===`thinking`?Math.sin(a*It.breathe.thinkingSpeed)*It.breathe.thinkingAmp+1:s.state===`idle`?Math.sin(a*It.breathe.idleSpeed)*It.breathe.idleAmp+1:1)*s.scale;e.save(),e.globalAlpha=s.opacity,Yn(e,s,f),Xn(e,s,f,c,l,u,d),Zn(e,s,f,c,l,d,a),Qn(e,s,f,c,l,u,d,a),$n(e,s,f,c,d),s.state===`thinking`&&er(e,s,f,c,a),d&&tr(e,s,f,c,a),nr(e,s,f,l),(s.state!==`complete`||s.opacity>.5)&&(s.isMain&&Jn(e,s,f,a),qn(e,s,f)),i&&s.state!==`complete`&&rr(e,s,f),e.restore()}}function ar(e,t){if(e>11.5)return 0;let n;return n=e<.3?e/E:e<10?1:1-(e-10)/ee,n=Math.max(0,Math.min(1,n))*t*.9,n}function or(e,t,n){for(let r of t.values()){if(r.messageBubbles.length===0)continue;let t=r.isMain?Mt.radiusMain:Mt.radiusSub,i=r.x+t+k.bubbleAnchorOffset,a=r.y+k.bubbleCursorY,o=!0;for(let t of r.messageBubbles){let s=ar(n-t.time,r.opacity);if(s<.01)continue;let{role:c,text:l}=t,u=c===`thinking`,d=u?B.bubbleThinkingBase:c===`user`?B.bubbleUserBase:B.bubbleAssistantBase,f=u?B.roleThinkingText:c===`user`?B.roleUserText:B.roleAssistantText,p=u?`💭 THINKING`:c===`user`?`USER`:`CLAUDE`,m=u?F.thinking:F.normal,h=`${m.fontSize}px monospace`;e.font=h;let g;t._cachedWrappedLines&&t._cachedWrappedFont===h?g=t._cachedWrappedLines:(g=sr(e,l,204),t._cachedWrappedLines=g,t._cachedWrappedFont=h);let _=g.length>8,v=_?g.slice(0,8):g,y=Math.min(220,Math.max(...v.map(t=>Rn(e,t)))+m.padding*2+4),b=m.headerH+v.length*m.lineH+m.padding+(_?m.lineH*.8:0);if(t._cachedW=y,t._cachedH=b,t._cachedLines=v.length,e.save(),e.globalAlpha=u?s*.7:s,o){let t=a+b/2;e.beginPath(),e.moveTo(i,t-F.triOffset),e.lineTo(i-F.triWidth,t),e.lineTo(i,t+F.triOffset),e.fillStyle=Wt(d,.12),e.fill(),o=!1}e.beginPath(),e.roundRect(i,a,y,b,F.borderRadius),e.fillStyle=Wt(d,u?.08:.12),e.fill(),e.strokeStyle=Wt(d,u?.15:.25),e.lineWidth=.5,e.stroke(),e.font=`${m.labelSize}px monospace`,e.textAlign=`left`,e.textBaseline=`top`,e.fillStyle=f+(u?`60`:`80`),e.fillText(p,i+m.padding,a+3),e.font=`italic ${m.fontSize}px monospace`,e.fillStyle=f+(u?`b0`:``);for(let t=0;t<v.length;t++)e.fillText(v[t],i+m.padding,a+m.headerH+t*m.lineH);_&&(e.fillStyle=f+`80`,e.fillText(`...`,i+m.padding,a+m.headerH+v.length*m.lineH)),e.restore(),a+=b+6}}}function sr(e,t,n){let r=[],i=t.split(`
38
+ `);for(let t of i){if(t.trim()===``){r.push(``);continue}let i=t.match(/^(\s*)/),a=i?i[1]:``,o=t.trimStart().split(/\s+/),s=a;for(let t of o){let i=s.trimStart()?`${s} ${t}`:`${s}${t}`;for(Rn(e,i)>n&&s.trimStart()?(r.push(s),s=a+t):s=i;Rn(e,s)>n&&s.length>1;){let t=s.length-1;for(;t>1&&Rn(e,s.slice(0,t))>n;)t--;r.push(s.slice(0,t)),s=a+s.slice(t)}}s&&r.push(s)}return r.length>0?r:[``]}function cr(e,t,n,r,i){let a=1-e;return a*a*a*t+3*a*a*e*n+3*a*e*e*r+e*e*e*i}function lr(e,t,n,r=0){let i=t.get(e.to);if(i&&i.opacity>=r)return i;let a=n.get(e.to);return a&&a.opacity>=r?a:null}function ur(e,t,n,r){let i=n-e,a=r-t,o=Math.sqrt(i*i+a*a);if(o<1)return null;let s=o*z.curvature,c=-a/o*s,l=i/o*s;return{cp1x:e+i*z.cp1+c,cp1y:t+a*z.cp1+l,cp2x:e+i*z.cp2+c,cp2y:t+a*z.cp2+l,dist:o,dx:i,dy:a}}function dr(e,t,n,r,i,a,o,s,c,l){let u=cr(e,t,r,a,s),d=cr(e,n,i,o,c),f=.001,p=Math.max(0,e-f),m=Math.min(1,e+f),h=cr(m,t,r,a,s)-cr(p,t,r,a,s),g=cr(m,n,i,o,c)-cr(p,n,i,o,c),_=Math.sqrt(h*h+g*g)||1;return{x:u,y:d,nx:-g/_*l,ny:h/_*l}}function fr(e,t,n,r,i,a,o,s,c,l,u,d,f){let p=z.segments;e.beginPath();for(let d=0;d<=p;d++){let f=d/p,m=dr(f,t,n,r,i,a,o,s,c,(l+(u-l)*f)/2);d===0?e.moveTo(m.x+m.nx,m.y+m.ny):e.lineTo(m.x+m.nx,m.y+m.ny)}for(let d=p;d>=0;d--){let f=d/p,m=dr(f,t,n,r,i,a,o,s,c,(l+(u-l)*f)/2);e.lineTo(m.x-m.nx,m.y-m.ny)}e.closePath(),e.fillStyle=d+Cn(f),e.fill()}function pr(e){let t=new Set;for(let n of e)t.add(n.edgeId);return t}function mr(e,t,n,r,i,a){for(let o of t){let t=n.get(o.from);if(!t||t.opacity<.05)continue;let s=lr(o,n,r,w);if(!s)continue;let c=s.x,l=s.y,u=t.x,d=t.y,f=i.has(o.id),p=f?z.activeAlpha:z.idleAlpha,m=f?Math.sin(a*It.pulseSpeed)*.1+.9:1,h=ur(u,d,c,l);if(!h)continue;let{cp1x:g,cp1y:_,cp2x:v,cp2y:y}=h,b=o.type===`tool`?B.tool:B.holoBase,x=o.type===`tool`?z.tool:z.parentChild;e.save(),fr(e,u,d,g,_,v,y,c,l,x.startW,x.endW,b,p*m),f&&fr(e,u,d,g,_,v,y,c,l,x.startW+z.glowExtra.startW,x.endW+z.glowExtra.endW,b,z.glowExtra.alpha),e.restore()}}function hr(e){let t=new Map;for(let n of e)t.set(n.id,n);return t}function gr(e,t,n,r,i,a){for(let o of t){let t=n.get(o.edgeId);if(!t)continue;let s=r.get(t.from);if(!s)continue;let c=lr(t,r,i);if(!c)continue;let l=c.x,u=c.y,d=s.x,f=s.y,p=ur(d,f,l,u);if(!p)continue;let{cp1x:m,cp1y:h,cp2x:g,cp2y:_,dx:v,dy:y,dist:b}=p,x=o.progress,S=v/b,C=-(y/b),w=S,T=(o.id.charCodeAt(5)||0)*.7,E=Math.sin(x*z.wobble.freq+a*z.wobble.timeFreq+T)*z.wobble.amp*Math.sin(x*Math.PI),ee=cr(x,d,m,g,l),D=cr(x,f,h,_,u),te=ee+C*E,ne=D+w*E;e.save();let O=o.type===`return`||o.type===`tool_return`;for(let t=Lt.trailSegments;t>=0;t--){let n=t/Lt.trailSegments*z.wobble.trailOffset,r=O?Math.min(1,x+n):Math.max(0,x-n),i=Math.sin(r*z.wobble.freq+a*z.wobble.timeFreq+T)*z.wobble.amp*Math.sin(r*Math.PI),s=cr(r,d,m,g,l)+C*i,c=cr(r,f,h,_,u)+w*i,p=(Lt.trailSegments-t)/Lt.trailSegments*.6;e.beginPath(),e.fillStyle=o.color+Cn(p),e.arc(s,c,o.size*((Lt.trailSegments-t)/Lt.trailSegments),0,Math.PI*2),e.fill()}let re=oe.glowRadius,ie=Pn(o.color,re,`60`,`00`);e.drawImage(ie,te-re,ne-re),e.beginPath(),e.fillStyle=o.color,e.arc(te,ne,o.size,0,Math.PI*2),e.fill(),e.beginPath(),e.fillStyle=B.holoHot+`80`,e.arc(te,ne,o.size*oe.coreHighlightScale,0,Math.PI*2),e.fill(),o.label&&x>oe.labelMinT&&x<oe.labelMaxT&&(e.fillStyle=o.color+`aa`,e.font=`${oe.labelFontSize}px monospace`,e.textAlign=`center`,e.fillText(o.label,te,ne+oe.labelYOffset)),e.restore()}}function _r(e,t,n,r){for(let[i,a]of t){let t=a.state===`running`,o=a.state===`error`,s=t?Math.sin(n*4)*.2+.8:o?Math.sin(n*6)*.15+.85:.5;e.save(),e.globalAlpha=a.opacity,e.font=`${N.fontSize}px monospace`;let c=`${a.toolName}: ${a.args}`,l=zn(e,c,148),u=Math.min(Rn(e,l)+12,160),d=Math.max(60,u),f=!t&&(a.tokenCost||o)?N.expandedHeight:N.collapsedHeight,p=a.x-d/2,m=a.y-f/2,h=i===r;if(o&&(e.shadowColor=B.error,e.shadowBlur=N.errorGlowBase+Math.sin(n*6)*N.errorGlowPulse),e.beginPath(),e.roundRect(p,m,d,f,N.borderRadius),e.fillStyle=o?Wt(B.toolCardErrorBase,.8*s):h?Wt(B.toolCardSelectedBase,.15*s):Wt(B.toolCardBase,.7*s),e.fill(),e.strokeStyle=o?B.error+`90`:h?B.holoBase+`aa`:t?B.tool+`60`:B.return+`40`,e.lineWidth=o?2:h?1.5:1,e.stroke(),e.shadowBlur=0,t&&(e.beginPath(),e.arc(a.x,a.y,Math.max(d,f)/2+N.spinRingPadding,n*N.spinSpeed,n*N.spinSpeed+N.spinArc),e.strokeStyle=B.tool+`50`,e.lineWidth=1.5,e.stroke()),o){e.save(),e.strokeStyle=B.error+`40`,e.lineWidth=.8;for(let t=0;t<3;t++){let n=t/3*Math.PI*2+.5;e.beginPath(),e.moveTo(a.x,a.y),e.lineTo(a.x+Math.cos(n)*d*.5,a.y+Math.sin(n)*f*.6),e.stroke()}e.restore()}let g=zn(e,c,d-8);e.font=`${N.fontSize}px monospace`,e.textAlign=`center`,e.textBaseline=`middle`,t?(e.fillStyle=B.tool,e.fillText(g,a.x,a.y)):o?(e.fillStyle=B.error,e.fillText(zn(e,`${a.toolName}: FAILED`,d-8),a.x,a.y-N.twoLineOffset),e.font=`${N.errorFontSize}px monospace`,e.fillStyle=B.error+`aa`,e.fillText(zn(e,a.errorMessage||a.result||``,d-8),a.x,a.y+N.twoLineOffset+2)):(e.fillStyle=B.return,e.fillText(g,a.x,a.y-N.twoLineOffset),a.tokenCost&&(e.fillStyle=B.tool+`90`,e.font=`${N.tokenFontSize}px monospace`,e.fillText(`${a.tokenCost} tok`,a.x,a.y+N.twoLineOffset+2))),e.restore()}}function vr(e,t,n){for(let r of t){let t=n.get(r.agentId);!t||r.opacity<.1||(e.save(),e.globalAlpha=r.opacity*.3,e.strokeStyle=B.holoBase+`30`,e.lineWidth=.5,e.setLineDash([3,5]),e.beginPath(),e.moveTo(t.x,t.y),e.lineTo(r.x,r.y),e.stroke(),e.setLineDash([]),e.restore())}}function yr(e,t,n,r){for(let n of t){if(n.opacity<.05)continue;e.save(),e.globalAlpha=n.opacity;let t=n.content.split(`
39
+ `),{cardW:i,cardH:a}=ie(n.label,t),o=n.x-i/2,s=n.y-a/2,c=n.id===r;e.beginPath(),e.roundRect(o,s,i,a,3),e.fillStyle=c?B.cardBgSelected:B.cardBg,e.fill();let l=Ut(n.type);c&&(e.shadowColor=l,e.shadowBlur=12,e.strokeStyle=l+`80`,e.lineWidth=1.5,e.stroke(),e.shadowBlur=0),e.fillStyle=l+`60`,e.fillRect(o,s,2,a),c||(e.strokeStyle=l+`30`,e.lineWidth=.5,e.stroke()),e.fillStyle=l,e.font=`bold 8px monospace`,e.textAlign=`left`,e.textBaseline=`top`,e.fillText(zn(e,n.label,i-10),o+6,s+3),e.fillStyle=B.textMuted,e.font=`7px monospace`;for(let n=0;n<t.length;n++)e.fillText(zn(e,t[n],i-10),o+6,s+14+n*11);e.restore()}}function br(e){return e/1e6*6}function xr(e){let t=e.toLowerCase();return t.includes(`read`)||t.includes(`glob`)||t.includes(`grep`)?B.contextUser:t.includes(`edit`)||t.includes(`write`)?B.contextReasoning:t.includes(`bash`)?B.tool:B.contextSubagent}function Sr(e){let t=new Map;for(let n of e.values()){if(!n.tokenCost)continue;let e=t.get(n.agentId);e||(e=[],t.set(n.agentId,e)),e.push(n)}return t}function Cr(e,t,n){let r=Sr(n);for(let[,n]of t){if(n.opacity<.05)continue;let t=br(n.tokensUsed);if(t<ae.minDisplayCost)continue;let i=n.isMain?Mt.radiusMain:Mt.radiusSub,a=n.y-i-ae.pillYOffset,o=`$${t<.01?t.toFixed(4):t.toFixed(3)}`;e.font=`bold 9px monospace`;let s=e.measureText(o).width+ae.pillPadding,c=ae.pillHeight,l=n.x-s/2;e.save(),e.globalAlpha=n.opacity*.9,e.fillStyle=B.costPillBg,e.strokeStyle=B.costPillStroke,e.lineWidth=1,e.beginPath(),e.roundRect(l,a,s,c,ae.pillRadius),e.fill(),e.stroke(),e.fillStyle=B.costText,e.textAlign=`center`,e.textBaseline=`middle`,e.fillText(o,n.x,a+c/2);let u=r.get(n.id);if(u&&u.length>0){let t=new Map,r=0;for(let e of u){let n=e.tokenCost||0,i=e.toolName;t.set(i,(t.get(i)||0)+n),r+=n}if(r>0){let i=Math.min(s+ae.miniBarMaxExtra,ae.miniBarMax),o=ae.miniBarHeight,l=n.x-i/2,u=a+c+ae.miniBarGap;e.fillStyle=B.holoBorder06,e.beginPath(),e.roundRect(l,u,i,o,ae.miniBarRadius),e.fill();let d=l;for(let[a,s]of t){let t=s/r*i;t<1||(e.fillStyle=xr(a),e.globalAlpha=n.opacity*.7,e.beginPath(),e.roundRect(d,u,t,o,ae.miniBarRadius),e.fill(),d+=t)}}}e.restore()}}function wr(e,t,n){let r=Array.from(t.values()).filter(e=>e.tokensUsed>0);if(r.length===0)return;let i=r.reduce((e,t)=>e+t.tokensUsed,0),a=br(i),o=r.map(e=>({name:e.name,tokens:e.tokensUsed,cost:br(e.tokensUsed)})).sort((e,t)=>t.cost-e.cost),s=new Map;for(let[,e]of n)if(e.tokenCost){let t=e.toolName;s.set(t,(s.get(t)||0)+e.tokenCost)}let c=Array.from(s.entries()).map(([e,t])=>({name:e,tokens:t,cost:br(t)})).sort((e,t)=>t.cost-e.cost),l=e.canvas.width/e.canvas.offsetWidth,u=e.canvas.width/l,d=P.width,f=u-d-P.xMargin,p=P.yStart,m=P.lineHeight,h=P.headerHeight,g=P.sectionGap,_=Math.min(o.length,P.maxRows),v=Math.min(c.length,P.maxRows),y=h+_*m+g+(v>0?14+v*m:0)+12;e.save(),e.fillStyle=B.panelBg,e.strokeStyle=B.glassBorder,e.lineWidth=1,e.beginPath(),e.roundRect(f,p,d,y,P.borderRadius),e.fill(),e.stroke();let b=p+8;e.font=`bold 11px monospace`,e.textAlign=`left`,e.textBaseline=`top`,e.fillStyle=B.costText,e.fillText(`$${a.toFixed(3)}`,f+P.contentPadding,b),e.font=`9px monospace`,e.fillStyle=B.textMuted,e.fillText(`${wn(i)} tokens`,f+P.contentPadding+e.measureText(`$${a.toFixed(3)}`).width+14,b+2),b+=h;let x=d-P.contentPadding*2;for(let t=0;t<_;t++){let n=o[t],r=a>0?n.cost/a:0;e.fillStyle=B.holoBorder06,e.beginPath(),e.roundRect(f+P.contentPadding,b+1,x,m-3,P.barRadius),e.fill(),e.fillStyle=n.name.includes(`main`)||o.length===1?B.barFillMain:B.barFillSub,e.beginPath(),e.roundRect(f+P.contentPadding,b+1,x*r,m-3,P.barRadius),e.fill(),e.font=`8px monospace`,e.fillStyle=B.textPrimary,e.textAlign=`left`,e.fillText(zn(e,n.name,x-50),f+P.contentPadding+P.barInset,b+3),e.textAlign=`right`,e.fillStyle=B.costText,e.fillText(`$${n.cost.toFixed(3)}`,f+P.contentPadding+x-P.barInset,b+3),b+=m}if(c.length>0){b+=g,e.font=`8px monospace`,e.fillStyle=B.textMuted,e.textAlign=`left`,e.fillText(`BY TOOL`,f+P.contentPadding,b),b+=14;for(let t=0;t<v;t++){let n=c[t],r=a>0?n.cost/a:0;e.fillStyle=B.panelSeparator,e.beginPath(),e.roundRect(f+P.contentPadding,b+1,x,m-3,P.barRadius),e.fill(),e.fillStyle=xr(n.name),e.globalAlpha=.2,e.beginPath(),e.roundRect(f+P.contentPadding,b+1,x*r,m-3,P.barRadius),e.fill(),e.globalAlpha=1,e.font=`8px monospace`,e.fillStyle=xr(n.name),e.textAlign=`left`,e.fillText(zn(e,n.name,x-50),f+P.contentPadding+P.barInset,b+3),e.textAlign=`right`,e.fillStyle=B.costTextDim,e.fillText(`$${n.cost.toFixed(3)}`,f+P.contentPadding+x-P.barInset,b+3),b+=m}}e.restore()}function Tr(e,t,n){for(let[r,i]of n){let n=i.isMain?Mt.radiusMain:Mt.radiusSub,a=e-i.x,o=t-i.y;if(a*a+o*o<n*n)return r}return null}function Er(e,t,n){for(let[r,i]of n){if(i.opacity<.1)continue;let n=i.state===`running`,a=i.state===`error`,o=`${i.toolName}: ${i.args}`.length*le.toolCharWidth+12,s=Math.max(60,Math.min(o,160)),c=!n&&(i.tokenCost||a)?N.expandedHeight:N.collapsedHeight,l=i.x-s/2,u=i.y-c/2;if(e>=l&&e<=l+s&&t>=u&&t<=u+c)return r}return null}function Dr(e,t,n,r){for(let i of n.values()){if(i.messageBubbles.length===0)continue;let n=i.isMain?Mt.radiusMain:Mt.radiusSub,a=i.x+n+k.bubbleAnchorOffset,o=i.y+k.bubbleCursorY;for(let n of i.messageBubbles){if(ar(r-n.time,i.opacity)<.01)continue;let s,c;if(n._cachedW!=null&&n._cachedH!=null)s=n._cachedW,c=n._cachedH;else{let e=n.role===`thinking`?F.thinking:F.normal,t=le.bubbleCharWidth,r=Math.floor((220-e.padding*2)/t),i=0;for(let e of n.text.split(`
40
+ `)){if(e.trim()===``){i++;continue}let t=e.split(/\s+/),n=``;for(let e of t)n&&(n+` `+e).length>r?(i++,n=e):n=n?n+` `+e:e;n&&i++}i===0&&(i=1),s=220,c=e.headerH+i*e.lineH+e.padding}if(e>=a&&e<=a+s&&t>=o&&t<=o+c)return i.id;o+=c+6}}return null}function Or(e,t,n){for(let r of n){if(r.opacity<.1)continue;let n=r.content.split(`
41
+ `),{cardW:i,cardH:a}=ie(r.label,n),o=r.x-i/2,s=r.y-a/2;if(e>=o&&e<=o+i&&t>=s&&t<=s+a)return r.id}return null}function kr(e,t,n,r){let i=[],a=[],o=new Map,s=new Map;for(let[t,r]of e){o.set(t,r.state);let e=n.get(t);e||(a.push({kind:`agent_spawn`}),r.opacity<.5&&i.push({type:`spawn`,x:r.x,y:r.y,color:B.holoBase,age:0,duration:Lt.spawnDuration})),e&&e!==`complete`&&r.state===`complete`&&(a.push({kind:`agent_complete`}),i.push({type:`complete`,x:r.x,y:r.y,color:B.complete,age:0,duration:Lt.completeDuration}))}for(let[e,n]of t){s.set(e,n.state);let t=r.get(e);if(!t&&n.state===`running`&&a.push({kind:`tool_start`}),t===`running`&&n.state===`complete`){a.push({kind:`tool_complete`});let e=[];for(let t=0;t<Lt.shatterCount;t++)e.push({angle:t/Lt.shatterCount*Math.PI*2+Math.random()*.5,speed:Lt.shatterSpeed.min+Math.random()*Lt.shatterSpeed.range,size:Lt.shatterSize.min+Math.random()*Lt.shatterSize.range});i.push({type:`shatter`,x:n.x,y:n.y,color:B.return,age:0,duration:Lt.shatterDuration,particles:e})}t===`running`&&n.state===`error`&&a.push({kind:`tool_error`})}return{effects:i,transitions:a,newAgentStates:o,newToolStates:s}}var Ar=22;function jr({mainCanvasRef:e,drawPropsRef:t,simTimeRef:n,dimensions:r,agentCount:i,zoomToFitTrigger:a,selectedAgentId:o}){let s=(0,l.useRef)({x:0,y:0,scale:1}),c=(0,l.useRef)(!1),u=(0,l.useRef)(null),d=(0,l.useRef)({vx:0,vy:0,active:!1}),f=(0,l.useRef)({agents:null,toolCalls:null,discoveries:null,selectedAgentId:null,result:null});(0,l.useEffect)(()=>{i>0&&s.current.x===0&&s.current.y===0&&(s.current={x:r.width/2,y:r.height/2,scale:1})},[i,r]);let p=(0,l.useCallback)((e,t)=>{let n=new Set([t]),r=[t];for(;r.length>0;){let t=r.shift();for(let[i,a]of e)a.parentId===t&&!n.has(i)&&(n.add(i),r.push(i))}return n},[]),m=(0,l.useCallback)(()=>{let{agents:e,toolCalls:r,discoveries:i,dimensions:a,selectedAgentId:o}=t.current;if(e.size===0)return null;let s=f.current;if(s.agents===e&&s.toolCalls===r&&s.discoveries===i&&s.selectedAgentId===o)return s.result;let c=null;if(o){let t=e.get(o);t&&!t.isMain&&(c=p(e,o))}let l=1/0,u=-1/0,d=1/0,m=-1/0;for(let[t,r]of e){if(c&&!c.has(t))continue;let e=(r.isMain?Mt.radiusMain:Mt.radiusSub)+Ar;if(l=Math.min(l,r.x-e),u=Math.max(u,r.x+e),d=Math.min(d,r.y-e),m=Math.max(m,r.y+e),r.messageBubbles.length>0){let t=r.messageBubbles.filter(e=>(n.current??0)-e.time<=10+ee).length;if(t>0){u=Math.max(u,r.x+e+14+220*.4),l=Math.min(l,r.x-e-220*.2);let n=t*46;d=Math.min(d,r.y-20),m=Math.max(m,r.y-20+n)}}}for(let[,e]of r)e.opacity>.1&&(!c||c.has(e.agentId))&&(l=Math.min(l,e.x-85),u=Math.max(u,e.x+85),d=Math.min(d,e.y-18),m=Math.max(m,e.y+18));for(let e of i)e.opacity>.1&&(!c||c.has(e.agentId))&&(l=Math.min(l,e.x-80),u=Math.max(u,e.x+80),d=Math.min(d,e.y-30),m=Math.max(m,e.y+30));if(l===1/0)return f.current={agents:e,toolCalls:r,discoveries:i,selectedAgentId:o,result:null},null;let h=It.viewportPadding,g=u-l+h*2,_=m-d+h*2,v=(l+u)/2,y=(d+m)/2,b=Math.min(a.width/g,a.height/_,2),x={x:a.width/2-v*b,y:a.height/2-y*b,scale:b};return f.current={agents:e,toolCalls:r,discoveries:i,selectedAgentId:o,result:x},x},[p,t,n]),h=(0,l.useCallback)(()=>{c.current=!1;let e=m();e&&(u.current=e)},[m]);return(0,l.useEffect)(()=>{a&&a>0&&h()},[a,h]),(0,l.useEffect)(()=>{c.current=!1,u.current=null},[o]),{transformRef:s,userHasNavigatedRef:c,panVelocityRef:d,screenToCanvas:(0,l.useCallback)((t,n)=>{let r=e.current;if(!r)return{x:0,y:0};let i=r.getBoundingClientRect(),a=s.current;return{x:(t-i.left-a.x)/a.scale,y:(n-i.top-a.y)/a.scale}},[e]),doZoomToFit:h,updateCamera:(0,l.useCallback)((e,t)=>{let n=s.current,r=d.current;if(r.active&&(s.current={...n,x:n.x+r.vx,y:n.y+r.vy},r.vx*=It.inertiaDecay,r.vy*=It.inertiaDecay,Math.abs(r.vx)<.1&&Math.abs(r.vy)<.1&&(r.active=!1)),!c.current&&!e&&!t){let e=m();e&&(u.current=e)}let i=u.current;if(i){let e=It.autoFitLerp,t=s.current,n=t.x+(i.x-t.x)*e,r=t.y+(i.y-t.y)*e,a=t.scale+(i.scale-t.scale)*e;Math.abs(i.x-n)<.5&&Math.abs(i.y-r)<.5&&Math.abs(i.scale-a)<.001?(u.current=null,s.current={x:i.x,y:i.y,scale:i.scale}):s.current={x:n,y:r,scale:a}}},[m])}}function Mr({drawPropsRef:e,transformRef:t,userHasNavigatedRef:n,panVelocityRef:r,simTimeRef:i,screenToCanvas:a,doZoomToFit:o,mainCanvasRef:s}){let[c,u]=(0,l.useState)(!1),d=(0,l.useRef)(!1),f=(0,l.useRef)(null);d.current=c;let p=(0,l.useRef)(null),m=(0,l.useRef)({x:0,y:0,time:0}),h=(0,l.useRef)(null),g=(0,l.useCallback)((t,n)=>Tr(t,n,e.current.agents),[e]),_=(0,l.useCallback)((t,n)=>Er(t,n,e.current.toolCalls),[e]),v=(0,l.useCallback)((t,n)=>Dr(t,n,e.current.agents,i.current),[e,i]),y=(0,l.useCallback)((t,n)=>Or(t,n,e.current.discoveries),[e]),b=(0,l.useCallback)(e=>{let t=a(e.clientX,e.clientY),n=g(t.x,t.y);e.button===0&&(r.current={vx:0,vy:0,active:!1},u(!0),n?f.current={type:`agent`,id:n,startX:e.clientX,startY:e.clientY}:(f.current={type:`canvas`,startX:e.clientX,startY:e.clientY},m.current={x:e.clientX,y:e.clientY,time:performance.now()}))},[a,g,r]),x=(0,l.useCallback)(i=>{let o=a(i.clientX,i.clientY),s=g(o.x,o.y);s!==h.current&&(h.current=s,e.current.onAgentHover(s));let c=d.current,l=f.current;if(c&&l)if(l.type===`canvas`){n.current=!0;let e=i.clientX-l.startX,a=i.clientY-l.startY,o=t.current;t.current={...o,x:o.x+e,y:o.y+a};let s=performance.now(),c=Math.max(s-m.current.time,1)/1e3;r.current={vx:(i.clientX-m.current.x)/c*te.velocityScale,vy:(i.clientY-m.current.y)/c*te.velocityScale,active:!1},m.current={x:i.clientX,y:i.clientY,time:s},f.current={...l,startX:i.clientX,startY:i.clientY}}else l.type===`agent`&&l.id&&Math.abs(i.clientX-l.startX)+Math.abs(i.clientY-l.startY)>It.dragThresholdPx&&(p.current={targetX:o.x,targetY:o.y,agentId:l.id})},[a,g,e,n,t,r]),S=(0,l.useCallback)(t=>{if(t.button===2){u(!1),f.current=null;return}let n=f.current;if(n?.type===`canvas`){let e=r.current;(Math.abs(e.vx)>It.inertiaThreshold||Math.abs(e.vy)>It.inertiaThreshold)&&(r.current.active=!0)}if((n?Math.abs(t.clientX-n.startX)+Math.abs(t.clientY-n.startY):0)<It.dragThresholdPx){let n=a(t.clientX,t.clientY),r=g(n.x,n.y),i=e.current;if(r)i.onAgentClick(r);else{let e=v(n.x,n.y);if(e)i.onAgentClick(e);else{let e=_(n.x,n.y);if(e)i.onToolCallClick?.(e);else{let e=y(n.x,n.y);e?i.onDiscoveryClick?.(e):(i.onAgentClick(null),i.onToolCallClick?.(null),i.onDiscoveryClick?.(null))}}}}p.current&&=(e.current.onAgentDrag(p.current.agentId,p.current.targetX,p.current.targetY),null),u(!1),f.current=null},[a,g,v,_,y,e,r]),C=(0,l.useRef)(()=>{});C.current=e=>{if(e.preventDefault(),n.current=!0,e.ctrlKey||e.metaKey){let n=e.deltaY>0?te.zoomStepDown:te.zoomStepUp,r=s.current?.getBoundingClientRect();if(!r)return;let i=e.clientX-r.left,a=e.clientY-r.top,o=t.current,c=Math.max(te.minZoom,Math.min(te.maxZoom,o.scale*n));t.current={scale:c,x:i-(i-o.x)*(c/o.scale),y:a-(a-o.y)*(c/o.scale)}}else{let n=t.current;t.current={...n,x:n.x-e.deltaX,y:n.y-e.deltaY}}},(0,l.useEffect)(()=>{let e=s.current;if(!e)return;let t=e=>C.current(e);return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[s]);let w=(0,l.useCallback)(()=>{o()},[o]),T=(0,l.useCallback)(t=>{t.preventDefault();let n=a(t.clientX,t.clientY),r=g(n.x,n.y);e.current.onContextMenu(t,r?`agent`:`canvas`,r??void 0)},[a,g,e]),E=(0,l.useCallback)(()=>{u(!1),f.current=null,p.current=null,h.current!==null&&(h.current=null,e.current.onAgentHover(null))},[e]),ee=(0,l.useCallback)((e,t)=>{let n=p.current;if(n){let r=e.get(n.agentId);if(r){let e=It.dragLerp,i=r.x+(n.targetX-r.x)*e,a=r.y+(n.targetY-r.y)*e;t(n.agentId,i,a)}}},[]);return{isDragging:c,dragLerpRef:p,handlers:{onMouseDown:b,onMouseMove:x,onMouseUp:S,onDoubleClick:w,onContextMenu:T,onMouseLeave:E},updateDragLerp:ee}}var Nr=e((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),V=e(((e,t)=>{t.exports=Nr()}))();function Pr({simulationRef:e,selectedAgentId:t,hoveredAgentId:n,showStats:r,showHexGrid:i,zoomToFitTrigger:a,pauseAutoFit:o,onAgentClick:s,onAgentHover:c,onAgentDrag:u,onContextMenu:d,onToolCallClick:f,selectedToolCallId:p,onDiscoveryClick:m,selectedDiscoveryId:h,showCostOverlay:g}){let _=(0,l.useRef)(null),v=(0,l.useRef)(null),[y,b]=(0,l.useState)({width:800,height:600}),x=(0,l.useRef)(0),S=(0,l.useRef)(0),C=(0,l.useRef)(0),w=(0,l.useRef)(null),T=(0,l.useRef)([]),E=(0,l.useRef)(0),ee=(0,l.useRef)(1),te=(0,l.useRef)([]),ne=(0,l.useRef)(new Map),O=(0,l.useRef)(new Map),re=(0,l.useRef)(0),ie=(0,l.useRef)({frames:0,lastFpsUpdate:0,fps:0,frameTimeMs:0,frameTimes:[],p95:0}),k=(0,l.useRef)({particles:[],edges:[],activeEdgeIds:new Set,edgeMap:new Map}),A=e.current,j=e=>({agents:A.agents,toolCalls:A.toolCalls,particles:A.particles,edges:A.edges,discoveries:A.discoveries,selectedAgentId:t,hoveredAgentId:n,showStats:r,showHexGrid:i,showCostOverlay:g,selectedToolCallId:p,selectedDiscoveryId:h,simTime:A.currentTime,pauseAutoFit:o,dimensions:y,onAgentDrag:u,onAgentClick:s,onAgentHover:c,onContextMenu:d,onToolCallClick:f,onDiscoveryClick:m,isDragging:e?.isDragging??!1}),M=(0,l.useRef)(j());M.current=j(M.current);let{transformRef:N,userHasNavigatedRef:ae,panVelocityRef:P,screenToCanvas:F,doZoomToFit:I,updateCamera:L}=jr({mainCanvasRef:v,drawPropsRef:M,simTimeRef:C,dimensions:y,agentCount:A.agents.size,zoomToFitTrigger:a,selectedAgentId:t}),{isDragging:oe,handlers:le,updateDragLerp:ue}=Mr({drawPropsRef:M,transformRef:N,userHasNavigatedRef:ae,panVelocityRef:P,simTimeRef:C,screenToCanvas:F,doZoomToFit:I,mainCanvasRef:v});M.current.isDragging=oe,(0,l.useEffect)(()=>(w.current=new Sn(.5),T.current=On(y.width,y.height),()=>{w.current=null}),[]),(0,l.useEffect)(()=>{let e=_.current;if(!e)return;let t=window.devicePixelRatio||1;ee.current=t;let n=new ResizeObserver(e=>{for(let n of e){let e=n.contentRect.width,r=n.contentRect.height;b({width:e,height:r}),w.current?.resize(e*t,r*t)}});return n.observe(e),()=>n.disconnect()},[]);let de=(0,l.useCallback)(()=>{let{agents:e,toolCalls:t}=M.current,{effects:n,newAgentStates:r,newToolStates:i}=kr(e,t,ne.current,O.current);te.current.push(...n),ne.current=r,O.current=i},[]),fe=(0,l.useRef)(()=>{});return fe.current=(0,l.useCallback)(t=>{x.current=requestAnimationFrame(e=>fe.current(e));let n=v.current;if(!n)return;let r=n.getContext(`2d`);if(r)try{{let t=e.current,n=M.current;n.agents=t.agents,n.toolCalls=t.toolCalls,n.particles=t.particles,n.edges=t.edges,n.discoveries=t.discoveries,n.simTime=t.currentTime}let{agents:i,toolCalls:a,particles:o,edges:s,discoveries:c,selectedAgentId:l,hoveredAgentId:u,showStats:d,showHexGrid:f,showCostOverlay:p,selectedToolCallId:m,selectedDiscoveryId:h,simTime:g,pauseAutoFit:_,dimensions:v,onAgentDrag:y,isDragging:b}=M.current,x=N.current,ne=E.current?(t-E.current)/1e3:D.defaultDeltaTime;E.current=t,S.current+=ne,g!=null&&(C.current=g);let O=ee.current,re=v.width,A=v.height;(n.width!==re*O||n.height!==A*O)&&(n.width=re*O,n.height=A*O,r.scale(O,O)),L(b,_),ue(i,y),de();{let e=te.current,t=0;for(let n=0;n<e.length;n++)e[n].age+=ne,e[n].age<e[n].duration&&(t!==n&&(e[t]=e[n]),t++);e.length=t}r.clearRect(0,0,re,A),kn(T.current,ne,re,A);let j;for(let[,e]of i)if(e.state===`thinking`||e.state===`tool_calling`||e.state===`waiting_permission`){j={x:e.x,y:e.y,color:Ht(e.state)};break}An(r,re,A,T.current,x,f,S.current,j),r.save(),r.translate(x.x,x.y),r.scale(x.scale,x.scale);let ae=k.current,P,F;if(ae.particles===o&&ae.edges===s?(P=ae.activeEdgeIds,F=ae.edgeMap):(P=pr(o),F=hr(s),k.current={particles:o,edges:s,activeEdgeIds:P,edgeMap:F}),vr(r,c,i),mr(r,s,i,a,P,S.current),_r(r,a,S.current,m),yr(r,c,i,h),ir(r,i,l,u,d,S.current),or(r,i,C.current),p&&Cr(r,i,a),gr(r,o,F,i,a,S.current),Un(r,te.current),l){let e=i.get(l);e&&Bn(r,e,x,A)}if(r.restore(),p&&wr(r,i,a),w.current&&w.current.apply(n,r),se){let e=ie.current,n=performance.now(),l=n-(t||n);if(e.frameTimes.push(l),e.frameTimes.length>ce.maxFrameSamples&&e.frameTimes.shift(),e.frames++,e.frameTimeMs=l,n-e.lastFpsUpdate>=ce.updateIntervalMs){e.fps=e.frames,e.frames=0,e.lastFpsUpdate=n;let t=[...e.frameTimes].sort((e,t)=>e-t);e.p95=t[Math.floor(t.length*.95)]||0}let u=ce,d=u.x+u.padding,f=u.y+u.lineHeight+2;r.save(),r.fillStyle=u.bgColor,r.fillRect(u.x,u.y,u.width,u.height),r.font=u.font,r.fillStyle=e.fps<u.fpsWarning?u.fpsWarningColor:e.fps<u.fpsCaution?u.fpsCautionColor:u.fpsGoodColor,r.fillText(`FPS: ${e.fps}`,d,f),f+=u.lineHeight,r.fillStyle=u.textColor,r.fillText(`Frame: ${l.toFixed(1)}ms P95: ${e.p95.toFixed(1)}ms`,d,f),f+=u.lineHeight,r.fillText(`Agents: ${i.size}`,d,f),f+=u.lineHeight,r.fillText(`Tool calls: ${a.size}`,d,f),f+=u.lineHeight,r.fillText(`Particles: ${o.length}`,d,f),f+=u.lineHeight,r.fillText(`Edges: ${s.length}`,d,f),f+=u.lineHeight,r.fillText(`Discoveries: ${c.length}`,d,f),r.restore()}}catch(e){let t=Date.now();t-re.current>5e3&&(re.current=t,console.warn(`[AgentCanvas] draw error:`,e))}},[de,L,ue,N]),(0,l.useEffect)(()=>(x.current=requestAnimationFrame(e=>fe.current(e)),()=>{x.current&&cancelAnimationFrame(x.current)}),[]),(0,V.jsx)(`div`,{ref:_,className:`relative w-full h-full overflow-hidden`,style:{cursor:oe?`grabbing`:`grab`},children:(0,V.jsx)(`canvas`,{ref:v,style:{width:y.width,height:y.height},...le,className:`w-full h-full`})})}function Fr(e){return`${Math.floor(e/60)}:${Math.floor(e%60).toString().padStart(2,`0`)}`}function Ir(e){switch(e){case`thinking`:return B.thinking;case`tool_call`:return B.tool;case`tool_result`:return B.return;case`message`:return B.message;case`error`:return B.error;default:return B.idle}}var Lr=120,Rr=(0,l.memo)(function({events:e,totalDuration:t,className:n=``}){let r=e.length>Lr?Array.from({length:Lr},(t,n)=>e[Math.floor(n*e.length/Lr)]):e,i=e.length>0?e[e.length-1].timestamp:0,a=i>0?i:t;return(0,V.jsx)(V.Fragment,{children:r.map(e=>{let t=a>0?e.timestamp/a*100:0;return t<0||t>100?null:(0,V.jsx)(`div`,{className:`absolute top-1/2 -translate-y-1/2 w-1.5 h-1.5 rounded-full ${n}`,style:{left:`${t}%`,background:Ir(e.type)}},e.id)})})});function zr(e,t){let n=(0,l.useRef)([]);return e.length===0&&t<.1?n.current=[]:e.length>=n.current.length&&(n.current=e),n.current}function Br(e){let{isReviewing:t=!1}=e;return t?(0,V.jsx)(Ur,{...e}):(0,V.jsx)(Vr,{...e})}function Vr({currentTime:e,totalDuration:t,timelineEvents:n,eventCount:r=0,onEnterReview:i,isReviewing:a}){let[o,s]=(0,l.useState)(!0),c=zr(n,t);return(0,l.useEffect)(()=>{if(a)return;let e=setInterval(()=>s(e=>!e),Ft.livePulseMs);return()=>clearInterval(e)},[a]),(0,V.jsx)(`div`,{className:`absolute bottom-4 left-4 right-4 mx-auto`,style:{pointerEvents:`auto`,maxWidth:zt.controlBarMaxWidth,zIndex:Pt.controlBar},children:(0,V.jsxs)(`div`,{className:`glass-card px-5 py-3 flex items-center gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 shrink-0`,children:[(0,V.jsx)(`span`,{className:`w-2 h-2 rounded-full transition-opacity duration-500`,style:{background:B.liveDot,boxShadow:o?`0 0 8px ${B.liveDot}, 0 0 16px rgba(255,68,68,0.3)`:`0 0 4px ${B.liveDot}80`,opacity:o?1:.6}}),(0,V.jsx)(`span`,{className:`text-[10px] font-mono font-semibold tracking-wider`,style:{color:B.liveText},children:`LIVE`})]}),(0,V.jsx)(`span`,{className:`text-xs font-mono shrink-0`,style:{color:B.textPrimary},children:Fr(e)}),(0,V.jsx)(`div`,{className:`flex-1 relative h-6 flex items-center`,children:(0,V.jsx)(`div`,{className:`w-full rounded-full relative`,style:{height:3,background:B.holoBg10},children:(0,V.jsx)(Rr,{events:c,totalDuration:t,eventCount:c.length,className:`opacity-80`})})}),(0,V.jsx)(`span`,{className:`text-[10px] font-mono shrink-0`,style:{color:B.textMuted},children:r}),(0,V.jsx)(`button`,{onClick:i,className:`px-2.5 py-1 rounded text-[10px] font-mono transition-all hover:scale-105`,style:{background:B.holoBg10,border:`1px solid ${B.reviewBtnBorder}`,color:B.textPrimary},children:`⏸ Review`})]})})}var Hr=[.5,1,2,4];function Ur({isPlaying:e,speed:t,currentTime:n,totalDuration:r,onPlayPause:i,onRestart:a,onSpeedChange:o,onSeek:s,timelineEvents:c,isReviewing:u,onResumeLive:d}){let f=(0,l.useRef)(null),[p,m]=(0,l.useState)(!1),h=zr(c,r),g=r>0?n/r:0,_=(0,l.useCallback)(e=>{let t=f.current?.getBoundingClientRect();!t||!s||s(Math.max(0,Math.min(1,(e-t.left)/t.width))*r)},[s,r]);return(0,l.useEffect)(()=>{if(!p)return;let e=e=>_(e.clientX),t=()=>m(!1);return window.addEventListener(`mousemove`,e),window.addEventListener(`mouseup`,t),()=>{window.removeEventListener(`mousemove`,e),window.removeEventListener(`mouseup`,t)}},[p,_]),(0,V.jsx)(`div`,{className:`absolute bottom-4 left-4 right-4 mx-auto`,style:{pointerEvents:`auto`,maxWidth:zt.controlBarMaxWidth,zIndex:Pt.controlBar},children:(0,V.jsxs)(`div`,{className:`glass-card px-5 py-3 flex items-center gap-3`,children:[(0,V.jsx)(`button`,{onClick:i,className:`w-9 h-9 rounded-full flex items-center justify-center transition-all shrink-0 hover:scale-110`,style:{background:e?B.playBtnActiveBg:B.playBtnBg,border:`1.5px solid ${B.playBtnBorder}`,boxShadow:B.playBtnGlow},children:(0,V.jsx)(`span`,{style:{color:B.textPrimary,fontSize:14,marginLeft:e?0:2},children:e?`⏸`:`▶`})}),(0,V.jsx)(`span`,{className:`text-xs font-mono shrink-0`,style:{color:B.textPrimary,minWidth:42},children:Fr(n)}),(0,V.jsxs)(`div`,{ref:f,className:`flex-1 relative h-8 flex items-center group cursor-pointer`,onMouseDown:e=>{e.preventDefault(),m(!0),_(e.clientX)},children:[(0,V.jsxs)(`div`,{className:`w-full rounded-full relative transition-all duration-150 group-hover:h-2`,style:{height:p?8:4,background:B.glassBorder},children:[(0,V.jsx)(`div`,{className:`h-full rounded-full transition-[width]`,style:{width:`${g*100}%`,background:B.scrubberFill}}),(0,V.jsx)(Rr,{events:h,totalDuration:r,eventCount:h.length,className:`opacity-60 group-hover:opacity-100 transition-opacity`})]}),(0,V.jsx)(`div`,{className:`absolute top-1/2 -translate-y-1/2 rounded-full transition-all duration-150 group-hover:w-4 group-hover:h-4`,style:{left:`${g*100}%`,width:p?16:12,height:p?16:12,marginLeft:p?-8:-6,background:B.textPrimary,boxShadow:B.scrubberHeadGlow}})]}),(0,V.jsx)(`span`,{className:`text-[10px] font-mono shrink-0`,style:{color:B.textMuted},children:Fr(r)}),(0,V.jsx)(`div`,{className:`flex items-center gap-0.5 shrink-0`,children:Hr.map(e=>(0,V.jsxs)(`button`,{onClick:()=>o(e),className:`px-2 py-0.5 rounded text-[10px] font-mono transition-all`,style:{background:t===e?B.playBtnActiveBg:`transparent`,color:t===e?B.textPrimary:B.textMuted},children:[e,`x`]},e))}),u&&(0,V.jsx)(`button`,{onClick:d,className:`px-2.5 py-1 rounded text-[10px] font-mono font-semibold transition-all hover:scale-105 shrink-0`,style:{background:B.liveResumeBg,border:`1px solid ${B.liveResumeBorder}`,color:B.liveText},children:`▶ LIVE`}),u&&(0,V.jsx)(`button`,{onClick:a,className:`text-sm transition-all shrink-0 hover:scale-110`,style:{color:B.textDim},children:`⟲`})]})})}function Wr({children:e,className:t=``,style:n,visible:r}){let[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{if(r)a(!0),requestAnimationFrame(()=>s(!0));else{s(!1);let e=setTimeout(()=>a(!1),Ft.glassAnimMs);return()=>clearTimeout(e)}},[r]),i?(0,V.jsx)(`div`,{className:`glass-card ${t}`,style:{...n,opacity:o?1:0,transform:o?`scale(1)`:`scale(0.95)`,transition:`opacity 0.2s ease-out, transform 0.2s ease-out`},children:e}):null}function Gr(e,t,n=50){(0,l.useEffect)(()=>{let r=n=>{e.current&&!e.current.contains(n.target)&&t()},i=setTimeout(()=>{document.addEventListener(`mousedown`,r)},n);return()=>{clearTimeout(i),document.removeEventListener(`mousedown`,r)}},[e,t,n])}var Kr=800,qr=600;function Jr(e,t,n,r=20){let i=typeof window<`u`?window.innerWidth-t-Nt.margin:Kr,a=typeof window<`u`?window.innerHeight-n-Nt.margin:qr;return{left:Math.min(Math.max(Nt.margin,e.x-t/2),i),top:Math.min(Math.max(Nt.margin,e.y+r),a)}}var Yr={onMouseDown:e=>e.stopPropagation(),onMouseUp:e=>e.stopPropagation(),onClick:e=>e.stopPropagation()};function Xr({onClick:e,className:t=``}){return(0,V.jsx)(`button`,{onClick:e,className:`text-xs transition-colors ${t}`,style:{color:B.textMuted},children:`✕`})}function Zr({children:e,onClose:t,className:n=`mb-2`,actions:r}){return(0,V.jsxs)(`div`,{className:`flex items-center justify-between ${n}`,children:[(0,V.jsx)(`div`,{className:`flex items-center gap-2`,children:e}),(0,V.jsxs)(`div`,{className:`flex items-center gap-1`,children:[r,(0,V.jsx)(Xr,{onClick:t})]})]})}function Qr({position:e,width:t,estimatedHeight:n,onClose:r,children:i}){let a=(0,l.useRef)(null),{left:o,top:s}=Jr(e,t,n);return Gr(a,r),(0,V.jsx)(`div`,{ref:a,...Yr,style:{position:`absolute`,left:o,top:s,width:t,zIndex:Pt.detailCard},children:(0,V.jsx)(Wr,{visible:!0,children:i})})}function $r({visible:e,position:t,axis:n=`X`,offset:r=20,zIndex:i,width:a,className:o=``,style:s,children:c}){return(0,V.jsx)(`div`,{className:`absolute transition-all duration-300 ${o}`,style:{...t,opacity:e?1:0,transform:`translate${n}(${e?0:r}px)`,pointerEvents:e?`auto`:`none`,zIndex:i,width:a,...s},children:c})}function ei({percent:e,color:t,trackColor:n=B.holoBg10}){return(0,V.jsx)(`div`,{className:`h-1 rounded-full overflow-hidden`,style:{background:n},children:(0,V.jsx)(`div`,{className:`h-full rounded-full transition-all duration-500`,style:{width:`${e}%`,background:t,boxShadow:`0 0 6px ${t}40`}})})}function ti({agent:e,onClose:t}){let n=Math.round(e.tokensUsed/e.tokensMax*100),r=Ht(e.state),i=Nt.margin;return(0,V.jsxs)(Wr,{visible:!0,className:`agent-detail-card`,style:{position:`absolute`,left:i,top:typeof window<`u`?Math.max(100,(window.innerHeight-Nt.detail.height)/2):300,width:Nt.detail.width,zIndex:Pt.detailCard},children:[(0,V.jsxs)(Zr,{onClose:t,className:`mb-3`,children:[(0,V.jsx)(`div`,{className:`w-2 h-2 rounded-full`,style:{background:r,boxShadow:`0 0 8px ${r}`}}),(0,V.jsx)(`span`,{className:`text-xs font-mono`,style:{color:B.textPrimary},children:e.name})]}),(0,V.jsxs)(`div`,{className:`mb-3`,children:[(0,V.jsxs)(`div`,{className:`flex justify-between mb-1`,children:[(0,V.jsx)(`span`,{className:`text-[10px]`,style:{color:B.textMuted},children:`Context`}),(0,V.jsxs)(`span`,{className:`text-[10px] font-mono`,style:{color:B.textDim},children:[wn(e.tokensUsed),` / `,wn(e.tokensMax),` (`,n,`%)`]})]}),(0,V.jsx)(ei,{percent:n,color:r})]}),(0,V.jsxs)(`div`,{className:`flex gap-3 mb-3 text-[10px] font-mono`,style:{color:B.textDim},children:[(0,V.jsxs)(`span`,{children:[e.toolCalls,` tools`]}),(0,V.jsxs)(`span`,{children:[e.timeAlive.toFixed(1),`s alive`]}),(0,V.jsx)(`span`,{className:`capitalize`,style:{color:r},children:e.state})]}),e.currentTool&&(0,V.jsxs)(`div`,{className:`mb-3 px-2 py-1.5 rounded text-[10px] font-mono flex items-center gap-2`,style:{background:B.toolIndicatorBg,border:`1px solid ${B.toolIndicatorBorder}`,color:B.toolIndicatorText},children:[(0,V.jsx)(`span`,{className:`animate-spin inline-block`,children:`⚙`}),e.currentTool]})]})}function ni({position:e,items:t,onClose:n}){let r=(0,l.useRef)(null);return Gr(r,n,Ft.contextMenuDelayMs),(0,V.jsx)(`div`,{ref:r,...Yr,style:{position:`fixed`,left:e.x,top:e.y,zIndex:Pt.contextMenu},children:(0,V.jsx)(Wr,{visible:!0,style:{minWidth:160},children:(0,V.jsx)(`div`,{className:`py-1`,children:t.map((e,t)=>e.separator?(0,V.jsx)(`div`,{className:`my-1 h-px`,style:{background:B.holoBg10}},t):(0,V.jsx)(`button`,{onClick:()=>{e.onClick(),n()},className:`w-full px-3 py-1.5 text-left text-[11px] font-mono transition-colors hover:bg-white/5`,style:{color:e.danger?B.error:B.textPrimary},children:e.label},t))})})})}var ri=(0,l.createContext)(null),ii=ri.Provider;function ai({toolName:e,inputData:t,args:n,compact:r=!1}){if(!t)return(0,V.jsx)(`span`,{className:`opacity-60`,children:n||e});switch(e){case`Edit`:return(0,V.jsx)(si,{data:t,compact:r});case`TodoWrite`:return(0,V.jsx)(li,{data:t});case`Bash`:return(0,V.jsx)(ui,{data:t,compact:r});case`Write`:return(0,V.jsx)(di,{data:t,compact:r});case`Read`:return(0,V.jsx)(fi,{data:t});case`Grep`:return(0,V.jsx)(pi,{data:t});case`Glob`:return(0,V.jsx)(mi,{data:t});case`WebSearch`:return(0,V.jsx)(hi,{data:t});case`WebFetch`:return(0,V.jsx)(gi,{data:t});case`AskUserQuestion`:return(0,V.jsx)(_i,{data:t});default:return(0,V.jsx)(`span`,{className:`opacity-60`,children:n||e})}}function oi({path:e}){let t=(0,l.useContext)(ri);if(!e)return null;let n=Tn(e);return(0,V.jsx)(`div`,{className:`text-[9px] mb-1 truncate ${t?`hover:underline`:``}`,style:{color:t?B.filePathActive:B.filePathInactive,cursor:t?`pointer`:void 0},onClick:t?()=>t(e):void 0,title:t?e:void 0,children:n})}function si({data:e,compact:t}){let n=String(e.file_path||``),r=String(e.old_string||``),i=String(e.new_string||``),a=t?4:8,o=r.split(`
42
+ `).slice(0,a),s=i.split(`
43
+ `).slice(0,a);return(0,V.jsxs)(`div`,{children:[(0,V.jsx)(oi,{path:n}),(0,V.jsxs)(`div`,{className:`rounded overflow-hidden text-[9px] font-mono leading-snug`,style:{background:B.codeBlockBg},children:[o.map((e,t)=>(0,V.jsxs)(`div`,{className:`px-1.5 py-px`,style:{color:B.diffRemoved,background:B.diffRemovedBg},children:[(0,V.jsx)(`span`,{className:`opacity-50 mr-1`,children:`-`}),e||` `]},`old-${t}`)),r.split(`
44
+ `).length>a&&(0,V.jsx)(`div`,{className:`px-1.5 py-px opacity-50`,style:{color:B.diffRemoved},children:`...`}),s.map((e,t)=>(0,V.jsxs)(`div`,{className:`px-1.5 py-px`,style:{color:B.diffAdded,background:B.diffAddedBg},children:[(0,V.jsx)(`span`,{className:`opacity-50 mr-1`,children:`+`}),e||` `]},`new-${t}`)),i.split(`
45
+ `).length>a&&(0,V.jsx)(`div`,{className:`px-1.5 py-px opacity-50`,style:{color:B.diffAdded},children:`...`})]})]})}function ci(e){return Array.isArray(e)&&e.every(e=>e&&typeof e==`object`&&`content`in e)}function li({data:e}){if(!ci(e.todos))return null;let t=e.todos;return(0,V.jsx)(`div`,{className:`space-y-0.5`,children:t.map((e,t)=>{let n=e.status===`completed`?`✓`:e.status===`in_progress`?`●`:`○`;return(0,V.jsxs)(`div`,{className:`flex items-start gap-1.5 text-[10px] font-mono`,children:[(0,V.jsx)(`span`,{style:{color:e.status===`completed`?B.todoCompleted:e.status===`in_progress`?B.tool_calling:B.todoPending,flexShrink:0},children:n}),(0,V.jsx)(`span`,{style:{color:e.status===`completed`?B.todoCompletedText:B.assistantText,textDecoration:e.status===`completed`?`line-through`:`none`,opacity:e.status===`completed`?.6:1},children:e.content})]},t)})})}function ui({data:e,compact:t}){let n=String(e.command||``),r=String(e.description||``),i=t?120:300;return(0,V.jsxs)(`div`,{children:[r&&(0,V.jsx)(`div`,{className:`text-[9px] mb-1 opacity-60`,style:{color:B.assistantText},children:r}),(0,V.jsxs)(`div`,{className:`rounded px-1.5 py-1 text-[9px] font-mono`,style:{background:B.codeBlockBg,color:B.tool_calling},children:[(0,V.jsx)(`span`,{className:`opacity-55 mr-1`,children:`$`}),n.length>i?n.slice(0,i)+`...`:n]})]})}function di({data:e,compact:t}){let n=String(e.file_path||``),r=String(e.content||``),i=t?4:8,a=r.split(`
46
+ `).slice(0,i);return(0,V.jsxs)(`div`,{children:[(0,V.jsx)(oi,{path:n}),(0,V.jsxs)(`div`,{className:`rounded px-1.5 py-1 text-[9px] font-mono leading-snug`,style:{background:B.codeBlockBg,color:B.contentDim},children:[a.map((e,t)=>(0,V.jsx)(`div`,{className:`truncate`,children:e||` `},t)),r.split(`
47
+ `).length>i&&(0,V.jsx)(`div`,{className:`opacity-50`,children:`...`})]})]})}function fi({data:e}){let t=String(e.file_path||``),n=typeof e.offset==`number`?e.offset:void 0,r=typeof e.limit==`number`?e.limit:void 0;return(0,V.jsxs)(`div`,{children:[(0,V.jsx)(oi,{path:t}),(n!=null||r!=null)&&(0,V.jsxs)(`div`,{className:`text-[9px] opacity-50`,style:{color:B.assistantText},children:[n?`from line ${n}`:``,n&&r?`, `:``,r?`${r} lines`:``]})]})}function pi({data:e}){let t=String(e.pattern||``),n=String(e.path||``),r=typeof e.glob==`string`?e.glob:void 0;return(0,V.jsxs)(`div`,{className:`text-[9px] font-mono`,children:[(0,V.jsx)(`span`,{style:{color:B.tool_calling},children:t}),n&&(0,V.jsxs)(`span`,{className:`opacity-55 ml-1`,children:[`in `,Tn(n,2)]}),r&&(0,V.jsxs)(`span`,{className:`opacity-55 ml-1`,children:[`(`,r,`)`]})]})}function mi({data:e}){let t=String(e.pattern||``),n=String(e.path||``);return(0,V.jsxs)(`div`,{className:`text-[9px] font-mono`,children:[(0,V.jsx)(`span`,{style:{color:B.tool_calling},children:t}),n&&(0,V.jsxs)(`span`,{className:`opacity-55 ml-1`,children:[`in `,Tn(n,2)]})]})}function hi({data:e}){let t=String(e.query||``);return(0,V.jsxs)(`div`,{className:`rounded px-1.5 py-1 text-[10px] font-mono flex items-center gap-1.5`,style:{background:B.codeBlockBg},children:[(0,V.jsx)(`span`,{style:{color:B.searchIcon},children:`🔍`}),(0,V.jsx)(`span`,{style:{color:B.assistantText},children:t})]})}function gi({data:e}){let t=String(e.url||``),n=String(e.prompt||``),r=t;try{let e=new URL(t);r=e.hostname+e.pathname.slice(0,50)}catch{}return(0,V.jsxs)(`div`,{children:[(0,V.jsxs)(`div`,{className:`rounded px-1.5 py-1 text-[9px] font-mono truncate`,style:{background:B.codeBlockBg,color:B.filePathActive},children:[`🌐 `,r]}),n&&(0,V.jsx)(`div`,{className:`mt-1 text-[9px] opacity-50 truncate`,style:{color:B.assistantText},children:n.slice(0,120)})]})}function _i({data:e}){let t=Array.isArray(e.questions)?e.questions:void 0;return!t||t.length===0?null:(0,V.jsx)(`div`,{className:`space-y-1.5`,children:t.map((e,t)=>(0,V.jsxs)(`div`,{children:[(0,V.jsx)(`div`,{className:`text-[10px] font-mono mb-0.5`,style:{color:B.tool_calling},children:e.question}),Array.isArray(e.options)&&e.options.length>0&&(0,V.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:e.options.map((e,t)=>(0,V.jsx)(`span`,{className:`text-[9px] font-mono px-1.5 py-0.5 rounded`,style:{background:B.glassHighlight,border:`1px solid ${B.glassBorder}`,color:B.contentDim},children:e},t))})]},t))})}function vi({tool:e,position:t,onClose:n}){let r=e.state===`running`?B.tool_calling:B.complete;return(0,V.jsxs)(Qr,{position:t,width:zt.tool.width,estimatedHeight:zt.tool.estimatedHeight,onClose:n,children:[(0,V.jsxs)(Zr,{onClose:n,children:[(0,V.jsx)(`span`,{className:`text-[9px]`,style:{color:r},children:e.state===`running`?`⚙`:`✓`}),(0,V.jsx)(`span`,{className:`text-[11px] font-mono font-semibold`,style:{color:B.tool_calling},children:e.toolName}),(0,V.jsx)(`span`,{className:`text-[9px] font-mono capitalize`,style:{color:r+`90`},children:e.state})]}),e.inputData?(0,V.jsx)(ai,{toolName:e.toolName,inputData:e.inputData,args:e.args,compact:!1}):(0,V.jsx)(`div`,{className:`text-[10px] font-mono`,style:{color:B.textPrimary+`90`},children:e.args}),e.result&&(0,V.jsxs)(`div`,{className:`mt-2 rounded px-2 py-1 text-[9px] font-mono`,style:{background:B.resultBg,border:`1px solid ${B.resultBorder}`,color:B.complete+`90`},children:[(0,V.jsx)(`span`,{className:`opacity-50 mr-1`,children:`Result:`}),e.result]}),e.tokenCost!=null&&e.tokenCost>0&&(0,V.jsxs)(`div`,{className:`mt-1.5 text-[9px] font-mono`,style:{color:B.textMuted},children:[e.tokenCost,` tokens`]})]})}function yi({discovery:e,position:t,onClose:n}){let r=Ut(e.type),i=e.type===`file`?`FILE`:e.type===`pattern`?`PATTERN`:e.type===`finding`?`FINDING`:`CODE`;return(0,V.jsxs)(Qr,{position:t,width:zt.discovery.width,estimatedHeight:zt.discovery.estimatedHeight,onClose:n,children:[(0,V.jsx)(Zr,{onClose:n,children:(0,V.jsx)(`span`,{className:`text-[9px] font-mono font-bold px-1.5 py-0.5 rounded`,style:{background:r+`20`,color:r,border:`1px solid ${r}30`},children:i})}),(0,V.jsx)(`div`,{className:`text-[11px] font-mono font-semibold mb-2`,style:{color:r,wordBreak:`break-all`},children:e.label}),e.content&&(0,V.jsx)(`div`,{className:`rounded px-2 py-1.5 text-[9px] font-mono whitespace-pre-wrap`,style:{background:B.holoBg03,border:`1px solid ${B.holoBorder08}`,color:B.textPrimary+`90`,maxHeight:120,overflow:`auto`},children:e.content}),(0,V.jsxs)(`div`,{className:`mt-1.5 text-[9px] font-mono`,style:{color:B.textMuted},children:[`agent: `,e.agentId]})]})}function bi({visible:e,fileAttention:t,onClose:n,onOpenFile:r}){if(!e)return null;let i=Array.from(t.values()).sort((e,t)=>t.totalTokens-e.totalTokens),a=Math.max(...i.map(e=>e.totalTokens),1);return(0,V.jsx)($r,{visible:e,position:{top:48,right:12},zIndex:Pt.sidePanel,width:260,children:(0,V.jsxs)(`div`,{className:`glass-card relative`,children:[(0,V.jsx)(Zr,{onClose:n,children:(0,V.jsx)(`span`,{className:`text-[10px] font-mono tracking-wider`,style:{color:B.textPrimary},children:`FILE ATTENTION`})}),(0,V.jsxs)(`div`,{className:`space-y-1 max-h-[300px] overflow-y-auto`,children:[i.length===0&&(0,V.jsx)(`div`,{className:`text-[9px] font-mono py-2 text-center`,style:{color:B.textMuted},children:`No files accessed yet`}),i.map(e=>{let t=e.totalTokens/a,n=t>.7?B.error:t>.4?B.tool:B.holoBase,i=r&&e.path.startsWith(`/`),o=Tn(e.path);return(0,V.jsxs)(`div`,{className:`rounded px-2 py-1.5 transition-colors ${i?`hover:brightness-125`:``}`,style:{background:`rgba(10, 15, 30, 0.5)`,border:`1px solid ${i?n+`30`:n+`15`}`,cursor:i?`pointer`:void 0},onClick:i?()=>r(e.path):void 0,title:i?e.path:void 0,children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,V.jsx)(`span`,{className:`text-[9px] font-mono truncate`,style:{color:n,maxWidth:160},children:o}),(0,V.jsx)(`span`,{className:`text-[9px] font-mono`,style:{color:B.textMuted},children:e.totalTokens>0?wn(e.totalTokens):`—`})]}),(0,V.jsx)(`div`,{className:`mt-1`,children:(0,V.jsx)(ei,{percent:t*100,color:n,trackColor:B.holoBg05})}),(0,V.jsxs)(`div`,{className:`flex items-center gap-2 mt-1`,children:[e.reads>0&&(0,V.jsxs)(`span`,{className:`text-[9px] font-mono`,style:{color:B.holoBase+`80`},children:[e.reads,` read`,e.reads>1?`s`:``]}),e.edits>0&&(0,V.jsxs)(`span`,{className:`text-[9px] font-mono`,style:{color:B.tool+`80`},children:[e.edits,` edit`,e.edits>1?`s`:``]}),e.agents.length>0&&(0,V.jsxs)(`span`,{className:`text-[9px] font-mono`,style:{color:B.textMuted},title:e.agents.join(`, `),children:[e.agents.length,` agent`,e.agents.length>1?`s`:``]})]})]},e.path)})]}),i.length>0&&(0,V.jsxs)(`div`,{className:`mt-2 pt-2 flex justify-between text-[9px] font-mono`,style:{borderTop:`1px solid ${B.holoBorder08}`,color:B.textMuted},children:[(0,V.jsxs)(`span`,{children:[i.length,` files`]}),(0,V.jsxs)(`span`,{children:[wn(i.reduce((e,t)=>e+t.totalTokens,0)),` tokens in file reads`]})]})]})})}var xi=22,Si=20,Ci=90,wi=`9px monospace`,Ti=[{color:B.idle,label:`Idle`},{color:B.thinking,label:`Thinking`},{color:B.tool,label:`Tool Call`},{color:B.error,label:`Error`},{color:B.complete,label:`Complete`}];function Ei(e,t,n,r,i,a){if(e.clearRect(0,0,r*a,i*a),e.save(),e.scale(a,a),t.length===0){e.font=wi,e.fillStyle=B.textMuted,e.textAlign=`center`,e.fillText(`No timeline data`,r/2,i/2),e.restore();return}let o=t[0].startTime,s=n;for(let e of t){e.startTime<o&&(o=e.startTime);let t=e.endTime??n;t>s&&(s=t)}let c=Math.max(s-o,1),l=r-Ci,u=c>60?10:c>20?5:c>10?2:1,d=[];for(let e=Math.ceil(o/u)*u;e<=s;e+=u)d.push(e);e.font=wi,e.textAlign=`center`,e.fillStyle=B.textMuted;for(let t of d){let n=Ci+(t-o)/c*l;e.fillText(`${t.toFixed(0)}s`,n,Si-4)}for(let r=0;r<t.length;r++){let i=t[r],a=Si+r*xi;e.textAlign=`right`,e.fillStyle=B.textDim;let s=i.agentName.length>12?i.agentName.slice(0,12)+`..`:i.agentName;e.fillText(s,Ci-6,a+xi/2+3);let u=a+4,f=xi-8;e.fillStyle=B.holoBg03,e.fillRect(Ci,u,l,f),e.fillStyle=B.panelSeparator;for(let t of d){let n=Ci+(t-o)/c*l;e.fillRect(n,u,1,f)}for(let t of i.blocks){let r=(t.startTime-o)/c*l,i=((t.endTime??n)-o)/c*l,a=Math.max(i-r,1),s=Ci+r;e.globalAlpha=.3,e.fillStyle=t.color,e.fillRect(s,u+1,a,f-2),e.globalAlpha=.2,e.strokeStyle=t.color,e.lineWidth=1,e.strokeRect(s,u+1,a,f-2),e.globalAlpha=1,a>40&&(e.save(),e.beginPath(),e.rect(s,u,a,f),e.clip(),e.fillStyle=t.color,e.globalAlpha=.8,e.textAlign=`left`,e.fillText(t.label,s+4,u+f/2+3),e.restore())}let p=Ci+(n-o)/c*l;e.fillStyle=B.holoHot,e.globalAlpha=.5,e.fillRect(p,u,1,f),e.globalAlpha=1}e.restore()}function Di({visible:e,timelineEntries:t,currentTime:n,onClose:r}){let i=(0,l.useRef)(null),a=(0,l.useMemo)(()=>e?Array.from(t.values()).sort((e,t)=>e.startTime-t.startTime):[],[e,t]),o=Si+a.length*xi;return(0,l.useEffect)(()=>{if(!e)return;let t=i.current;if(!t)return;let r=t.getContext(`2d`);if(!r)return;let s=t.parentElement?.clientWidth??t.clientWidth,c=window.devicePixelRatio||1;t.width=s*c,t.height=o*c,t.style.width=`${s}px`,t.style.height=`${o}px`,Ei(r,a,n,s,o,c)},[e,a,n,o]),e?(0,V.jsx)($r,{visible:e,position:{bottom:72,left:16,right:16},axis:`Y`,zIndex:Pt.sidePanel,className:`mx-auto`,style:{maxWidth:700},children:(0,V.jsxs)(`div`,{className:`glass-card relative`,children:[(0,V.jsx)(Zr,{onClose:r,children:(0,V.jsx)(`span`,{className:`text-[10px] font-mono tracking-wider`,style:{color:B.textPrimary},children:`EXECUTION TIMELINE`})}),(0,V.jsx)(`div`,{className:`overflow-auto`,style:{maxHeight:300},children:(0,V.jsx)(`canvas`,{ref:i,style:{display:`block`}})}),(0,V.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-1.5`,style:{borderTop:`1px solid ${B.holoBorder06}`},children:[(0,V.jsx)(`div`,{style:{width:Ci,flexShrink:0}}),(0,V.jsx)(`div`,{className:`flex items-center gap-3`,children:Ti.map(e=>(0,V.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,V.jsx)(`div`,{className:`w-2 h-2 rounded-sm`,style:{background:e.color+`70`}}),(0,V.jsx)(`span`,{className:`text-[9px] font-mono`,style:{color:B.textMuted},children:e.label})]},e.label))})]})]})}):null}function Oi({text:e,query:t}){return!t||!t.trim()?(0,V.jsx)(V.Fragment,{children:e}):(0,V.jsx)(V.Fragment,{children:e.split(RegExp(`(${t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)})`,`gi`)).map((e,n)=>e.toLowerCase()===t.toLowerCase()?(0,V.jsx)(`mark`,{style:{background:B.searchHighlightBg,color:`inherit`,borderRadius:2,padding:`0 1px`},children:e},n):e)})}function ki({message:e,compact:t=!1,searchQuery:n}){let[r,i]=(0,l.useState)(!1);switch(e.type){case`user`:return(0,V.jsxs)(`div`,{className:`rounded px-2.5 py-2 text-[10px] font-mono leading-relaxed`,style:{background:B.userMsgBg,border:`1px solid ${B.userMsgBorder}`},children:[(0,V.jsx)(`div`,{className:`text-[9px] mb-1 font-semibold tracking-wider`,style:{color:B.userLabel},children:`USER`}),(0,V.jsx)(`div`,{style:{color:B.userText},className:`whitespace-pre-wrap break-words`,children:(0,V.jsx)(Oi,{text:e.content,query:n})})]});case`assistant`:return(0,V.jsxs)(`div`,{className:`rounded px-2.5 py-2 text-[10px] font-mono leading-relaxed`,style:{background:B.panelSeparator,border:`1px solid ${B.holoBorder08}`},children:[(0,V.jsx)(`div`,{className:`text-[9px] mb-1 font-semibold tracking-wider`,style:{color:B.assistantLabel},children:`CLAUDE`}),(0,V.jsx)(`div`,{style:{color:B.assistantText},className:`whitespace-pre-wrap break-words`,children:(0,V.jsx)(Oi,{text:t?e.content.slice(0,200)+(e.content.length>200?`...`:``):e.content,query:n})})]});case`thinking`:return(0,V.jsxs)(`div`,{className:`rounded px-2.5 py-1.5 cursor-pointer transition-all`,style:{background:r?B.thinkingBgExpanded:B.thinkingBgCollapsed,border:`1px solid ${B.thinkingBorder}`},onClick:()=>i(!r),children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,V.jsx)(`span`,{className:`text-[9px] font-semibold tracking-wider`,style:{color:B.thinkingLabel},children:`THINKING`}),(0,V.jsx)(`span`,{className:`text-[9px]`,style:{color:B.thinkingArrow},children:r?`▾`:`▸`}),!r&&(0,V.jsxs)(`span`,{className:`text-[9px] font-mono truncate opacity-50`,style:{color:B.thinkingPreview},children:[e.content.slice(0,60),`...`]})]}),r&&(0,V.jsx)(`div`,{className:`mt-1.5 text-[9px] font-mono leading-relaxed whitespace-pre-wrap break-words`,style:{color:B.thinkingTextExpanded,borderLeft:`2px solid ${B.thinkingBorderLeft}`,paddingLeft:8},children:t?e.content.slice(0,500):e.content})]});case`tool_call`:return(0,V.jsxs)(`div`,{className:`rounded px-2.5 py-1.5`,style:{background:B.toolCallBg,border:`1px solid ${B.toolCallBorder}`},children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-1`,children:[(0,V.jsx)(`span`,{className:`text-[9px]`,style:{color:B.userLabel},children:`⚙`}),(0,V.jsx)(`span`,{className:`text-[9px] font-mono font-semibold`,style:{color:B.tool_calling},children:e.toolName||`Tool`})]}),e.inputData?(0,V.jsx)(ai,{toolName:e.toolName||``,inputData:e.inputData,args:e.content,compact:t}):(0,V.jsx)(`div`,{className:`text-[9px] font-mono opacity-60`,style:{color:B.assistantText},children:e.content})]});case`tool_result`:{let r=e.content.replace(/^< /,``),i=e.toolName===`Bash`;return(0,V.jsxs)(`div`,{className:`rounded px-2.5 py-1 text-[9px] font-mono`,style:{background:i?B.bashResultBg:B.toolResultBg,border:`1px solid ${i?B.bashResultBorder:B.toolResultBorder}`,color:i?B.bashResultText:B.toolResultText},children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-0.5`,children:[(0,V.jsx)(`span`,{className:`text-[9px] opacity-50`,children:i?`$`:`✓`}),e.toolName&&(0,V.jsx)(`span`,{className:`text-[9px] opacity-60`,children:e.toolName})]}),(0,V.jsx)(`div`,{className:i?`whitespace-pre-wrap leading-relaxed`:``,children:(0,V.jsx)(Oi,{text:r.slice(0,t?80:400),query:n})})]})}default:return(0,V.jsx)(`div`,{className:`rounded px-2.5 py-1.5 text-[10px] font-mono`,style:{color:B.textFaint},children:e.content})}}function Ai(e,t,n=60){let r=(0,l.useRef)(null),i=(0,l.useRef)(!0),a=(0,l.useRef)(!1);return(0,l.useEffect)(()=>{r.current&&i.current&&(r.current.scrollTop=r.current.scrollHeight)},[e]),(0,l.useEffect)(()=>{t&&!a.current&&r.current&&(r.current.scrollTop=r.current.scrollHeight,i.current=!0),a.current=t},[t]),{ref:r,handleScroll:(0,l.useCallback)(()=>{if(!r.current)return;let{scrollTop:e,scrollHeight:t,clientHeight:a}=r.current;i.current=t-e-a<n},[n]),scrollToBottom:(0,l.useCallback)(()=>{i.current=!0,r.current&&(r.current.scrollTop=r.current.scrollHeight)},[]),isAutoScrolling:i}}function H({visible:e,agentName:t,agentState:n,conversation:r,onClose:i}){let{ref:a}=Ai(r.length,e),o=Ht(n);return(0,V.jsx)($r,{visible:e,position:{bottom:64,right:12},zIndex:Pt.chatPanel,width:Nt.chat.width,...Yr,children:(0,V.jsxs)(`div`,{className:`glass-card`,style:{display:`flex`,flexDirection:`column`,maxHeight:Nt.chat.maxHeight},children:[(0,V.jsxs)(Zr,{onClose:i,className:`mb-2 flex-shrink-0`,children:[(0,V.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full`,style:{background:o,boxShadow:`0 0 6px ${o}`}}),(0,V.jsx)(`span`,{className:`text-[10px] font-mono tracking-wider`,style:{color:B.textPrimary},children:t.toUpperCase()}),(0,V.jsx)(`span`,{className:`text-[9px] font-mono capitalize`,style:{color:o+`90`},children:n})]}),(0,V.jsx)(`div`,{ref:a,className:`flex-1 overflow-y-auto space-y-1.5 mb-2`,style:{minHeight:Nt.chat.messagesMinHeight,maxHeight:Nt.chat.messagesMaxHeight},children:r.length===0?(0,V.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,V.jsx)(`p`,{className:`text-[10px] font-mono`,style:{color:B.textMuted},children:`No messages yet...`})}):r.map(e=>(0,V.jsx)(ki,{message:e},e.id))})]})})}var U=10;function ji(e,t,n){let{gap:r,initialViewportHeight:i=300,autoScroll:a=!1}=n,[o,s]=(0,l.useState)(0),[c,u]=(0,l.useState)(i),[d,f]=(0,l.useState)(0),p=(0,l.useRef)(new Map),m=(0,l.useRef)(!0),[h,g]=(0,l.useState)(!0),_=(0,l.useRef)(!0);e.length===0?_.current=!0:_.current&&(_.current=!1,p.current.clear(),m.current=!0);let v=a&&m.current,y=(0,l.useCallback)(()=>{let e=t.current;if(e){if(a){let t=e.scrollHeight-e.scrollTop-e.clientHeight<60;if(m.current=t,g(t),t)return}s(e.scrollTop)}},[t,a]);(0,l.useEffect)(()=>{let e=t.current;if(!e)return;let n=new ResizeObserver(e=>{for(let t of e)u(t.contentRect.height)});return n.observe(e),()=>n.disconnect()},[t]);let b=p.current,x=0,S=[];for(let t of e){S.push(x);let e=b.get(t.id);e!=null&&(x+=e+r)}let C=!v&&t.current?t.current.scrollTop:o,w,T;if(v&&e.length>0){T=e.length;let t=0;w=e.length;for(let n=e.length-1;n>=0;n--){let i=b.get(e[n].id);if(i!=null&&(t+=i+r),w=n,t>c+200)break}w=Math.max(0,w-U)}else{let t=0;for(t=0;t<e.length;t++){let n=b.get(e[t].id);if(n!=null&&S[t]+n+r>=C)break}w=Math.max(0,t-U),T=w;for(let n=t;n<e.length;n++){let t=b.get(e[n].id);if(T=n+1,t!=null&&S[n]>C+c){T=Math.min(e.length,n+U+1);break}}T=Math.min(e.length,Math.max(T,w+U+1))}for(let t=T;t<e.length&&!b.has(e[t].id);t++)T=t+1;let E=e.slice(w,T),ee=w<S.length?S[w]:0,D=(0,l.useCallback)((e,t)=>{if(!t)return;let n=t.offsetHeight;b.get(e)!==n&&(b.set(e,n),f(e=>e+1))},[b]);(0,l.useEffect)(()=>{a&&m.current&&t.current&&(t.current.scrollTop=t.current.scrollHeight)},[a,t,e.length,d]);let te=(0,l.useCallback)(()=>{t.current&&(t.current.scrollTop=t.current.scrollHeight,m.current=!0,g(!0))},[t]);return{visibleItems:E,totalHeight:x,offsetTop:ee,handleScroll:y,measureRef:D,isAtBottom:h,scrollToBottom:te}}var Mi=8,Ni=400;function Pi({visible:e,conversation:t,onClose:n}){let[r,i]=(0,l.useState)(``),[a,o]=(0,l.useState)(!1),s=(0,l.useRef)(null),c=(0,l.useRef)(null);(0,l.useEffect)(()=>{a&&s.current?.focus()},[a]);let u=e?r.trim()?t.filter(e=>{let t=r.toLowerCase();return e.content.toLowerCase().includes(t)||(e.toolName||``).toLowerCase().includes(t)}):t:[],{visibleItems:d,totalHeight:f,offsetTop:p,handleScroll:m,measureRef:h,isAtBottom:g,scrollToBottom:_}=ji(u,c,{gap:Mi,initialViewportHeight:Ni,autoScroll:!0});return e?(0,V.jsx)($r,{visible:e,position:{right:0,bottom:0,top:36},zIndex:Pt.transcriptPanel,width:Nt.transcript.width,...Yr,children:(0,V.jsxs)(`div`,{className:`h-full flex flex-col`,style:{background:B.panelBg,backdropFilter:`blur(24px)`,borderLeft:`1px solid ${B.holoBorder10}`},children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-2.5 flex-shrink-0`,style:{borderBottom:`1px solid ${B.holoBorder08}`},children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-mono tracking-widest font-semibold`,style:{color:B.panelLabel},children:`TRANSCRIPT`}),(0,V.jsxs)(`span`,{className:`text-[9px] font-mono`,style:{color:B.panelLabelDim},children:[r?`${u.length}/${t.length}`:t.length,` messages`]})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,V.jsx)(`button`,{onClick:()=>{o(e=>!e),a&&i(``)},className:`text-[9px] font-mono px-1.5 py-0.5 rounded transition-all`,style:{background:a?B.toggleActive:`transparent`,color:a?B.assistantText:B.textMuted},children:`/`}),(0,V.jsx)(Xr,{onClick:n,className:`px-1`})]})]}),a&&(0,V.jsx)(`div`,{className:`px-3 pb-2 flex-shrink-0`,style:{borderBottom:`1px solid ${B.holoBorder06}`},children:(0,V.jsx)(`input`,{ref:s,type:`text`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(o(!1),i(``)),e.stopPropagation()},placeholder:`Filter messages...`,className:`w-full px-2 py-1 rounded text-[10px] font-mono outline-none`,style:{background:B.holoBg05,border:`1px solid ${B.holoBorder12}`,color:B.assistantText}})}),(0,V.jsx)(`div`,{ref:c,onScroll:m,className:`flex-1 overflow-y-auto px-3 py-2`,style:{scrollbarWidth:`thin`,scrollbarColor:`${B.scrollbarThumb} transparent`},children:u.length===0?(0,V.jsx)(`div`,{className:`flex items-center justify-center h-32`,children:(0,V.jsx)(`p`,{className:`text-[10px] font-mono`,style:{color:B.textMuted},children:r?`No matching messages`:`Waiting for session activity...`})}):(0,V.jsx)(`div`,{style:{height:f,position:`relative`},children:(0,V.jsx)(`div`,{style:{position:`absolute`,top:p,left:0,right:0},children:d.map(e=>(0,V.jsx)(`div`,{ref:t=>h(e.id,t),style:{marginBottom:Mi},children:(0,V.jsx)(ki,{message:e,searchQuery:r})},e.id))})})}),!g&&u.length>0&&(0,V.jsx)(`div`,{className:`flex justify-center py-1 flex-shrink-0`,style:{borderTop:`1px solid ${B.holoBorder06}`},children:(0,V.jsx)(`button`,{onClick:_,className:`text-[9px] font-mono px-3 py-1 rounded-full transition-all`,style:{background:B.holoBg10,border:`1px solid ${B.glassBorder}`,color:B.scrollBtnText},children:`↓ New messages`})})]})}):null}var Fi=new Set([`assistant`,`user`,`thinking`]),Ii=12,Li=14,Ri=50,zi=120,Bi=4;function Vi({conversations:e,agents:t,onAgentClick:n,selectedAgentId:r}){let[i,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(`all`),[c,u]=(0,l.useState)(new Set),d=(0,l.useRef)(null),f=(0,l.useRef)(0),p=(0,l.useRef)(t);p.current=t;let m=(0,l.useMemo)(()=>{let e=[];for(let[n,r]of t)e.push(`${n}:${r.name}:${r.isMain}`);return e.sort().join(`|`)},[t]),h=(0,l.useMemo)(()=>{let t=p.current,n=null;for(let[r,i]of e)if(t.has(r)){for(let e=i.length-1;e>=0;e--)if(Fi.has(i[e].type)){(!n||i[e].timestamp>n.timestamp)&&(n={...i[e],agentId:r});break}}return n},[e,m]),g=(0,l.useMemo)(()=>{if(!i)return[];let t=p.current,n=[];for(let[r,i]of e)t.has(r)&&i.some(e=>Fi.has(e.type))&&n.push(r);return n.sort((e,n)=>{let r=t.get(e),i=t.get(n);return r?.isMain?-1:i?.isMain?1:(r?.name??e).localeCompare(i?.name??n)})},[i?e:null,i,m]),_=(0,l.useRef)({key:``,counts:new Map,result:[]}),v=(0,l.useMemo)(()=>{if(!i)return[];let t=p.current,n=_.current,r=`${o}:${m}`;if(n.key!==r&&(n.key=r,n.counts=new Map,n.result=[]),o===`all`){let r=!1;for(let[i,a]of e){if(!t.has(i))continue;let e=n.counts.get(i)??0;if(a.length>e){for(let t=e;t<a.length;t++)Fi.has(a[t].type)&&n.result.push({...a[t],agentId:i});n.counts.set(i,a.length),r=!0}}return r&&n.result.sort((e,t)=>e.timestamp-t.timestamp),n.result}let a=e.get(o)??[],s=n.counts.get(o)??0;if(a.length>s){for(let e=s;e<a.length;e++)Fi.has(a[e].type)&&n.result.push({...a[e],agentId:o});n.counts.set(o,a.length)}return n.result},[i?e:null,i,o,m]),{visibleItems:y,totalHeight:b,offsetTop:x,handleScroll:S,measureRef:C}=ji(v,d,{gap:Bi,autoScroll:!0});(0,l.useEffect)(()=>{let t=Array.from(e.values()).reduce((e,t)=>e+t.length,0);if(t>f.current&&i)for(let[t,n]of e)t!==o&&o!==`all`&&n.length>0&&u(e=>new Set(e).add(t));f.current=t},[e,i,o]),(0,l.useEffect)(()=>{u(o===`all`?new Set:e=>{let t=new Set(e);return t.delete(o),t})},[o]),(0,l.useEffect)(()=>{o!==`all`&&!e.has(o)&&s(`all`)},[e,o]),(0,l.useEffect)(()=>{if(r){let e=p.current.get(r);e&&!e.isMain?s(r):s(`all`)}else s(`all`)},[r]);let w=(0,l.useRef)(null);if(Gr(w,(0,l.useCallback)(()=>a(!1),[])),!h&&g.length===0)return null;if(!i){if(!h)return null;let e=t.get(h.agentId)?.name??h.agentId,n=Vt[h.type]??Vt.assistant,r=h.content.replace(/\n/g,` `).slice(0,Ri);return(0,V.jsx)(`div`,{className:`absolute cursor-pointer transition-all hover:scale-[1.02]`,style:{top:48,left:12,zIndex:Pt.info,pointerEvents:`auto`},onClick:()=>a(!0),children:(0,V.jsxs)(`div`,{className:`glass-card px-3 py-2 flex items-center gap-2`,style:{maxWidth:320},children:[(0,V.jsx)(`div`,{className:`w-1.5 h-1.5 rounded-full shrink-0`,style:{background:n.text}}),(0,V.jsx)(`span`,{className:`text-[9px] font-mono font-semibold shrink-0`,style:{color:B.textPrimary},children:e.length>Ii?e.slice(0,Ii)+`..`:e}),(0,V.jsxs)(`span`,{className:`text-[9px] font-mono truncate`,style:{color:n.text+`cc`},children:[r,h.content.length>Ri?`...`:``]}),(0,V.jsx)(`span`,{className:`text-[9px] shrink-0`,style:{color:B.textMuted},children:`▾`})]})})}return(0,V.jsx)(`div`,{ref:w,className:`absolute`,style:{top:48,left:12,zIndex:Pt.info,pointerEvents:`auto`},onClick:e=>e.stopPropagation(),children:(0,V.jsxs)(`div`,{className:`glass-card flex flex-col`,style:{width:320,maxHeight:420},children:[(0,V.jsxs)(`div`,{className:`flex items-center justify-between px-3 pt-2 pb-1`,children:[(0,V.jsx)(`span`,{className:`text-[10px] font-mono font-semibold tracking-wider`,style:{color:B.textPrimary},children:`MESSAGES`}),(0,V.jsx)(`button`,{onClick:()=>a(!1),className:`text-[9px] transition-colors`,style:{color:B.textMuted},children:`▴`})]}),g.length>1&&(0,V.jsxs)(`div`,{className:`flex gap-0.5 px-2 pb-1.5 overflow-x-auto`,style:{scrollbarWidth:`none`},children:[(0,V.jsx)(Hi,{label:`All`,active:o===`all`,onClick:()=>s(`all`),color:B.holoBase}),g.map(e=>{let n=t.get(e),r=n?.name??e,i=n?Ht(n.state):B.idle;return(0,V.jsx)(Hi,{label:r.length>Li?r.slice(0,Li)+`..`:r,active:o===e,onClick:()=>s(e),color:i,hasUnread:c.has(e)},e)})]}),(0,V.jsx)(`div`,{ref:d,onScroll:S,className:`flex-1 overflow-y-auto px-2 pb-2`,style:{maxHeight:340,scrollbarWidth:`thin`,scrollbarColor:`${B.scrollbarThumb} transparent`},children:v.length===0?(0,V.jsx)(`div`,{className:`flex items-center justify-center py-6`,children:(0,V.jsx)(`span`,{className:`text-[9px] font-mono`,style:{color:B.textMuted},children:`No messages yet`})}):(0,V.jsx)(`div`,{style:{height:b,position:`relative`},children:(0,V.jsx)(`div`,{style:{position:`absolute`,top:x,left:0,right:0},children:y.map(e=>(0,V.jsx)(`div`,{ref:t=>C(e.id,t),style:{marginBottom:Bi},children:(0,V.jsx)(Ui,{message:e,agentId:e.agentId,agentName:t.get(e.agentId)?.name??e.agentId,showAgent:o===`all`,isSelected:r===e.agentId,onClick:()=>{n(e.agentId),a(!1)}})},e.id))})})})]})})}function Hi({label:e,active:t,onClick:n,color:r,hasUnread:i}){return(0,V.jsxs)(`button`,{onClick:n,className:`px-2 py-0.5 rounded text-[9px] font-mono transition-all shrink-0 relative`,style:{background:t?r+`20`:`transparent`,color:t?r:B.textMuted,border:t?`1px solid ${r}30`:`1px solid transparent`},children:[e,i&&(0,V.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full`,style:{background:B.unreadDot}})]})}function Ui({message:e,agentId:t,agentName:n,showAgent:r,isSelected:i,onClick:a}){let[o,s]=(0,l.useState)(!1),c=Vt[e.type]??Vt.assistant,u=e.content.length>zi,d=o||!u?e.content:e.content.slice(0,zi)+`...`;return(0,V.jsxs)(`div`,{className:`rounded px-2 py-1.5 cursor-pointer transition-all`,style:{background:i?c.bgSelected:c.bg,borderLeft:i?`2px solid ${c.text}`:`2px solid transparent`},onClick:a,children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-1.5 mb-0.5`,children:[(0,V.jsx)(`span`,{className:`text-[9px] font-mono font-semibold`,style:{color:c.text+`90`},children:c.label}),r&&(0,V.jsx)(`span`,{className:`text-[9px] font-mono`,style:{color:B.textMuted},children:n})]}),(0,V.jsx)(`div`,{className:`text-[9px] font-mono leading-relaxed whitespace-pre-wrap break-words`,style:{color:c.text},children:d}),u&&(0,V.jsx)(`button`,{className:`text-[9px] font-mono mt-0.5 transition-colors`,style:{color:B.textMuted},onClick:e=>{e.stopPropagation(),s(e=>!e)},children:o?`▴ less`:`▾ more`})]})}function Wi({sessions:e,selectedSessionId:t,sessionsWithActivity:n,onSelectSession:r,onCloseSession:i}){let a=(0,l.useRef)(new Map),o=(0,l.useCallback)((e,t)=>{t?a.current.set(e,t):a.current.delete(e)},[]);return(0,l.useEffect)(()=>{t&&a.current.get(t)?.scrollIntoView({behavior:`smooth`,block:`nearest`,inline:`nearest`})},[t]),(0,V.jsx)(`div`,{className:`flex gap-1`,children:e.map(e=>{let a=e.id===t,s=e.status===`active`,c=n.has(e.id),l=s||c;return(0,V.jsxs)(`button`,{ref:t=>o(e.id,t),onClick:()=>r(e.id),className:`group px-1.5 py-0.5 rounded transition-all flex items-center gap-1`,style:{flexShrink:0,whiteSpace:`nowrap`,background:a?B.tabSelectedBg:B.tabInactiveBg,border:`1px solid ${a?B.tabSelectedBorder:B.tabInactiveBorder}`,color:a?B.holoBright:B.textMuted},children:[(0,V.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full flex-shrink-0`,style:{background:l?B.complete:B.idle+`40`,boxShadow:l?`0 0 4px ${B.complete}`:`none`,animation:c&&!a?`pulse 1.5s infinite`:`none`}}),e.label,(0,V.jsx)(`span`,{className:`ml-0.5 opacity-0 group-hover:opacity-60 transition-opacity cursor-pointer`,style:{color:B.tabClose,fontSize:8,lineHeight:`10px`},onClick:t=>{t.stopPropagation(),i(e.id)},children:`✕`})]},e.id)})})}function Gi(){return(0,V.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`polygon`,{points:`11 5 6 9 2 9 2 15 6 15 11 19 11 5`}),(0,V.jsx)(`line`,{x1:`23`,y1:`9`,x2:`17`,y2:`15`}),(0,V.jsx)(`line`,{x1:`17`,y1:`9`,x2:`23`,y2:`15`})]})}function Ki(){return(0,V.jsxs)(`svg`,{width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:[(0,V.jsx)(`polygon`,{points:`11 5 6 9 2 9 2 15 6 15 11 19 11 5`}),(0,V.jsx)(`path`,{d:`M19.07 4.93a10 10 0 0 1 0 14.14`}),(0,V.jsx)(`path`,{d:`M15.54 8.46a5 5 0 0 1 0 7.07`})]})}function qi({active:e,onClick:t,children:n,style:r,activeColor:i}){return(0,V.jsx)(`button`,{onClick:t,className:`px-1.5 py-0.5 rounded transition-all`,style:{background:e?i?.bg??B.toggleActive:B.toggleInactive,border:`1px solid ${B.toggleBorder}`,color:e?i?.text??B.holoBright:B.textMuted,...r},children:n})}function Ji({status:e}){let t=e===`watching`?B.complete:e===`connected`?B.idle:B.error,n=e===`watching`?`LIVE`:e===`connected`?`CONNECTED`:`OFFLINE`;return(0,V.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,V.jsx)(`span`,{className:`w-1.5 h-1.5 rounded-full`,style:{background:t,boxShadow:`0 0 4px ${t}`}}),n]})}var Yi=(0,l.memo)(function({sessions:e,selectedSessionId:t,sessionsWithActivity:n,onSelectSession:r,onCloseSession:i,isVSCode:a,connectionStatus:o,agentCount:s,totalTokens:c,showFileAttention:l,showTranscript:u,showCostOverlay:d,showTimeline:f,isMuted:p,onTogglePanel:m,onToggleTimeline:h,onToggleMute:g}){return(0,V.jsxs)(`div`,{className:`absolute top-3 left-3 right-3 flex items-center gap-4 font-mono text-[10px]`,style:{zIndex:Pt.info},children:[e.length>1&&(0,V.jsx)(`div`,{className:`min-w-0 flex-shrink overflow-x-auto scrollbar-hide`,children:(0,V.jsx)(Wi,{sessions:e,selectedSessionId:t,sessionsWithActivity:n,onSelectSession:r,onCloseSession:i})}),(0,V.jsx)(`div`,{className:`flex-1`}),(0,V.jsxs)(`div`,{className:`flex items-center gap-4 flex-shrink-0`,style:{color:B.textMuted},children:[a&&(0,V.jsx)(Ji,{status:o}),(0,V.jsxs)(`span`,{children:[s,` agents`]}),(0,V.jsxs)(`span`,{children:[wn(c),` tokens`,(0,V.jsxs)(`span`,{style:{color:B.complete+`65`,marginLeft:4},children:[`~$`,br(c).toFixed(2)]})]}),(0,V.jsxs)(`div`,{className:`flex items-center gap-1 px-1 py-0.5 rounded`,style:{background:B.holoBg03,border:`1px solid ${B.holoBorder06}`},children:[(0,V.jsx)(qi,{active:l,onClick:()=>m(`files`),style:{background:l?void 0:`transparent`,border:`none`},children:`Files`}),(0,V.jsx)(qi,{active:u,onClick:()=>m(`transcript`),style:{background:u?void 0:`transparent`,border:`none`},children:`Chat`}),(0,V.jsx)(qi,{active:d,onClick:()=>m(`cost`),activeColor:{bg:B.costActiveBg,text:B.complete},style:{background:d?void 0:`transparent`,border:`none`},children:`$Cost`})]}),(0,V.jsx)(qi,{active:f,onClick:h,children:`Timeline`}),(0,V.jsx)(qi,{active:!p,onClick:g,style:{border:`1px solid ${B.toggleBorder}`},children:p?(0,V.jsx)(Gi,{}):(0,V.jsx)(Ki,{})})]})]})}),Xi=class{constructor(){this.ctx=null,this.masterGain=null,this._muted=!0,this._volume=.5}ensureContext(){if(this.ctx){this.ctx.state===`suspended`&&this.ctx.resume();return}this.ctx=new AudioContext,this.masterGain=this.ctx.createGain(),this.masterGain.gain.value=this._muted?0:this._volume,this.masterGain.connect(this.ctx.destination)}get muted(){return this._muted}setMuted(e){this._muted=e,this.masterGain&&this.masterGain.gain.setTargetAtTime(e?0:this._volume,this.ctx.currentTime,.05)}toggleMute(){return this.setMuted(!this._muted),this._muted}playClick(e,t){if(this.ensureContext(),!this.ctx||!this.masterGain)return;let n=this.ctx.currentTime,r=this.ctx.createOscillator(),i=this.ctx.createGain(),a=this.ctx.createBiquadFilter();r.type=`sine`,r.frequency.setValueAtTime(e,n),r.frequency.exponentialRampToValueAtTime(e*.5,n+.025),a.type=`lowpass`,a.frequency.value=800,a.Q.value=.5,i.gain.setValueAtTime(t,n),i.gain.exponentialRampToValueAtTime(.001,n+.025),r.connect(a),a.connect(i),i.connect(this.masterGain),r.start(n),r.stop(n+.025)}playToolStart(){this.playClick(480,.06)}playToolEnd(){this.playClick(600,.08)}playAgentSpawn(){if(this.ensureContext(),!this.ctx||!this.masterGain)return;let e=this.ctx.currentTime,t=[784,1175];for(let n=0;n<t.length;n++){let r=this.ctx.createOscillator(),i=this.ctx.createGain(),a=e+n*.06;r.type=`sine`,r.frequency.value=t[n],i.gain.setValueAtTime(.001,a),i.gain.linearRampToValueAtTime(.03,a+.02),i.gain.exponentialRampToValueAtTime(.001,a+.2),r.connect(i),i.connect(this.masterGain),r.start(a),r.stop(a+.2)}}playAgentComplete(){if(this.ensureContext(),!this.ctx||!this.masterGain)return;let e=[261.63,329.63,392,493.88],t=this.ctx.currentTime;for(let n=0;n<e.length;n++){let r=this.ctx.createOscillator(),i=this.ctx.createGain(),a=t+n*.07;r.type=`sine`,r.frequency.value=e[n],i.gain.setValueAtTime(.001,a),i.gain.linearRampToValueAtTime(.022,a+.03),i.gain.setValueAtTime(.022,a+.25),i.gain.exponentialRampToValueAtTime(.001,a+.5),r.connect(i),i.connect(this.masterGain),r.start(a),r.stop(a+.5)}}playError(){if(this.ensureContext(),!this.ctx||!this.masterGain)return;let e=this.ctx.currentTime,t=this.ctx.createOscillator(),n=this.ctx.createGain();t.type=`triangle`,t.frequency.setValueAtTime(220,e),t.frequency.exponentialRampToValueAtTime(165,e+.25),n.gain.setValueAtTime(.001,e),n.gain.linearRampToValueAtTime(.08,e+.02),n.gain.exponentialRampToValueAtTime(.001,e+.25),t.connect(n),n.connect(this.masterGain),t.start(e),t.stop(e+.25)}dispose(){this.ctx&&(this.ctx.close(),this.ctx=null,this.masterGain=null)}};function Zi(e,t,n){let r=(0,l.useRef)(null),[i,a]=(0,l.useState)(!0),o=(0,l.useRef)(!1),s=(0,l.useRef)(new Map),c=(0,l.useRef)(new Map);return(0,l.useEffect)(()=>{let e=new Xi;try{localStorage.getItem(`agent-viz-sound`)===`on`&&(e.setMuted(!1),a(!1))}catch{}return r.current=e,()=>{r.current?.dispose(),r.current=null}},[]),(0,l.useEffect)(()=>{if(o.current||!r.current||n)return;let i=r.current,{transitions:a,newAgentStates:l,newToolStates:u}=kr(e,t,c.current,s.current);c.current=l,s.current=u;for(let e of a)switch(e.kind){case`agent_spawn`:i.playAgentSpawn();break;case`agent_complete`:i.playAgentComplete();break;case`tool_start`:i.playToolStart();break;case`tool_complete`:i.playToolEnd();break;case`tool_error`:i.playError();break}},[e,t,n]),{isMuted:i,seekingRef:o,handleToggleMute:(0,l.useCallback)(()=>{if(r.current){let e=r.current.toggleMute();a(e);try{localStorage.setItem(T,e?`off`:`on`)}catch{}}},[])}}function Qi(){let e=yn(),{frameRef:t,agents:n,toolCalls:r,particles:i,edges:a,discoveries:o,fileAttention:s,timelineEntries:c,currentTime:u,isPlaying:d,speed:f,maxTimeReached:p,conversations:m,play:h,pause:g,restart:_,setSpeed:v,seekToTime:y,updateAgentPosition:x,saveSnapshot:S,restoreSnapshot:C}=_n({useMockData:e.useMockData,externalEvents:e.pendingEvents,onExternalEventsConsumed:e.consumeEvents,sessionFilter:e.selectedSessionId,sessionFilterRef:e.selectedSessionIdRef}),w=bn({agents:n,toolCalls:r,discoveries:o}),[T,E]=(0,l.useState)(!1),[ee,D]=(0,l.useState)(!0),[te,ne]=(0,l.useState)(!1),[O,re]=(0,l.useState)(!1),[ie,k]=(0,l.useState)(!1),[A,j]=(0,l.useState)(!1),M=(0,l.useCallback)(e=>{k(t=>e===`files`?!t:!1),j(t=>e===`transcript`?!t:!1),ne(t=>e===`cost`?!t:!1)},[]),[N,ae]=(0,l.useState)(0),[P,F]=(0,l.useState)(!1),{isMuted:I,seekingRef:L,handleToggleMute:oe}=Zi(n,r,P);(0,l.useEffect)(()=>{let e=setTimeout(()=>h(),Ft.autoPlayDelayMs);return()=>clearTimeout(e)},[h]);let se=(0,l.useRef)(new Map),ce=(0,l.useRef)(null);(0,l.useLayoutEffect)(()=>{if(e.selectedSessionId&&e.selectedSessionId!==ce.current){ce.current!==null&&se.current.set(ce.current,{snapshot:S(),eventCount:e.getSessionEventCount(ce.current)});let t=se.current.get(e.selectedSessionId);t?(C(t.snapshot),e.flushSessionEvents(e.selectedSessionId,t.eventCount)):(_(),e.flushSessionEvents(e.selectedSessionId)),ce.current=e.selectedSessionId}},[e.selectedSessionId,_,e.flushSessionEvents,S,C,e.getSessionEventCount]);let le=(0,l.useRef)({counts:new Map,events:[],idCounter:0}),ue=(0,l.useMemo)(()=>{let e=le.current,t=!1;for(let[n,r]of m){let i=e.counts.get(n)??0;if(r.length>i){for(let t=i;t<r.length;t++){let i=r[t];e.events.push({id:`event-${e.idCounter++}`,type:i.type===`tool_call`?`tool_call`:i.type===`tool_result`?`tool_result`:`message`,label:i.content.slice(0,20),timestamp:i.timestamp,nodeId:n})}e.counts.set(n,r.length),t=!0}}return t&&e.events.sort((e,t)=>e.timestamp-t.timestamp),e.events},[m]),de=(0,l.useCallback)(()=>{d?(g(),F(!0)):h()},[d,h,g]),fe=(0,l.useCallback)(()=>{g(),F(!0)},[g]),pe=(0,l.useRef)(null),me=(0,l.useCallback)(()=>{F(!1),y(p),ae(e=>e+1),pe.current&&clearTimeout(pe.current),pe.current=setTimeout(()=>{pe.current=null,h()},Ft.resumeLiveDelayMs)},[y,p,h]);(0,l.useEffect)(()=>()=>{pe.current&&clearTimeout(pe.current)},[]);let he=(0,l.useCallback)(()=>{F(!1),_(!0)},[_]);xn((0,l.useMemo)(()=>({togglePlayPause:de,toggleFilePanel:()=>M(`files`),toggleTranscript:()=>M(`transcript`),toggleTimeline:()=>{re(e=>!e)},toggleHexGrid:()=>{D(e=>!e)},toggleStats:()=>{E(e=>!e)},toggleCostOverlay:()=>M(`cost`),zoomToFit:()=>{ae(e=>e+1)},clearSelection:()=>{w.clearAllSelections()},deselectAgent:()=>{w.clearAgent()},closeTranscript:()=>{j(!1)},toggleMute:oe,setSpeed:v,selectedAgentId:w.selectedAgentId}),[de,w.clearAllSelections,w.clearAgent,w.selectedAgentId,v,oe,M]));let ge=(0,l.useMemo)(()=>{let e=0;for(let t of n.values())e+=t.tokensUsed;return e},[n]),_e=w.selectedAgentId?n.get(w.selectedAgentId):null,ve=w.selectedAgentId&&m.get(w.selectedAgentId)||[],ye=(0,l.useMemo)(()=>A?Array.from(m.values()).flat().sort((e,t)=>e.timestamp-t.timestamp):[],[m,A]),be=w.contextMenu?w.contextMenu.agentId?[{label:`📊 Toggle Stats`,onClick:()=>E(e=>!e)}]:[{label:`🔍 Zoom to Fit`,onClick:()=>ae(e=>e+1)},{label:`📊 Toggle Stats`,onClick:()=>E(e=>!e)},{label:`⬡ Toggle Grid`,onClick:()=>D(e=>!e)},{label:``,onClick:()=>{},separator:!0},{label:`⟲ Restart`,onClick:_}]:[],xe=(0,l.useCallback)(t=>{if(e.removeSession(t),se.current.delete(t),e.selectedSessionId===t){let n=e.sessions.filter(e=>e.id!==t);n.length>0&&e.selectSession(n[n.length-1].id)}},[e]),Se=(0,l.useCallback)((t,n)=>{e.bridgeOpenFile(t,n)},[e]),Ce=n.size===0&&!e.useMockData;return(0,V.jsx)(ii,{value:e.isVSCode?Se:null,children:(0,V.jsxs)(`div`,{className:`h-screen w-screen relative overflow-hidden`,style:{background:B.void},children:[Ce&&(0,V.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center z-10 pointer-events-none`,children:(0,V.jsxs)(`div`,{className:`text-center`,style:{fontFamily:`'SF Mono', 'Fira Code', monospace`},children:[(0,V.jsx)(`div`,{className:`text-sm`,style:{color:`#66ccff80`},children:`WAITING FOR AGENT SESSION`}),(0,V.jsx)(`div`,{className:`mt-2 text-xs`,style:{color:`#66ccff40`},children:`Start a Claude Code session to see activity`})]})}),(0,V.jsx)(Pr,{simulationRef:t,selectedAgentId:w.selectedAgentId,hoveredAgentId:w.hoveredAgentId,showStats:T,showHexGrid:ee,zoomToFitTrigger:N,pauseAutoFit:w.contextMenu!==null,onAgentClick:w.handleAgentClick,onAgentHover:w.setHoveredAgentId,onAgentDrag:x,onContextMenu:w.handleContextMenu,onToolCallClick:w.handleToolCallClick,selectedToolCallId:w.selectedToolCallId,onDiscoveryClick:w.handleDiscoveryClick,selectedDiscoveryId:w.selectedDiscoveryId,showCostOverlay:te}),(0,V.jsx)(Vi,{conversations:m,agents:n,onAgentClick:w.handleAgentClick,selectedAgentId:w.selectedAgentId}),_e&&w.selectedAgentWorldPos&&(0,V.jsx)(`div`,{...Yr,children:(0,V.jsx)(ti,{agent:_e,onClose:w.clearAgent})}),w.selectedToolData&&w.selectedToolScreenPos&&(0,V.jsx)(`div`,{...Yr,children:(0,V.jsx)(vi,{tool:w.selectedToolData,position:w.selectedToolScreenPos,onClose:w.clearTool})}),w.selectedDiscoveryData&&w.selectedDiscoveryScreenPos&&(0,V.jsx)(`div`,{...Yr,children:(0,V.jsx)(yi,{discovery:w.selectedDiscoveryData,position:w.selectedDiscoveryScreenPos,onClose:w.clearDiscovery})}),(0,V.jsx)(H,{visible:!!_e,agentName:_e?.name??``,agentState:_e?.state??`idle`,conversation:ve,onClose:w.clearAgent}),w.contextMenu&&(0,V.jsx)(ni,{position:w.contextMenu,items:be,onClose:()=>w.setContextMenu(null)}),(0,V.jsx)(Br,{isPlaying:d,speed:f,currentTime:u,totalDuration:e.useMockData?P?Math.max(p,u):b:Math.max(p,u),onPlayPause:de,onRestart:he,onSpeedChange:v,onSeek:e=>{L.current=!0,g(),y(e),ae(e=>e+1),pe.current&&clearTimeout(pe.current),pe.current=setTimeout(()=>{pe.current=null,L.current=!1},Ft.seekCompleteDelayMs)},timelineEvents:ue,isReviewing:P,eventCount:ue.length,onEnterReview:fe,onResumeLive:me}),(0,V.jsx)(bi,{visible:ie,fileAttention:s,onClose:()=>k(!1),onOpenFile:e.isVSCode?Se:void 0}),(0,V.jsx)(Pi,{visible:A,conversation:ye,onClose:()=>j(!1)}),(0,V.jsx)(Di,{visible:O,timelineEntries:c,currentTime:u,onClose:()=>re(!1)}),(0,V.jsx)(Yi,{sessions:e.sessions,selectedSessionId:e.selectedSessionId,sessionsWithActivity:e.sessionsWithActivity,onSelectSession:e.selectSession,onCloseSession:xe,isVSCode:e.isVSCode,connectionStatus:e.connectionStatus,agentCount:n.size,totalTokens:ge,showFileAttention:ie,showTranscript:A,showCostOverlay:te,showTimeline:O,isMuted:I,onTogglePanel:M,onToggleTimeline:()=>re(e=>!e),onToggleMute:oe})]})})}var $i=document.getElementById(`root`);if(!$i)throw Error(`Root element #root not found`);(0,c.createRoot)($i).render((0,V.jsx)(Qi,{}))})();