apteva 0.2.7 → 0.2.8

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.
Files changed (40) hide show
  1. package/dist/App.hzbfeg94.js +217 -0
  2. package/dist/index.html +3 -1
  3. package/dist/styles.css +1 -1
  4. package/package.json +1 -1
  5. package/src/auth/index.ts +386 -0
  6. package/src/auth/middleware.ts +183 -0
  7. package/src/binary.ts +19 -1
  8. package/src/db.ts +561 -32
  9. package/src/routes/api.ts +901 -35
  10. package/src/routes/auth.ts +242 -0
  11. package/src/server.ts +46 -5
  12. package/src/web/App.tsx +61 -19
  13. package/src/web/components/agents/AgentCard.tsx +24 -22
  14. package/src/web/components/agents/AgentPanel.tsx +751 -11
  15. package/src/web/components/agents/AgentsView.tsx +81 -9
  16. package/src/web/components/agents/CreateAgentModal.tsx +28 -1
  17. package/src/web/components/auth/CreateAccountStep.tsx +176 -0
  18. package/src/web/components/auth/LoginPage.tsx +91 -0
  19. package/src/web/components/auth/index.ts +2 -0
  20. package/src/web/components/common/Icons.tsx +48 -0
  21. package/src/web/components/common/Modal.tsx +1 -1
  22. package/src/web/components/dashboard/Dashboard.tsx +70 -22
  23. package/src/web/components/index.ts +3 -0
  24. package/src/web/components/layout/Header.tsx +135 -18
  25. package/src/web/components/layout/Sidebar.tsx +81 -43
  26. package/src/web/components/mcp/McpPage.tsx +261 -32
  27. package/src/web/components/onboarding/OnboardingWizard.tsx +64 -8
  28. package/src/web/components/settings/SettingsPage.tsx +320 -21
  29. package/src/web/components/tasks/TasksPage.tsx +21 -19
  30. package/src/web/components/telemetry/TelemetryPage.tsx +163 -61
  31. package/src/web/context/AuthContext.tsx +230 -0
  32. package/src/web/context/ProjectContext.tsx +182 -0
  33. package/src/web/context/index.ts +5 -0
  34. package/src/web/hooks/useAgents.ts +18 -6
  35. package/src/web/hooks/useOnboarding.ts +20 -4
  36. package/src/web/hooks/useProviders.ts +15 -5
  37. package/src/web/icon.png +0 -0
  38. package/src/web/styles.css +12 -0
  39. package/src/web/types.ts +6 -0
  40. package/dist/App.3kb50qa3.js +0 -213
@@ -0,0 +1,217 @@
1
+ var Uv=Object.create;var{getPrototypeOf:qv,defineProperty:sq,getOwnPropertyNames:Bv}=Object;var Ov=Object.prototype.hasOwnProperty;var X0=(Y,G,q)=>{q=Y!=null?Uv(qv(Y)):{};let O=G||!Y||!Y.__esModule?sq(q,"default",{value:Y,enumerable:!0}):q;for(let H of Bv(Y))if(!Ov.call(O,H))sq(O,H,{get:()=>Y[H],enumerable:!0});return O};var b3=(Y,G)=>()=>(G||Y((G={exports:{}}).exports,G),G.exports);var v1=b3((Lv,pQ)=>{(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y="18.3.1",G=Symbol.for("react.element"),q=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),L=Symbol.for("react.provider"),M=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),W=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),h=Symbol.iterator,k="@@iterator";function S(B){if(B===null||typeof B!=="object")return null;var I=h&&B[h]||B[k];if(typeof I==="function")return I;return null}var C={current:null},i={transition:null},j={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},o={current:null},z0={},V=null;function H0(B){V=B}z0.setExtraStackFrame=function(B){V=B},z0.getCurrentStack=null,z0.getStackAddendum=function(){var B="";if(V)B+=V;var I=z0.getCurrentStack;if(I)B+=I()||"";return B};var Y0=!1,K0=!1,q0=!1,B0=!1,J0=!1,v0={ReactCurrentDispatcher:C,ReactCurrentBatchConfig:i,ReactCurrentOwner:o};v0.ReactDebugCurrentFrame=z0,v0.ReactCurrentActQueue=j;function m0(B){{for(var I=arguments.length,l=Array(I>1?I-1:0),r=1;r<I;r++)l[r-1]=arguments[r];B1("warn",B,l)}}function F0(B){{for(var I=arguments.length,l=Array(I>1?I-1:0),r=1;r<I;r++)l[r-1]=arguments[r];B1("error",B,l)}}function B1(B,I,l){{var r=v0.ReactDebugCurrentFrame,O0=r.getStackAddendum();if(O0!=="")I+="%s",l=l.concat([O0]);var a0=l.map(function(D0){return String(D0)});a0.unshift("Warning: "+I),Function.prototype.apply.call(console[B],console,a0)}}var s1={};function E1(B,I){{var l=B.constructor,r=l&&(l.displayName||l.name)||"ReactClass",O0=r+"."+I;if(s1[O0])return;F0("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",I,r),s1[O0]=!0}}var p1={isMounted:function(B){return!1},enqueueForceUpdate:function(B,I,l){E1(B,"forceUpdate")},enqueueReplaceState:function(B,I,l,r){E1(B,"replaceState")},enqueueSetState:function(B,I,l,r){E1(B,"setState")}},x0=Object.assign,U1={};Object.freeze(U1);function n(B,I,l){this.props=B,this.context=I,this.refs=U1,this.updater=l||p1}n.prototype.isReactComponent={},n.prototype.setState=function(B,I){if(typeof B!=="object"&&typeof B!=="function"&&B!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,B,I,"setState")},n.prototype.forceUpdate=function(B){this.updater.enqueueForceUpdate(this,B,"forceUpdate")};{var S0={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},u0=function(B,I){Object.defineProperty(n.prototype,B,{get:function(){m0("%s(...) is deprecated in plain JavaScript React classes. %s",I[0],I[1]);return}})};for(var s0 in S0)if(S0.hasOwnProperty(s0))u0(s0,S0[s0])}function R0(){}R0.prototype=n.prototype;function t0(B,I,l){this.props=B,this.context=I,this.refs=U1,this.updater=l||p1}var $1=t0.prototype=new R0;$1.constructor=t0,x0($1,n.prototype),$1.isPureReactComponent=!0;function O1(){var B={current:null};return Object.seal(B),B}var f6=Array.isArray;function J6(B){return f6(B)}function u6(B){{var I=typeof Symbol==="function"&&Symbol.toStringTag,l=I&&B[Symbol.toStringTag]||B.constructor.name||"Object";return l}}function g6(B){try{return z6(B),!1}catch(I){return!0}}function z6(B){return""+B}function X1(B){if(g6(B))return F0("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",u6(B)),z6(B)}function l6(B,I,l){var r=B.displayName;if(r)return r;var O0=I.displayName||I.name||"";return O0!==""?l+"("+O0+")":l}function E6(B){return B.displayName||"Context"}function _6(B){if(B==null)return null;if(typeof B.tag==="number")F0("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof B==="function")return B.displayName||B.name||null;if(typeof B==="string")return B;switch(B){case O:return"Fragment";case q:return"Portal";case w:return"Profiler";case H:return"StrictMode";case F:return"Suspense";case v:return"SuspenseList"}if(typeof B==="object")switch(B.$$typeof){case M:var I=B;return E6(I)+".Consumer";case L:var l=B;return E6(l._context)+".Provider";case T:return l6(B,B.render,"ForwardRef");case _:var r=B.displayName||null;if(r!==null)return r;return _6(B.type)||"Memo";case W:{var O0=B,a0=O0._payload,D0=O0._init;try{return _6(D0(a0))}catch(e0){return null}}}return null}var v6=Object.prototype.hasOwnProperty,I5={key:!0,ref:!0,__self:!0,__source:!0},Y6,O4,$6;$6={};function L4(B){if(v6.call(B,"ref")){var I=Object.getOwnPropertyDescriptor(B,"ref").get;if(I&&I.isReactWarning)return!1}return B.ref!==void 0}function L6(B){if(v6.call(B,"key")){var I=Object.getOwnPropertyDescriptor(B,"key").get;if(I&&I.isReactWarning)return!1}return B.key!==void 0}function M6(B,I){var l=function(){if(!Y6)Y6=!0,F0("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",I)};l.isReactWarning=!0,Object.defineProperty(B,"key",{get:l,configurable:!0})}function J4(B,I){var l=function(){if(!O4)O4=!0,F0("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",I)};l.isReactWarning=!0,Object.defineProperty(B,"ref",{get:l,configurable:!0})}function T4(B){if(typeof B.ref==="string"&&o.current&&B.__self&&o.current.stateNode!==B.__self){var I=_6(o.current.type);if(!$6[I])F0('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I,B.ref),$6[I]=!0}}var h6=function(B,I,l,r,O0,a0,D0){var e0={$$typeof:G,type:B,key:I,ref:l,props:D0,_owner:a0};if(e0._store={},Object.defineProperty(e0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(e0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:r}),Object.defineProperty(e0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:O0}),Object.freeze)Object.freeze(e0.props),Object.freeze(e0);return e0};function p6(B,I,l){var r,O0={},a0=null,D0=null,e0=null,F1=null;if(I!=null){if(L4(I))D0=I.ref,T4(I);if(L6(I))X1(I.key),a0=""+I.key;e0=I.__self===void 0?null:I.__self,F1=I.__source===void 0?null:I.__source;for(r in I)if(v6.call(I,r)&&!I5.hasOwnProperty(r))O0[r]=I[r]}var o1=arguments.length-2;if(o1===1)O0.children=l;else if(o1>1){var H6=Array(o1);for(var G6=0;G6<o1;G6++)H6[G6]=arguments[G6+2];if(Object.freeze)Object.freeze(H6);O0.children=H6}if(B&&B.defaultProps){var w6=B.defaultProps;for(r in w6)if(O0[r]===void 0)O0[r]=w6[r]}if(a0||D0){var V6=typeof B==="function"?B.displayName||B.name||"Unknown":B;if(a0)M6(O0,V6);if(D0)J4(O0,V6)}return h6(B,a0,D0,e0,F1,o.current,O0)}function N0(B,I){var l=h6(B.type,I,B.ref,B._self,B._source,B._owner,B.props);return l}function d0(B,I,l){if(B===null||B===void 0)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+B+".");var r,O0=x0({},B.props),a0=B.key,D0=B.ref,e0=B._self,F1=B._source,o1=B._owner;if(I!=null){if(L4(I))D0=I.ref,o1=o.current;if(L6(I))X1(I.key),a0=""+I.key;var H6;if(B.type&&B.type.defaultProps)H6=B.type.defaultProps;for(r in I)if(v6.call(I,r)&&!I5.hasOwnProperty(r))if(I[r]===void 0&&H6!==void 0)O0[r]=H6[r];else O0[r]=I[r]}var G6=arguments.length-2;if(G6===1)O0.children=l;else if(G6>1){var w6=Array(G6);for(var V6=0;V6<G6;V6++)w6[V6]=arguments[V6+2];O0.children=w6}return h6(B.type,a0,D0,e0,F1,o1,O0)}function i0(B){return typeof B==="object"&&B!==null&&B.$$typeof===G}var T1=".",x1=":";function F6(B){var I=/[=:]/g,l={"=":"=0",":":"=2"},r=B.replace(I,function(O0){return l[O0]});return"$"+r}var e1=!1,c6=/\/+/g;function H1(B){return B.replace(c6,"$&/")}function Z1(B,I){if(typeof B==="object"&&B!==null&&B.key!=null)return X1(B.key),F6(""+B.key);return I.toString(36)}function m4(B,I,l,r,O0){var a0=typeof B;if(a0==="undefined"||a0==="boolean")B=null;var D0=!1;if(B===null)D0=!0;else switch(a0){case"string":case"number":D0=!0;break;case"object":switch(B.$$typeof){case G:case q:D0=!0}}if(D0){var e0=B,F1=O0(e0),o1=r===""?T1+Z1(e0,0):r;if(J6(F1)){var H6="";if(o1!=null)H6=H1(o1)+"/";m4(F1,I,H6,"",function(OX){return OX})}else if(F1!=null){if(i0(F1)){if(F1.key&&(!e0||e0.key!==F1.key))X1(F1.key);F1=N0(F1,l+(F1.key&&(!e0||e0.key!==F1.key)?H1(""+F1.key)+"/":"")+o1)}I.push(F1)}return 1}var G6,w6,V6=0,y1=r===""?T1:r+x1;if(J6(B))for(var v7=0;v7<B.length;v7++)G6=B[v7],w6=y1+Z1(G6,v7),V6+=m4(G6,I,l,w6,O0);else{var N3=S(B);if(typeof N3==="function"){var E2=B;if(N3===E2.entries){if(!e1)m0("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");e1=!0}var BX=N3.call(E2),q8,c2=0;while(!(q8=BX.next()).done)G6=q8.value,w6=y1+Z1(G6,c2++),V6+=m4(G6,I,l,w6,O0)}else if(a0==="object"){var d2=String(B);throw Error("Objects are not valid as a React child (found: "+(d2==="[object Object]"?"object with keys {"+Object.keys(B).join(", ")+"}":d2)+"). If you meant to render a collection of children, use an array instead.")}}return V6}function Y4(B,I,l){if(B==null)return B;var r=[],O0=0;return m4(B,r,"","",function(a0){return I.call(l,a0,O0++)}),r}function u4(B){var I=0;return Y4(B,function(){I++}),I}function j5(B,I,l){Y4(B,function(){I.apply(this,arguments)},l)}function T5(B){return Y4(B,function(I){return I})||[]}function o5(B){if(!i0(B))throw Error("React.Children.only expected to receive a single React element child.");return B}function q5(B){var I={$$typeof:M,_currentValue:B,_currentValue2:B,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};I.Provider={$$typeof:L,_context:I};var l=!1,r=!1,O0=!1;{var a0={$$typeof:M,_context:I};Object.defineProperties(a0,{Provider:{get:function(){if(!r)r=!0,F0("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");return I.Provider},set:function(D0){I.Provider=D0}},_currentValue:{get:function(){return I._currentValue},set:function(D0){I._currentValue=D0}},_currentValue2:{get:function(){return I._currentValue2},set:function(D0){I._currentValue2=D0}},_threadCount:{get:function(){return I._threadCount},set:function(D0){I._threadCount=D0}},Consumer:{get:function(){if(!l)l=!0,F0("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");return I.Consumer}},displayName:{get:function(){return I.displayName},set:function(D0){if(!O0)m0("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",D0),O0=!0}}}),I.Consumer=a0}return I._currentRenderer=null,I._currentRenderer2=null,I}var f4=-1,f5=0,R1=1,i1=2;function Q6(B){if(B._status===f4){var I=B._result,l=I();if(l.then(function(a0){if(B._status===f5||B._status===f4){var D0=B;D0._status=R1,D0._result=a0}},function(a0){if(B._status===f5||B._status===f4){var D0=B;D0._status=i1,D0._result=a0}}),B._status===f4){var r=B;r._status=f5,r._result=l}}if(B._status===R1){var O0=B._result;if(O0===void 0)F0(`lazy: Expected the result of a dynamic import() call. Instead received: %s
2
+
3
+ Your code should look like:
4
+ const MyComponent = lazy(() => import('./MyComponent'))
5
+
6
+ Did you accidentally put curly braces around the import?`,O0);if(!("default"in O0))F0(`lazy: Expected the result of a dynamic import() call. Instead received: %s
7
+
8
+ Your code should look like:
9
+ const MyComponent = lazy(() => import('./MyComponent'))`,O0);return O0.default}else throw B._result}function h1(B){var I={_status:f4,_result:B},l={$$typeof:W,_payload:I,_init:Q6};{var r,O0;Object.defineProperties(l,{defaultProps:{configurable:!0,get:function(){return r},set:function(a0){F0("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=a0,Object.defineProperty(l,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return O0},set:function(a0){F0("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),O0=a0,Object.defineProperty(l,"propTypes",{enumerable:!0})}}})}return l}function A(B){{if(B!=null&&B.$$typeof===_)F0("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");else if(typeof B!=="function")F0("forwardRef requires a render function but was given %s.",B===null?"null":typeof B);else if(B.length!==0&&B.length!==2)F0("forwardRef render functions accept exactly two parameters: props and ref. %s",B.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined.");if(B!=null){if(B.defaultProps!=null||B.propTypes!=null)F0("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?")}}var I={$$typeof:T,render:B};{var l;Object.defineProperty(I,"displayName",{enumerable:!1,configurable:!0,get:function(){return l},set:function(r){if(l=r,!B.name&&!B.displayName)B.displayName=r}})}return I}var t=Symbol.for("react.module.reference");function Z0(B){if(typeof B==="string"||typeof B==="function")return!0;if(B===O||B===w||J0||B===H||B===F||B===v||B0||B===f||Y0||K0||q0)return!0;if(typeof B==="object"&&B!==null){if(B.$$typeof===W||B.$$typeof===_||B.$$typeof===L||B.$$typeof===M||B.$$typeof===T||B.$$typeof===t||B.getModuleId!==void 0)return!0}return!1}function P(B,I){if(!Z0(B))F0("memo: The first argument must be a component. Instead received: %s",B===null?"null":typeof B);var l={$$typeof:_,type:B,compare:I===void 0?null:I};{var r;Object.defineProperty(l,"displayName",{enumerable:!1,configurable:!0,get:function(){return r},set:function(O0){if(r=O0,!B.name&&!B.displayName)B.displayName=O0}})}return l}function u(){var B=C.current;if(B===null)F0(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
10
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
11
+ 2. You might be breaking the Rules of Hooks
12
+ 3. You might have more than one copy of React in the same app
13
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`);return B}function b0(B){var I=u();if(B._context!==void 0){var l=B._context;if(l.Consumer===B)F0("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");else if(l.Provider===B)F0("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return I.useContext(B)}function U0(B){var I=u();return I.useState(B)}function _0(B,I,l){var r=u();return r.useReducer(B,I,l)}function g0(B){var I=u();return I.useRef(B)}function f0(B,I){var l=u();return l.useEffect(B,I)}function Q0(B,I){var l=u();return l.useInsertionEffect(B,I)}function L0(B,I){var l=u();return l.useLayoutEffect(B,I)}function c0(B,I){var l=u();return l.useCallback(B,I)}function P1(B,I){var l=u();return l.useMemo(B,I)}function j1(B,I,l){var r=u();return r.useImperativeHandle(B,I,l)}function g4(B,I){{var l=u();return l.useDebugValue(B,I)}}function z5(){var B=u();return B.useTransition()}function N6(B){var I=u();return I.useDeferredValue(B)}function L1(){var B=u();return B.useId()}function K8(B,I,l){var r=u();return r.useSyncExternalStore(B,I,l)}var a5=0,I2,T2,f2,C2,S2,h2,V2;function k9(){}k9.__reactDisabledLog=!0;function KX(){{if(a5===0){I2=console.log,T2=console.info,f2=console.warn,C2=console.error,S2=console.group,h2=console.groupCollapsed,V2=console.groupEnd;var B={configurable:!0,enumerable:!0,value:k9,writable:!0};Object.defineProperties(console,{info:B,log:B,warn:B,error:B,group:B,groupCollapsed:B,groupEnd:B})}a5++}}function D2(){{if(a5--,a5===0){var B={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:x0({},B,{value:I2}),info:x0({},B,{value:T2}),warn:x0({},B,{value:f2}),error:x0({},B,{value:C2}),group:x0({},B,{value:S2}),groupCollapsed:x0({},B,{value:h2}),groupEnd:x0({},B,{value:V2})})}if(a5<0)F0("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var w7=v0.ReactCurrentDispatcher,B5;function g8(B,I,l){{if(B5===void 0)try{throw Error()}catch(O0){var r=O0.stack.trim().match(/\n( *(at )?)/);B5=r&&r[1]||""}return`
14
+ `+B5+B}}var E8=!1,U3;{var y2=typeof WeakMap==="function"?WeakMap:Map;U3=new y2}function I9(B,I){if(!B||E8)return"";{var l=U3.get(B);if(l!==void 0)return l}var r;E8=!0;var O0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var a0;a0=w7.current,w7.current=null,KX();try{if(I){var D0=function(){throw Error()};if(Object.defineProperty(D0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(D0,[])}catch(y1){r=y1}Reflect.construct(B,[],D0)}else{try{D0.call()}catch(y1){r=y1}B.call(D0.prototype)}}else{try{throw Error()}catch(y1){r=y1}B()}}catch(y1){if(y1&&r&&typeof y1.stack==="string"){var e0=y1.stack.split(`
15
+ `),F1=r.stack.split(`
16
+ `),o1=e0.length-1,H6=F1.length-1;while(o1>=1&&H6>=0&&e0[o1]!==F1[H6])H6--;for(;o1>=1&&H6>=0;o1--,H6--)if(e0[o1]!==F1[H6]){if(o1!==1||H6!==1)do if(o1--,H6--,H6<0||e0[o1]!==F1[H6]){var G6=`
17
+ `+e0[o1].replace(" at new "," at ");if(B.displayName&&G6.includes("<anonymous>"))G6=G6.replace("<anonymous>",B.displayName);if(typeof B==="function")U3.set(B,G6);return G6}while(o1>=1&&H6>=0);break}}}finally{E8=!1,w7.current=a0,D2(),Error.prepareStackTrace=O0}var w6=B?B.displayName||B.name:"",V6=w6?g8(w6):"";if(typeof B==="function")U3.set(B,V6);return V6}function m2(B,I,l){return I9(B,!1)}function UX(B){var I=B.prototype;return!!(I&&I.isReactComponent)}function c8(B,I,l){if(B==null)return"";if(typeof B==="function")return I9(B,UX(B));if(typeof B==="string")return g8(B);switch(B){case F:return g8("Suspense");case v:return g8("SuspenseList")}if(typeof B==="object")switch(B.$$typeof){case T:return m2(B.render);case _:return c8(B.type,I,l);case W:{var r=B,O0=r._payload,a0=r._init;try{return c8(a0(O0),I,l)}catch(D0){}}}return""}var T9={},u2=v0.ReactDebugCurrentFrame;function q3(B){if(B){var I=B._owner,l=c8(B.type,B._source,I?I.type:null);u2.setExtraStackFrame(l)}else u2.setExtraStackFrame(null)}function f9(B,I,l,r,O0){{var a0=Function.call.bind(v6);for(var D0 in B)if(a0(B,D0)){var e0=void 0;try{if(typeof B[D0]!=="function"){var F1=Error((r||"React class")+": "+l+" type `"+D0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof B[D0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw F1.name="Invariant Violation",F1}e0=B[D0](I,D0,r,l,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(o1){e0=o1}if(e0&&!(e0 instanceof Error))q3(O0),F0("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",l,D0,typeof e0),q3(null);if(e0 instanceof Error&&!(e0.message in T9))T9[e0.message]=!0,q3(O0),F0("Failed %s type: %s",l,e0.message),q3(null)}}}function S1(B){if(B){var I=B._owner,l=c8(B.type,B._source,I?I.type:null);H0(l)}else H0(null)}var C9=!1;function g2(){if(o.current){var B=_6(o.current.type);if(B)return`
18
+
19
+ Check the render method of \``+B+"`."}return""}function G1(B){if(B!==void 0){var I=B.fileName.replace(/^.*[\\\/]/,""),l=B.lineNumber;return`
20
+
21
+ Check your code at `+I+":"+l+"."}return""}function S9(B){if(B!==null&&B!==void 0)return G1(B.__source);return""}var C4={};function R7(B){var I=g2();if(!I){var l=typeof B==="string"?B:B.displayName||B.name;if(l)I=`
22
+
23
+ Check the top-level render call using <`+l+">."}return I}function d8(B,I){if(!B._store||B._store.validated||B.key!=null)return;B._store.validated=!0;var l=R7(I);if(C4[l])return;C4[l]=!0;var r="";if(B&&B._owner&&B._owner!==o.current)r=" It was passed a child from "+_6(B._owner.type)+".";S1(B),F0('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',l,r),S1(null)}function h9(B,I){if(typeof B!=="object")return;if(J6(B))for(var l=0;l<B.length;l++){var r=B[l];if(i0(r))d8(r,I)}else if(i0(B)){if(B._store)B._store.validated=!0}else if(B){var O0=S(B);if(typeof O0==="function"){if(O0!==B.entries){var a0=O0.call(B),D0;while(!(D0=a0.next()).done)if(i0(D0.value))d8(D0.value,I)}}}}function $4(B){{var I=B.type;if(I===null||I===void 0||typeof I==="string")return;var l;if(typeof I==="function")l=I.propTypes;else if(typeof I==="object"&&(I.$$typeof===T||I.$$typeof===_))l=I.propTypes;else return;if(l){var r=_6(I);f9(l,B.props,"prop",r,B)}else if(I.PropTypes!==void 0&&!C9){C9=!0;var O0=_6(I);F0("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",O0||"Unknown")}if(typeof I.getDefaultProps==="function"&&!I.getDefaultProps.isReactClassApproved)F0("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function C6(B){{var I=Object.keys(B.props);for(var l=0;l<I.length;l++){var r=I[l];if(r!=="children"&&r!=="key"){S1(B),F0("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),S1(null);break}}if(B.ref!==null)S1(B),F0("Invalid attribute `ref` supplied to `React.Fragment`."),S1(null)}}function V9(B,I,l){var r=Z0(B);if(!r){var O0="";if(B===void 0||typeof B==="object"&&B!==null&&Object.keys(B).length===0)O0+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var a0=S9(I);if(a0)O0+=a0;else O0+=g2();var D0;if(B===null)D0="null";else if(J6(B))D0="array";else if(B!==void 0&&B.$$typeof===G)D0="<"+(_6(B.type)||"Unknown")+" />",O0=" Did you accidentally export a JSX literal instead of a component?";else D0=typeof B;F0("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",D0,O0)}var e0=p6.apply(this,arguments);if(e0==null)return e0;if(r)for(var F1=2;F1<arguments.length;F1++)h9(arguments[F1],B);if(B===O)C6(e0);else $4(e0);return e0}var Q5=!1;function o4(B){var I=V9.bind(null,B);I.type=B;{if(!Q5)Q5=!0,m0("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");Object.defineProperty(I,"type",{enumerable:!1,get:function(){return m0("Factory.type is deprecated. Access the class directly before passing it to createFactory."),Object.defineProperty(this,"type",{value:B}),B}})}return I}function r5(B,I,l){var r=d0.apply(this,arguments);for(var O0=2;O0<arguments.length;O0++)h9(arguments[O0],r.type);return $4(r),r}function qX(B,I){var l=i.transition;i.transition={};var r=i.transition;i.transition._updatedFibers=new Set;try{B()}finally{if(i.transition=l,l===null&&r._updatedFibers){var O0=r._updatedFibers.size;if(O0>10)m0("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");r._updatedFibers.clear()}}}var B3=!1,P7=null;function D9(B){if(P7===null)try{var I=("require"+Math.random()).slice(0,7),l=pQ&&pQ[I];P7=l.call(pQ,"timers").setImmediate}catch(r){P7=function(O0){if(B3===!1){if(B3=!0,typeof MessageChannel>"u")F0("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.")}var a0=new MessageChannel;a0.port1.onmessage=O0,a0.port2.postMessage(void 0)}}return P7(B)}var l8=0,y9=!1;function m9(B){{var I=l8;if(l8++,j.current===null)j.current=[];var l=j.isBatchingLegacy,r;try{if(j.isBatchingLegacy=!0,r=B(),!l&&j.didScheduleLegacyUpdate){var O0=j.current;if(O0!==null)j.didScheduleLegacyUpdate=!1,L3(O0)}}catch(w6){throw U8(I),w6}finally{j.isBatchingLegacy=l}if(r!==null&&typeof r==="object"&&typeof r.then==="function"){var a0=r,D0=!1,e0={then:function(w6,V6){D0=!0,a0.then(function(y1){if(U8(I),l8===0)O3(y1,w6,V6);else w6(y1)},function(y1){U8(I),V6(y1)})}};if(!y9&&typeof Promise<"u")Promise.resolve().then(function(){}).then(function(){if(!D0)y9=!0,F0("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);")});return e0}else{var F1=r;if(U8(I),l8===0){var o1=j.current;if(o1!==null)L3(o1),j.current=null;var H6={then:function(w6,V6){if(j.current===null)j.current=[],O3(F1,w6,V6);else w6(F1)}};return H6}else{var G6={then:function(w6,V6){w6(F1)}};return G6}}}}function U8(B){{if(B!==l8-1)F0("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");l8=B}}function O3(B,I,l){{var r=j.current;if(r!==null)try{L3(r),D9(function(){if(r.length===0)j.current=null,I(B);else O3(B,I,l)})}catch(O0){l(O0)}else I(B)}}var p8=!1;function L3(B){if(!p8){p8=!0;var I=0;try{for(;I<B.length;I++){var l=B[I];do l=l(!0);while(l!==null)}B.length=0}catch(r){throw B=B.slice(I+1),r}finally{p8=!1}}}var u9=V9,g9=r5,E9=o4,c9={map:Y4,forEach:j5,count:u4,toArray:T5,only:o5};if(Lv.Children=c9,Lv.Component=n,Lv.Fragment=O,Lv.Profiler=w,Lv.PureComponent=t0,Lv.StrictMode=H,Lv.Suspense=F,Lv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=v0,Lv.act=m9,Lv.cloneElement=g9,Lv.createContext=q5,Lv.createElement=u9,Lv.createFactory=E9,Lv.createRef=O1,Lv.forwardRef=A,Lv.isValidElement=i0,Lv.lazy=h1,Lv.memo=P,Lv.startTransition=qX,Lv.unstable_act=m9,Lv.useCallback=c0,Lv.useContext=b0,Lv.useDebugValue=g4,Lv.useDeferredValue=N6,Lv.useEffect=f0,Lv.useId=L1,Lv.useImperativeHandle=j1,Lv.useInsertionEffect=Q0,Lv.useLayoutEffect=L0,Lv.useMemo=P1,Lv.useReducer=_0,Lv.useRef=g0,Lv.useState=U0,Lv.useSyncExternalStore=K8,Lv.useTransition=z5,Lv.version=Y,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var eq=b3((Nv)=>{(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=!1,G=!1,q=5;function O(N0,d0){var i0=N0.length;N0.push(d0),L(N0,d0,i0)}function H(N0){return N0.length===0?null:N0[0]}function w(N0){if(N0.length===0)return null;var d0=N0[0],i0=N0.pop();if(i0!==d0)N0[0]=i0,M(N0,i0,0);return d0}function L(N0,d0,i0){var T1=i0;while(T1>0){var x1=T1-1>>>1,F6=N0[x1];if(T(F6,d0)>0)N0[x1]=d0,N0[T1]=F6,T1=x1;else return}}function M(N0,d0,i0){var T1=i0,x1=N0.length,F6=x1>>>1;while(T1<F6){var e1=(T1+1)*2-1,c6=N0[e1],H1=e1+1,Z1=N0[H1];if(T(c6,d0)<0)if(H1<x1&&T(Z1,c6)<0)N0[T1]=Z1,N0[H1]=d0,T1=H1;else N0[T1]=c6,N0[e1]=d0,T1=e1;else if(H1<x1&&T(Z1,d0)<0)N0[T1]=Z1,N0[H1]=d0,T1=H1;else return}}function T(N0,d0){var i0=N0.sortIndex-d0.sortIndex;return i0!==0?i0:N0.id-d0.id}var F=1,v=2,_=3,W=4,f=5;function h(N0,d0){}var k=typeof performance==="object"&&typeof performance.now==="function";if(k){var S=performance;Nv.unstable_now=function(){return S.now()}}else{var C=Date,i=C.now();Nv.unstable_now=function(){return C.now()-i}}var j=1073741823,o=-1,z0=250,V=5000,H0=1e4,Y0=j,K0=[],q0=[],B0=1,J0=null,v0=_,m0=!1,F0=!1,B1=!1,s1=typeof setTimeout==="function"?setTimeout:null,E1=typeof clearTimeout==="function"?clearTimeout:null,p1=typeof setImmediate<"u"?setImmediate:null,x0=typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0?navigator.scheduling.isInputPending.bind(navigator.scheduling):null;function U1(N0){var d0=H(q0);while(d0!==null){if(d0.callback===null)w(q0);else if(d0.startTime<=N0)w(q0),d0.sortIndex=d0.expirationTime,O(K0,d0);else return;d0=H(q0)}}function n(N0){if(B1=!1,U1(N0),!F0)if(H(K0)!==null)F0=!0,M6(S0);else{var d0=H(q0);if(d0!==null)J4(n,d0.startTime-N0)}}function S0(N0,d0){if(F0=!1,B1)B1=!1,T4();m0=!0;var i0=v0;try{if(G)try{return u0(N0,d0)}catch(x1){if(J0!==null){var T1=Nv.unstable_now();h(J0,T1),J0.isQueued=!1}throw x1}else return u0(N0,d0)}finally{J0=null,v0=i0,m0=!1}}function u0(N0,d0){var i0=d0;U1(i0),J0=H(K0);while(J0!==null&&!Y){if(J0.expirationTime>i0&&(!N0||v6()))break;var T1=J0.callback;if(typeof T1==="function"){J0.callback=null,v0=J0.priorityLevel;var x1=J0.expirationTime<=i0,F6=T1(x1);if(i0=Nv.unstable_now(),typeof F6==="function")J0.callback=F6;else if(J0===H(K0))w(K0);U1(i0)}else w(K0);J0=H(K0)}if(J0!==null)return!0;else{var e1=H(q0);if(e1!==null)J4(n,e1.startTime-i0);return!1}}function s0(N0,d0){switch(N0){case F:case v:case _:case W:case f:break;default:N0=_}var i0=v0;v0=N0;try{return d0()}finally{v0=i0}}function R0(N0){var d0;switch(v0){case F:case v:case _:d0=_;break;default:d0=v0;break}var i0=v0;v0=d0;try{return N0()}finally{v0=i0}}function t0(N0){var d0=v0;return function(){var i0=v0;v0=d0;try{return N0.apply(this,arguments)}finally{v0=i0}}}function $1(N0,d0,i0){var T1=Nv.unstable_now(),x1;if(typeof i0==="object"&&i0!==null){var F6=i0.delay;if(typeof F6==="number"&&F6>0)x1=T1+F6;else x1=T1}else x1=T1;var e1;switch(N0){case F:e1=o;break;case v:e1=z0;break;case f:e1=Y0;break;case W:e1=H0;break;case _:default:e1=V;break}var c6=x1+e1,H1={id:B0++,callback:d0,priorityLevel:N0,startTime:x1,expirationTime:c6,sortIndex:-1};if(x1>T1){if(H1.sortIndex=x1,O(q0,H1),H(K0)===null&&H1===H(q0)){if(B1)T4();else B1=!0;J4(n,x1-T1)}}else if(H1.sortIndex=c6,O(K0,H1),!F0&&!m0)F0=!0,M6(S0);return H1}function O1(){}function f6(){if(!F0&&!m0)F0=!0,M6(S0)}function J6(){return H(K0)}function u6(N0){N0.callback=null}function g6(){return v0}var z6=!1,X1=null,l6=-1,E6=q,_6=-1;function v6(){var N0=Nv.unstable_now()-_6;if(N0<E6)return!1;return!0}function I5(){}function Y6(N0){if(N0<0||N0>125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}if(N0>0)E6=Math.floor(1000/N0);else E6=q}var O4=function(){if(X1!==null){var N0=Nv.unstable_now();_6=N0;var d0=!0,i0=!0;try{i0=X1(d0,N0)}finally{if(i0)$6();else z6=!1,X1=null}}else z6=!1},$6;if(typeof p1==="function")$6=function(){p1(O4)};else if(typeof MessageChannel<"u"){var L4=new MessageChannel,L6=L4.port2;L4.port1.onmessage=O4,$6=function(){L6.postMessage(null)}}else $6=function(){s1(O4,0)};function M6(N0){if(X1=N0,!z6)z6=!0,$6()}function J4(N0,d0){l6=s1(function(){N0(Nv.unstable_now())},d0)}function T4(){E1(l6),l6=-1}var h6=I5,p6=null;if(Nv.unstable_IdlePriority=f,Nv.unstable_ImmediatePriority=F,Nv.unstable_LowPriority=W,Nv.unstable_NormalPriority=_,Nv.unstable_Profiling=p6,Nv.unstable_UserBlockingPriority=v,Nv.unstable_cancelCallback=u6,Nv.unstable_continueExecution=f6,Nv.unstable_forceFrameRate=Y6,Nv.unstable_getCurrentPriorityLevel=g6,Nv.unstable_getFirstCallbackNode=J6,Nv.unstable_next=R0,Nv.unstable_pauseExecution=O1,Nv.unstable_requestPaint=h6,Nv.unstable_runWithPriority=s0,Nv.unstable_scheduleCallback=$1,Nv.unstable_shouldYield=v6,Nv.unstable_wrapCallback=t0,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var bB=b3((Wv)=>{var W9=X0(v1()),t1=X0(eq());(function(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Y=W9.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,G=!1;function q(b){G=b}function O(b){if(!G){for(var z=arguments.length,Q=Array(z>1?z-1:0),X=1;X<z;X++)Q[X-1]=arguments[X];w("warn",b,Q)}}function H(b){if(!G){for(var z=arguments.length,Q=Array(z>1?z-1:0),X=1;X<z;X++)Q[X-1]=arguments[X];w("error",b,Q)}}function w(b,z,Q){{var X=Y.ReactDebugCurrentFrame,Z=X.getStackAddendum();if(Z!=="")z+="%s",Q=Q.concat([Z]);var J=Q.map(function($){return String($)});J.unshift("Warning: "+z),Function.prototype.apply.call(console[b],console,J)}}var L=0,M=1,T=2,F=3,v=4,_=5,W=6,f=7,h=8,k=9,S=10,C=11,i=12,j=13,o=14,z0=15,V=16,H0=17,Y0=18,K0=19,q0=21,B0=22,J0=23,v0=24,m0=25,F0=!0,B1=!1,s1=!1,E1=!1,p1=!1,x0=!0,U1=!1,n=!0,S0=!0,u0=!0,s0=!0,R0=new Set,t0={},$1={};function O1(b,z){f6(b,z),f6(b+"Capture",z)}function f6(b,z){if(t0[b])H("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",b);t0[b]=z;{var Q=b.toLowerCase();if($1[Q]=b,b==="onDoubleClick")$1.ondblclick=b}for(var X=0;X<z.length;X++)R0.add(z[X])}var J6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",u6=Object.prototype.hasOwnProperty;function g6(b){{var z=typeof Symbol==="function"&&Symbol.toStringTag,Q=z&&b[Symbol.toStringTag]||b.constructor.name||"Object";return Q}}function z6(b){try{return X1(b),!1}catch(z){return!0}}function X1(b){return""+b}function l6(b,z){if(z6(b))return H("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.",z,g6(b)),X1(b)}function E6(b){if(z6(b))return H("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",g6(b)),X1(b)}function _6(b,z){if(z6(b))return H("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.",z,g6(b)),X1(b)}function v6(b,z){if(z6(b))return H("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.",z,g6(b)),X1(b)}function I5(b){if(z6(b))return H("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.",g6(b)),X1(b)}function Y6(b){if(z6(b))return H("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.",g6(b)),X1(b)}var O4=0,$6=1,L4=2,L6=3,M6=4,J4=5,T4=6,h6=":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",p6=h6+"\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",N0=new RegExp("^["+h6+"]["+p6+"]*$"),d0={},i0={};function T1(b){if(u6.call(i0,b))return!0;if(u6.call(d0,b))return!1;if(N0.test(b))return i0[b]=!0,!0;return d0[b]=!0,H("Invalid attribute name: `%s`",b),!1}function x1(b,z,Q){if(z!==null)return z.type===O4;if(Q)return!1;if(b.length>2&&(b[0]==="o"||b[0]==="O")&&(b[1]==="n"||b[1]==="N"))return!0;return!1}function F6(b,z,Q,X){if(Q!==null&&Q.type===O4)return!1;switch(typeof z){case"function":case"symbol":return!0;case"boolean":{if(X)return!1;if(Q!==null)return!Q.acceptsBooleans;else{var Z=b.toLowerCase().slice(0,5);return Z!=="data-"&&Z!=="aria-"}}default:return!1}}function e1(b,z,Q,X){if(z===null||typeof z>"u")return!0;if(F6(b,z,Q,X))return!0;if(X)return!1;if(Q!==null)switch(Q.type){case L6:return!z;case M6:return z===!1;case J4:return isNaN(z);case T4:return isNaN(z)||z<1}return!1}function c6(b){return Z1.hasOwnProperty(b)?Z1[b]:null}function H1(b,z,Q,X,Z,J,$){this.acceptsBooleans=z===L4||z===L6||z===M6,this.attributeName=X,this.attributeNamespace=Z,this.mustUseProperty=Q,this.propertyName=b,this.type=z,this.sanitizeURL=J,this.removeEmptyString=$}var Z1={},m4=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];m4.forEach(function(b){Z1[b]=new H1(b,O4,!1,b,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(b){var z=b[0],Q=b[1];Z1[z]=new H1(z,$6,!1,Q,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(b){Z1[b]=new H1(b,L4,!1,b.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(b){Z1[b]=new H1(b,L4,!1,b,null,!1,!1)}),["allowFullScreen","async","autoFocus","autoPlay","controls","default","defer","disabled","disablePictureInPicture","disableRemotePlayback","formNoValidate","hidden","loop","noModule","noValidate","open","playsInline","readOnly","required","reversed","scoped","seamless","itemScope"].forEach(function(b){Z1[b]=new H1(b,L6,!1,b.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(b){Z1[b]=new H1(b,L6,!0,b,null,!1,!1)}),["capture","download"].forEach(function(b){Z1[b]=new H1(b,M6,!1,b,null,!1,!1)}),["cols","rows","size","span"].forEach(function(b){Z1[b]=new H1(b,T4,!1,b,null,!1,!1)}),["rowSpan","start"].forEach(function(b){Z1[b]=new H1(b,J4,!1,b.toLowerCase(),null,!1,!1)});var Y4=/[\-\:]([a-z])/g,u4=function(b){return b[1].toUpperCase()};["accent-height","alignment-baseline","arabic-form","baseline-shift","cap-height","clip-path","clip-rule","color-interpolation","color-interpolation-filters","color-profile","color-rendering","dominant-baseline","enable-background","fill-opacity","fill-rule","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","glyph-name","glyph-orientation-horizontal","glyph-orientation-vertical","horiz-adv-x","horiz-origin-x","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","overline-position","overline-thickness","paint-order","panose-1","pointer-events","rendering-intent","shape-rendering","stop-color","stop-opacity","strikethrough-position","strikethrough-thickness","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-rendering","underline-position","underline-thickness","unicode-bidi","unicode-range","units-per-em","v-alphabetic","v-hanging","v-ideographic","v-mathematical","vector-effect","vert-adv-y","vert-origin-x","vert-origin-y","word-spacing","writing-mode","xmlns:xlink","x-height"].forEach(function(b){var z=b.replace(Y4,u4);Z1[z]=new H1(z,$6,!1,b,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(b){var z=b.replace(Y4,u4);Z1[z]=new H1(z,$6,!1,b,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(b){var z=b.replace(Y4,u4);Z1[z]=new H1(z,$6,!1,b,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(b){Z1[b]=new H1(b,$6,!1,b.toLowerCase(),null,!1,!1)});var j5="xlinkHref";Z1[j5]=new H1("xlinkHref",$6,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(b){Z1[b]=new H1(b,$6,!1,b.toLowerCase(),null,!0,!0)});var T5=/^[\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,o5=!1;function q5(b){if(!o5&&T5.test(b))o5=!0,H("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(b))}function f4(b,z,Q,X){if(X.mustUseProperty){var Z=X.propertyName;return b[Z]}else{if(l6(Q,z),X.sanitizeURL)q5(""+Q);var J=X.attributeName,$=null;if(X.type===M6){if(b.hasAttribute(J)){var K=b.getAttribute(J);if(K==="")return!0;if(e1(z,Q,X,!1))return K;if(K===""+Q)return Q;return K}}else if(b.hasAttribute(J)){if(e1(z,Q,X,!1))return b.getAttribute(J);if(X.type===L6)return Q;$=b.getAttribute(J)}if(e1(z,Q,X,!1))return $===null?Q:$;else if($===""+Q)return Q;else return $}}function f5(b,z,Q,X){{if(!T1(z))return;if(!b.hasAttribute(z))return Q===void 0?void 0:null;var Z=b.getAttribute(z);if(l6(Q,z),Z===""+Q)return Q;return Z}}function R1(b,z,Q,X){var Z=c6(z);if(x1(z,Z,X))return;if(e1(z,Q,Z,X))Q=null;if(X||Z===null){if(T1(z)){var J=z;if(Q===null)b.removeAttribute(J);else l6(Q,z),b.setAttribute(J,""+Q)}return}var $=Z.mustUseProperty;if($){var K=Z.propertyName;if(Q===null){var U=Z.type;b[K]=U===L6?!1:""}else b[K]=Q;return}var{attributeName:N,attributeNamespace:R}=Z;if(Q===null)b.removeAttribute(N);else{var y=Z.type,D;if(y===L6||y===M6&&Q===!0)D="";else if(l6(Q,N),D=""+Q,Z.sanitizeURL)q5(D.toString());if(R)b.setAttributeNS(R,N,D);else b.setAttribute(N,D)}}var i1=Symbol.for("react.element"),Q6=Symbol.for("react.portal"),h1=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),t=Symbol.for("react.profiler"),Z0=Symbol.for("react.provider"),P=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),b0=Symbol.for("react.suspense"),U0=Symbol.for("react.suspense_list"),_0=Symbol.for("react.memo"),g0=Symbol.for("react.lazy"),f0=Symbol.for("react.scope"),Q0=Symbol.for("react.debug_trace_mode"),L0=Symbol.for("react.offscreen"),c0=Symbol.for("react.legacy_hidden"),P1=Symbol.for("react.cache"),j1=Symbol.for("react.tracing_marker"),g4=Symbol.iterator,z5="@@iterator";function N6(b){if(b===null||typeof b!=="object")return null;var z=g4&&b[g4]||b[z5];if(typeof z==="function")return z;return null}var L1=Object.assign,K8=0,a5,I2,T2,f2,C2,S2,h2;function V2(){}V2.__reactDisabledLog=!0;function k9(){{if(K8===0){a5=console.log,I2=console.info,T2=console.warn,f2=console.error,C2=console.group,S2=console.groupCollapsed,h2=console.groupEnd;var b={configurable:!0,enumerable:!0,value:V2,writable:!0};Object.defineProperties(console,{info:b,log:b,warn:b,error:b,group:b,groupCollapsed:b,groupEnd:b})}K8++}}function KX(){{if(K8--,K8===0){var b={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:L1({},b,{value:a5}),info:L1({},b,{value:I2}),warn:L1({},b,{value:T2}),error:L1({},b,{value:f2}),group:L1({},b,{value:C2}),groupCollapsed:L1({},b,{value:S2}),groupEnd:L1({},b,{value:h2})})}if(K8<0)H("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var D2=Y.ReactCurrentDispatcher,w7;function B5(b,z,Q){{if(w7===void 0)try{throw Error()}catch(Z){var X=Z.stack.trim().match(/\n( *(at )?)/);w7=X&&X[1]||""}return`
24
+ `+w7+b}}var g8=!1,E8;{var U3=typeof WeakMap==="function"?WeakMap:Map;E8=new U3}function y2(b,z){if(!b||g8)return"";{var Q=E8.get(b);if(Q!==void 0)return Q}var X;g8=!0;var Z=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var J;J=D2.current,D2.current=null,k9();try{if(z){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(x){X=x}Reflect.construct(b,[],$)}else{try{$.call()}catch(x){X=x}b.call($.prototype)}}else{try{throw Error()}catch(x){X=x}b()}}catch(x){if(x&&X&&typeof x.stack==="string"){var K=x.stack.split(`
25
+ `),U=X.stack.split(`
26
+ `),N=K.length-1,R=U.length-1;while(N>=1&&R>=0&&K[N]!==U[R])R--;for(;N>=1&&R>=0;N--,R--)if(K[N]!==U[R]){if(N!==1||R!==1)do if(N--,R--,R<0||K[N]!==U[R]){var y=`
27
+ `+K[N].replace(" at new "," at ");if(b.displayName&&y.includes("<anonymous>"))y=y.replace("<anonymous>",b.displayName);if(typeof b==="function")E8.set(b,y);return y}while(N>=1&&R>=0);break}}}finally{g8=!1,D2.current=J,KX(),Error.prepareStackTrace=Z}var D=b?b.displayName||b.name:"",p=D?B5(D):"";if(typeof b==="function")E8.set(b,p);return p}function I9(b,z,Q){return y2(b,!0)}function m2(b,z,Q){return y2(b,!1)}function UX(b){var z=b.prototype;return!!(z&&z.isReactComponent)}function c8(b,z,Q){if(b==null)return"";if(typeof b==="function")return y2(b,UX(b));if(typeof b==="string")return B5(b);switch(b){case b0:return B5("Suspense");case U0:return B5("SuspenseList")}if(typeof b==="object")switch(b.$$typeof){case u:return m2(b.render);case _0:return c8(b.type,z,Q);case g0:{var X=b,Z=X._payload,J=X._init;try{return c8(J(Z),z,Q)}catch($){}}}return""}function T9(b){var z=b._debugOwner?b._debugOwner.type:null,Q=b._debugSource;switch(b.tag){case _:return B5(b.type);case V:return B5("Lazy");case j:return B5("Suspense");case K0:return B5("SuspenseList");case L:case T:case z0:return m2(b.type);case C:return m2(b.type.render);case M:return I9(b.type);default:return""}}function u2(b){try{var z="",Q=b;do z+=T9(Q),Q=Q.return;while(Q);return z}catch(X){return`
28
+ Error generating stack: `+X.message+`
29
+ `+X.stack}}function q3(b,z,Q){var X=b.displayName;if(X)return X;var Z=z.displayName||z.name||"";return Z!==""?Q+"("+Z+")":Q}function f9(b){return b.displayName||"Context"}function S1(b){if(b==null)return null;if(typeof b.tag==="number")H("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof b==="function")return b.displayName||b.name||null;if(typeof b==="string")return b;switch(b){case h1:return"Fragment";case Q6:return"Portal";case t:return"Profiler";case A:return"StrictMode";case b0:return"Suspense";case U0:return"SuspenseList"}if(typeof b==="object")switch(b.$$typeof){case P:var z=b;return f9(z)+".Consumer";case Z0:var Q=b;return f9(Q._context)+".Provider";case u:return q3(b,b.render,"ForwardRef");case _0:var X=b.displayName||null;if(X!==null)return X;return S1(b.type)||"Memo";case g0:{var Z=b,J=Z._payload,$=Z._init;try{return S1($(J))}catch(K){return null}}}return null}function C9(b,z,Q){var X=z.displayName||z.name||"";return b.displayName||(X!==""?Q+"("+X+")":Q)}function g2(b){return b.displayName||"Context"}function G1(b){var{tag:z,type:Q}=b;switch(z){case v0:return"Cache";case k:var X=Q;return g2(X)+".Consumer";case S:var Z=Q;return g2(Z._context)+".Provider";case Y0:return"DehydratedFragment";case C:return C9(Q,Q.render,"ForwardRef");case f:return"Fragment";case _:return Q;case v:return"Portal";case F:return"Root";case W:return"Text";case V:return S1(Q);case h:if(Q===A)return"StrictMode";return"Mode";case B0:return"Offscreen";case i:return"Profiler";case q0:return"Scope";case j:return"Suspense";case K0:return"SuspenseList";case m0:return"TracingMarker";case M:case L:case H0:case T:case o:case z0:if(typeof Q==="function")return Q.displayName||Q.name||null;if(typeof Q==="string")return Q;break}return null}var S9=Y.ReactDebugCurrentFrame,C4=null,R7=!1;function d8(){{if(C4===null)return null;var b=C4._debugOwner;if(b!==null&&typeof b<"u")return G1(b)}return null}function h9(){{if(C4===null)return"";return u2(C4)}}function $4(){S9.getCurrentStack=null,C4=null,R7=!1}function C6(b){S9.getCurrentStack=b===null?null:h9,C4=b,R7=!1}function V9(){return C4}function Q5(b){R7=b}function o4(b){return""+b}function r5(b){switch(typeof b){case"boolean":case"number":case"string":case"undefined":return b;case"object":return Y6(b),b;default:return""}}var qX={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0};function B3(b,z){{if(!(qX[z.type]||z.onChange||z.onInput||z.readOnly||z.disabled||z.value==null))H("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.");if(!(z.onChange||z.readOnly||z.disabled||z.checked==null))H("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}}function P7(b){var{type:z,nodeName:Q}=b;return Q&&Q.toLowerCase()==="input"&&(z==="checkbox"||z==="radio")}function D9(b){return b._valueTracker}function l8(b){b._valueTracker=null}function y9(b){var z="";if(!b)return z;if(P7(b))z=b.checked?"true":"false";else z=b.value;return z}function m9(b){var z=P7(b)?"checked":"value",Q=Object.getOwnPropertyDescriptor(b.constructor.prototype,z);Y6(b[z]);var X=""+b[z];if(b.hasOwnProperty(z)||typeof Q>"u"||typeof Q.get!=="function"||typeof Q.set!=="function")return;var{get:Z,set:J}=Q;Object.defineProperty(b,z,{configurable:!0,get:function(){return Z.call(this)},set:function(K){Y6(K),X=""+K,J.call(this,K)}}),Object.defineProperty(b,z,{enumerable:Q.enumerable});var $={getValue:function(){return X},setValue:function(K){Y6(K),X=""+K},stopTracking:function(){l8(b),delete b[z]}};return $}function U8(b){if(D9(b))return;b._valueTracker=m9(b)}function O3(b){if(!b)return!1;var z=D9(b);if(!z)return!0;var Q=z.getValue(),X=y9(b);if(X!==Q)return z.setValue(X),!0;return!1}function p8(b){if(b=b||(typeof document<"u"?document:void 0),typeof b>"u")return null;try{return b.activeElement||b.body}catch(z){return b.body}}var L3=!1,u9=!1,g9=!1,E9=!1;function c9(b){var z=b.type==="checkbox"||b.type==="radio";return z?b.checked!=null:b.value!=null}function B(b,z){var Q=b,X=z.checked,Z=L1({},z,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:X!=null?X:Q._wrapperState.initialChecked});return Z}function I(b,z){{if(B3("input",z),z.checked!==void 0&&z.defaultChecked!==void 0&&!u9)H("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",d8()||"A component",z.type),u9=!0;if(z.value!==void 0&&z.defaultValue!==void 0&&!L3)H("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components",d8()||"A component",z.type),L3=!0}var Q=b,X=z.defaultValue==null?"":z.defaultValue;Q._wrapperState={initialChecked:z.checked!=null?z.checked:z.defaultChecked,initialValue:r5(z.value!=null?z.value:X),controlled:c9(z)}}function l(b,z){var Q=b,X=z.checked;if(X!=null)R1(Q,"checked",X,!1)}function r(b,z){var Q=b;{var X=c9(z);if(!Q._wrapperState.controlled&&X&&!E9)H("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),E9=!0;if(Q._wrapperState.controlled&&!X&&!g9)H("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components"),g9=!0}l(b,z);var Z=r5(z.value),J=z.type;if(Z!=null){if(J==="number"){if(Z===0&&Q.value===""||Q.value!=Z)Q.value=o4(Z)}else if(Q.value!==o4(Z))Q.value=o4(Z)}else if(J==="submit"||J==="reset"){Q.removeAttribute("value");return}if(z.hasOwnProperty("value"))e0(Q,z.type,Z);else if(z.hasOwnProperty("defaultValue"))e0(Q,z.type,r5(z.defaultValue));if(z.checked==null&&z.defaultChecked!=null)Q.defaultChecked=!!z.defaultChecked}function O0(b,z,Q){var X=b;if(z.hasOwnProperty("value")||z.hasOwnProperty("defaultValue")){var Z=z.type,J=Z==="submit"||Z==="reset";if(J&&(z.value===void 0||z.value===null))return;var $=o4(X._wrapperState.initialValue);if(!Q){if($!==X.value)X.value=$}X.defaultValue=$}var K=X.name;if(K!=="")X.name="";if(X.defaultChecked=!X.defaultChecked,X.defaultChecked=!!X._wrapperState.initialChecked,K!=="")X.name=K}function a0(b,z){var Q=b;r(Q,z),D0(Q,z)}function D0(b,z){var Q=z.name;if(z.type==="radio"&&Q!=null){var X=b;while(X.parentNode)X=X.parentNode;l6(Q,"name");var Z=X.querySelectorAll("input[name="+JSON.stringify(""+Q)+'][type="radio"]');for(var J=0;J<Z.length;J++){var $=Z[J];if($===b||$.form!==b.form)continue;var K=Iz($);if(!K)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");O3($),r($,K)}}}function e0(b,z,Q){if(z!=="number"||p8(b.ownerDocument)!==b){if(Q==null)b.defaultValue=o4(b._wrapperState.initialValue);else if(b.defaultValue!==o4(Q))b.defaultValue=o4(Q)}}var F1=!1,o1=!1,H6=!1;function G6(b,z){{if(z.value==null){if(typeof z.children==="object"&&z.children!==null)W9.Children.forEach(z.children,function(Q){if(Q==null)return;if(typeof Q==="string"||typeof Q==="number")return;if(!o1)o1=!0,H("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.")});else if(z.dangerouslySetInnerHTML!=null){if(!H6)H6=!0,H("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.")}}if(z.selected!=null&&!F1)H("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),F1=!0}}function w6(b,z){if(z.value!=null)b.setAttribute("value",o4(r5(z.value)))}var V6=Array.isArray;function y1(b){return V6(b)}var v7=!1;function N3(){var b=d8();if(b)return`
30
+
31
+ Check the render method of \``+b+"`.";return""}var E2=["value","defaultValue"];function BX(b){{B3("select",b);for(var z=0;z<E2.length;z++){var Q=E2[z];if(b[Q]==null)continue;var X=y1(b[Q]);if(b.multiple&&!X)H("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",Q,N3());else if(!b.multiple&&X)H("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",Q,N3())}}}function q8(b,z,Q,X){var Z=b.options;if(z){var J=Q,$={};for(var K=0;K<J.length;K++)$["$"+J[K]]=!0;for(var U=0;U<Z.length;U++){var N=$.hasOwnProperty("$"+Z[U].value);if(Z[U].selected!==N)Z[U].selected=N;if(N&&X)Z[U].defaultSelected=!0}}else{var R=o4(r5(Q)),y=null;for(var D=0;D<Z.length;D++){if(Z[D].value===R){if(Z[D].selected=!0,X)Z[D].defaultSelected=!0;return}if(y===null&&!Z[D].disabled)y=Z[D]}if(y!==null)y.selected=!0}}function c2(b,z){return L1({},z,{value:void 0})}function d2(b,z){var Q=b;if(BX(z),Q._wrapperState={wasMultiple:!!z.multiple},z.value!==void 0&&z.defaultValue!==void 0&&!v7)H("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components"),v7=!0}function OX(b,z){var Q=b;Q.multiple=!!z.multiple;var X=z.value;if(X!=null)q8(Q,!!z.multiple,X,!1);else if(z.defaultValue!=null)q8(Q,!!z.multiple,z.defaultValue,!0)}function iB(b,z){var Q=b,X=Q._wrapperState.wasMultiple;Q._wrapperState.wasMultiple=!!z.multiple;var Z=z.value;if(Z!=null)q8(Q,!!z.multiple,Z,!1);else if(X!==!!z.multiple)if(z.defaultValue!=null)q8(Q,!!z.multiple,z.defaultValue,!0);else q8(Q,!!z.multiple,z.multiple?[]:"",!1)}function jB(b,z){var Q=b,X=z.value;if(X!=null)q8(Q,!!z.multiple,X,!1)}var p$=!1;function LX(b,z){var Q=b;if(z.dangerouslySetInnerHTML!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");var X=L1({},z,{value:void 0,defaultValue:void 0,children:o4(Q._wrapperState.initialValue)});return X}function x$(b,z){var Q=b;if(B3("textarea",z),z.value!==void 0&&z.defaultValue!==void 0&&!p$)H("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components",d8()||"A component"),p$=!0;var X=z.value;if(X==null){var{children:Z,defaultValue:J}=z;if(Z!=null){H("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");{if(J!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(y1(Z)){if(Z.length>1)throw Error("<textarea> can only have at most one child.");Z=Z[0]}J=Z}}if(J==null)J="";X=J}Q._wrapperState={initialValue:r5(X)}}function i$(b,z){var Q=b,X=r5(z.value),Z=r5(z.defaultValue);if(X!=null){var J=o4(X);if(J!==Q.value)Q.value=J;if(z.defaultValue==null&&Q.defaultValue!==J)Q.defaultValue=J}if(Z!=null)Q.defaultValue=o4(Z)}function j$(b,z){var Q=b,X=Q.textContent;if(X===Q._wrapperState.initialValue){if(X!==""&&X!==null)Q.value=X}}function oB(b,z){i$(b,z)}var B8="http://www.w3.org/1999/xhtml",aB="http://www.w3.org/1998/Math/MathML",NX="http://www.w3.org/2000/svg";function WX(b){switch(b){case"svg":return NX;case"math":return aB;default:return B8}}function _X(b,z){if(b==null||b===B8)return WX(z);if(b===NX&&z==="foreignObject")return B8;return b}var rB=function(b){if(typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction)return function(z,Q,X,Z){MSApp.execUnsafeLocalFunction(function(){return b(z,Q,X,Z)})};else return b},d9,o$=rB(function(b,z){if(b.namespaceURI===NX){if(!("innerHTML"in b)){d9=d9||document.createElement("div"),d9.innerHTML="<svg>"+z.valueOf().toString()+"</svg>";var Q=d9.firstChild;while(b.firstChild)b.removeChild(b.firstChild);while(Q.firstChild)b.appendChild(Q.firstChild);return}}b.innerHTML=z}),a4=1,O8=3,x6=8,L8=9,MX=11,l9=function(b,z){if(z){var Q=b.firstChild;if(Q&&Q===b.lastChild&&Q.nodeType===O8){Q.nodeValue=z;return}}b.textContent=z},nB={animation:["animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationTimingFunction"],background:["backgroundAttachment","backgroundClip","backgroundColor","backgroundImage","backgroundOrigin","backgroundPositionX","backgroundPositionY","backgroundRepeat","backgroundSize"],backgroundPosition:["backgroundPositionX","backgroundPositionY"],border:["borderBottomColor","borderBottomStyle","borderBottomWidth","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderLeftColor","borderLeftStyle","borderLeftWidth","borderRightColor","borderRightStyle","borderRightWidth","borderTopColor","borderTopStyle","borderTopWidth"],borderBlockEnd:["borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth"],borderBlockStart:["borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth"],borderBottom:["borderBottomColor","borderBottomStyle","borderBottomWidth"],borderColor:["borderBottomColor","borderLeftColor","borderRightColor","borderTopColor"],borderImage:["borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth"],borderInlineEnd:["borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth"],borderInlineStart:["borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth"],borderLeft:["borderLeftColor","borderLeftStyle","borderLeftWidth"],borderRadius:["borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius"],borderRight:["borderRightColor","borderRightStyle","borderRightWidth"],borderStyle:["borderBottomStyle","borderLeftStyle","borderRightStyle","borderTopStyle"],borderTop:["borderTopColor","borderTopStyle","borderTopWidth"],borderWidth:["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth"],columnRule:["columnRuleColor","columnRuleStyle","columnRuleWidth"],columns:["columnCount","columnWidth"],flex:["flexBasis","flexGrow","flexShrink"],flexFlow:["flexDirection","flexWrap"],font:["fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontWeight","lineHeight"],fontVariant:["fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantLigatures","fontVariantNumeric","fontVariantPosition"],gap:["columnGap","rowGap"],grid:["gridAutoColumns","gridAutoFlow","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],gridArea:["gridColumnEnd","gridColumnStart","gridRowEnd","gridRowStart"],gridColumn:["gridColumnEnd","gridColumnStart"],gridColumnGap:["columnGap"],gridGap:["columnGap","rowGap"],gridRow:["gridRowEnd","gridRowStart"],gridRowGap:["rowGap"],gridTemplate:["gridTemplateAreas","gridTemplateColumns","gridTemplateRows"],listStyle:["listStyleImage","listStylePosition","listStyleType"],margin:["marginBottom","marginLeft","marginRight","marginTop"],marker:["markerEnd","markerMid","markerStart"],mask:["maskClip","maskComposite","maskImage","maskMode","maskOrigin","maskPositionX","maskPositionY","maskRepeat","maskSize"],maskPosition:["maskPositionX","maskPositionY"],outline:["outlineColor","outlineStyle","outlineWidth"],overflow:["overflowX","overflowY"],padding:["paddingBottom","paddingLeft","paddingRight","paddingTop"],placeContent:["alignContent","justifyContent"],placeItems:["alignItems","justifyItems"],placeSelf:["alignSelf","justifySelf"],textDecoration:["textDecorationColor","textDecorationLine","textDecorationStyle"],textEmphasis:["textEmphasisColor","textEmphasisStyle"],transition:["transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction"],wordWrap:["overflowWrap"]},l2={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};function tB(b,z){return b+z.charAt(0).toUpperCase()+z.substring(1)}var sB=["Webkit","ms","Moz","O"];Object.keys(l2).forEach(function(b){sB.forEach(function(z){l2[tB(z,b)]=l2[b]})});function wX(b,z,Q){var X=z==null||typeof z==="boolean"||z==="";if(X)return"";if(!Q&&typeof z==="number"&&z!==0&&!(l2.hasOwnProperty(b)&&l2[b]))return z+"px";return v6(z,b),(""+z).trim()}var eB=/([A-Z])/g,bO=/^ms-/;function zO(b){return b.replace(eB,"-$1").toLowerCase().replace(bO,"-ms-")}var a$=function(){};{var QO=/^(?:webkit|moz|o)[A-Z]/,XO=/^-ms-/,ZO=/-(.)/g,r$=/;\s*$/,W3={},RX={},n$=!1,t$=!1,JO=function(b){return b.replace(ZO,function(z,Q){return Q.toUpperCase()})},YO=function(b){if(W3.hasOwnProperty(b)&&W3[b])return;W3[b]=!0,H("Unsupported style property %s. Did you mean %s?",b,JO(b.replace(XO,"ms-")))},$O=function(b){if(W3.hasOwnProperty(b)&&W3[b])return;W3[b]=!0,H("Unsupported vendor-prefixed style property %s. Did you mean %s?",b,b.charAt(0).toUpperCase()+b.slice(1))},HO=function(b,z){if(RX.hasOwnProperty(z)&&RX[z])return;RX[z]=!0,H(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,b,z.replace(r$,""))},GO=function(b,z){if(n$)return;n$=!0,H("`NaN` is an invalid value for the `%s` css style property.",b)},KO=function(b,z){if(t$)return;t$=!0,H("`Infinity` is an invalid value for the `%s` css style property.",b)};a$=function(b,z){if(b.indexOf("-")>-1)YO(b);else if(QO.test(b))$O(b);else if(r$.test(z))HO(b,z);if(typeof z==="number"){if(isNaN(z))GO(b,z);else if(!isFinite(z))KO(b,z)}}}var UO=a$;function qO(b){{var z="",Q="";for(var X in b){if(!b.hasOwnProperty(X))continue;var Z=b[X];if(Z!=null){var J=X.indexOf("--")===0;z+=Q+(J?X:zO(X))+":",z+=wX(X,Z,J),Q=";"}}return z||null}}function s$(b,z){var Q=b.style;for(var X in z){if(!z.hasOwnProperty(X))continue;var Z=X.indexOf("--")===0;if(!Z)UO(X,z[X]);var J=wX(X,z[X],Z);if(X==="float")X="cssFloat";if(Z)Q.setProperty(X,J);else Q[X]=J}}function BO(b){return b==null||typeof b==="boolean"||b===""}function e$(b){var z={};for(var Q in b){var X=nB[Q]||[Q];for(var Z=0;Z<X.length;Z++)z[X[Z]]=Q}return z}function OO(b,z){{if(!z)return;var Q=e$(b),X=e$(z),Z={};for(var J in Q){var $=Q[J],K=X[J];if(K&&$!==K){var U=$+","+K;if(Z[U])continue;Z[U]=!0,H("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.",BO(b[$])?"Removing":"Updating",$,K)}}}}var LO={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},NO=L1({menuitem:!0},LO),WO="__html";function PX(b,z){if(!z)return;if(NO[b]){if(z.children!=null||z.dangerouslySetInnerHTML!=null)throw Error(b+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.")}if(z.dangerouslySetInnerHTML!=null){if(z.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");if(typeof z.dangerouslySetInnerHTML!=="object"||!(WO in z.dangerouslySetInnerHTML))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.")}if(!z.suppressContentEditableWarning&&z.contentEditable&&z.children!=null)H("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.");if(z.style!=null&&typeof z.style!=="object")throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.")}function F7(b,z){if(b.indexOf("-")===-1)return typeof z.is==="string";switch(b){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 p9={accept:"accept",acceptcharset:"acceptCharset","accept-charset":"acceptCharset",accesskey:"accessKey",action:"action",allowfullscreen:"allowFullScreen",alt:"alt",as:"as",async:"async",autocapitalize:"autoCapitalize",autocomplete:"autoComplete",autocorrect:"autoCorrect",autofocus:"autoFocus",autoplay:"autoPlay",autosave:"autoSave",capture:"capture",cellpadding:"cellPadding",cellspacing:"cellSpacing",challenge:"challenge",charset:"charSet",checked:"checked",children:"children",cite:"cite",class:"className",classid:"classID",classname:"className",cols:"cols",colspan:"colSpan",content:"content",contenteditable:"contentEditable",contextmenu:"contextMenu",controls:"controls",controlslist:"controlsList",coords:"coords",crossorigin:"crossOrigin",dangerouslysetinnerhtml:"dangerouslySetInnerHTML",data:"data",datetime:"dateTime",default:"default",defaultchecked:"defaultChecked",defaultvalue:"defaultValue",defer:"defer",dir:"dir",disabled:"disabled",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback",download:"download",draggable:"draggable",enctype:"encType",enterkeyhint:"enterKeyHint",for:"htmlFor",form:"form",formmethod:"formMethod",formaction:"formAction",formenctype:"formEncType",formnovalidate:"formNoValidate",formtarget:"formTarget",frameborder:"frameBorder",headers:"headers",height:"height",hidden:"hidden",high:"high",href:"href",hreflang:"hrefLang",htmlfor:"htmlFor",httpequiv:"httpEquiv","http-equiv":"httpEquiv",icon:"icon",id:"id",imagesizes:"imageSizes",imagesrcset:"imageSrcSet",innerhtml:"innerHTML",inputmode:"inputMode",integrity:"integrity",is:"is",itemid:"itemID",itemprop:"itemProp",itemref:"itemRef",itemscope:"itemScope",itemtype:"itemType",keyparams:"keyParams",keytype:"keyType",kind:"kind",label:"label",lang:"lang",list:"list",loop:"loop",low:"low",manifest:"manifest",marginwidth:"marginWidth",marginheight:"marginHeight",max:"max",maxlength:"maxLength",media:"media",mediagroup:"mediaGroup",method:"method",min:"min",minlength:"minLength",multiple:"multiple",muted:"muted",name:"name",nomodule:"noModule",nonce:"nonce",novalidate:"noValidate",open:"open",optimum:"optimum",pattern:"pattern",placeholder:"placeholder",playsinline:"playsInline",poster:"poster",preload:"preload",profile:"profile",radiogroup:"radioGroup",readonly:"readOnly",referrerpolicy:"referrerPolicy",rel:"rel",required:"required",reversed:"reversed",role:"role",rows:"rows",rowspan:"rowSpan",sandbox:"sandbox",scope:"scope",scoped:"scoped",scrolling:"scrolling",seamless:"seamless",selected:"selected",shape:"shape",size:"size",sizes:"sizes",span:"span",spellcheck:"spellCheck",src:"src",srcdoc:"srcDoc",srclang:"srcLang",srcset:"srcSet",start:"start",step:"step",style:"style",summary:"summary",tabindex:"tabIndex",target:"target",title:"title",type:"type",usemap:"useMap",value:"value",width:"width",wmode:"wmode",wrap:"wrap",about:"about",accentheight:"accentHeight","accent-height":"accentHeight",accumulate:"accumulate",additive:"additive",alignmentbaseline:"alignmentBaseline","alignment-baseline":"alignmentBaseline",allowreorder:"allowReorder",alphabetic:"alphabetic",amplitude:"amplitude",arabicform:"arabicForm","arabic-form":"arabicForm",ascent:"ascent",attributename:"attributeName",attributetype:"attributeType",autoreverse:"autoReverse",azimuth:"azimuth",basefrequency:"baseFrequency",baselineshift:"baselineShift","baseline-shift":"baselineShift",baseprofile:"baseProfile",bbox:"bbox",begin:"begin",bias:"bias",by:"by",calcmode:"calcMode",capheight:"capHeight","cap-height":"capHeight",clip:"clip",clippath:"clipPath","clip-path":"clipPath",clippathunits:"clipPathUnits",cliprule:"clipRule","clip-rule":"clipRule",color:"color",colorinterpolation:"colorInterpolation","color-interpolation":"colorInterpolation",colorinterpolationfilters:"colorInterpolationFilters","color-interpolation-filters":"colorInterpolationFilters",colorprofile:"colorProfile","color-profile":"colorProfile",colorrendering:"colorRendering","color-rendering":"colorRendering",contentscripttype:"contentScriptType",contentstyletype:"contentStyleType",cursor:"cursor",cx:"cx",cy:"cy",d:"d",datatype:"datatype",decelerate:"decelerate",descent:"descent",diffuseconstant:"diffuseConstant",direction:"direction",display:"display",divisor:"divisor",dominantbaseline:"dominantBaseline","dominant-baseline":"dominantBaseline",dur:"dur",dx:"dx",dy:"dy",edgemode:"edgeMode",elevation:"elevation",enablebackground:"enableBackground","enable-background":"enableBackground",end:"end",exponent:"exponent",externalresourcesrequired:"externalResourcesRequired",fill:"fill",fillopacity:"fillOpacity","fill-opacity":"fillOpacity",fillrule:"fillRule","fill-rule":"fillRule",filter:"filter",filterres:"filterRes",filterunits:"filterUnits",floodopacity:"floodOpacity","flood-opacity":"floodOpacity",floodcolor:"floodColor","flood-color":"floodColor",focusable:"focusable",fontfamily:"fontFamily","font-family":"fontFamily",fontsize:"fontSize","font-size":"fontSize",fontsizeadjust:"fontSizeAdjust","font-size-adjust":"fontSizeAdjust",fontstretch:"fontStretch","font-stretch":"fontStretch",fontstyle:"fontStyle","font-style":"fontStyle",fontvariant:"fontVariant","font-variant":"fontVariant",fontweight:"fontWeight","font-weight":"fontWeight",format:"format",from:"from",fx:"fx",fy:"fy",g1:"g1",g2:"g2",glyphname:"glyphName","glyph-name":"glyphName",glyphorientationhorizontal:"glyphOrientationHorizontal","glyph-orientation-horizontal":"glyphOrientationHorizontal",glyphorientationvertical:"glyphOrientationVertical","glyph-orientation-vertical":"glyphOrientationVertical",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",hanging:"hanging",horizadvx:"horizAdvX","horiz-adv-x":"horizAdvX",horizoriginx:"horizOriginX","horiz-origin-x":"horizOriginX",ideographic:"ideographic",imagerendering:"imageRendering","image-rendering":"imageRendering",in2:"in2",in:"in",inlist:"inlist",intercept:"intercept",k1:"k1",k2:"k2",k3:"k3",k4:"k4",k:"k",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",kerning:"kerning",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",letterspacing:"letterSpacing","letter-spacing":"letterSpacing",lightingcolor:"lightingColor","lighting-color":"lightingColor",limitingconeangle:"limitingConeAngle",local:"local",markerend:"markerEnd","marker-end":"markerEnd",markerheight:"markerHeight",markermid:"markerMid","marker-mid":"markerMid",markerstart:"markerStart","marker-start":"markerStart",markerunits:"markerUnits",markerwidth:"markerWidth",mask:"mask",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",mathematical:"mathematical",mode:"mode",numoctaves:"numOctaves",offset:"offset",opacity:"opacity",operator:"operator",order:"order",orient:"orient",orientation:"orientation",origin:"origin",overflow:"overflow",overlineposition:"overlinePosition","overline-position":"overlinePosition",overlinethickness:"overlineThickness","overline-thickness":"overlineThickness",paintorder:"paintOrder","paint-order":"paintOrder",panose1:"panose1","panose-1":"panose1",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointerevents:"pointerEvents","pointer-events":"pointerEvents",points:"points",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",prefix:"prefix",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",property:"property",r:"r",radius:"radius",refx:"refX",refy:"refY",renderingintent:"renderingIntent","rendering-intent":"renderingIntent",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",resource:"resource",restart:"restart",result:"result",results:"results",rotate:"rotate",rx:"rx",ry:"ry",scale:"scale",security:"security",seed:"seed",shaperendering:"shapeRendering","shape-rendering":"shapeRendering",slope:"slope",spacing:"spacing",specularconstant:"specularConstant",specularexponent:"specularExponent",speed:"speed",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stemh:"stemh",stemv:"stemv",stitchtiles:"stitchTiles",stopcolor:"stopColor","stop-color":"stopColor",stopopacity:"stopOpacity","stop-opacity":"stopOpacity",strikethroughposition:"strikethroughPosition","strikethrough-position":"strikethroughPosition",strikethroughthickness:"strikethroughThickness","strikethrough-thickness":"strikethroughThickness",string:"string",stroke:"stroke",strokedasharray:"strokeDasharray","stroke-dasharray":"strokeDasharray",strokedashoffset:"strokeDashoffset","stroke-dashoffset":"strokeDashoffset",strokelinecap:"strokeLinecap","stroke-linecap":"strokeLinecap",strokelinejoin:"strokeLinejoin","stroke-linejoin":"strokeLinejoin",strokemiterlimit:"strokeMiterlimit","stroke-miterlimit":"strokeMiterlimit",strokewidth:"strokeWidth","stroke-width":"strokeWidth",strokeopacity:"strokeOpacity","stroke-opacity":"strokeOpacity",suppresscontenteditablewarning:"suppressContentEditableWarning",suppresshydrationwarning:"suppressHydrationWarning",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textanchor:"textAnchor","text-anchor":"textAnchor",textdecoration:"textDecoration","text-decoration":"textDecoration",textlength:"textLength",textrendering:"textRendering","text-rendering":"textRendering",to:"to",transform:"transform",typeof:"typeof",u1:"u1",u2:"u2",underlineposition:"underlinePosition","underline-position":"underlinePosition",underlinethickness:"underlineThickness","underline-thickness":"underlineThickness",unicode:"unicode",unicodebidi:"unicodeBidi","unicode-bidi":"unicodeBidi",unicoderange:"unicodeRange","unicode-range":"unicodeRange",unitsperem:"unitsPerEm","units-per-em":"unitsPerEm",unselectable:"unselectable",valphabetic:"vAlphabetic","v-alphabetic":"vAlphabetic",values:"values",vectoreffect:"vectorEffect","vector-effect":"vectorEffect",version:"version",vertadvy:"vertAdvY","vert-adv-y":"vertAdvY",vertoriginx:"vertOriginX","vert-origin-x":"vertOriginX",vertoriginy:"vertOriginY","vert-origin-y":"vertOriginY",vhanging:"vHanging","v-hanging":"vHanging",videographic:"vIdeographic","v-ideographic":"vIdeographic",viewbox:"viewBox",viewtarget:"viewTarget",visibility:"visibility",vmathematical:"vMathematical","v-mathematical":"vMathematical",vocab:"vocab",widths:"widths",wordspacing:"wordSpacing","word-spacing":"wordSpacing",writingmode:"writingMode","writing-mode":"writingMode",x1:"x1",x2:"x2",x:"x",xchannelselector:"xChannelSelector",xheight:"xHeight","x-height":"xHeight",xlinkactuate:"xlinkActuate","xlink:actuate":"xlinkActuate",xlinkarcrole:"xlinkArcrole","xlink:arcrole":"xlinkArcrole",xlinkhref:"xlinkHref","xlink:href":"xlinkHref",xlinkrole:"xlinkRole","xlink:role":"xlinkRole",xlinkshow:"xlinkShow","xlink:show":"xlinkShow",xlinktitle:"xlinkTitle","xlink:title":"xlinkTitle",xlinktype:"xlinkType","xlink:type":"xlinkType",xmlbase:"xmlBase","xml:base":"xmlBase",xmllang:"xmlLang","xml:lang":"xmlLang",xmlns:"xmlns","xml:space":"xmlSpace",xmlnsxlink:"xmlnsXlink","xmlns:xlink":"xmlnsXlink",xmlspace:"xmlSpace",y1:"y1",y2:"y2",y:"y",ychannelselector:"yChannelSelector",z:"z",zoomandpan:"zoomAndPan"},bH={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0},_3={},_O=new RegExp("^(aria)-["+p6+"]*$"),MO=new RegExp("^(aria)[A-Z]["+p6+"]*$");function wO(b,z){{if(u6.call(_3,z)&&_3[z])return!0;if(MO.test(z)){var Q="aria-"+z.slice(4).toLowerCase(),X=bH.hasOwnProperty(Q)?Q:null;if(X==null)return H("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",z),_3[z]=!0,!0;if(z!==X)return H("Invalid ARIA attribute `%s`. Did you mean `%s`?",z,X),_3[z]=!0,!0}if(_O.test(z)){var Z=z.toLowerCase(),J=bH.hasOwnProperty(Z)?Z:null;if(J==null)return _3[z]=!0,!1;if(z!==J)return H("Unknown ARIA attribute `%s`. Did you mean `%s`?",z,J),_3[z]=!0,!0}}return!0}function RO(b,z){{var Q=[];for(var X in z){var Z=wO(b,X);if(!Z)Q.push(X)}var J=Q.map(function($){return"`"+$+"`"}).join(", ");if(Q.length===1)H("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",J,b);else if(Q.length>1)H("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props",J,b)}}function PO(b,z){if(F7(b,z))return;RO(b,z)}var zH=!1;function vO(b,z){{if(b!=="input"&&b!=="textarea"&&b!=="select")return;if(z!=null&&z.value===null&&!zH)if(zH=!0,b==="select"&&z.multiple)H("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",b);else H("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",b)}}var QH=function(){};{var E4={},XH=/^on./,FO=/^on[^A-Z]/,AO=new RegExp("^(aria)-["+p6+"]*$"),kO=new RegExp("^(aria)[A-Z]["+p6+"]*$");QH=function(b,z,Q,X){if(u6.call(E4,z)&&E4[z])return!0;var Z=z.toLowerCase();if(Z==="onfocusin"||Z==="onfocusout")return H("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React."),E4[z]=!0,!0;if(X!=null){var{registrationNameDependencies:J,possibleRegistrationNames:$}=X;if(J.hasOwnProperty(z))return!0;var K=$.hasOwnProperty(Z)?$[Z]:null;if(K!=null)return H("Invalid event handler property `%s`. Did you mean `%s`?",z,K),E4[z]=!0,!0;if(XH.test(z))return H("Unknown event handler property `%s`. It will be ignored.",z),E4[z]=!0,!0}else if(XH.test(z)){if(FO.test(z))H("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",z);return E4[z]=!0,!0}if(AO.test(z)||kO.test(z))return!0;if(Z==="innerhtml")return H("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),E4[z]=!0,!0;if(Z==="aria")return H("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),E4[z]=!0,!0;if(Z==="is"&&Q!==null&&Q!==void 0&&typeof Q!=="string")return H("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof Q),E4[z]=!0,!0;if(typeof Q==="number"&&isNaN(Q))return H("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",z),E4[z]=!0,!0;var U=c6(z),N=U!==null&&U.type===O4;if(p9.hasOwnProperty(Z)){var R=p9[Z];if(R!==z)return H("Invalid DOM property `%s`. Did you mean `%s`?",z,R),E4[z]=!0,!0}else if(!N&&z!==Z)return H("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",z,Z),E4[z]=!0,!0;if(typeof Q==="boolean"&&F6(z,Q,U,!1)){if(Q)H('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',Q,z,z,Q,z);else H('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',Q,z,z,Q,z,z,z);return E4[z]=!0,!0}if(N)return!0;if(F6(z,Q,U,!1))return E4[z]=!0,!1;if((Q==="false"||Q==="true")&&U!==null&&U.type===L6)return H("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",Q,z,Q==="false"?"The browser will interpret it as a truthy value.":'Although this works, it will not work as expected if you pass the string "false".',z,Q),E4[z]=!0,!0;return!0}}var IO=function(b,z,Q){{var X=[];for(var Z in z){var J=QH(b,Z,z[Z],Q);if(!J)X.push(Z)}var $=X.map(function(K){return"`"+K+"`"}).join(", ");if(X.length===1)H("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",$,b);else if(X.length>1)H("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ",$,b)}};function TO(b,z,Q){if(F7(b,z))return;IO(b,z,Q)}var ZH=1,vX=2,p2=4,fO=ZH|vX|p2,x2=null;function CO(b){if(x2!==null)H("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue.");x2=b}function SO(){if(x2===null)H("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue.");x2=null}function hO(b){return b===x2}function FX(b){var z=b.target||b.srcElement||window;if(z.correspondingUseElement)z=z.correspondingUseElement;return z.nodeType===O8?z.parentNode:z}var AX=null,M3=null,w3=null;function JH(b){var z=t8(b);if(!z)return;if(typeof AX!=="function")throw Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");var Q=z.stateNode;if(Q){var X=Iz(Q);AX(z.stateNode,z.type,X)}}function VO(b){AX=b}function YH(b){if(M3)if(w3)w3.push(b);else w3=[b];else M3=b}function DO(){return M3!==null||w3!==null}function $H(){if(!M3)return;var b=M3,z=w3;if(M3=null,w3=null,JH(b),z)for(var Q=0;Q<z.length;Q++)JH(z[Q])}var HH=function(b,z){return b(z)},GH=function(){},kX=!1;function yO(){var b=DO();if(b)GH(),$H()}function KH(b,z,Q){if(kX)return b(z,Q);kX=!0;try{return HH(b,z,Q)}finally{kX=!1,yO()}}function mO(b,z,Q){HH=b,GH=Q}function uO(b){return b==="button"||b==="input"||b==="select"||b==="textarea"}function gO(b,z,Q){switch(b){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":return!!(Q.disabled&&uO(z));default:return!1}}function i2(b,z){var Q=b.stateNode;if(Q===null)return null;var X=Iz(Q);if(X===null)return null;var Z=X[z];if(gO(z,b.type,X))return null;if(Z&&typeof Z!=="function")throw Error("Expected `"+z+"` listener to be a function, instead got a value of `"+typeof Z+"` type.");return Z}var IX=!1;if(J6)try{var j2={};Object.defineProperty(j2,"passive",{get:function(){IX=!0}}),window.addEventListener("test",j2,j2),window.removeEventListener("test",j2,j2)}catch(b){IX=!1}function UH(b,z,Q,X,Z,J,$,K,U){var N=Array.prototype.slice.call(arguments,3);try{z.apply(Q,N)}catch(R){this.onError(R)}}var qH=UH;if(typeof window<"u"&&typeof window.dispatchEvent==="function"&&typeof document<"u"&&typeof document.createEvent==="function"){var TX=document.createElement("react");qH=function(z,Q,X,Z,J,$,K,U,N){if(typeof document>"u"||document===null)throw Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");var R=document.createEvent("Event"),y=!1,D=!0,p=window.event,x=Object.getOwnPropertyDescriptor(window,"event");function a(){if(TX.removeEventListener(s,p0,!1),typeof window.event<"u"&&window.hasOwnProperty("event"))window.event=p}var w0=Array.prototype.slice.call(arguments,3);function p0(){y=!0,a(),Q.apply(X,w0),D=!1}var E0,W1=!1,_1=!1;function c(d){if(E0=d.error,W1=!0,E0===null&&d.colno===0&&d.lineno===0)_1=!0;if(d.defaultPrevented){if(E0!=null&&typeof E0==="object")try{E0._suppressLogging=!0}catch(G0){}}}var s="react-"+(z?z:"invokeguardedcallback");if(window.addEventListener("error",c),TX.addEventListener(s,p0,!1),R.initEvent(s,!1,!1),TX.dispatchEvent(R),x)Object.defineProperty(window,"event",x);if(y&&D){if(!W1)E0=Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`);else if(_1)E0=Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.");this.onError(E0)}if(window.removeEventListener("error",c),!y)return a(),UH.apply(this,arguments)}}var EO=qH,R3=!1,x9=null,i9=!1,fX=null,cO={onError:function(b){R3=!0,x9=b}};function CX(b,z,Q,X,Z,J,$,K,U){R3=!1,x9=null,EO.apply(cO,arguments)}function dO(b,z,Q,X,Z,J,$,K,U){if(CX.apply(this,arguments),R3){var N=SX();if(!i9)i9=!0,fX=N}}function lO(){if(i9){var b=fX;throw i9=!1,fX=null,b}}function pO(){return R3}function SX(){if(R3){var b=x9;return R3=!1,x9=null,b}else throw Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.")}function P3(b){return b._reactInternals}function xO(b){return b._reactInternals!==void 0}function iO(b,z){b._reactInternals=z}var o0=0,v3=1,i6=2,f1=4,A7=16,o2=32,hX=64,m1=128,N8=256,x8=512,k7=1024,C5=2048,W8=4096,I7=8192,j9=16384,jO=C5|f1|hX|x8|k7|j9,oO=32767,a2=32768,c4=65536,VX=131072,BH=1048576,DX=2097152,T7=4194304,yX=8388608,_8=16777216,o9=33554432,mX=f1|k7|0,uX=i6|f1|A7|o2|x8|W8|I7,r2=f1|hX|x8|I7,F3=C5|A7,M8=T7|yX|DX,aO=Y.ReactCurrentOwner;function f7(b){var z=b,Q=b;if(!b.alternate){var X=z;do{if(z=X,(z.flags&(i6|W8))!==o0)Q=z.return;X=z.return}while(X)}else while(z.return)z=z.return;if(z.tag===F)return Q;return null}function OH(b){if(b.tag===j){var z=b.memoizedState;if(z===null){var Q=b.alternate;if(Q!==null)z=Q.memoizedState}if(z!==null)return z.dehydrated}return null}function LH(b){return b.tag===F?b.stateNode.containerInfo:null}function rO(b){return f7(b)===b}function nO(b){{var z=aO.current;if(z!==null&&z.tag===M){var Q=z,X=Q.stateNode;if(!X._warnedAboutRefsInRender)H("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",G1(Q)||"A component");X._warnedAboutRefsInRender=!0}}var Z=P3(b);if(!Z)return!1;return f7(Z)===Z}function NH(b){if(f7(b)!==b)throw Error("Unable to find node on an unmounted component.")}function WH(b){var z=b.alternate;if(!z){var Q=f7(b);if(Q===null)throw Error("Unable to find node on an unmounted component.");if(Q!==b)return null;return b}var X=b,Z=z;while(!0){var J=X.return;if(J===null)break;var $=J.alternate;if($===null){var K=J.return;if(K!==null){X=Z=K;continue}break}if(J.child===$.child){var U=J.child;while(U){if(U===X)return NH(J),b;if(U===Z)return NH(J),z;U=U.sibling}throw Error("Unable to find node on an unmounted component.")}if(X.return!==Z.return)X=J,Z=$;else{var N=!1,R=J.child;while(R){if(R===X){N=!0,X=J,Z=$;break}if(R===Z){N=!0,Z=J,X=$;break}R=R.sibling}if(!N){R=$.child;while(R){if(R===X){N=!0,X=$,Z=J;break}if(R===Z){N=!0,Z=$,X=J;break}R=R.sibling}if(!N)throw Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.")}}if(X.alternate!==Z)throw Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.")}if(X.tag!==F)throw Error("Unable to find node on an unmounted component.");if(X.stateNode.current===X)return b;return z}function _H(b){var z=WH(b);return z!==null?MH(z):null}function MH(b){if(b.tag===_||b.tag===W)return b;var z=b.child;while(z!==null){var Q=MH(z);if(Q!==null)return Q;z=z.sibling}return null}function tO(b){var z=WH(b);return z!==null?wH(z):null}function wH(b){if(b.tag===_||b.tag===W)return b;var z=b.child;while(z!==null){if(z.tag!==v){var Q=wH(z);if(Q!==null)return Q}z=z.sibling}return null}var RH=t1.unstable_scheduleCallback,sO=t1.unstable_cancelCallback,eO=t1.unstable_shouldYield,bL=t1.unstable_requestPaint,H4=t1.unstable_now,zL=t1.unstable_getCurrentPriorityLevel,a9=t1.unstable_ImmediatePriority,gX=t1.unstable_UserBlockingPriority,C7=t1.unstable_NormalPriority,QL=t1.unstable_LowPriority,EX=t1.unstable_IdlePriority,XL=t1.unstable_yieldValue,ZL=t1.unstable_setDisableYieldValue,S7=null,N4=null,A0=null,n5=!1,S5=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u";function JL(b){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")return!1;var z=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(z.isDisabled)return!0;if(!z.supportsFiber)return H("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools"),!0;try{if(S0)b=L1({},b,{getLaneLabelMap:UL,injectProfilingHooks:KL});S7=z.inject(b),N4=z}catch(Q){H("React instrumentation encountered an error: %s.",Q)}if(z.checkDCE)return!0;else return!1}function YL(b,z){if(N4&&typeof N4.onScheduleFiberRoot==="function")try{N4.onScheduleFiberRoot(S7,b,z)}catch(Q){if(!n5)n5=!0,H("React instrumentation encountered an error: %s",Q)}}function $L(b,z){if(N4&&typeof N4.onCommitFiberRoot==="function")try{var Q=(b.current.flags&m1)===m1;if(u0){var X;switch(z){case J5:X=a9;break;case R8:X=gX;break;case P8:X=C7;break;case Qz:X=EX;break;default:X=C7;break}N4.onCommitFiberRoot(S7,b,X,Q)}else N4.onCommitFiberRoot(S7,b,void 0,Q)}catch(Z){if(!n5)n5=!0,H("React instrumentation encountered an error: %s",Z)}}function HL(b){if(N4&&typeof N4.onPostCommitFiberRoot==="function")try{N4.onPostCommitFiberRoot(S7,b)}catch(z){if(!n5)n5=!0,H("React instrumentation encountered an error: %s",z)}}function GL(b){if(N4&&typeof N4.onCommitFiberUnmount==="function")try{N4.onCommitFiberUnmount(S7,b)}catch(z){if(!n5)n5=!0,H("React instrumentation encountered an error: %s",z)}}function G4(b){{if(typeof XL==="function")ZL(b),q(b);if(N4&&typeof N4.setStrictMode==="function")try{N4.setStrictMode(S7,b)}catch(z){if(!n5)n5=!0,H("React instrumentation encountered an error: %s",z)}}}function KL(b){A0=b}function UL(){{var b=new Map,z=1;for(var Q=0;Q<dX;Q++){var X=SL(z);b.set(z,X),z*=2}return b}}function qL(b){if(A0!==null&&typeof A0.markCommitStarted==="function")A0.markCommitStarted(b)}function PH(){if(A0!==null&&typeof A0.markCommitStopped==="function")A0.markCommitStopped()}function n2(b){if(A0!==null&&typeof A0.markComponentRenderStarted==="function")A0.markComponentRenderStarted(b)}function A3(){if(A0!==null&&typeof A0.markComponentRenderStopped==="function")A0.markComponentRenderStopped()}function BL(b){if(A0!==null&&typeof A0.markComponentPassiveEffectMountStarted==="function")A0.markComponentPassiveEffectMountStarted(b)}function OL(){if(A0!==null&&typeof A0.markComponentPassiveEffectMountStopped==="function")A0.markComponentPassiveEffectMountStopped()}function LL(b){if(A0!==null&&typeof A0.markComponentPassiveEffectUnmountStarted==="function")A0.markComponentPassiveEffectUnmountStarted(b)}function NL(){if(A0!==null&&typeof A0.markComponentPassiveEffectUnmountStopped==="function")A0.markComponentPassiveEffectUnmountStopped()}function WL(b){if(A0!==null&&typeof A0.markComponentLayoutEffectMountStarted==="function")A0.markComponentLayoutEffectMountStarted(b)}function _L(){if(A0!==null&&typeof A0.markComponentLayoutEffectMountStopped==="function")A0.markComponentLayoutEffectMountStopped()}function vH(b){if(A0!==null&&typeof A0.markComponentLayoutEffectUnmountStarted==="function")A0.markComponentLayoutEffectUnmountStarted(b)}function FH(){if(A0!==null&&typeof A0.markComponentLayoutEffectUnmountStopped==="function")A0.markComponentLayoutEffectUnmountStopped()}function ML(b,z,Q){if(A0!==null&&typeof A0.markComponentErrored==="function")A0.markComponentErrored(b,z,Q)}function wL(b,z,Q){if(A0!==null&&typeof A0.markComponentSuspended==="function")A0.markComponentSuspended(b,z,Q)}function RL(b){if(A0!==null&&typeof A0.markLayoutEffectsStarted==="function")A0.markLayoutEffectsStarted(b)}function PL(){if(A0!==null&&typeof A0.markLayoutEffectsStopped==="function")A0.markLayoutEffectsStopped()}function vL(b){if(A0!==null&&typeof A0.markPassiveEffectsStarted==="function")A0.markPassiveEffectsStarted(b)}function FL(){if(A0!==null&&typeof A0.markPassiveEffectsStopped==="function")A0.markPassiveEffectsStopped()}function AH(b){if(A0!==null&&typeof A0.markRenderStarted==="function")A0.markRenderStarted(b)}function AL(){if(A0!==null&&typeof A0.markRenderYielded==="function")A0.markRenderYielded()}function kH(){if(A0!==null&&typeof A0.markRenderStopped==="function")A0.markRenderStopped()}function kL(b){if(A0!==null&&typeof A0.markRenderScheduled==="function")A0.markRenderScheduled(b)}function IL(b,z){if(A0!==null&&typeof A0.markForceUpdateScheduled==="function")A0.markForceUpdateScheduled(b,z)}function cX(b,z){if(A0!==null&&typeof A0.markStateUpdateScheduled==="function")A0.markStateUpdateScheduled(b,z)}var j0=0,A1=1,a1=2,D6=8,t5=16,IH=Math.clz32?Math.clz32:CL,TL=Math.log,fL=Math.LN2;function CL(b){var z=b>>>0;if(z===0)return 32;return 31-(TL(z)/fL|0)|0}var dX=31,$0=0,K4=0,b1=1,k3=2,w8=4,h7=8,s5=16,t2=32,I3=4194240,s2=64,lX=128,pX=256,xX=512,iX=1024,jX=2048,oX=4096,aX=8192,rX=16384,nX=32768,tX=65536,sX=131072,eX=262144,bZ=524288,zZ=1048576,QZ=2097152,r9=130023424,T3=4194304,XZ=8388608,ZZ=16777216,JZ=33554432,YZ=67108864,TH=T3,e2=134217728,fH=268435455,bb=268435456,V7=536870912,X5=1073741824;function SL(b){{if(b&b1)return"Sync";if(b&k3)return"InputContinuousHydration";if(b&w8)return"InputContinuous";if(b&h7)return"DefaultHydration";if(b&s5)return"Default";if(b&t2)return"TransitionHydration";if(b&I3)return"Transition";if(b&r9)return"Retry";if(b&e2)return"SelectiveHydration";if(b&bb)return"IdleHydration";if(b&V7)return"Idle";if(b&X5)return"Offscreen"}}var W6=-1,n9=s2,t9=T3;function zb(b){switch(D7(b)){case b1:return b1;case k3:return k3;case w8:return w8;case h7:return h7;case s5:return s5;case t2:return t2;case s2:case lX:case pX:case xX:case iX:case jX:case oX:case aX:case rX:case nX:case tX:case sX:case eX:case bZ:case zZ:case QZ:return b&I3;case T3:case XZ:case ZZ:case JZ:case YZ:return b&r9;case e2:return e2;case bb:return bb;case V7:return V7;case X5:return X5;default:return H("Should have found matching lanes. This is a bug in React."),b}}function s9(b,z){var Q=b.pendingLanes;if(Q===$0)return $0;var X=$0,Z=b.suspendedLanes,J=b.pingedLanes,$=Q&fH;if($!==$0){var K=$&~Z;if(K!==$0)X=zb(K);else{var U=$&J;if(U!==$0)X=zb(U)}}else{var N=Q&~Z;if(N!==$0)X=zb(N);else if(J!==$0)X=zb(J)}if(X===$0)return $0;if(z!==$0&&z!==X&&(z&Z)===$0){var R=D7(X),y=D7(z);if(R>=y||R===s5&&(y&I3)!==$0)return z}if((X&w8)!==$0)X|=Q&s5;var D=b.entangledLanes;if(D!==$0){var p=b.entanglements,x=X&D;while(x>0){var a=y7(x),w0=1<<a;X|=p[a],x&=~w0}}return X}function hL(b,z){var Q=b.eventTimes,X=W6;while(z>0){var Z=y7(z),J=1<<Z,$=Q[Z];if($>X)X=$;z&=~J}return X}function VL(b,z){switch(b){case b1:case k3:case w8:return z+250;case h7:case s5:case t2:case s2:case lX:case pX:case xX:case iX:case jX:case oX:case aX:case rX:case nX:case tX:case sX:case eX:case bZ:case zZ:case QZ:return z+5000;case T3:case XZ:case ZZ:case JZ:case YZ:return W6;case e2:case bb:case V7:case X5:return W6;default:return H("Should have found matching lanes. This is a bug in React."),W6}}function DL(b,z){var{pendingLanes:Q,suspendedLanes:X,pingedLanes:Z,expirationTimes:J}=b,$=Q;while($>0){var K=y7($),U=1<<K,N=J[K];if(N===W6){if((U&X)===$0||(U&Z)!==$0)J[K]=VL(U,z)}else if(N<=z)b.expiredLanes|=U;$&=~U}}function yL(b){return zb(b.pendingLanes)}function $Z(b){var z=b.pendingLanes&~X5;if(z!==$0)return z;if(z&X5)return X5;return $0}function mL(b){return(b&b1)!==$0}function HZ(b){return(b&fH)!==$0}function CH(b){return(b&r9)===b}function uL(b){var z=b1|w8|s5;return(b&z)===$0}function gL(b){return(b&I3)===b}function e9(b,z){var Q=k3|w8|h7|s5;return(z&Q)!==$0}function EL(b,z){return(z&b.expiredLanes)!==$0}function SH(b){return(b&I3)!==$0}function hH(){var b=n9;if(n9<<=1,(n9&I3)===$0)n9=s2;return b}function cL(){var b=t9;if(t9<<=1,(t9&r9)===$0)t9=T3;return b}function D7(b){return b&-b}function Qb(b){return D7(b)}function y7(b){return 31-IH(b)}function GZ(b){return y7(b)}function Z5(b,z){return(b&z)!==$0}function f3(b,z){return(b&z)===z}function q1(b,z){return b|z}function bz(b,z){return b&~z}function VH(b,z){return b&z}function zz(b){return b}function dL(b,z){return b!==K4&&b<z?b:z}function KZ(b){var z=[];for(var Q=0;Q<dX;Q++)z.push(b);return z}function Xb(b,z,Q){if(b.pendingLanes|=z,z!==V7)b.suspendedLanes=$0,b.pingedLanes=$0;var X=b.eventTimes,Z=GZ(z);X[Z]=Q}function lL(b,z){b.suspendedLanes|=z,b.pingedLanes&=~z;var Q=b.expirationTimes,X=z;while(X>0){var Z=y7(X),J=1<<Z;Q[Z]=W6,X&=~J}}function DH(b,z,Q){b.pingedLanes|=b.suspendedLanes&z}function pL(b,z){var Q=b.pendingLanes&~z;b.pendingLanes=z,b.suspendedLanes=$0,b.pingedLanes=$0,b.expiredLanes&=z,b.mutableReadLanes&=z,b.entangledLanes&=z;var{entanglements:X,eventTimes:Z,expirationTimes:J}=b,$=Q;while($>0){var K=y7($),U=1<<K;X[K]=$0,Z[K]=W6,J[K]=W6,$&=~U}}function UZ(b,z){var Q=b.entangledLanes|=z,X=b.entanglements,Z=Q;while(Z){var J=y7(Z),$=1<<J;if($&z|X[J]&z)X[J]|=z;Z&=~$}}function xL(b,z){var Q=D7(z),X;switch(Q){case w8:X=k3;break;case s5:X=h7;break;case s2:case lX:case pX:case xX:case iX:case jX:case oX:case aX:case rX:case nX:case tX:case sX:case eX:case bZ:case zZ:case QZ:case T3:case XZ:case ZZ:case JZ:case YZ:X=t2;break;case V7:X=bb;break;default:X=K4;break}if((X&(b.suspendedLanes|z))!==K4)return K4;return X}function yH(b,z,Q){if(!S5)return;var X=b.pendingUpdatersLaneMap;while(Q>0){var Z=GZ(Q),J=1<<Z,$=X[Z];$.add(z),Q&=~J}}function mH(b,z){if(!S5)return;var{pendingUpdatersLaneMap:Q,memoizedUpdaters:X}=b;while(z>0){var Z=GZ(z),J=1<<Z,$=Q[Z];if($.size>0)$.forEach(function(K){var U=K.alternate;if(U===null||!X.has(U))X.add(K)}),$.clear();z&=~J}}function uH(b,z){return null}var J5=b1,R8=w8,P8=s5,Qz=V7,Zb=K4;function h5(){return Zb}function U4(b){Zb=b}function iL(b,z){var Q=Zb;try{return Zb=b,z()}finally{Zb=Q}}function jL(b,z){return b!==0&&b<z?b:z}function oL(b,z){return b===0||b>z?b:z}function qZ(b,z){return b!==0&&b<z}function gH(b){var z=D7(b);if(!qZ(J5,z))return J5;if(!qZ(R8,z))return R8;if(HZ(z))return P8;return Qz}function Xz(b){var z=b.current.memoizedState;return z.isDehydrated}var EH;function aL(b){EH=b}function rL(b){EH(b)}var BZ;function nL(b){BZ=b}var cH;function tL(b){cH=b}var dH;function sL(b){dH=b}var lH;function eL(b){lH=b}var OZ=!1,Zz=[],i8=null,j8=null,o8=null,Jb=new Map,Yb=new Map,a8=[],bN=["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","submit"];function zN(b){return bN.indexOf(b)>-1}function QN(b,z,Q,X,Z){return{blockedOn:b,domEventName:z,eventSystemFlags:Q,nativeEvent:Z,targetContainers:[X]}}function pH(b,z){switch(b){case"focusin":case"focusout":i8=null;break;case"dragenter":case"dragleave":j8=null;break;case"mouseover":case"mouseout":o8=null;break;case"pointerover":case"pointerout":{var Q=z.pointerId;Jb.delete(Q);break}case"gotpointercapture":case"lostpointercapture":{var X=z.pointerId;Yb.delete(X);break}}}function $b(b,z,Q,X,Z,J){if(b===null||b.nativeEvent!==J){var $=QN(z,Q,X,Z,J);if(z!==null){var K=t8(z);if(K!==null)BZ(K)}return $}b.eventSystemFlags|=X;var U=b.targetContainers;if(Z!==null&&U.indexOf(Z)===-1)U.push(Z);return b}function XN(b,z,Q,X,Z){switch(z){case"focusin":{var J=Z;return i8=$b(i8,b,z,Q,X,J),!0}case"dragenter":{var $=Z;return j8=$b(j8,b,z,Q,X,$),!0}case"mouseover":{var K=Z;return o8=$b(o8,b,z,Q,X,K),!0}case"pointerover":{var U=Z,N=U.pointerId;return Jb.set(N,$b(Jb.get(N)||null,b,z,Q,X,U)),!0}case"gotpointercapture":{var R=Z,y=R.pointerId;return Yb.set(y,$b(Yb.get(y)||null,b,z,Q,X,R)),!0}}return!1}function xH(b){var z=g7(b.target);if(z!==null){var Q=f7(z);if(Q!==null){var X=Q.tag;if(X===j){var Z=OH(Q);if(Z!==null){b.blockedOn=Z,lH(b.priority,function(){cH(Q)});return}}else if(X===F){var J=Q.stateNode;if(Xz(J)){b.blockedOn=LH(Q);return}}}}b.blockedOn=null}function ZN(b){var z=dH(),Q={blockedOn:null,target:b,priority:z},X=0;for(;X<a8.length;X++)if(!qZ(z,a8[X].priority))break;if(a8.splice(X,0,Q),X===0)xH(Q)}function Jz(b){if(b.blockedOn!==null)return!1;var z=b.targetContainers;while(z.length>0){var Q=z[0],X=WZ(b.domEventName,b.eventSystemFlags,Q,b.nativeEvent);if(X===null){var Z=b.nativeEvent,J=new Z.constructor(Z.type,Z);CO(J),Z.target.dispatchEvent(J),SO()}else{var $=t8(X);if($!==null)BZ($);return b.blockedOn=X,!1}z.shift()}return!0}function iH(b,z,Q){if(Jz(b))Q.delete(z)}function JN(){if(OZ=!1,i8!==null&&Jz(i8))i8=null;if(j8!==null&&Jz(j8))j8=null;if(o8!==null&&Jz(o8))o8=null;Jb.forEach(iH),Yb.forEach(iH)}function Hb(b,z){if(b.blockedOn===z){if(b.blockedOn=null,!OZ)OZ=!0,t1.unstable_scheduleCallback(t1.unstable_NormalPriority,JN)}}function Gb(b){if(Zz.length>0){Hb(Zz[0],b);for(var z=1;z<Zz.length;z++){var Q=Zz[z];if(Q.blockedOn===b)Q.blockedOn=null}}if(i8!==null)Hb(i8,b);if(j8!==null)Hb(j8,b);if(o8!==null)Hb(o8,b);var X=function(K){return Hb(K,b)};Jb.forEach(X),Yb.forEach(X);for(var Z=0;Z<a8.length;Z++){var J=a8[Z];if(J.blockedOn===b)J.blockedOn=null}while(a8.length>0){var $=a8[0];if($.blockedOn!==null)break;else if(xH($),$.blockedOn===null)a8.shift()}}var C3=Y.ReactCurrentBatchConfig,LZ=!0;function jH(b){LZ=!!b}function YN(){return LZ}function $N(b,z,Q){var X=oH(z),Z;switch(X){case J5:Z=HN;break;case R8:Z=GN;break;case P8:default:Z=NZ;break}return Z.bind(null,z,Q,b)}function HN(b,z,Q,X){var Z=h5(),J=C3.transition;C3.transition=null;try{U4(J5),NZ(b,z,Q,X)}finally{U4(Z),C3.transition=J}}function GN(b,z,Q,X){var Z=h5(),J=C3.transition;C3.transition=null;try{U4(R8),NZ(b,z,Q,X)}finally{U4(Z),C3.transition=J}}function NZ(b,z,Q,X){if(!LZ)return;KN(b,z,Q,X)}function KN(b,z,Q,X){var Z=WZ(b,z,Q,X);if(Z===null){SZ(b,z,X,Yz,Q),pH(b,X);return}if(XN(Z,b,z,Q,X)){X.stopPropagation();return}if(pH(b,X),z&p2&&zN(b)){while(Z!==null){var J=t8(Z);if(J!==null)rL(J);var $=WZ(b,z,Q,X);if($===null)SZ(b,z,X,Yz,Q);if($===Z)break;Z=$}if(Z!==null)X.stopPropagation();return}SZ(b,z,X,null,Q)}var Yz=null;function WZ(b,z,Q,X){Yz=null;var Z=FX(X),J=g7(Z);if(J!==null){var $=f7(J);if($===null)J=null;else{var K=$.tag;if(K===j){var U=OH($);if(U!==null)return U;J=null}else if(K===F){var N=$.stateNode;if(Xz(N))return LH($);J=null}else if($!==J)J=null}}return Yz=J,null}function oH(b){switch(b){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"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 J5;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return R8;case"message":{var z=zL();switch(z){case a9:return J5;case gX:return R8;case C7:case QL:return P8;case EX:return Qz;default:return P8}}default:return P8}}function UN(b,z,Q){return b.addEventListener(z,Q,!1),Q}function qN(b,z,Q){return b.addEventListener(z,Q,!0),Q}function BN(b,z,Q,X){return b.addEventListener(z,Q,{capture:!0,passive:X}),Q}function ON(b,z,Q,X){return b.addEventListener(z,Q,{passive:X}),Q}var Kb=null,_Z=null,Ub=null;function LN(b){return Kb=b,_Z=rH(),!0}function NN(){Kb=null,_Z=null,Ub=null}function aH(){if(Ub)return Ub;var b,z=_Z,Q=z.length,X,Z=rH(),J=Z.length;for(b=0;b<Q;b++)if(z[b]!==Z[b])break;var $=Q-b;for(X=1;X<=$;X++)if(z[Q-X]!==Z[J-X])break;var K=X>1?1-X:void 0;return Ub=Z.slice(b,K),Ub}function rH(){if("value"in Kb)return Kb.value;return Kb.textContent}function $z(b){var z,Q=b.keyCode;if("charCode"in b){if(z=b.charCode,z===0&&Q===13)z=13}else z=Q;if(z===10)z=13;if(z>=32||z===13)return z;return 0}function Hz(){return!0}function nH(){return!1}function Y5(b){function z(Q,X,Z,J,$){this._reactName=Q,this._targetInst=Z,this.type=X,this.nativeEvent=J,this.target=$,this.currentTarget=null;for(var K in b){if(!b.hasOwnProperty(K))continue;var U=b[K];if(U)this[K]=U(J);else this[K]=J[K]}var N=J.defaultPrevented!=null?J.defaultPrevented:J.returnValue===!1;if(N)this.isDefaultPrevented=Hz;else this.isDefaultPrevented=nH;return this.isPropagationStopped=nH,this}return L1(z.prototype,{preventDefault:function(){this.defaultPrevented=!0;var Q=this.nativeEvent;if(!Q)return;if(Q.preventDefault)Q.preventDefault();else if(typeof Q.returnValue!=="unknown")Q.returnValue=!1;this.isDefaultPrevented=Hz},stopPropagation:function(){var Q=this.nativeEvent;if(!Q)return;if(Q.stopPropagation)Q.stopPropagation();else if(typeof Q.cancelBubble!=="unknown")Q.cancelBubble=!0;this.isPropagationStopped=Hz},persist:function(){},isPersistent:Hz}),z}var S3={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(b){return b.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},MZ=Y5(S3),qb=L1({},S3,{view:0,detail:0}),WN=Y5(qb),wZ,RZ,Bb;function _N(b){if(b!==Bb){if(Bb&&b.type==="mousemove")wZ=b.screenX-Bb.screenX,RZ=b.screenY-Bb.screenY;else wZ=0,RZ=0;Bb=b}}var Gz=L1({},qb,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vZ,button:0,buttons:0,relatedTarget:function(b){if(b.relatedTarget===void 0)return b.fromElement===b.srcElement?b.toElement:b.fromElement;return b.relatedTarget},movementX:function(b){if("movementX"in b)return b.movementX;return _N(b),wZ},movementY:function(b){if("movementY"in b)return b.movementY;return RZ}}),tH=Y5(Gz),MN=L1({},Gz,{dataTransfer:0}),wN=Y5(MN),RN=L1({},qb,{relatedTarget:0}),PZ=Y5(RN),PN=L1({},S3,{animationName:0,elapsedTime:0,pseudoElement:0}),vN=Y5(PN),FN=L1({},S3,{clipboardData:function(b){return"clipboardData"in b?b.clipboardData:window.clipboardData}}),AN=Y5(FN),kN=L1({},S3,{data:0}),sH=Y5(kN),IN=sH,TN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},fN={"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"};function CN(b){if(b.key){var z=TN[b.key]||b.key;if(z!=="Unidentified")return z}if(b.type==="keypress"){var Q=$z(b);return Q===13?"Enter":String.fromCharCode(Q)}if(b.type==="keydown"||b.type==="keyup")return fN[b.keyCode]||"Unidentified";return""}var SN={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function hN(b){var z=this,Q=z.nativeEvent;if(Q.getModifierState)return Q.getModifierState(b);var X=SN[b];return X?!!Q[X]:!1}function vZ(b){return hN}var VN=L1({},qb,{key:CN,code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vZ,charCode:function(b){if(b.type==="keypress")return $z(b);return 0},keyCode:function(b){if(b.type==="keydown"||b.type==="keyup")return b.keyCode;return 0},which:function(b){if(b.type==="keypress")return $z(b);if(b.type==="keydown"||b.type==="keyup")return b.keyCode;return 0}}),DN=Y5(VN),yN=L1({},Gz,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),eH=Y5(yN),mN=L1({},qb,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vZ}),uN=Y5(mN),gN=L1({},S3,{propertyName:0,elapsedTime:0,pseudoElement:0}),EN=Y5(gN),cN=L1({},Gz,{deltaX:function(b){return"deltaX"in b?b.deltaX:("wheelDeltaX"in b)?-b.wheelDeltaX:0},deltaY:function(b){return"deltaY"in b?b.deltaY:("wheelDeltaY"in b)?-b.wheelDeltaY:("wheelDelta"in b)?-b.wheelDelta:0},deltaZ:0,deltaMode:0}),dN=Y5(cN),lN=[9,13,27,32],bG=229,FZ=J6&&"CompositionEvent"in window,Ob=null;if(J6&&"documentMode"in document)Ob=document.documentMode;var pN=J6&&"TextEvent"in window&&!Ob,zG=J6&&(!FZ||Ob&&Ob>8&&Ob<=11),QG=32,XG=String.fromCharCode(QG);function xN(){O1("onBeforeInput",["compositionend","keypress","textInput","paste"]),O1("onCompositionEnd",["compositionend","focusout","keydown","keypress","keyup","mousedown"]),O1("onCompositionStart",["compositionstart","focusout","keydown","keypress","keyup","mousedown"]),O1("onCompositionUpdate",["compositionupdate","focusout","keydown","keypress","keyup","mousedown"])}var ZG=!1;function iN(b){return(b.ctrlKey||b.altKey||b.metaKey)&&!(b.ctrlKey&&b.altKey)}function jN(b){switch(b){case"compositionstart":return"onCompositionStart";case"compositionend":return"onCompositionEnd";case"compositionupdate":return"onCompositionUpdate"}}function oN(b,z){return b==="keydown"&&z.keyCode===bG}function JG(b,z){switch(b){case"keyup":return lN.indexOf(z.keyCode)!==-1;case"keydown":return z.keyCode!==bG;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YG(b){var z=b.detail;if(typeof z==="object"&&"data"in z)return z.data;return null}function $G(b){return b.locale==="ko"}var h3=!1;function aN(b,z,Q,X,Z){var J,$;if(FZ)J=jN(z);else if(!h3){if(oN(z,X))J="onCompositionStart"}else if(JG(z,X))J="onCompositionEnd";if(!J)return null;if(zG&&!$G(X)){if(!h3&&J==="onCompositionStart")h3=LN(Z);else if(J==="onCompositionEnd"){if(h3)$=aH()}}var K=Oz(Q,J);if(K.length>0){var U=new sH(J,z,null,X,Z);if(b.push({event:U,listeners:K}),$)U.data=$;else{var N=YG(X);if(N!==null)U.data=N}}}function rN(b,z){switch(b){case"compositionend":return YG(z);case"keypress":var Q=z.which;if(Q!==QG)return null;return ZG=!0,XG;case"textInput":var X=z.data;if(X===XG&&ZG)return null;return X;default:return null}}function nN(b,z){if(h3){if(b==="compositionend"||!FZ&&JG(b,z)){var Q=aH();return NN(),h3=!1,Q}return null}switch(b){case"paste":return null;case"keypress":if(!iN(z)){if(z.char&&z.char.length>1)return z.char;else if(z.which)return String.fromCharCode(z.which)}return null;case"compositionend":return zG&&!$G(z)?null:z.data;default:return null}}function tN(b,z,Q,X,Z){var J;if(pN)J=rN(z,X);else J=nN(z,X);if(!J)return null;var $=Oz(Q,"onBeforeInput");if($.length>0){var K=new IN("onBeforeInput","beforeinput",null,X,Z);b.push({event:K,listeners:$}),K.data=J}}function sN(b,z,Q,X,Z,J,$){aN(b,z,Q,X,Z),tN(b,z,Q,X,Z)}var eN={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 HG(b){var z=b&&b.nodeName&&b.nodeName.toLowerCase();if(z==="input")return!!eN[b.type];if(z==="textarea")return!0;return!1}function bW(b){if(!J6)return!1;var z="on"+b,Q=z in document;if(!Q){var X=document.createElement("div");X.setAttribute(z,"return;"),Q=typeof X[z]==="function"}return Q}function zW(){O1("onChange",["change","click","focusin","focusout","input","keydown","keyup","selectionchange"])}function GG(b,z,Q,X){YH(X);var Z=Oz(z,"onChange");if(Z.length>0){var J=new MZ("onChange","change",null,Q,X);b.push({event:J,listeners:Z})}}var Lb=null,Nb=null;function QW(b){var z=b.nodeName&&b.nodeName.toLowerCase();return z==="select"||z==="input"&&b.type==="file"}function XW(b){var z=[];GG(z,Nb,b,FX(b)),KH(ZW,z)}function ZW(b){IG(b,0)}function Kz(b){var z=g3(b);if(O3(z))return b}function JW(b,z){if(b==="change")return z}var KG=!1;if(J6)KG=bW("input")&&(!document.documentMode||document.documentMode>9);function YW(b,z){Lb=b,Nb=z,Lb.attachEvent("onpropertychange",qG)}function UG(){if(!Lb)return;Lb.detachEvent("onpropertychange",qG),Lb=null,Nb=null}function qG(b){if(b.propertyName!=="value")return;if(Kz(Nb))XW(b)}function $W(b,z,Q){if(b==="focusin")UG(),YW(z,Q);else if(b==="focusout")UG()}function HW(b,z){if(b==="selectionchange"||b==="keyup"||b==="keydown")return Kz(Nb)}function GW(b){var z=b.nodeName;return z&&z.toLowerCase()==="input"&&(b.type==="checkbox"||b.type==="radio")}function KW(b,z){if(b==="click")return Kz(z)}function UW(b,z){if(b==="input"||b==="change")return Kz(z)}function qW(b){var z=b._wrapperState;if(!z||!z.controlled||b.type!=="number")return;e0(b,"number",b.value)}function BW(b,z,Q,X,Z,J,$){var K=Q?g3(Q):window,U,N;if(QW(K))U=JW;else if(HG(K))if(KG)U=UW;else U=HW,N=$W;else if(GW(K))U=KW;if(U){var R=U(z,Q);if(R){GG(b,R,X,Z);return}}if(N)N(z,K,Q);if(z==="focusout")qW(K)}function OW(){f6("onMouseEnter",["mouseout","mouseover"]),f6("onMouseLeave",["mouseout","mouseover"]),f6("onPointerEnter",["pointerout","pointerover"]),f6("onPointerLeave",["pointerout","pointerover"])}function LW(b,z,Q,X,Z,J,$){var K=z==="mouseover"||z==="pointerover",U=z==="mouseout"||z==="pointerout";if(K&&!hO(X)){var N=X.relatedTarget||X.fromElement;if(N){if(g7(N)||Sb(N))return}}if(!U&&!K)return;var R;if(Z.window===Z)R=Z;else{var y=Z.ownerDocument;if(y)R=y.defaultView||y.parentWindow;else R=window}var D,p;if(U){var x=X.relatedTarget||X.toElement;if(D=Q,p=x?g7(x):null,p!==null){var a=f7(p);if(p!==a||p.tag!==_&&p.tag!==W)p=null}}else D=null,p=Q;if(D===p)return;var w0=tH,p0="onMouseLeave",E0="onMouseEnter",W1="mouse";if(z==="pointerout"||z==="pointerover")w0=eH,p0="onPointerLeave",E0="onPointerEnter",W1="pointer";var _1=D==null?R:g3(D),c=p==null?R:g3(p),s=new w0(p0,W1+"leave",D,X,Z);s.target=_1,s.relatedTarget=c;var d=null,G0=g7(Z);if(G0===Q){var I0=new w0(E0,W1+"enter",p,X,Z);I0.target=c,I0.relatedTarget=_1,d=I0}EW(b,s,d,D,p)}function NW(b,z){return b===z&&(b!==0||1/b===1/z)||b!==b&&z!==z}var $5=typeof Object.is==="function"?Object.is:NW;function Wb(b,z){if($5(b,z))return!0;if(typeof b!=="object"||b===null||typeof z!=="object"||z===null)return!1;var Q=Object.keys(b),X=Object.keys(z);if(Q.length!==X.length)return!1;for(var Z=0;Z<Q.length;Z++){var J=Q[Z];if(!u6.call(z,J)||!$5(b[J],z[J]))return!1}return!0}function BG(b){while(b&&b.firstChild)b=b.firstChild;return b}function WW(b){while(b){if(b.nextSibling)return b.nextSibling;b=b.parentNode}}function OG(b,z){var Q=BG(b),X=0,Z=0;while(Q){if(Q.nodeType===O8){if(Z=X+Q.textContent.length,X<=z&&Z>=z)return{node:Q,offset:z-X};X=Z}Q=BG(WW(Q))}}function _W(b){var z=b.ownerDocument,Q=z&&z.defaultView||window,X=Q.getSelection&&Q.getSelection();if(!X||X.rangeCount===0)return null;var{anchorNode:Z,anchorOffset:J,focusNode:$,focusOffset:K}=X;try{Z.nodeType,$.nodeType}catch(U){return null}return MW(b,Z,J,$,K)}function MW(b,z,Q,X,Z){var J=0,$=-1,K=-1,U=0,N=0,R=b,y=null;b:while(!0){var D=null;while(!0){if(R===z&&(Q===0||R.nodeType===O8))$=J+Q;if(R===X&&(Z===0||R.nodeType===O8))K=J+Z;if(R.nodeType===O8)J+=R.nodeValue.length;if((D=R.firstChild)===null)break;y=R,R=D}while(!0){if(R===b)break b;if(y===z&&++U===Q)$=J;if(y===X&&++N===Z)K=J;if((D=R.nextSibling)!==null)break;R=y,y=R.parentNode}R=D}if($===-1||K===-1)return null;return{start:$,end:K}}function wW(b,z){var Q=b.ownerDocument||document,X=Q&&Q.defaultView||window;if(!X.getSelection)return;var Z=X.getSelection(),J=b.textContent.length,$=Math.min(z.start,J),K=z.end===void 0?$:Math.min(z.end,J);if(!Z.extend&&$>K){var U=K;K=$,$=U}var N=OG(b,$),R=OG(b,K);if(N&&R){if(Z.rangeCount===1&&Z.anchorNode===N.node&&Z.anchorOffset===N.offset&&Z.focusNode===R.node&&Z.focusOffset===R.offset)return;var y=Q.createRange();if(y.setStart(N.node,N.offset),Z.removeAllRanges(),$>K)Z.addRange(y),Z.extend(R.node,R.offset);else y.setEnd(R.node,R.offset),Z.addRange(y)}}function LG(b){return b&&b.nodeType===O8}function NG(b,z){if(!b||!z)return!1;else if(b===z)return!0;else if(LG(b))return!1;else if(LG(z))return NG(b,z.parentNode);else if("contains"in b)return b.contains(z);else if(b.compareDocumentPosition)return!!(b.compareDocumentPosition(z)&16);else return!1}function RW(b){return b&&b.ownerDocument&&NG(b.ownerDocument.documentElement,b)}function PW(b){try{return typeof b.contentWindow.location.href==="string"}catch(z){return!1}}function WG(){var b=window,z=p8();while(z instanceof b.HTMLIFrameElement){if(PW(z))b=z.contentWindow;else return z;z=p8(b.document)}return z}function AZ(b){var z=b&&b.nodeName&&b.nodeName.toLowerCase();return z&&(z==="input"&&(b.type==="text"||b.type==="search"||b.type==="tel"||b.type==="url"||b.type==="password")||z==="textarea"||b.contentEditable==="true")}function vW(){var b=WG();return{focusedElem:b,selectionRange:AZ(b)?AW(b):null}}function FW(b){var z=WG(),Q=b.focusedElem,X=b.selectionRange;if(z!==Q&&RW(Q)){if(X!==null&&AZ(Q))kW(Q,X);var Z=[],J=Q;while(J=J.parentNode)if(J.nodeType===a4)Z.push({element:J,left:J.scrollLeft,top:J.scrollTop});if(typeof Q.focus==="function")Q.focus();for(var $=0;$<Z.length;$++){var K=Z[$];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}}function AW(b){var z;if("selectionStart"in b)z={start:b.selectionStart,end:b.selectionEnd};else z=_W(b);return z||{start:0,end:0}}function kW(b,z){var{start:Q,end:X}=z;if(X===void 0)X=Q;if("selectionStart"in b)b.selectionStart=Q,b.selectionEnd=Math.min(X,b.value.length);else wW(b,z)}var IW=J6&&"documentMode"in document&&document.documentMode<=11;function TW(){O1("onSelect",["focusout","contextmenu","dragend","focusin","keydown","keyup","mousedown","mouseup","selectionchange"])}var V3=null,kZ=null,_b=null,IZ=!1;function fW(b){if("selectionStart"in b&&AZ(b))return{start:b.selectionStart,end:b.selectionEnd};else{var z=b.ownerDocument&&b.ownerDocument.defaultView||window,Q=z.getSelection();return{anchorNode:Q.anchorNode,anchorOffset:Q.anchorOffset,focusNode:Q.focusNode,focusOffset:Q.focusOffset}}}function CW(b){return b.window===b?b.document:b.nodeType===L8?b:b.ownerDocument}function _G(b,z,Q){var X=CW(Q);if(IZ||V3==null||V3!==p8(X))return;var Z=fW(V3);if(!_b||!Wb(_b,Z)){_b=Z;var J=Oz(kZ,"onSelect");if(J.length>0){var $=new MZ("onSelect","select",null,z,Q);b.push({event:$,listeners:J}),$.target=V3}}}function SW(b,z,Q,X,Z,J,$){var K=Q?g3(Q):window;switch(z){case"focusin":if(HG(K)||K.contentEditable==="true")V3=K,kZ=Q,_b=null;break;case"focusout":V3=null,kZ=null,_b=null;break;case"mousedown":IZ=!0;break;case"contextmenu":case"mouseup":case"dragend":IZ=!1,_G(b,X,Z);break;case"selectionchange":if(IW)break;case"keydown":case"keyup":_G(b,X,Z)}}function Uz(b,z){var Q={};return Q[b.toLowerCase()]=z.toLowerCase(),Q["Webkit"+b]="webkit"+z,Q["Moz"+b]="moz"+z,Q}var D3={animationend:Uz("Animation","AnimationEnd"),animationiteration:Uz("Animation","AnimationIteration"),animationstart:Uz("Animation","AnimationStart"),transitionend:Uz("Transition","TransitionEnd")},TZ={},MG={};if(J6){if(MG=document.createElement("div").style,!("AnimationEvent"in window))delete D3.animationend.animation,delete D3.animationiteration.animation,delete D3.animationstart.animation;if(!("TransitionEvent"in window))delete D3.transitionend.transition}function qz(b){if(TZ[b])return TZ[b];else if(!D3[b])return b;var z=D3[b];for(var Q in z)if(z.hasOwnProperty(Q)&&Q in MG)return TZ[b]=z[Q];return b}var wG=qz("animationend"),RG=qz("animationiteration"),PG=qz("animationstart"),vG=qz("transitionend"),FG=new Map,AG=["abort","auxClick","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"];function r8(b,z){FG.set(b,z),O1(z,[b])}function hW(){for(var b=0;b<AG.length;b++){var z=AG[b],Q=z.toLowerCase(),X=z[0].toUpperCase()+z.slice(1);r8(Q,"on"+X)}r8(wG,"onAnimationEnd"),r8(RG,"onAnimationIteration"),r8(PG,"onAnimationStart"),r8("dblclick","onDoubleClick"),r8("focusin","onFocus"),r8("focusout","onBlur"),r8(vG,"onTransitionEnd")}function VW(b,z,Q,X,Z,J,$){var K=FG.get(z);if(K===void 0)return;var U=MZ,N=z;switch(z){case"keypress":if($z(X)===0)return;case"keydown":case"keyup":U=DN;break;case"focusin":N="focus",U=PZ;break;case"focusout":N="blur",U=PZ;break;case"beforeblur":case"afterblur":U=PZ;break;case"click":if(X.button===2)return;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":U=tH;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=wN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=uN;break;case wG:case RG:case PG:U=vN;break;case vG:U=EN;break;case"scroll":U=WN;break;case"wheel":U=dN;break;case"copy":case"cut":case"paste":U=AN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=eH;break}var R=(J&p2)!==0;{var y=!R&&z==="scroll",D=uW(Q,K,X.type,R,y);if(D.length>0){var p=new U(K,N,null,X,Z);b.push({event:p,listeners:D})}}}hW(),OW(),zW(),TW(),xN();function DW(b,z,Q,X,Z,J,$){VW(b,z,Q,X,Z,J);var K=(J&fO)===0;if(K)LW(b,z,Q,X,Z),BW(b,z,Q,X,Z),SW(b,z,Q,X,Z),sN(b,z,Q,X,Z)}var Mb=["abort","canplay","canplaythrough","durationchange","emptied","encrypted","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","resize","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],fZ=new Set(["cancel","close","invalid","load","scroll","toggle"].concat(Mb));function kG(b,z,Q){var X=b.type||"unknown-event";b.currentTarget=Q,dO(X,z,void 0,b),b.currentTarget=null}function yW(b,z,Q){var X;if(Q)for(var Z=z.length-1;Z>=0;Z--){var J=z[Z],$=J.instance,K=J.currentTarget,U=J.listener;if($!==X&&b.isPropagationStopped())return;kG(b,U,K),X=$}else for(var N=0;N<z.length;N++){var R=z[N],y=R.instance,D=R.currentTarget,p=R.listener;if(y!==X&&b.isPropagationStopped())return;kG(b,p,D),X=y}}function IG(b,z){var Q=(z&p2)!==0;for(var X=0;X<b.length;X++){var Z=b[X],J=Z.event,$=Z.listeners;yW(J,$,Q)}lO()}function mW(b,z,Q,X,Z){var J=FX(Q),$=[];DW($,b,X,Q,J,z),IG($,z)}function R6(b,z){if(!fZ.has(b))H('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',b);var Q=!1,X=qM(z),Z=cW(b,Q);if(!X.has(Z))TG(z,b,vX,Q),X.add(Z)}function CZ(b,z,Q){if(fZ.has(b)&&!z)H('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.',b);var X=0;if(z)X|=p2;TG(Q,b,X,z)}var Bz="_reactListening"+Math.random().toString(36).slice(2);function wb(b){if(!b[Bz]){b[Bz]=!0,R0.forEach(function(Q){if(Q!=="selectionchange"){if(!fZ.has(Q))CZ(Q,!1,b);CZ(Q,!0,b)}});var z=b.nodeType===L8?b:b.ownerDocument;if(z!==null){if(!z[Bz])z[Bz]=!0,CZ("selectionchange",!1,z)}}}function TG(b,z,Q,X,Z){var J=$N(b,z,Q),$=void 0;if(IX){if(z==="touchstart"||z==="touchmove"||z==="wheel")$=!0}b=b;var K;if(X)if($!==void 0)K=BN(b,z,J,$);else K=qN(b,z,J);else if($!==void 0)K=ON(b,z,J,$);else K=UN(b,z,J)}function fG(b,z){return b===z||b.nodeType===x6&&b.parentNode===z}function SZ(b,z,Q,X,Z){var J=X;if((z&ZH)===0&&(z&vX)===0){var $=Z;if(X!==null){var K=X;b:while(!0){if(K===null)return;var U=K.tag;if(U===F||U===v){var N=K.stateNode.containerInfo;if(fG(N,$))break;if(U===v){var R=K.return;while(R!==null){var y=R.tag;if(y===F||y===v){var D=R.stateNode.containerInfo;if(fG(D,$))return}R=R.return}}while(N!==null){var p=g7(N);if(p===null)return;var x=p.tag;if(x===_||x===W){K=J=p;continue b}N=N.parentNode}}K=K.return}}}KH(function(){return mW(b,z,Q,J)})}function Rb(b,z,Q){return{instance:b,listener:z,currentTarget:Q}}function uW(b,z,Q,X,Z,J){var $=z!==null?z+"Capture":null,K=X?$:z,U=[],N=b,R=null;while(N!==null){var y=N,D=y.stateNode,p=y.tag;if(p===_&&D!==null){if(R=D,K!==null){var x=i2(N,K);if(x!=null)U.push(Rb(N,x,R))}}if(Z)break;N=N.return}return U}function Oz(b,z){var Q=z+"Capture",X=[],Z=b;while(Z!==null){var J=Z,$=J.stateNode,K=J.tag;if(K===_&&$!==null){var U=$,N=i2(Z,Q);if(N!=null)X.unshift(Rb(Z,N,U));var R=i2(Z,z);if(R!=null)X.push(Rb(Z,R,U))}Z=Z.return}return X}function y3(b){if(b===null)return null;do b=b.return;while(b&&b.tag!==_);if(b)return b;return null}function gW(b,z){var Q=b,X=z,Z=0;for(var J=Q;J;J=y3(J))Z++;var $=0;for(var K=X;K;K=y3(K))$++;while(Z-$>0)Q=y3(Q),Z--;while($-Z>0)X=y3(X),$--;var U=Z;while(U--){if(Q===X||X!==null&&Q===X.alternate)return Q;Q=y3(Q),X=y3(X)}return null}function CG(b,z,Q,X,Z){var J=z._reactName,$=[],K=Q;while(K!==null){if(K===X)break;var U=K,N=U.alternate,R=U.stateNode,y=U.tag;if(N!==null&&N===X)break;if(y===_&&R!==null){var D=R;if(Z){var p=i2(K,J);if(p!=null)$.unshift(Rb(K,p,D))}else if(!Z){var x=i2(K,J);if(x!=null)$.push(Rb(K,x,D))}}K=K.return}if($.length!==0)b.push({event:z,listeners:$})}function EW(b,z,Q,X,Z){var J=X&&Z?gW(X,Z):null;if(X!==null)CG(b,z,X,J,!1);if(Z!==null&&Q!==null)CG(b,Q,Z,J,!0)}function cW(b,z){return b+"__"+(z?"capture":"bubble")}var r4=!1,Pb="dangerouslySetInnerHTML",Lz="suppressContentEditableWarning",n8="suppressHydrationWarning",SG="autoFocus",m7="children",u7="style",Nz="__html",hZ,Wz,vb,hG,_z,VG,DG;hZ={dialog:!0,webview:!0},Wz=function(b,z){PO(b,z),vO(b,z),TO(b,z,{registrationNameDependencies:t0,possibleRegistrationNames:$1})},VG=J6&&!document.documentMode,vb=function(b,z,Q){if(r4)return;var X=Mz(Q),Z=Mz(z);if(Z===X)return;r4=!0,H("Prop `%s` did not match. Server: %s Client: %s",b,JSON.stringify(Z),JSON.stringify(X))},hG=function(b){if(r4)return;r4=!0;var z=[];b.forEach(function(Q){z.push(Q)}),H("Extra attributes from the server: %s",z)},_z=function(b,z){if(z===!1)H("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",b,b,b);else H("Expected `%s` listener to be a function, instead got a value of `%s` type.",b,typeof z)},DG=function(b,z){var Q=b.namespaceURI===B8?b.ownerDocument.createElement(b.tagName):b.ownerDocument.createElementNS(b.namespaceURI,b.tagName);return Q.innerHTML=z,Q.innerHTML};var dW=/\r\n?/g,lW=/\u0000|\uFFFD/g;function Mz(b){I5(b);var z=typeof b==="string"?b:""+b;return z.replace(dW,`
32
+ `).replace(lW,"")}function wz(b,z,Q,X){var Z=Mz(z),J=Mz(b);if(J===Z)return;if(X){if(!r4)r4=!0,H('Text content did not match. Server: "%s" Client: "%s"',J,Z)}if(Q&&F0)throw Error("Text content does not match server-rendered HTML.")}function yG(b){return b.nodeType===L8?b:b.ownerDocument}function pW(){}function Rz(b){b.onclick=pW}function xW(b,z,Q,X,Z){for(var J in X){if(!X.hasOwnProperty(J))continue;var $=X[J];if(J===u7){if($)Object.freeze($);s$(z,$)}else if(J===Pb){var K=$?$[Nz]:void 0;if(K!=null)o$(z,K)}else if(J===m7){if(typeof $==="string"){var U=b!=="textarea"||$!=="";if(U)l9(z,$)}else if(typeof $==="number")l9(z,""+$)}else if(J===Lz||J===n8);else if(J===SG);else if(t0.hasOwnProperty(J)){if($!=null){if(typeof $!=="function")_z(J,$);if(J==="onScroll")R6("scroll",z)}}else if($!=null)R1(z,J,$,Z)}}function iW(b,z,Q,X){for(var Z=0;Z<z.length;Z+=2){var J=z[Z],$=z[Z+1];if(J===u7)s$(b,$);else if(J===Pb)o$(b,$);else if(J===m7)l9(b,$);else R1(b,J,$,X)}}function jW(b,z,Q,X){var Z,J=yG(Q),$,K=X;if(K===B8)K=WX(b);if(K===B8){if(Z=F7(b,z),!Z&&b!==b.toLowerCase())H("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",b);if(b==="script"){var U=J.createElement("div");U.innerHTML="<script></script>";var N=U.firstChild;$=U.removeChild(N)}else if(typeof z.is==="string")$=J.createElement(b,{is:z.is});else if($=J.createElement(b),b==="select"){var R=$;if(z.multiple)R.multiple=!0;else if(z.size)R.size=z.size}}else $=J.createElementNS(K,b);if(K===B8){if(!Z&&Object.prototype.toString.call($)==="[object HTMLUnknownElement]"&&!u6.call(hZ,b))hZ[b]=!0,H("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.",b)}return $}function oW(b,z){return yG(z).createTextNode(b)}function aW(b,z,Q,X){var Z=F7(z,Q);Wz(z,Q);var J;switch(z){case"dialog":R6("cancel",b),R6("close",b),J=Q;break;case"iframe":case"object":case"embed":R6("load",b),J=Q;break;case"video":case"audio":for(var $=0;$<Mb.length;$++)R6(Mb[$],b);J=Q;break;case"source":R6("error",b),J=Q;break;case"img":case"image":case"link":R6("error",b),R6("load",b),J=Q;break;case"details":R6("toggle",b),J=Q;break;case"input":I(b,Q),J=B(b,Q),R6("invalid",b);break;case"option":G6(b,Q),J=Q;break;case"select":d2(b,Q),J=c2(b,Q),R6("invalid",b);break;case"textarea":x$(b,Q),J=LX(b,Q),R6("invalid",b);break;default:J=Q}switch(PX(z,J),xW(z,b,X,J,Z),z){case"input":U8(b),O0(b,Q,!1);break;case"textarea":U8(b),j$(b);break;case"option":w6(b,Q);break;case"select":OX(b,Q);break;default:if(typeof J.onClick==="function")Rz(b);break}}function rW(b,z,Q,X,Z){Wz(z,X);var J=null,$,K;switch(z){case"input":$=B(b,Q),K=B(b,X),J=[];break;case"select":$=c2(b,Q),K=c2(b,X),J=[];break;case"textarea":$=LX(b,Q),K=LX(b,X),J=[];break;default:if($=Q,K=X,typeof $.onClick!=="function"&&typeof K.onClick==="function")Rz(b);break}PX(z,K);var U,N,R=null;for(U in $){if(K.hasOwnProperty(U)||!$.hasOwnProperty(U)||$[U]==null)continue;if(U===u7){var y=$[U];for(N in y)if(y.hasOwnProperty(N)){if(!R)R={};R[N]=""}}else if(U===Pb||U===m7);else if(U===Lz||U===n8);else if(U===SG);else if(t0.hasOwnProperty(U)){if(!J)J=[]}else(J=J||[]).push(U,null)}for(U in K){var D=K[U],p=$!=null?$[U]:void 0;if(!K.hasOwnProperty(U)||D===p||D==null&&p==null)continue;if(U===u7){if(D)Object.freeze(D);if(p){for(N in p)if(p.hasOwnProperty(N)&&(!D||!D.hasOwnProperty(N))){if(!R)R={};R[N]=""}for(N in D)if(D.hasOwnProperty(N)&&p[N]!==D[N]){if(!R)R={};R[N]=D[N]}}else{if(!R){if(!J)J=[];J.push(U,R)}R=D}}else if(U===Pb){var x=D?D[Nz]:void 0,a=p?p[Nz]:void 0;if(x!=null){if(a!==x)(J=J||[]).push(U,x)}}else if(U===m7){if(typeof D==="string"||typeof D==="number")(J=J||[]).push(U,""+D)}else if(U===Lz||U===n8);else if(t0.hasOwnProperty(U)){if(D!=null){if(typeof D!=="function")_z(U,D);if(U==="onScroll")R6("scroll",b)}if(!J&&p!==D)J=[]}else(J=J||[]).push(U,D)}if(R)OO(R,K[u7]),(J=J||[]).push(u7,R);return J}function nW(b,z,Q,X,Z){if(Q==="input"&&Z.type==="radio"&&Z.name!=null)l(b,Z);var J=F7(Q,X),$=F7(Q,Z);switch(iW(b,z,J,$),Q){case"input":r(b,Z);break;case"textarea":i$(b,Z);break;case"select":iB(b,Z);break}}function tW(b){{var z=b.toLowerCase();if(!p9.hasOwnProperty(z))return null;return p9[z]||null}}function sW(b,z,Q,X,Z,J,$){var K,U;switch(K=F7(z,Q),Wz(z,Q),z){case"dialog":R6("cancel",b),R6("close",b);break;case"iframe":case"object":case"embed":R6("load",b);break;case"video":case"audio":for(var N=0;N<Mb.length;N++)R6(Mb[N],b);break;case"source":R6("error",b);break;case"img":case"image":case"link":R6("error",b),R6("load",b);break;case"details":R6("toggle",b);break;case"input":I(b,Q),R6("invalid",b);break;case"option":G6(b,Q);break;case"select":d2(b,Q),R6("invalid",b);break;case"textarea":x$(b,Q),R6("invalid",b);break}PX(z,Q);{U=new Set;var R=b.attributes;for(var y=0;y<R.length;y++){var D=R[y].name.toLowerCase();switch(D){case"value":break;case"checked":break;case"selected":break;default:U.add(R[y].name)}}}var p=null;for(var x in Q){if(!Q.hasOwnProperty(x))continue;var a=Q[x];if(x===m7){if(typeof a==="string"){if(b.textContent!==a){if(Q[n8]!==!0)wz(b.textContent,a,J,$);p=[m7,a]}}else if(typeof a==="number"){if(b.textContent!==""+a){if(Q[n8]!==!0)wz(b.textContent,a,J,$);p=[m7,""+a]}}}else if(t0.hasOwnProperty(x)){if(a!=null){if(typeof a!=="function")_z(x,a);if(x==="onScroll")R6("scroll",b)}}else if($&&!0&&typeof K==="boolean"){var w0=void 0,p0=K&&U1?null:c6(x);if(Q[n8]===!0);else if(x===Lz||x===n8||x==="value"||x==="checked"||x==="selected");else if(x===Pb){var E0=b.innerHTML,W1=a?a[Nz]:void 0;if(W1!=null){var _1=DG(b,W1);if(_1!==E0)vb(x,E0,_1)}}else if(x===u7){if(U.delete(x),VG){var c=qO(a);if(w0=b.getAttribute("style"),c!==w0)vb(x,w0,c)}}else if(K&&!U1){if(U.delete(x.toLowerCase()),w0=f5(b,x,a),a!==w0)vb(x,w0,a)}else if(!x1(x,p0,K)&&!e1(x,a,p0,K)){var s=!1;if(p0!==null)U.delete(p0.attributeName),w0=f4(b,x,a,p0);else{var d=X;if(d===B8)d=WX(z);if(d===B8)U.delete(x.toLowerCase());else{var G0=tW(x);if(G0!==null&&G0!==x)s=!0,U.delete(G0);U.delete(x)}w0=f5(b,x,a)}var I0=U1;if(!I0&&a!==w0&&!s)vb(x,w0,a)}}}if($){if(U.size>0&&Q[n8]!==!0)hG(U)}switch(z){case"input":U8(b),O0(b,Q,!0);break;case"textarea":U8(b),j$(b);break;case"select":case"option":break;default:if(typeof Q.onClick==="function")Rz(b);break}return p}function eW(b,z,Q){var X=b.nodeValue!==z;return X}function VZ(b,z){{if(r4)return;r4=!0,H("Did not expect server HTML to contain a <%s> in <%s>.",z.nodeName.toLowerCase(),b.nodeName.toLowerCase())}}function DZ(b,z){{if(r4)return;r4=!0,H('Did not expect server HTML to contain the text node "%s" in <%s>.',z.nodeValue,b.nodeName.toLowerCase())}}function yZ(b,z,Q){{if(r4)return;r4=!0,H("Expected server HTML to contain a matching <%s> in <%s>.",z,b.nodeName.toLowerCase())}}function mZ(b,z){{if(z==="")return;if(r4)return;r4=!0,H('Expected server HTML to contain a matching text node for "%s" in <%s>.',z,b.nodeName.toLowerCase())}}function b_(b,z,Q){switch(z){case"input":a0(b,Q);return;case"textarea":oB(b,Q);return;case"select":jB(b,Q);return}}var Fb=function(){},Ab=function(){};{var z_=["address","applet","area","article","aside","base","basefont","bgsound","blockquote","body","br","button","caption","center","col","colgroup","dd","details","dir","div","dl","dt","embed","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","iframe","img","input","isindex","li","link","listing","main","marquee","menu","menuitem","meta","nav","noembed","noframes","noscript","object","ol","p","param","plaintext","pre","script","section","select","source","style","summary","table","tbody","td","template","textarea","tfoot","th","thead","title","tr","track","ul","wbr","xmp"],mG=["applet","caption","html","table","td","th","marquee","object","template","foreignObject","desc","title"],Q_=mG.concat(["button"]),X_=["dd","dt","li","option","optgroup","p","rp","rt"],uG={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null};Ab=function(b,z){var Q=L1({},b||uG),X={tag:z};if(mG.indexOf(z)!==-1)Q.aTagInScope=null,Q.buttonTagInScope=null,Q.nobrTagInScope=null;if(Q_.indexOf(z)!==-1)Q.pTagInButtonScope=null;if(z_.indexOf(z)!==-1&&z!=="address"&&z!=="div"&&z!=="p")Q.listItemTagAutoclosing=null,Q.dlItemTagAutoclosing=null;if(Q.current=X,z==="form")Q.formTag=X;if(z==="a")Q.aTagInScope=X;if(z==="button")Q.buttonTagInScope=X;if(z==="nobr")Q.nobrTagInScope=X;if(z==="p")Q.pTagInButtonScope=X;if(z==="li")Q.listItemTagAutoclosing=X;if(z==="dd"||z==="dt")Q.dlItemTagAutoclosing=X;return Q};var Z_=function(b,z){switch(z){case"select":return b==="option"||b==="optgroup"||b==="#text";case"optgroup":return b==="option"||b==="#text";case"option":return b==="#text";case"tr":return b==="th"||b==="td"||b==="style"||b==="script"||b==="template";case"tbody":case"thead":case"tfoot":return b==="tr"||b==="style"||b==="script"||b==="template";case"colgroup":return b==="col"||b==="template";case"table":return b==="caption"||b==="colgroup"||b==="tbody"||b==="tfoot"||b==="thead"||b==="style"||b==="script"||b==="template";case"head":return b==="base"||b==="basefont"||b==="bgsound"||b==="link"||b==="meta"||b==="title"||b==="noscript"||b==="noframes"||b==="style"||b==="script"||b==="template";case"html":return b==="head"||b==="body"||b==="frameset";case"frameset":return b==="frame";case"#document":return b==="html"}switch(b){case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return z!=="h1"&&z!=="h2"&&z!=="h3"&&z!=="h4"&&z!=="h5"&&z!=="h6";case"rp":case"rt":return X_.indexOf(z)===-1;case"body":case"caption":case"col":case"colgroup":case"frameset":case"frame":case"head":case"html":case"tbody":case"td":case"tfoot":case"th":case"thead":case"tr":return z==null}return!0},J_=function(b,z){switch(b){case"address":case"article":case"aside":case"blockquote":case"center":case"details":case"dialog":case"dir":case"div":case"dl":case"fieldset":case"figcaption":case"figure":case"footer":case"header":case"hgroup":case"main":case"menu":case"nav":case"ol":case"p":case"section":case"summary":case"ul":case"pre":case"listing":case"table":case"hr":case"xmp":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":return z.pTagInButtonScope;case"form":return z.formTag||z.pTagInButtonScope;case"li":return z.listItemTagAutoclosing;case"dd":case"dt":return z.dlItemTagAutoclosing;case"button":return z.buttonTagInScope;case"a":return z.aTagInScope;case"nobr":return z.nobrTagInScope}return null},gG={};Fb=function(b,z,Q){Q=Q||uG;var X=Q.current,Z=X&&X.tag;if(z!=null){if(b!=null)H("validateDOMNesting: when childText is passed, childTag should be null");b="#text"}var J=Z_(b,Z)?null:X,$=J?null:J_(b,Q),K=J||$;if(!K)return;var U=K.tag,N=!!J+"|"+b+"|"+U;if(gG[N])return;gG[N]=!0;var R=b,y="";if(b==="#text")if(/\S/.test(z))R="Text nodes";else R="Whitespace text nodes",y=" Make sure you don't have any extra whitespace between tags on each line of your source code.";else R="<"+b+">";if(J){var D="";if(U==="table"&&b==="tr")D+=" Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.";H("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s",R,U,y,D)}else H("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.",R,U)}}var Pz="suppressHydrationWarning",vz="$",Fz="/$",kb="$?",Ib="$!",Y_="style",uZ=null,gZ=null;function $_(b){var z,Q,X=b.nodeType;switch(X){case L8:case MX:{z=X===L8?"#document":"#fragment";var Z=b.documentElement;Q=Z?Z.namespaceURI:_X(null,"");break}default:{var J=X===x6?b.parentNode:b,$=J.namespaceURI||null;z=J.tagName,Q=_X($,z);break}}{var K=z.toLowerCase(),U=Ab(null,K);return{namespace:Q,ancestorInfo:U}}}function H_(b,z,Q){{var X=b,Z=_X(X.namespace,z),J=Ab(X.ancestorInfo,z);return{namespace:Z,ancestorInfo:J}}}function EZ(b){return b}function G_(b){uZ=YN(),gZ=vW();var z=null;return jH(!1),z}function K_(b){FW(gZ),jH(uZ),uZ=null,gZ=null}function U_(b,z,Q,X,Z){var J;{var $=X;if(Fb(b,null,$.ancestorInfo),typeof z.children==="string"||typeof z.children==="number"){var K=""+z.children,U=Ab($.ancestorInfo,b);Fb(null,K,U)}J=$.namespace}var N=jW(b,z,Q,J);return Cb(Z,N),oZ(N,z),N}function q_(b,z){b.appendChild(z)}function B_(b,z,Q,X,Z){switch(aW(b,z,Q,X),z){case"button":case"input":case"select":case"textarea":return!!Q.autoFocus;case"img":return!0;default:return!1}}function O_(b,z,Q,X,Z,J){{var $=J;if(typeof X.children!==typeof Q.children&&(typeof X.children==="string"||typeof X.children==="number")){var K=""+X.children,U=Ab($.ancestorInfo,z);Fb(null,K,U)}}return rW(b,z,Q,X)}function cZ(b,z){return b==="textarea"||b==="noscript"||typeof z.children==="string"||typeof z.children==="number"||typeof z.dangerouslySetInnerHTML==="object"&&z.dangerouslySetInnerHTML!==null&&z.dangerouslySetInnerHTML.__html!=null}function L_(b,z,Q,X){{var Z=Q;Fb(null,b,Z.ancestorInfo)}var J=oW(b,z);return Cb(X,J),J}function N_(){var b=window.event;if(b===void 0)return P8;return oH(b.type)}var dZ=typeof setTimeout==="function"?setTimeout:void 0,W_=typeof clearTimeout==="function"?clearTimeout:void 0,lZ=-1,EG=typeof Promise==="function"?Promise:void 0,__=typeof queueMicrotask==="function"?queueMicrotask:typeof EG<"u"?function(b){return EG.resolve(null).then(b).catch(M_)}:dZ;function M_(b){setTimeout(function(){throw b})}function w_(b,z,Q,X){switch(z){case"button":case"input":case"select":case"textarea":if(Q.autoFocus)b.focus();return;case"img":{if(Q.src)b.src=Q.src;return}}}function R_(b,z,Q,X,Z,J){nW(b,z,Q,X,Z),oZ(b,Z)}function cG(b){l9(b,"")}function P_(b,z,Q){b.nodeValue=Q}function v_(b,z){b.appendChild(z)}function F_(b,z){var Q;if(b.nodeType===x6)Q=b.parentNode,Q.insertBefore(z,b);else Q=b,Q.appendChild(z);var X=b._reactRootContainer;if((X===null||X===void 0)&&Q.onclick===null)Rz(Q)}function A_(b,z,Q){b.insertBefore(z,Q)}function k_(b,z,Q){if(b.nodeType===x6)b.parentNode.insertBefore(z,Q);else b.insertBefore(z,Q)}function I_(b,z){b.removeChild(z)}function T_(b,z){if(b.nodeType===x6)b.parentNode.removeChild(z);else b.removeChild(z)}function pZ(b,z){var Q=z,X=0;do{var Z=Q.nextSibling;if(b.removeChild(Q),Z&&Z.nodeType===x6){var J=Z.data;if(J===Fz)if(X===0){b.removeChild(Z),Gb(z);return}else X--;else if(J===vz||J===kb||J===Ib)X++}Q=Z}while(Q);Gb(z)}function f_(b,z){if(b.nodeType===x6)pZ(b.parentNode,z);else if(b.nodeType===a4)pZ(b,z);Gb(b)}function C_(b){b=b;var z=b.style;if(typeof z.setProperty==="function")z.setProperty("display","none","important");else z.display="none"}function S_(b){b.nodeValue=""}function h_(b,z){b=b;var Q=z[Y_],X=Q!==void 0&&Q!==null&&Q.hasOwnProperty("display")?Q.display:null;b.style.display=wX("display",X)}function V_(b,z){b.nodeValue=z}function D_(b){if(b.nodeType===a4)b.textContent="";else if(b.nodeType===L8){if(b.documentElement)b.removeChild(b.documentElement)}}function y_(b,z,Q){if(b.nodeType!==a4||z.toLowerCase()!==b.nodeName.toLowerCase())return null;return b}function m_(b,z){if(z===""||b.nodeType!==O8)return null;return b}function u_(b){if(b.nodeType!==x6)return null;return b}function dG(b){return b.data===kb}function xZ(b){return b.data===Ib}function g_(b){var z=b.nextSibling&&b.nextSibling.dataset,Q,X,Z;if(z)Q=z.dgst,X=z.msg,Z=z.stck;return{message:X,digest:Q,stack:Z}}function E_(b,z){b._reactRetry=z}function Az(b){for(;b!=null;b=b.nextSibling){var z=b.nodeType;if(z===a4||z===O8)break;if(z===x6){var Q=b.data;if(Q===vz||Q===Ib||Q===kb)break;if(Q===Fz)return null}}return b}function Tb(b){return Az(b.nextSibling)}function c_(b){return Az(b.firstChild)}function d_(b){return Az(b.firstChild)}function l_(b){return Az(b.nextSibling)}function p_(b,z,Q,X,Z,J,$){Cb(J,b),oZ(b,Q);var K;{var U=Z;K=U.namespace}var N=(J.mode&A1)!==j0;return sW(b,z,Q,K,X,N,$)}function x_(b,z,Q,X){Cb(Q,b);var Z=(Q.mode&A1)!==j0;return eW(b,z)}function i_(b,z){Cb(z,b)}function j_(b){var z=b.nextSibling,Q=0;while(z){if(z.nodeType===x6){var X=z.data;if(X===Fz)if(Q===0)return Tb(z);else Q--;else if(X===vz||X===Ib||X===kb)Q++}z=z.nextSibling}return null}function lG(b){var z=b.previousSibling,Q=0;while(z){if(z.nodeType===x6){var X=z.data;if(X===vz||X===Ib||X===kb)if(Q===0)return z;else Q--;else if(X===Fz)Q++}z=z.previousSibling}return null}function o_(b){Gb(b)}function a_(b){Gb(b)}function r_(b){return b!=="head"&&b!=="body"}function n_(b,z,Q,X){var Z=!0;wz(z.nodeValue,Q,X,Z)}function t_(b,z,Q,X,Z,J){if(z[Pz]!==!0){var $=!0;wz(X.nodeValue,Z,J,$)}}function s_(b,z){if(z.nodeType===a4)VZ(b,z);else if(z.nodeType===x6);else DZ(b,z)}function e_(b,z){{var Q=b.parentNode;if(Q!==null)if(z.nodeType===a4)VZ(Q,z);else if(z.nodeType===x6);else DZ(Q,z)}}function bM(b,z,Q,X,Z){if(Z||z[Pz]!==!0)if(X.nodeType===a4)VZ(Q,X);else if(X.nodeType===x6);else DZ(Q,X)}function zM(b,z,Q){yZ(b,z)}function QM(b,z){mZ(b,z)}function XM(b,z,Q){{var X=b.parentNode;if(X!==null)yZ(X,z)}}function ZM(b,z){{var Q=b.parentNode;if(Q!==null)mZ(Q,z)}}function JM(b,z,Q,X,Z,J){if(J||z[Pz]!==!0)yZ(Q,X)}function YM(b,z,Q,X,Z){if(Z||z[Pz]!==!0)mZ(Q,X)}function $M(b){H("An error occurred during hydration. The server HTML was replaced with client content in <%s>.",b.nodeName.toLowerCase())}function HM(b){wb(b)}var m3=Math.random().toString(36).slice(2),u3="__reactFiber$"+m3,iZ="__reactProps$"+m3,fb="__reactContainer$"+m3,jZ="__reactEvents$"+m3,GM="__reactListeners$"+m3,KM="__reactHandles$"+m3;function UM(b){delete b[u3],delete b[iZ],delete b[jZ],delete b[GM],delete b[KM]}function Cb(b,z){z[u3]=b}function kz(b,z){z[fb]=b}function pG(b){b[fb]=null}function Sb(b){return!!b[fb]}function g7(b){var z=b[u3];if(z)return z;var Q=b.parentNode;while(Q){if(z=Q[fb]||Q[u3],z){var X=z.alternate;if(z.child!==null||X!==null&&X.child!==null){var Z=lG(b);while(Z!==null){var J=Z[u3];if(J)return J;Z=lG(Z)}}return z}b=Q,Q=b.parentNode}return null}function t8(b){var z=b[u3]||b[fb];if(z)if(z.tag===_||z.tag===W||z.tag===j||z.tag===F)return z;else return null;return null}function g3(b){if(b.tag===_||b.tag===W)return b.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function Iz(b){return b[iZ]||null}function oZ(b,z){b[iZ]=z}function qM(b){var z=b[jZ];if(z===void 0)z=b[jZ]=new Set;return z}var xG={},iG=Y.ReactDebugCurrentFrame;function Tz(b){if(b){var z=b._owner,Q=c8(b.type,b._source,z?z.type:null);iG.setExtraStackFrame(Q)}else iG.setExtraStackFrame(null)}function V5(b,z,Q,X,Z){{var J=Function.call.bind(u6);for(var $ in b)if(J(b,$)){var K=void 0;try{if(typeof b[$]!=="function"){var U=Error((X||"React class")+": "+Q+" type `"+$+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof b[$]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw U.name="Invariant Violation",U}K=b[$](z,$,X,Q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(N){K=N}if(K&&!(K instanceof Error))Tz(Z),H("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",X||"React class",Q,$,typeof K),Tz(null);if(K instanceof Error&&!(K.message in xG))xG[K.message]=!0,Tz(Z),H("Failed %s type: %s",Q,K.message),Tz(null)}}}var aZ=[],fz;fz=[];var v8=-1;function s8(b){return{current:b}}function S4(b,z){if(v8<0){H("Unexpected pop.");return}if(z!==fz[v8])H("Unexpected Fiber popped.");b.current=aZ[v8],aZ[v8]=null,fz[v8]=null,v8--}function h4(b,z,Q){v8++,aZ[v8]=b.current,fz[v8]=Q,b.current=z}var jG={},H5={};Object.freeze(H5);var F8=s8(H5),e5=s8(!1),rZ=H5;function E3(b,z,Q){{if(Q&&b8(z))return rZ;return F8.current}}function oG(b,z,Q){{var X=b.stateNode;X.__reactInternalMemoizedUnmaskedChildContext=z,X.__reactInternalMemoizedMaskedChildContext=Q}}function c3(b,z){{var Q=b.type,X=Q.contextTypes;if(!X)return H5;var Z=b.stateNode;if(Z&&Z.__reactInternalMemoizedUnmaskedChildContext===z)return Z.__reactInternalMemoizedMaskedChildContext;var J={};for(var $ in X)J[$]=z[$];{var K=G1(b)||"Unknown";V5(X,J,"context",K)}if(Z)oG(b,z,J);return J}}function Cz(){return e5.current}function b8(b){{var z=b.childContextTypes;return z!==null&&z!==void 0}}function Sz(b){S4(e5,b),S4(F8,b)}function nZ(b){S4(e5,b),S4(F8,b)}function aG(b,z,Q){{if(F8.current!==H5)throw Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");h4(F8,z,b),h4(e5,Q,b)}}function rG(b,z,Q){{var X=b.stateNode,Z=z.childContextTypes;if(typeof X.getChildContext!=="function"){{var J=G1(b)||"Unknown";if(!jG[J])jG[J]=!0,H("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.",J,J)}return Q}var $=X.getChildContext();for(var K in $)if(!(K in Z))throw Error((G1(b)||"Unknown")+'.getChildContext(): key "'+K+'" is not defined in childContextTypes.');{var U=G1(b)||"Unknown";V5(Z,$,"child context",U)}return L1({},Q,$)}}function hz(b){{var z=b.stateNode,Q=z&&z.__reactInternalMemoizedMergedChildContext||H5;return rZ=F8.current,h4(F8,Q,b),h4(e5,e5.current,b),!0}}function nG(b,z,Q){{var X=b.stateNode;if(!X)throw Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");if(Q){var Z=rG(b,z,rZ);X.__reactInternalMemoizedMergedChildContext=Z,S4(e5,b),S4(F8,b),h4(F8,Z,b),h4(e5,Q,b)}else S4(e5,b),h4(e5,Q,b)}}function BM(b){{if(!rO(b)||b.tag!==M)throw Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");var z=b;do{switch(z.tag){case F:return z.stateNode.context;case M:{var Q=z.type;if(b8(Q))return z.stateNode.__reactInternalMemoizedMergedChildContext;break}}z=z.return}while(z!==null);throw Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.")}}var e8=0,Vz=1,A8=null,tZ=!1,sZ=!1;function tG(b){if(A8===null)A8=[b];else A8.push(b)}function OM(b){tZ=!0,tG(b)}function sG(){if(tZ)b7()}function b7(){if(!sZ&&A8!==null){sZ=!0;var b=0,z=h5();try{var Q=!0,X=A8;U4(J5);for(;b<X.length;b++){var Z=X[b];do Z=Z(Q);while(Z!==null)}A8=null,tZ=!1}catch(J){if(A8!==null)A8=A8.slice(b+1);throw RH(a9,b7),J}finally{U4(z),sZ=!1}}return null}var d3=[],l3=0,Dz=null,yz=0,O5=[],L5=0,E7=null,k8=1,I8="";function LM(b){return d7(),(b.flags&BH)!==o0}function NM(b){return d7(),yz}function WM(){var b=I8,z=k8,Q=z&~_M(z);return Q.toString(32)+b}function c7(b,z){d7(),d3[l3++]=yz,d3[l3++]=Dz,Dz=b,yz=z}function eG(b,z,Q){d7(),O5[L5++]=k8,O5[L5++]=I8,O5[L5++]=E7,E7=b;var X=k8,Z=I8,J=mz(X)-1,$=X&~(1<<J),K=Q+1,U=mz(z)+J;if(U>30){var N=J-J%5,R=(1<<N)-1,y=($&R).toString(32),D=$>>N,p=J-N,x=mz(z)+p,a=K<<p,w0=a|D,p0=y+Z;k8=1<<x|w0,I8=p0}else{var E0=K<<J,W1=E0|$,_1=Z;k8=1<<U|W1,I8=_1}}function eZ(b){d7();var z=b.return;if(z!==null){var Q=1,X=0;c7(b,Q),eG(b,Q,X)}}function mz(b){return 32-IH(b)}function _M(b){return 1<<mz(b)-1}function bJ(b){while(b===Dz)Dz=d3[--l3],d3[l3]=null,yz=d3[--l3],d3[l3]=null;while(b===E7)E7=O5[--L5],O5[L5]=null,I8=O5[--L5],O5[L5]=null,k8=O5[--L5],O5[L5]=null}function MM(){if(d7(),E7!==null)return{id:k8,overflow:I8};else return null}function wM(b,z){d7(),O5[L5++]=k8,O5[L5++]=I8,O5[L5++]=E7,k8=z.id,I8=z.overflow,E7=b}function d7(){if(!_4())H("Expected to be hydrating. This is a bug in React. Please file an issue.")}var W4=null,N5=null,D5=!1,l7=!1,z7=null;function RM(){if(D5)H("We should not be hydrating here. This is a bug in React. Please file a bug.")}function bK(){l7=!0}function PM(){return l7}function vM(b){var z=b.stateNode.containerInfo;return N5=d_(z),W4=b,D5=!0,z7=null,l7=!1,!0}function FM(b,z,Q){if(N5=l_(z),W4=b,D5=!0,z7=null,l7=!1,Q!==null)wM(b,Q);return!0}function zK(b,z){switch(b.tag){case F:{s_(b.stateNode.containerInfo,z);break}case _:{var Q=(b.mode&A1)!==j0;bM(b.type,b.memoizedProps,b.stateNode,z,Q);break}case j:{var X=b.memoizedState;if(X.dehydrated!==null)e_(X.dehydrated,z);break}}}function QK(b,z){zK(b,z);var Q=hP();Q.stateNode=z,Q.return=b;var X=b.deletions;if(X===null)b.deletions=[Q],b.flags|=A7;else X.push(Q)}function zJ(b,z){{if(l7)return;switch(b.tag){case F:{var Q=b.stateNode.containerInfo;switch(z.tag){case _:var{type:X,pendingProps:Z}=z;zM(Q,X);break;case W:var J=z.pendingProps;QM(Q,J);break}break}case _:{var{type:$,memoizedProps:K,stateNode:U}=b;switch(z.tag){case _:{var{type:N,pendingProps:R}=z,y=(b.mode&A1)!==j0;JM($,K,U,N,R,y);break}case W:{var D=z.pendingProps,p=(b.mode&A1)!==j0;YM($,K,U,D,p);break}}break}case j:{var x=b.memoizedState,a=x.dehydrated;if(a!==null)switch(z.tag){case _:var{type:w0,pendingProps:p0}=z;XM(a,w0);break;case W:var E0=z.pendingProps;ZM(a,E0);break}break}default:return}}}function XK(b,z){z.flags=z.flags&~W8|i6,zJ(b,z)}function ZK(b,z){switch(b.tag){case _:{var{type:Q,pendingProps:X}=b,Z=y_(z,Q);if(Z!==null)return b.stateNode=Z,W4=b,N5=c_(Z),!0;return!1}case W:{var J=b.pendingProps,$=m_(z,J);if($!==null)return b.stateNode=$,W4=b,N5=null,!0;return!1}case j:{var K=u_(z);if(K!==null){var U={dehydrated:K,treeContext:MM(),retryLane:X5};b.memoizedState=U;var N=VP(K);return N.return=b,b.child=N,W4=b,N5=null,!0}return!1}default:return!1}}function QJ(b){return(b.mode&A1)!==j0&&(b.flags&m1)===o0}function XJ(b){throw Error("Hydration failed because the initial UI does not match what was rendered on the server.")}function ZJ(b){if(!D5)return;var z=N5;if(!z){if(QJ(b))zJ(W4,b),XJ();XK(W4,b),D5=!1,W4=b;return}var Q=z;if(!ZK(b,z)){if(QJ(b))zJ(W4,b),XJ();z=Tb(Q);var X=W4;if(!z||!ZK(b,z)){XK(W4,b),D5=!1,W4=b;return}QK(X,Q)}}function AM(b,z,Q){var X=b.stateNode,Z=!l7,J=p_(X,b.type,b.memoizedProps,z,Q,b,Z);if(b.updateQueue=J,J!==null)return!0;return!1}function kM(b){var{stateNode:z,memoizedProps:Q}=b,X=x_(z,Q,b);if(X){var Z=W4;if(Z!==null)switch(Z.tag){case F:{var J=Z.stateNode.containerInfo,$=(Z.mode&A1)!==j0;n_(J,z,Q,$);break}case _:{var{type:K,memoizedProps:U,stateNode:N}=Z,R=(Z.mode&A1)!==j0;t_(K,U,N,z,Q,R);break}}}return X}function IM(b){var z=b.memoizedState,Q=z!==null?z.dehydrated:null;if(!Q)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");i_(Q,b)}function TM(b){var z=b.memoizedState,Q=z!==null?z.dehydrated:null;if(!Q)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");return j_(Q)}function JK(b){var z=b.return;while(z!==null&&z.tag!==_&&z.tag!==F&&z.tag!==j)z=z.return;W4=z}function uz(b){if(b!==W4)return!1;if(!D5)return JK(b),D5=!0,!1;if(b.tag!==F&&(b.tag!==_||r_(b.type)&&!cZ(b.type,b.memoizedProps))){var z=N5;if(z)if(QJ(b))YK(b),XJ();else while(z)QK(b,z),z=Tb(z)}if(JK(b),b.tag===j)N5=TM(b);else N5=W4?Tb(b.stateNode):null;return!0}function fM(){return D5&&N5!==null}function YK(b){var z=N5;while(z)zK(b,z),z=Tb(z)}function p3(){W4=null,N5=null,D5=!1,l7=!1}function $K(){if(z7!==null)zq(z7),z7=null}function _4(){return D5}function JJ(b){if(z7===null)z7=[b];else z7.push(b)}var CM=Y.ReactCurrentBatchConfig,SM=null;function hM(){return CM.transition}var y5={recordUnsafeLifecycleWarnings:function(b,z){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(b,z){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}};{var VM=function(b){var z=null,Q=b;while(Q!==null){if(Q.mode&D6)z=Q;Q=Q.return}return z},p7=function(b){var z=[];return b.forEach(function(Q){z.push(Q)}),z.sort().join(", ")},hb=[],Vb=[],Db=[],yb=[],mb=[],ub=[],x7=new Set;y5.recordUnsafeLifecycleWarnings=function(b,z){if(x7.has(b.type))return;if(typeof z.componentWillMount==="function"&&z.componentWillMount.__suppressDeprecationWarning!==!0)hb.push(b);if(b.mode&D6&&typeof z.UNSAFE_componentWillMount==="function")Vb.push(b);if(typeof z.componentWillReceiveProps==="function"&&z.componentWillReceiveProps.__suppressDeprecationWarning!==!0)Db.push(b);if(b.mode&D6&&typeof z.UNSAFE_componentWillReceiveProps==="function")yb.push(b);if(typeof z.componentWillUpdate==="function"&&z.componentWillUpdate.__suppressDeprecationWarning!==!0)mb.push(b);if(b.mode&D6&&typeof z.UNSAFE_componentWillUpdate==="function")ub.push(b)},y5.flushPendingUnsafeLifecycleWarnings=function(){var b=new Set;if(hb.length>0)hb.forEach(function(D){b.add(G1(D)||"Component"),x7.add(D.type)}),hb=[];var z=new Set;if(Vb.length>0)Vb.forEach(function(D){z.add(G1(D)||"Component"),x7.add(D.type)}),Vb=[];var Q=new Set;if(Db.length>0)Db.forEach(function(D){Q.add(G1(D)||"Component"),x7.add(D.type)}),Db=[];var X=new Set;if(yb.length>0)yb.forEach(function(D){X.add(G1(D)||"Component"),x7.add(D.type)}),yb=[];var Z=new Set;if(mb.length>0)mb.forEach(function(D){Z.add(G1(D)||"Component"),x7.add(D.type)}),mb=[];var J=new Set;if(ub.length>0)ub.forEach(function(D){J.add(G1(D)||"Component"),x7.add(D.type)}),ub=[];if(z.size>0){var $=p7(z);H(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
33
+
34
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
35
+
36
+ Please update the following components: %s`,$)}if(X.size>0){var K=p7(X);H(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
37
+
38
+ * Move data fetching code or side effects to componentDidUpdate.
39
+ * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
40
+
41
+ Please update the following components: %s`,K)}if(J.size>0){var U=p7(J);H(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.
42
+
43
+ * Move data fetching code or side effects to componentDidUpdate.
44
+
45
+ Please update the following components: %s`,U)}if(b.size>0){var N=p7(b);O(`componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
46
+
47
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
48
+ * Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
49
+
50
+ Please update the following components: %s`,N)}if(Q.size>0){var R=p7(Q);O(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
51
+
52
+ * Move data fetching code or side effects to componentDidUpdate.
53
+ * If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state
54
+ * Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
55
+
56
+ Please update the following components: %s`,R)}if(Z.size>0){var y=p7(Z);O(`componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.
57
+
58
+ * Move data fetching code or side effects to componentDidUpdate.
59
+ * Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
60
+
61
+ Please update the following components: %s`,y)}};var gz=new Map,HK=new Set;y5.recordLegacyContextWarning=function(b,z){var Q=VM(b);if(Q===null){H("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");return}if(HK.has(b.type))return;var X=gz.get(Q);if(b.type.contextTypes!=null||b.type.childContextTypes!=null||z!==null&&typeof z.getChildContext==="function"){if(X===void 0)X=[],gz.set(Q,X);X.push(b)}},y5.flushLegacyContextWarning=function(){gz.forEach(function(b,z){if(b.length===0)return;var Q=b[0],X=new Set;b.forEach(function(J){X.add(G1(J)||"Component"),HK.add(J.type)});var Z=p7(X);try{C6(Q),H(`Legacy context API has been detected within a strict-mode tree.
62
+
63
+ The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
64
+
65
+ Please update the following components: %s
66
+
67
+ Learn more about this warning here: https://reactjs.org/link/legacy-context`,Z)}finally{$4()}})},y5.discardPendingWarnings=function(){hb=[],Vb=[],Db=[],yb=[],mb=[],ub=[],gz=new Map}}var YJ,$J,HJ,GJ,KJ,GK=function(b,z){};YJ=!1,$J=!1,HJ={},GJ={},KJ={},GK=function(b,z){if(b===null||typeof b!=="object")return;if(!b._store||b._store.validated||b.key!=null)return;if(typeof b._store!=="object")throw Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");b._store.validated=!0;var Q=G1(z)||"Component";if(GJ[Q])return;GJ[Q]=!0,H('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.')};function DM(b){return b.prototype&&b.prototype.isReactComponent}function gb(b,z,Q){var X=Q.ref;if(X!==null&&typeof X!=="function"&&typeof X!=="object"){if((b.mode&D6||n)&&!(Q._owner&&Q._self&&Q._owner.stateNode!==Q._self)&&!(Q._owner&&Q._owner.tag!==M)&&!(typeof Q.type==="function"&&!DM(Q.type))&&Q._owner){var Z=G1(b)||"Component";if(!HJ[Z])H('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Z,X),HJ[Z]=!0}if(Q._owner){var J=Q._owner,$;if(J){var K=J;if(K.tag!==M)throw Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");$=K.stateNode}if(!$)throw Error("Missing owner for string ref "+X+". This error is likely caused by a bug in React. Please file an issue.");var U=$;_6(X,"ref");var N=""+X;if(z!==null&&z.ref!==null&&typeof z.ref==="function"&&z.ref._stringRef===N)return z.ref;var R=function(y){var D=U.refs;if(y===null)delete D[N];else D[N]=y};return R._stringRef=N,R}else{if(typeof X!=="string")throw Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");if(!Q._owner)throw Error("Element ref was specified as a string ("+X+`) but no owner was set. This could happen for one of the following reasons:
68
+ 1. You may be adding a ref to a function component
69
+ 2. You may be adding a ref to a component that was not created inside a component's render method
70
+ 3. You have multiple copies of React loaded
71
+ See https://reactjs.org/link/refs-must-have-owner for more information.`)}}return X}function Ez(b,z){var Q=Object.prototype.toString.call(z);throw Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}function cz(b){{var z=G1(b)||"Component";if(KJ[z])return;KJ[z]=!0,H("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.")}}function KK(b){var{_payload:z,_init:Q}=b;return Q(z)}function UK(b){function z(c,s){if(!b)return;var d=c.deletions;if(d===null)c.deletions=[s],c.flags|=A7;else d.push(s)}function Q(c,s){if(!b)return null;var d=s;while(d!==null)z(c,d),d=d.sibling;return null}function X(c,s){var d=new Map,G0=s;while(G0!==null){if(G0.key!==null)d.set(G0.key,G0);else d.set(G0.index,G0);G0=G0.sibling}return d}function Z(c,s){var d=e7(c,s);return d.index=0,d.sibling=null,d}function J(c,s,d){if(c.index=d,!b)return c.flags|=BH,s;var G0=c.alternate;if(G0!==null){var I0=G0.index;if(I0<s)return c.flags|=i6,s;else return I0}else return c.flags|=i6,s}function $(c){if(b&&c.alternate===null)c.flags|=i6;return c}function K(c,s,d,G0){if(s===null||s.tag!==W){var I0=$$(d,c.mode,G0);return I0.return=c,I0}else{var P0=Z(s,d);return P0.return=c,P0}}function U(c,s,d,G0){var I0=d.type;if(I0===h1)return R(c,s,d.props.children,G0,d.key);if(s!==null){if(s.elementType===I0||Wq(s,d)||typeof I0==="object"&&I0!==null&&I0.$$typeof===g0&&KK(I0)===s.type){var P0=Z(s,d.props);return P0.ref=gb(c,s,d),P0.return=c,P0._debugSource=d._source,P0._debugOwner=d._owner,P0}}var r0=Y$(d,c.mode,G0);return r0.ref=gb(c,s,d),r0.return=c,r0}function N(c,s,d,G0){if(s===null||s.tag!==v||s.stateNode.containerInfo!==d.containerInfo||s.stateNode.implementation!==d.implementation){var I0=H$(d,c.mode,G0);return I0.return=c,I0}else{var P0=Z(s,d.children||[]);return P0.return=c,P0}}function R(c,s,d,G0,I0){if(s===null||s.tag!==f){var P0=q7(d,c.mode,G0,I0);return P0.return=c,P0}else{var r0=Z(s,d);return r0.return=c,r0}}function y(c,s,d){if(typeof s==="string"&&s!==""||typeof s==="number"){var G0=$$(""+s,c.mode,d);return G0.return=c,G0}if(typeof s==="object"&&s!==null){switch(s.$$typeof){case i1:{var I0=Y$(s,c.mode,d);return I0.ref=gb(c,null,s),I0.return=c,I0}case Q6:{var P0=H$(s,c.mode,d);return P0.return=c,P0}case g0:{var{_payload:r0,_init:J1}=s;return y(c,J1(r0),d)}}if(y1(s)||N6(s)){var n1=q7(s,c.mode,d,null);return n1.return=c,n1}Ez(c,s)}if(typeof s==="function")cz(c);return null}function D(c,s,d,G0){var I0=s!==null?s.key:null;if(typeof d==="string"&&d!==""||typeof d==="number"){if(I0!==null)return null;return K(c,s,""+d,G0)}if(typeof d==="object"&&d!==null){switch(d.$$typeof){case i1:if(d.key===I0)return U(c,s,d,G0);else return null;case Q6:if(d.key===I0)return N(c,s,d,G0);else return null;case g0:{var{_payload:P0,_init:r0}=d;return D(c,s,r0(P0),G0)}}if(y1(d)||N6(d)){if(I0!==null)return null;return R(c,s,d,G0,null)}Ez(c,d)}if(typeof d==="function")cz(c);return null}function p(c,s,d,G0,I0){if(typeof G0==="string"&&G0!==""||typeof G0==="number"){var P0=c.get(d)||null;return K(s,P0,""+G0,I0)}if(typeof G0==="object"&&G0!==null){switch(G0.$$typeof){case i1:{var r0=c.get(G0.key===null?d:G0.key)||null;return U(s,r0,G0,I0)}case Q6:{var J1=c.get(G0.key===null?d:G0.key)||null;return N(s,J1,G0,I0)}case g0:var{_payload:n1,_init:V1}=G0;return p(c,s,d,V1(n1),I0)}if(y1(G0)||N6(G0)){var d6=c.get(d)||null;return R(s,d6,G0,I0,null)}Ez(s,G0)}if(typeof G0==="function")cz(s);return null}function x(c,s,d){{if(typeof c!=="object"||c===null)return s;switch(c.$$typeof){case i1:case Q6:GK(c,d);var G0=c.key;if(typeof G0!=="string")break;if(s===null){s=new Set,s.add(G0);break}if(!s.has(G0)){s.add(G0);break}H("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be "+"duplicated and/or omitted — the behavior is unsupported and "+"could change in a future version.",G0);break;case g0:var{_payload:I0,_init:P0}=c;x(P0(I0),s,d);break}}return s}function a(c,s,d,G0){{var I0=null;for(var P0=0;P0<d.length;P0++){var r0=d[P0];I0=x(r0,I0,c)}}var J1=null,n1=null,V1=s,d6=0,D1=0,y6=null;for(;V1!==null&&D1<d.length;D1++){if(V1.index>D1)y6=V1,V1=null;else y6=V1.sibling;var D4=D(c,V1,d[D1],G0);if(D4===null){if(V1===null)V1=y6;break}if(b){if(V1&&D4.alternate===null)z(c,V1)}if(d6=J(D4,d6,D1),n1===null)J1=D4;else n1.sibling=D4;n1=D4,V1=y6}if(D1===d.length){if(Q(c,V1),_4()){var A4=D1;c7(c,A4)}return J1}if(V1===null){for(;D1<d.length;D1++){var K5=y(c,d[D1],G0);if(K5===null)continue;if(d6=J(K5,d6,D1),n1===null)J1=K5;else n1.sibling=K5;n1=K5}if(_4()){var x4=D1;c7(c,x4)}return J1}var i4=X(c,V1);for(;D1<d.length;D1++){var y4=p(i4,c,D1,d[D1],G0);if(y4!==null){if(b){if(y4.alternate!==null)i4.delete(y4.key===null?D1:y4.key)}if(d6=J(y4,d6,D1),n1===null)J1=y4;else n1.sibling=y4;n1=y4}}if(b)i4.forEach(function(H2){return z(c,H2)});if(_4()){var D8=D1;c7(c,D8)}return J1}function w0(c,s,d,G0){var I0=N6(d);if(typeof I0!=="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");{if(typeof Symbol==="function"&&d[Symbol.toStringTag]==="Generator"){if(!$J)H("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers.");$J=!0}if(d.entries===I0){if(!YJ)H("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");YJ=!0}var P0=I0.call(d);if(P0){var r0=null,J1=P0.next();for(;!J1.done;J1=P0.next()){var n1=J1.value;r0=x(n1,r0,c)}}}var V1=I0.call(d);if(V1==null)throw Error("An iterable object provided no iterator.");var d6=null,D1=null,y6=s,D4=0,A4=0,K5=null,x4=V1.next();for(;y6!==null&&!x4.done;A4++,x4=V1.next()){if(y6.index>A4)K5=y6,y6=null;else K5=y6.sibling;var i4=D(c,y6,x4.value,G0);if(i4===null){if(y6===null)y6=K5;break}if(b){if(y6&&i4.alternate===null)z(c,y6)}if(D4=J(i4,D4,A4),D1===null)d6=i4;else D1.sibling=i4;D1=i4,y6=K5}if(x4.done){if(Q(c,y6),_4()){var y4=A4;c7(c,y4)}return d6}if(y6===null){for(;!x4.done;A4++,x4=V1.next()){var D8=y(c,x4.value,G0);if(D8===null)continue;if(D4=J(D8,D4,A4),D1===null)d6=D8;else D1.sibling=D8;D1=D8}if(_4()){var H2=A4;c7(c,H2)}return d6}var N9=X(c,y6);for(;!x4.done;A4++,x4=V1.next()){var H8=p(N9,c,A4,x4.value,G0);if(H8!==null){if(b){if(H8.alternate!==null)N9.delete(H8.key===null?A4:H8.key)}if(D4=J(H8,D4,A4),D1===null)d6=H8;else D1.sibling=H8;D1=H8}}if(b)N9.forEach(function(Kv){return z(c,Kv)});if(_4()){var Gv=A4;c7(c,Gv)}return d6}function p0(c,s,d,G0){if(s!==null&&s.tag===W){Q(c,s.sibling);var I0=Z(s,d);return I0.return=c,I0}Q(c,s);var P0=$$(d,c.mode,G0);return P0.return=c,P0}function E0(c,s,d,G0){var I0=d.key,P0=s;while(P0!==null){if(P0.key===I0){var r0=d.type;if(r0===h1){if(P0.tag===f){Q(c,P0.sibling);var J1=Z(P0,d.props.children);return J1.return=c,J1._debugSource=d._source,J1._debugOwner=d._owner,J1}}else if(P0.elementType===r0||Wq(P0,d)||typeof r0==="object"&&r0!==null&&r0.$$typeof===g0&&KK(r0)===P0.type){Q(c,P0.sibling);var n1=Z(P0,d.props);return n1.ref=gb(c,P0,d),n1.return=c,n1._debugSource=d._source,n1._debugOwner=d._owner,n1}Q(c,P0);break}else z(c,P0);P0=P0.sibling}if(d.type===h1){var V1=q7(d.props.children,c.mode,G0,d.key);return V1.return=c,V1}else{var d6=Y$(d,c.mode,G0);return d6.ref=gb(c,s,d),d6.return=c,d6}}function W1(c,s,d,G0){var I0=d.key,P0=s;while(P0!==null){if(P0.key===I0)if(P0.tag===v&&P0.stateNode.containerInfo===d.containerInfo&&P0.stateNode.implementation===d.implementation){Q(c,P0.sibling);var r0=Z(P0,d.children||[]);return r0.return=c,r0}else{Q(c,P0);break}else z(c,P0);P0=P0.sibling}var J1=H$(d,c.mode,G0);return J1.return=c,J1}function _1(c,s,d,G0){var I0=typeof d==="object"&&d!==null&&d.type===h1&&d.key===null;if(I0)d=d.props.children;if(typeof d==="object"&&d!==null){switch(d.$$typeof){case i1:return $(E0(c,s,d,G0));case Q6:return $(W1(c,s,d,G0));case g0:var{_payload:P0,_init:r0}=d;return _1(c,s,r0(P0),G0)}if(y1(d))return a(c,s,d,G0);if(N6(d))return w0(c,s,d,G0);Ez(c,d)}if(typeof d==="string"&&d!==""||typeof d==="number")return $(p0(c,s,""+d,G0));if(typeof d==="function")cz(c);return Q(c,s)}return _1}var x3=UK(!0),qK=UK(!1);function yM(b,z){if(b!==null&&z.child!==b.child)throw Error("Resuming work not yet implemented.");if(z.child===null)return;var Q=z.child,X=e7(Q,Q.pendingProps);z.child=X,X.return=z;while(Q.sibling!==null)Q=Q.sibling,X=X.sibling=e7(Q,Q.pendingProps),X.return=z;X.sibling=null}function mM(b,z){var Q=b.child;while(Q!==null)IP(Q,z),Q=Q.sibling}var UJ=s8(null),qJ;qJ={};var dz=null,i3=null,BJ=null,lz=!1;function pz(){dz=null,i3=null,BJ=null,lz=!1}function BK(){lz=!0}function OK(){lz=!1}function LK(b,z,Q){{h4(UJ,z._currentValue,b),z._currentValue=Q;{if(z._currentRenderer!==void 0&&z._currentRenderer!==null&&z._currentRenderer!==qJ)H("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");z._currentRenderer=qJ}}}function OJ(b,z){var Q=UJ.current;S4(UJ,z),b._currentValue=Q}function LJ(b,z,Q){var X=b;while(X!==null){var Z=X.alternate;if(!f3(X.childLanes,z)){if(X.childLanes=q1(X.childLanes,z),Z!==null)Z.childLanes=q1(Z.childLanes,z)}else if(Z!==null&&!f3(Z.childLanes,z))Z.childLanes=q1(Z.childLanes,z);if(X===Q)break;X=X.return}if(X!==Q)H("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.")}function uM(b,z,Q){gM(b,z,Q)}function gM(b,z,Q){var X=b.child;if(X!==null)X.return=b;while(X!==null){var Z=void 0,J=X.dependencies;if(J!==null){Z=X.child;var $=J.firstContext;while($!==null){if($.context===z){if(X.tag===M){var K=Qb(Q),U=T8(W6,K);U.tag=iz;var N=X.updateQueue;if(N===null);else{var R=N.shared,y=R.pending;if(y===null)U.next=U;else U.next=y.next,y.next=U;R.pending=U}}X.lanes=q1(X.lanes,Q);var D=X.alternate;if(D!==null)D.lanes=q1(D.lanes,Q);LJ(X.return,Q,b),J.lanes=q1(J.lanes,Q);break}$=$.next}}else if(X.tag===S)Z=X.type===b.type?null:X.child;else if(X.tag===Y0){var p=X.return;if(p===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");p.lanes=q1(p.lanes,Q);var x=p.alternate;if(x!==null)x.lanes=q1(x.lanes,Q);LJ(p,Q,b),Z=X.sibling}else Z=X.child;if(Z!==null)Z.return=X;else{Z=X;while(Z!==null){if(Z===b){Z=null;break}var a=Z.sibling;if(a!==null){a.return=Z.return,Z=a;break}Z=Z.return}}X=Z}}function j3(b,z){dz=b,i3=null,BJ=null;var Q=b.dependencies;if(Q!==null){var X=Q.firstContext;if(X!==null){if(Z5(Q.lanes,z))eb();Q.firstContext=null}}}function j6(b){if(lz)H("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");var z=b._currentValue;if(BJ===b);else{var Q={context:b,memoizedValue:z,next:null};if(i3===null){if(dz===null)throw Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");i3=Q,dz.dependencies={lanes:$0,firstContext:Q}}else i3=i3.next=Q}return z}var i7=null;function NJ(b){if(i7===null)i7=[b];else i7.push(b)}function EM(){if(i7!==null){for(var b=0;b<i7.length;b++){var z=i7[b],Q=z.interleaved;if(Q!==null){z.interleaved=null;var X=Q.next,Z=z.pending;if(Z!==null){var J=Z.next;Z.next=X,Q.next=J}z.pending=Q}}i7=null}}function NK(b,z,Q,X){var Z=z.interleaved;if(Z===null)Q.next=Q,NJ(z);else Q.next=Z.next,Z.next=Q;return z.interleaved=Q,xz(b,X)}function cM(b,z,Q,X){var Z=z.interleaved;if(Z===null)Q.next=Q,NJ(z);else Q.next=Z.next,Z.next=Q;z.interleaved=Q}function dM(b,z,Q,X){var Z=z.interleaved;if(Z===null)Q.next=Q,NJ(z);else Q.next=Z.next,Z.next=Q;return z.interleaved=Q,xz(b,X)}function n4(b,z){return xz(b,z)}var lM=xz;function xz(b,z){b.lanes=q1(b.lanes,z);var Q=b.alternate;if(Q!==null)Q.lanes=q1(Q.lanes,z);if(Q===null&&(b.flags&(i6|W8))!==o0)Bq(b);var X=b,Z=b.return;while(Z!==null){if(Z.childLanes=q1(Z.childLanes,z),Q=Z.alternate,Q!==null)Q.childLanes=q1(Q.childLanes,z);else if((Z.flags&(i6|W8))!==o0)Bq(b);X=Z,Z=Z.return}if(X.tag===F){var J=X.stateNode;return J}else return null}var WK=0,_K=1,iz=2,WJ=3,jz=!1,_J,oz;_J=!1,oz=null;function MJ(b){var z={baseState:b.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:$0},effects:null};b.updateQueue=z}function MK(b,z){var Q=z.updateQueue,X=b.updateQueue;if(Q===X){var Z={baseState:X.baseState,firstBaseUpdate:X.firstBaseUpdate,lastBaseUpdate:X.lastBaseUpdate,shared:X.shared,effects:X.effects};z.updateQueue=Z}}function T8(b,z){var Q={eventTime:b,lane:z,tag:WK,payload:null,callback:null,next:null};return Q}function Q7(b,z,Q){var X=b.updateQueue;if(X===null)return null;var Z=X.shared;if(oz===Z&&!_J)H("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),_J=!0;if(xR()){var J=Z.pending;if(J===null)z.next=z;else z.next=J.next,J.next=z;return Z.pending=z,lM(b,Q)}else return dM(b,Z,z,Q)}function az(b,z,Q){var X=z.updateQueue;if(X===null)return;var Z=X.shared;if(SH(Q)){var J=Z.lanes;J=VH(J,b.pendingLanes);var $=q1(J,Q);Z.lanes=$,UZ(b,$)}}function wJ(b,z){var{updateQueue:Q,alternate:X}=b;if(X!==null){var Z=X.updateQueue;if(Q===Z){var J=null,$=null,K=Q.firstBaseUpdate;if(K!==null){var U=K;do{var N={eventTime:U.eventTime,lane:U.lane,tag:U.tag,payload:U.payload,callback:U.callback,next:null};if($===null)J=$=N;else $.next=N,$=N;U=U.next}while(U!==null);if($===null)J=$=z;else $.next=z,$=z}else J=$=z;Q={baseState:Z.baseState,firstBaseUpdate:J,lastBaseUpdate:$,shared:Z.shared,effects:Z.effects},b.updateQueue=Q;return}}var R=Q.lastBaseUpdate;if(R===null)Q.firstBaseUpdate=z;else R.next=z;Q.lastBaseUpdate=z}function pM(b,z,Q,X,Z,J){switch(Q.tag){case _K:{var $=Q.payload;if(typeof $==="function"){BK();var K=$.call(J,X,Z);{if(b.mode&D6){G4(!0);try{$.call(J,X,Z)}finally{G4(!1)}}OK()}return K}return $}case WJ:b.flags=b.flags&~c4|m1;case WK:{var U=Q.payload,N;if(typeof U==="function"){BK(),N=U.call(J,X,Z);{if(b.mode&D6){G4(!0);try{U.call(J,X,Z)}finally{G4(!1)}}OK()}}else N=U;if(N===null||N===void 0)return X;return L1({},X,N)}case iz:return jz=!0,X}return X}function rz(b,z,Q,X){var Z=b.updateQueue;jz=!1,oz=Z.shared;var{firstBaseUpdate:J,lastBaseUpdate:$}=Z,K=Z.shared.pending;if(K!==null){Z.shared.pending=null;var U=K,N=U.next;if(U.next=null,$===null)J=N;else $.next=N;$=U;var R=b.alternate;if(R!==null){var y=R.updateQueue,D=y.lastBaseUpdate;if(D!==$){if(D===null)y.firstBaseUpdate=N;else D.next=N;y.lastBaseUpdate=U}}}if(J!==null){var p=Z.baseState,x=$0,a=null,w0=null,p0=null,E0=J;do{var{lane:W1,eventTime:_1}=E0;if(!f3(X,W1)){var c={eventTime:_1,lane:W1,tag:E0.tag,payload:E0.payload,callback:E0.callback,next:null};if(p0===null)w0=p0=c,a=p;else p0=p0.next=c;x=q1(x,W1)}else{if(p0!==null){var s={eventTime:_1,lane:K4,tag:E0.tag,payload:E0.payload,callback:E0.callback,next:null};p0=p0.next=s}p=pM(b,Z,E0,p,z,Q);var d=E0.callback;if(d!==null&&E0.lane!==K4){b.flags|=hX;var G0=Z.effects;if(G0===null)Z.effects=[E0];else G0.push(E0)}}if(E0=E0.next,E0===null)if(K=Z.shared.pending,K===null)break;else{var I0=K,P0=I0.next;I0.next=null,E0=P0,Z.lastBaseUpdate=I0,Z.shared.pending=null}}while(!0);if(p0===null)a=p;Z.baseState=a,Z.firstBaseUpdate=w0,Z.lastBaseUpdate=p0;var r0=Z.shared.interleaved;if(r0!==null){var J1=r0;do x=q1(x,J1.lane),J1=J1.next;while(J1!==r0)}else if(J===null)Z.shared.lanes=$0;U9(x),b.lanes=x,b.memoizedState=p}oz=null}function xM(b,z){if(typeof b!=="function")throw Error("Invalid argument passed as callback. Expected a function. Instead "+("received: "+b));b.call(z)}function wK(){jz=!1}function nz(){return jz}function RK(b,z,Q){var X=z.effects;if(z.effects=null,X!==null)for(var Z=0;Z<X.length;Z++){var J=X[Z],$=J.callback;if($!==null)J.callback=null,xM($,Q)}}var Eb={},X7=s8(Eb),cb=s8(Eb),tz=s8(Eb);function sz(b){if(b===Eb)throw Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");return b}function PK(){var b=sz(tz.current);return b}function RJ(b,z){h4(tz,z,b),h4(cb,b,b),h4(X7,Eb,b);var Q=$_(z);S4(X7,b),h4(X7,Q,b)}function o3(b){S4(X7,b),S4(cb,b),S4(tz,b)}function PJ(){var b=sz(X7.current);return b}function vK(b){var z=sz(tz.current),Q=sz(X7.current),X=H_(Q,b.type);if(Q===X)return;h4(cb,b,b),h4(X7,X,b)}function vJ(b){if(cb.current!==b)return;S4(X7,b),S4(cb,b)}var iM=0,FK=1,AK=1,db=2,m5=s8(iM);function FJ(b,z){return(b&z)!==0}function a3(b){return b&FK}function AJ(b,z){return b&FK|z}function jM(b,z){return b|z}function Z7(b,z){h4(m5,z,b)}function r3(b){S4(m5,b)}function oM(b,z){var Q=b.memoizedState;if(Q!==null){if(Q.dehydrated!==null)return!0;return!1}var X=b.memoizedProps;return!0}function ez(b){var z=b;while(z!==null){if(z.tag===j){var Q=z.memoizedState;if(Q!==null){var X=Q.dehydrated;if(X===null||dG(X)||xZ(X))return z}}else if(z.tag===K0&&z.memoizedProps.revealOrder!==void 0){var Z=(z.flags&m1)!==o0;if(Z)return z}else if(z.child!==null){z.child.return=z,z=z.child;continue}if(z===b)return null;while(z.sibling===null){if(z.return===null||z.return===b)return null;z=z.return}z.sibling.return=z.return,z=z.sibling}return null}var t4=0,r6=1,z8=2,n6=4,M4=8,kJ=[];function IJ(){for(var b=0;b<kJ.length;b++){var z=kJ[b];z._workInProgressVersionPrimary=null}kJ.length=0}function aM(b,z){var Q=z._getVersion,X=Q(z._source);if(b.mutableSourceEagerHydrationData==null)b.mutableSourceEagerHydrationData=[z,X];else b.mutableSourceEagerHydrationData.push(z,X)}var{ReactCurrentDispatcher:k0,ReactCurrentBatchConfig:lb}=Y,TJ,n3;TJ=new Set;var j7=$0,r1=null,t6=null,s6=null,bQ=!1,pb=!1,xb=0,rM=0,nM=25,e=null,W5=null,J7=-1,fJ=!1;function c1(){{var b=e;if(W5===null)W5=[b];else W5.push(b)}}function M0(){{var b=e;if(W5!==null){if(J7++,W5[J7]!==b)tM(b)}}}function t3(b){if(b!==void 0&&b!==null&&!y1(b))H("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",e,typeof b)}function tM(b){{var z=G1(r1);if(!TJ.has(z)){if(TJ.add(z),W5!==null){var Q="",X=30;for(var Z=0;Z<=J7;Z++){var J=W5[Z],$=Z===J7?b:J,K=Z+1+". "+J;while(K.length<X)K+=" ";K+=$+`
72
+ `,Q+=K}H(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks
73
+
74
+ Previous render Next render
75
+ ------------------------------------------------------
76
+ %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77
+ `,z,Q)}}}}function V4(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
78
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
79
+ 2. You might be breaking the Rules of Hooks
80
+ 3. You might have more than one copy of React in the same app
81
+ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function CJ(b,z){if(fJ)return!1;if(z===null)return H("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.",e),!1;if(b.length!==z.length)H(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
82
+
83
+ Previous: %s
84
+ Incoming: %s`,e,"["+z.join(", ")+"]","["+b.join(", ")+"]");for(var Q=0;Q<z.length&&Q<b.length;Q++){if($5(b[Q],z[Q]))continue;return!1}return!0}function s3(b,z,Q,X,Z,J){if(j7=J,r1=z,W5=b!==null?b._debugHookTypes:null,J7=-1,fJ=b!==null&&b.type!==z.type,z.memoizedState=null,z.updateQueue=null,z.lanes=$0,b!==null&&b.memoizedState!==null)k0.current=oK;else if(W5!==null)k0.current=jK;else k0.current=iK;var $=Q(X,Z);if(pb){var K=0;do{if(pb=!1,xb=0,K>=nM)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");K+=1,fJ=!1,t6=null,s6=null,z.updateQueue=null,J7=-1,k0.current=aK,$=Q(X,Z)}while(pb)}k0.current=LQ,z._debugHookTypes=W5;var U=t6!==null&&t6.next!==null;if(j7=$0,r1=null,t6=null,s6=null,e=null,W5=null,J7=-1,b!==null&&(b.flags&M8)!==(z.flags&M8)&&(b.mode&A1)!==j0)H("Internal React error: Expected static flag was missing. Please notify the React team.");if(bQ=!1,U)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");return $}function e3(){var b=xb!==0;return xb=0,b}function kK(b,z,Q){if(z.updateQueue=b.updateQueue,(z.mode&t5)!==j0)z.flags&=~(o9|_8|C5|f1);else z.flags&=~(C5|f1);b.lanes=bz(b.lanes,Q)}function IK(){if(k0.current=LQ,bQ){var b=r1.memoizedState;while(b!==null){var z=b.queue;if(z!==null)z.pending=null;b=b.next}bQ=!1}j7=$0,r1=null,t6=null,s6=null,W5=null,J7=-1,e=null,cK=!1,pb=!1,xb=0}function Q8(){var b={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};if(s6===null)r1.memoizedState=s6=b;else s6=s6.next=b;return s6}function _5(){var b;if(t6===null){var z=r1.alternate;if(z!==null)b=z.memoizedState;else b=null}else b=t6.next;var Q;if(s6===null)Q=r1.memoizedState;else Q=s6.next;if(Q!==null)s6=Q,Q=s6.next,t6=b;else{if(b===null)throw Error("Rendered more hooks than during the previous render.");t6=b;var X={memoizedState:t6.memoizedState,baseState:t6.baseState,baseQueue:t6.baseQueue,queue:t6.queue,next:null};if(s6===null)r1.memoizedState=s6=X;else s6=s6.next=X}return s6}function TK(){return{lastEffect:null,stores:null}}function SJ(b,z){return typeof z==="function"?z(b):z}function hJ(b,z,Q){var X=Q8(),Z;if(Q!==void 0)Z=Q(z);else Z=z;X.memoizedState=X.baseState=Z;var J={pending:null,interleaved:null,lanes:$0,dispatch:null,lastRenderedReducer:b,lastRenderedState:Z};X.queue=J;var $=J.dispatch=bw.bind(null,r1,J);return[X.memoizedState,$]}function VJ(b,z,Q){var X=_5(),Z=X.queue;if(Z===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");Z.lastRenderedReducer=b;var J=t6,$=J.baseQueue,K=Z.pending;if(K!==null){if($!==null){var U=$.next,N=K.next;$.next=N,K.next=U}if(J.baseQueue!==$)H("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React.");J.baseQueue=$=K,Z.pending=null}if($!==null){var R=$.next,y=J.baseState,D=null,p=null,x=null,a=R;do{var w0=a.lane;if(!f3(j7,w0)){var p0={lane:w0,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null};if(x===null)p=x=p0,D=y;else x=x.next=p0;r1.lanes=q1(r1.lanes,w0),U9(w0)}else{if(x!==null){var E0={lane:K4,action:a.action,hasEagerState:a.hasEagerState,eagerState:a.eagerState,next:null};x=x.next=E0}if(a.hasEagerState)y=a.eagerState;else{var W1=a.action;y=b(y,W1)}}a=a.next}while(a!==null&&a!==R);if(x===null)D=y;else x.next=p;if(!$5(y,X.memoizedState))eb();X.memoizedState=y,X.baseState=D,X.baseQueue=x,Z.lastRenderedState=y}var _1=Z.interleaved;if(_1!==null){var c=_1;do{var s=c.lane;r1.lanes=q1(r1.lanes,s),U9(s),c=c.next}while(c!==_1)}else if($===null)Z.lanes=$0;var d=Z.dispatch;return[X.memoizedState,d]}function DJ(b,z,Q){var X=_5(),Z=X.queue;if(Z===null)throw Error("Should have a queue. This is likely a bug in React. Please file an issue.");Z.lastRenderedReducer=b;var{dispatch:J,pending:$}=Z,K=X.memoizedState;if($!==null){Z.pending=null;var U=$.next,N=U;do{var R=N.action;K=b(K,R),N=N.next}while(N!==U);if(!$5(K,X.memoizedState))eb();if(X.memoizedState=K,X.baseQueue===null)X.baseState=K;Z.lastRenderedState=K}return[K,J]}function yJ(b,z,Q){return}function zQ(b,z,Q){return}function mJ(b,z,Q){var X=r1,Z=Q8(),J,$=_4();if($){if(Q===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");if(J=Q(),!n3){if(J!==Q())H("The result of getServerSnapshot should be cached to avoid an infinite loop"),n3=!0}}else{if(J=z(),!n3){var K=z();if(!$5(J,K))H("The result of getSnapshot should be cached to avoid an infinite loop"),n3=!0}var U=DQ();if(U===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!e9(U,j7))fK(X,z,J)}Z.memoizedState=J;var N={value:J,getSnapshot:z};return Z.queue=N,YQ(SK.bind(null,X,N,b),[b]),X.flags|=C5,ib(r6|M4,CK.bind(null,X,N,J,z),void 0,null),J}function QQ(b,z,Q){var X=r1,Z=_5(),J=z();if(!n3){var $=z();if(!$5(J,$))H("The result of getSnapshot should be cached to avoid an infinite loop"),n3=!0}var K=Z.memoizedState,U=!$5(K,J);if(U)Z.memoizedState=J,eb();var N=Z.queue;if(ob(SK.bind(null,X,N,b),[b]),N.getSnapshot!==z||U||s6!==null&&s6.memoizedState.tag&r6){X.flags|=C5,ib(r6|M4,CK.bind(null,X,N,J,z),void 0,null);var R=DQ();if(R===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");if(!e9(R,j7))fK(X,z,J)}return J}function fK(b,z,Q){b.flags|=j9;var X={getSnapshot:z,value:Q},Z=r1.updateQueue;if(Z===null)Z=TK(),r1.updateQueue=Z,Z.stores=[X];else{var J=Z.stores;if(J===null)Z.stores=[X];else J.push(X)}}function CK(b,z,Q,X){if(z.value=Q,z.getSnapshot=X,hK(z))VK(b)}function SK(b,z,Q){var X=function(){if(hK(z))VK(b)};return Q(X)}function hK(b){var{getSnapshot:z,value:Q}=b;try{var X=z();return!$5(Q,X)}catch(Z){return!0}}function VK(b){var z=n4(b,b1);if(z!==null)Q4(z,b,b1,W6)}function XQ(b){var z=Q8();if(typeof b==="function")b=b();z.memoizedState=z.baseState=b;var Q={pending:null,interleaved:null,lanes:$0,dispatch:null,lastRenderedReducer:SJ,lastRenderedState:b};z.queue=Q;var X=Q.dispatch=zw.bind(null,r1,Q);return[z.memoizedState,X]}function uJ(b){return VJ(SJ)}function gJ(b){return DJ(SJ)}function ib(b,z,Q,X){var Z={tag:b,create:z,destroy:Q,deps:X,next:null},J=r1.updateQueue;if(J===null)J=TK(),r1.updateQueue=J,J.lastEffect=Z.next=Z;else{var $=J.lastEffect;if($===null)J.lastEffect=Z.next=Z;else{var K=$.next;$.next=Z,Z.next=K,J.lastEffect=Z}}return Z}function EJ(b){var z=Q8();{var Q={current:b};return z.memoizedState=Q,Q}}function ZQ(b){var z=_5();return z.memoizedState}function jb(b,z,Q,X){var Z=Q8(),J=X===void 0?null:X;r1.flags|=b,Z.memoizedState=ib(r6|z,Q,void 0,J)}function JQ(b,z,Q,X){var Z=_5(),J=X===void 0?null:X,$=void 0;if(t6!==null){var K=t6.memoizedState;if($=K.destroy,J!==null){var U=K.deps;if(CJ(J,U)){Z.memoizedState=ib(z,Q,$,J);return}}}r1.flags|=b,Z.memoizedState=ib(r6|z,Q,$,J)}function YQ(b,z){if((r1.mode&t5)!==j0)return jb(o9|C5|yX,M4,b,z);else return jb(C5|yX,M4,b,z)}function ob(b,z){return JQ(C5,M4,b,z)}function cJ(b,z){return jb(f1,z8,b,z)}function $Q(b,z){return JQ(f1,z8,b,z)}function dJ(b,z){var Q=f1;if(Q|=T7,(r1.mode&t5)!==j0)Q|=_8;return jb(Q,n6,b,z)}function HQ(b,z){return JQ(f1,n6,b,z)}function DK(b,z){if(typeof z==="function"){var Q=z,X=b();return Q(X),function(){Q(null)}}else if(z!==null&&z!==void 0){var Z=z;if(!Z.hasOwnProperty("current"))H("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.","an object with keys {"+Object.keys(Z).join(", ")+"}");var J=b();return Z.current=J,function(){Z.current=null}}}function lJ(b,z,Q){if(typeof z!=="function")H("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",z!==null?typeof z:"null");var X=Q!==null&&Q!==void 0?Q.concat([b]):null,Z=f1;if(Z|=T7,(r1.mode&t5)!==j0)Z|=_8;return jb(Z,n6,DK.bind(null,z,b),X)}function GQ(b,z,Q){if(typeof z!=="function")H("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",z!==null?typeof z:"null");var X=Q!==null&&Q!==void 0?Q.concat([b]):null;return JQ(f1,n6,DK.bind(null,z,b),X)}function KQ(b,z){}var UQ=KQ;function pJ(b,z){var Q=Q8(),X=z===void 0?null:z;return Q.memoizedState=[b,X],b}function qQ(b,z){var Q=_5(),X=z===void 0?null:z,Z=Q.memoizedState;if(Z!==null){if(X!==null){var J=Z[1];if(CJ(X,J))return Z[0]}}return Q.memoizedState=[b,X],b}function xJ(b,z){var Q=Q8(),X=z===void 0?null:z,Z=b();return Q.memoizedState=[Z,X],Z}function BQ(b,z){var Q=_5(),X=z===void 0?null:z,Z=Q.memoizedState;if(Z!==null){if(X!==null){var J=Z[1];if(CJ(X,J))return Z[0]}}var $=b();return Q.memoizedState=[$,X],$}function iJ(b){var z=Q8();return z.memoizedState=b,b}function yK(b){var z=_5(),Q=t6,X=Q.memoizedState;return uK(z,X,b)}function mK(b){var z=_5();if(t6===null)return z.memoizedState=b,b;else{var Q=t6.memoizedState;return uK(z,Q,b)}}function uK(b,z,Q){var X=!uL(j7);if(X){if(!$5(Q,z)){var Z=hH();r1.lanes=q1(r1.lanes,Z),U9(Z),b.baseState=!0}return z}else{if(b.baseState)b.baseState=!1,eb();return b.memoizedState=Q,Q}}function sM(b,z,Q){var X=h5();U4(jL(X,R8)),b(!0);var Z=lb.transition;lb.transition={};var J=lb.transition;lb.transition._updatedFibers=new Set;try{b(!1),z()}finally{if(U4(X),lb.transition=Z,Z===null&&J._updatedFibers){var $=J._updatedFibers.size;if($>10)O("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");J._updatedFibers.clear()}}}function jJ(){var b=XQ(!1),z=b[0],Q=b[1],X=sM.bind(null,Q),Z=Q8();return Z.memoizedState=X,[z,X]}function gK(){var b=uJ(),z=b[0],Q=_5(),X=Q.memoizedState;return[z,X]}function EK(){var b=gJ(),z=b[0],Q=_5(),X=Q.memoizedState;return[z,X]}var cK=!1;function eM(){return cK}function oJ(){var b=Q8(),z=DQ(),Q=z.identifierPrefix,X;if(_4()){var Z=WM();X=":"+Q+"R"+Z;var J=xb++;if(J>0)X+="H"+J.toString(32);X+=":"}else{var $=rM++;X=":"+Q+"r"+$.toString(32)+":"}return b.memoizedState=X,X}function OQ(){var b=_5(),z=b.memoizedState;return z}function bw(b,z,Q){if(typeof arguments[3]==="function")H("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var X=K7(b),Z={lane:X,action:Q,hasEagerState:!1,eagerState:null,next:null};if(dK(b))lK(z,Z);else{var J=NK(b,z,Z,X);if(J!==null){var $=p4();Q4(J,b,X,$),pK(J,z,X)}}xK(b,X)}function zw(b,z,Q){if(typeof arguments[3]==="function")H("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");var X=K7(b),Z={lane:X,action:Q,hasEagerState:!1,eagerState:null,next:null};if(dK(b))lK(z,Z);else{var J=b.alternate;if(b.lanes===$0&&(J===null||J.lanes===$0)){var $=z.lastRenderedReducer;if($!==null){var K;K=k0.current,k0.current=u5;try{var U=z.lastRenderedState,N=$(U,Q);if(Z.hasEagerState=!0,Z.eagerState=N,$5(N,U)){cM(b,z,Z,X);return}}catch(D){}finally{k0.current=K}}}var R=NK(b,z,Z,X);if(R!==null){var y=p4();Q4(R,b,X,y),pK(R,z,X)}}xK(b,X)}function dK(b){var z=b.alternate;return b===r1||z!==null&&z===r1}function lK(b,z){pb=bQ=!0;var Q=b.pending;if(Q===null)z.next=z;else z.next=Q.next,Q.next=z;b.pending=z}function pK(b,z,Q){if(SH(Q)){var X=z.lanes;X=VH(X,b.pendingLanes);var Z=q1(X,Q);z.lanes=Z,UZ(b,Z)}}function xK(b,z,Q){cX(b,z)}var LQ={readContext:j6,useCallback:V4,useContext:V4,useEffect:V4,useImperativeHandle:V4,useInsertionEffect:V4,useLayoutEffect:V4,useMemo:V4,useReducer:V4,useRef:V4,useState:V4,useDebugValue:V4,useDeferredValue:V4,useTransition:V4,useMutableSource:V4,useSyncExternalStore:V4,useId:V4,unstable_isNewReconciler:B1},iK=null,jK=null,oK=null,aK=null,X8=null,u5=null,NQ=null;{var aJ=function(){H("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().")},z1=function(){H("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks")};iK={readContext:function(b){return j6(b)},useCallback:function(b,z){return e="useCallback",c1(),t3(z),pJ(b,z)},useContext:function(b){return e="useContext",c1(),j6(b)},useEffect:function(b,z){return e="useEffect",c1(),t3(z),YQ(b,z)},useImperativeHandle:function(b,z,Q){return e="useImperativeHandle",c1(),t3(Q),lJ(b,z,Q)},useInsertionEffect:function(b,z){return e="useInsertionEffect",c1(),t3(z),cJ(b,z)},useLayoutEffect:function(b,z){return e="useLayoutEffect",c1(),t3(z),dJ(b,z)},useMemo:function(b,z){e="useMemo",c1(),t3(z);var Q=k0.current;k0.current=X8;try{return xJ(b,z)}finally{k0.current=Q}},useReducer:function(b,z,Q){e="useReducer",c1();var X=k0.current;k0.current=X8;try{return hJ(b,z,Q)}finally{k0.current=X}},useRef:function(b){return e="useRef",c1(),EJ(b)},useState:function(b){e="useState",c1();var z=k0.current;k0.current=X8;try{return XQ(b)}finally{k0.current=z}},useDebugValue:function(b,z){return e="useDebugValue",c1(),KQ()},useDeferredValue:function(b){return e="useDeferredValue",c1(),iJ(b)},useTransition:function(){return e="useTransition",c1(),jJ()},useMutableSource:function(b,z,Q){return e="useMutableSource",c1(),yJ()},useSyncExternalStore:function(b,z,Q){return e="useSyncExternalStore",c1(),mJ(b,z,Q)},useId:function(){return e="useId",c1(),oJ()},unstable_isNewReconciler:B1},jK={readContext:function(b){return j6(b)},useCallback:function(b,z){return e="useCallback",M0(),pJ(b,z)},useContext:function(b){return e="useContext",M0(),j6(b)},useEffect:function(b,z){return e="useEffect",M0(),YQ(b,z)},useImperativeHandle:function(b,z,Q){return e="useImperativeHandle",M0(),lJ(b,z,Q)},useInsertionEffect:function(b,z){return e="useInsertionEffect",M0(),cJ(b,z)},useLayoutEffect:function(b,z){return e="useLayoutEffect",M0(),dJ(b,z)},useMemo:function(b,z){e="useMemo",M0();var Q=k0.current;k0.current=X8;try{return xJ(b,z)}finally{k0.current=Q}},useReducer:function(b,z,Q){e="useReducer",M0();var X=k0.current;k0.current=X8;try{return hJ(b,z,Q)}finally{k0.current=X}},useRef:function(b){return e="useRef",M0(),EJ(b)},useState:function(b){e="useState",M0();var z=k0.current;k0.current=X8;try{return XQ(b)}finally{k0.current=z}},useDebugValue:function(b,z){return e="useDebugValue",M0(),KQ()},useDeferredValue:function(b){return e="useDeferredValue",M0(),iJ(b)},useTransition:function(){return e="useTransition",M0(),jJ()},useMutableSource:function(b,z,Q){return e="useMutableSource",M0(),yJ()},useSyncExternalStore:function(b,z,Q){return e="useSyncExternalStore",M0(),mJ(b,z,Q)},useId:function(){return e="useId",M0(),oJ()},unstable_isNewReconciler:B1},oK={readContext:function(b){return j6(b)},useCallback:function(b,z){return e="useCallback",M0(),qQ(b,z)},useContext:function(b){return e="useContext",M0(),j6(b)},useEffect:function(b,z){return e="useEffect",M0(),ob(b,z)},useImperativeHandle:function(b,z,Q){return e="useImperativeHandle",M0(),GQ(b,z,Q)},useInsertionEffect:function(b,z){return e="useInsertionEffect",M0(),$Q(b,z)},useLayoutEffect:function(b,z){return e="useLayoutEffect",M0(),HQ(b,z)},useMemo:function(b,z){e="useMemo",M0();var Q=k0.current;k0.current=u5;try{return BQ(b,z)}finally{k0.current=Q}},useReducer:function(b,z,Q){e="useReducer",M0();var X=k0.current;k0.current=u5;try{return VJ(b,z,Q)}finally{k0.current=X}},useRef:function(b){return e="useRef",M0(),ZQ()},useState:function(b){e="useState",M0();var z=k0.current;k0.current=u5;try{return uJ(b)}finally{k0.current=z}},useDebugValue:function(b,z){return e="useDebugValue",M0(),UQ()},useDeferredValue:function(b){return e="useDeferredValue",M0(),yK(b)},useTransition:function(){return e="useTransition",M0(),gK()},useMutableSource:function(b,z,Q){return e="useMutableSource",M0(),zQ()},useSyncExternalStore:function(b,z,Q){return e="useSyncExternalStore",M0(),QQ(b,z)},useId:function(){return e="useId",M0(),OQ()},unstable_isNewReconciler:B1},aK={readContext:function(b){return j6(b)},useCallback:function(b,z){return e="useCallback",M0(),qQ(b,z)},useContext:function(b){return e="useContext",M0(),j6(b)},useEffect:function(b,z){return e="useEffect",M0(),ob(b,z)},useImperativeHandle:function(b,z,Q){return e="useImperativeHandle",M0(),GQ(b,z,Q)},useInsertionEffect:function(b,z){return e="useInsertionEffect",M0(),$Q(b,z)},useLayoutEffect:function(b,z){return e="useLayoutEffect",M0(),HQ(b,z)},useMemo:function(b,z){e="useMemo",M0();var Q=k0.current;k0.current=NQ;try{return BQ(b,z)}finally{k0.current=Q}},useReducer:function(b,z,Q){e="useReducer",M0();var X=k0.current;k0.current=NQ;try{return DJ(b,z,Q)}finally{k0.current=X}},useRef:function(b){return e="useRef",M0(),ZQ()},useState:function(b){e="useState",M0();var z=k0.current;k0.current=NQ;try{return gJ(b)}finally{k0.current=z}},useDebugValue:function(b,z){return e="useDebugValue",M0(),UQ()},useDeferredValue:function(b){return e="useDeferredValue",M0(),mK(b)},useTransition:function(){return e="useTransition",M0(),EK()},useMutableSource:function(b,z,Q){return e="useMutableSource",M0(),zQ()},useSyncExternalStore:function(b,z,Q){return e="useSyncExternalStore",M0(),QQ(b,z)},useId:function(){return e="useId",M0(),OQ()},unstable_isNewReconciler:B1},X8={readContext:function(b){return aJ(),j6(b)},useCallback:function(b,z){return e="useCallback",z1(),c1(),pJ(b,z)},useContext:function(b){return e="useContext",z1(),c1(),j6(b)},useEffect:function(b,z){return e="useEffect",z1(),c1(),YQ(b,z)},useImperativeHandle:function(b,z,Q){return e="useImperativeHandle",z1(),c1(),lJ(b,z,Q)},useInsertionEffect:function(b,z){return e="useInsertionEffect",z1(),c1(),cJ(b,z)},useLayoutEffect:function(b,z){return e="useLayoutEffect",z1(),c1(),dJ(b,z)},useMemo:function(b,z){e="useMemo",z1(),c1();var Q=k0.current;k0.current=X8;try{return xJ(b,z)}finally{k0.current=Q}},useReducer:function(b,z,Q){e="useReducer",z1(),c1();var X=k0.current;k0.current=X8;try{return hJ(b,z,Q)}finally{k0.current=X}},useRef:function(b){return e="useRef",z1(),c1(),EJ(b)},useState:function(b){e="useState",z1(),c1();var z=k0.current;k0.current=X8;try{return XQ(b)}finally{k0.current=z}},useDebugValue:function(b,z){return e="useDebugValue",z1(),c1(),KQ()},useDeferredValue:function(b){return e="useDeferredValue",z1(),c1(),iJ(b)},useTransition:function(){return e="useTransition",z1(),c1(),jJ()},useMutableSource:function(b,z,Q){return e="useMutableSource",z1(),c1(),yJ()},useSyncExternalStore:function(b,z,Q){return e="useSyncExternalStore",z1(),c1(),mJ(b,z,Q)},useId:function(){return e="useId",z1(),c1(),oJ()},unstable_isNewReconciler:B1},u5={readContext:function(b){return aJ(),j6(b)},useCallback:function(b,z){return e="useCallback",z1(),M0(),qQ(b,z)},useContext:function(b){return e="useContext",z1(),M0(),j6(b)},useEffect:function(b,z){return e="useEffect",z1(),M0(),ob(b,z)},useImperativeHandle:function(b,z,Q){return e="useImperativeHandle",z1(),M0(),GQ(b,z,Q)},useInsertionEffect:function(b,z){return e="useInsertionEffect",z1(),M0(),$Q(b,z)},useLayoutEffect:function(b,z){return e="useLayoutEffect",z1(),M0(),HQ(b,z)},useMemo:function(b,z){e="useMemo",z1(),M0();var Q=k0.current;k0.current=u5;try{return BQ(b,z)}finally{k0.current=Q}},useReducer:function(b,z,Q){e="useReducer",z1(),M0();var X=k0.current;k0.current=u5;try{return VJ(b,z,Q)}finally{k0.current=X}},useRef:function(b){return e="useRef",z1(),M0(),ZQ()},useState:function(b){e="useState",z1(),M0();var z=k0.current;k0.current=u5;try{return uJ(b)}finally{k0.current=z}},useDebugValue:function(b,z){return e="useDebugValue",z1(),M0(),UQ()},useDeferredValue:function(b){return e="useDeferredValue",z1(),M0(),yK(b)},useTransition:function(){return e="useTransition",z1(),M0(),gK()},useMutableSource:function(b,z,Q){return e="useMutableSource",z1(),M0(),zQ()},useSyncExternalStore:function(b,z,Q){return e="useSyncExternalStore",z1(),M0(),QQ(b,z)},useId:function(){return e="useId",z1(),M0(),OQ()},unstable_isNewReconciler:B1},NQ={readContext:function(b){return aJ(),j6(b)},useCallback:function(b,z){return e="useCallback",z1(),M0(),qQ(b,z)},useContext:function(b){return e="useContext",z1(),M0(),j6(b)},useEffect:function(b,z){return e="useEffect",z1(),M0(),ob(b,z)},useImperativeHandle:function(b,z,Q){return e="useImperativeHandle",z1(),M0(),GQ(b,z,Q)},useInsertionEffect:function(b,z){return e="useInsertionEffect",z1(),M0(),$Q(b,z)},useLayoutEffect:function(b,z){return e="useLayoutEffect",z1(),M0(),HQ(b,z)},useMemo:function(b,z){e="useMemo",z1(),M0();var Q=k0.current;k0.current=u5;try{return BQ(b,z)}finally{k0.current=Q}},useReducer:function(b,z,Q){e="useReducer",z1(),M0();var X=k0.current;k0.current=u5;try{return DJ(b,z,Q)}finally{k0.current=X}},useRef:function(b){return e="useRef",z1(),M0(),ZQ()},useState:function(b){e="useState",z1(),M0();var z=k0.current;k0.current=u5;try{return gJ(b)}finally{k0.current=z}},useDebugValue:function(b,z){return e="useDebugValue",z1(),M0(),UQ()},useDeferredValue:function(b){return e="useDeferredValue",z1(),M0(),mK(b)},useTransition:function(){return e="useTransition",z1(),M0(),EK()},useMutableSource:function(b,z,Q){return e="useMutableSource",z1(),M0(),zQ()},useSyncExternalStore:function(b,z,Q){return e="useSyncExternalStore",z1(),M0(),QQ(b,z)},useId:function(){return e="useId",z1(),M0(),OQ()},unstable_isNewReconciler:B1}}var Y7=t1.unstable_now,rK=0,WQ=-1,ab=-1,_Q=-1,rJ=!1,MQ=!1;function nK(){return rJ}function Qw(){MQ=!0}function Xw(){rJ=!1,MQ=!1}function Zw(){rJ=MQ,MQ=!1}function tK(){return rK}function sK(){rK=Y7()}function nJ(b){if(ab=Y7(),b.actualStartTime<0)b.actualStartTime=Y7()}function eK(b){ab=-1}function wQ(b,z){if(ab>=0){var Q=Y7()-ab;if(b.actualDuration+=Q,z)b.selfBaseDuration=Q;ab=-1}}function Z8(b){if(WQ>=0){var z=Y7()-WQ;WQ=-1;var Q=b.return;while(Q!==null){switch(Q.tag){case F:var X=Q.stateNode;X.effectDuration+=z;return;case i:var Z=Q.stateNode;Z.effectDuration+=z;return}Q=Q.return}}}function tJ(b){if(_Q>=0){var z=Y7()-_Q;_Q=-1;var Q=b.return;while(Q!==null){switch(Q.tag){case F:var X=Q.stateNode;if(X!==null)X.passiveEffectDuration+=z;return;case i:var Z=Q.stateNode;if(Z!==null)Z.passiveEffectDuration+=z;return}Q=Q.return}}}function J8(){WQ=Y7()}function sJ(){_Q=Y7()}function eJ(b){var z=b.child;while(z)b.actualDuration+=z.actualDuration,z=z.sibling}function g5(b,z){if(b&&b.defaultProps){var Q=L1({},z),X=b.defaultProps;for(var Z in X)if(Q[Z]===void 0)Q[Z]=X[Z];return Q}return z}var bY={},zY,QY,XY,ZY,JY,bU,RQ,YY,$Y,HY,rb;{zY=new Set,QY=new Set,XY=new Set,ZY=new Set,YY=new Set,JY=new Set,$Y=new Set,HY=new Set,rb=new Set;var zU=new Set;RQ=function(b,z){if(b===null||typeof b==="function")return;var Q=z+"_"+b;if(!zU.has(Q))zU.add(Q),H("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",z,b)},bU=function(b,z){if(z===void 0){var Q=S1(b)||"Component";if(!JY.has(Q))JY.add(Q),H("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",Q)}},Object.defineProperty(bY,"_processChildContext",{enumerable:!1,value:function(){throw Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).")}}),Object.freeze(bY)}function GY(b,z,Q,X){var Z=b.memoizedState,J=Q(X,Z);{if(b.mode&D6){G4(!0);try{J=Q(X,Z)}finally{G4(!1)}}bU(z,J)}var $=J===null||J===void 0?Z:L1({},Z,J);if(b.memoizedState=$,b.lanes===$0){var K=b.updateQueue;K.baseState=$}}var KY={isMounted:nO,enqueueSetState:function(b,z,Q){var X=P3(b),Z=p4(),J=K7(X),$=T8(Z,J);if($.payload=z,Q!==void 0&&Q!==null)RQ(Q,"setState"),$.callback=Q;var K=Q7(X,$,J);if(K!==null)Q4(K,X,J,Z),az(K,X,J);cX(X,J)},enqueueReplaceState:function(b,z,Q){var X=P3(b),Z=p4(),J=K7(X),$=T8(Z,J);if($.tag=_K,$.payload=z,Q!==void 0&&Q!==null)RQ(Q,"replaceState"),$.callback=Q;var K=Q7(X,$,J);if(K!==null)Q4(K,X,J,Z),az(K,X,J);cX(X,J)},enqueueForceUpdate:function(b,z){var Q=P3(b),X=p4(),Z=K7(Q),J=T8(X,Z);if(J.tag=iz,z!==void 0&&z!==null)RQ(z,"forceUpdate"),J.callback=z;var $=Q7(Q,J,Z);if($!==null)Q4($,Q,Z,X),az($,Q,Z);IL(Q,Z)}};function QU(b,z,Q,X,Z,J,$){var K=b.stateNode;if(typeof K.shouldComponentUpdate==="function"){var U=K.shouldComponentUpdate(X,J,$);{if(b.mode&D6){G4(!0);try{U=K.shouldComponentUpdate(X,J,$)}finally{G4(!1)}}if(U===void 0)H("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",S1(z)||"Component")}return U}if(z.prototype&&z.prototype.isPureReactComponent)return!Wb(Q,X)||!Wb(Z,J);return!0}function Jw(b,z,Q){var X=b.stateNode;{var Z=S1(z)||"Component",J=X.render;if(!J)if(z.prototype&&typeof z.prototype.render==="function")H("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?",Z);else H("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.",Z);if(X.getInitialState&&!X.getInitialState.isReactClassApproved&&!X.state)H("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?",Z);if(X.getDefaultProps&&!X.getDefaultProps.isReactClassApproved)H("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.",Z);if(X.propTypes)H("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.",Z);if(X.contextType)H("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",Z);{if(z.childContextTypes&&!rb.has(z)&&(b.mode&D6)===j0)rb.add(z),H(`%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead
85
+
86
+ .Learn more about this warning here: https://reactjs.org/link/legacy-context`,Z);if(z.contextTypes&&!rb.has(z)&&(b.mode&D6)===j0)rb.add(z),H(`%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.
87
+
88
+ Learn more about this warning here: https://reactjs.org/link/legacy-context`,Z);if(X.contextTypes)H("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.",Z);if(z.contextType&&z.contextTypes&&!$Y.has(z))$Y.add(z),H("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.",Z)}if(typeof X.componentShouldUpdate==="function")H("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.",Z);if(z.prototype&&z.prototype.isPureReactComponent&&typeof X.shouldComponentUpdate<"u")H("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.",S1(z)||"A pure component");if(typeof X.componentDidUnmount==="function")H("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",Z);if(typeof X.componentDidReceiveProps==="function")H("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().",Z);if(typeof X.componentWillRecieveProps==="function")H("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",Z);if(typeof X.UNSAFE_componentWillRecieveProps==="function")H("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",Z);var $=X.props!==Q;if(X.props!==void 0&&$)H("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",Z,Z);if(X.defaultProps)H("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.",Z,Z);if(typeof X.getSnapshotBeforeUpdate==="function"&&typeof X.componentDidUpdate!=="function"&&!XY.has(z))XY.add(z),H("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",S1(z));if(typeof X.getDerivedStateFromProps==="function")H("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",Z);if(typeof X.getDerivedStateFromError==="function")H("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",Z);if(typeof z.getSnapshotBeforeUpdate==="function")H("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",Z);var K=X.state;if(K&&(typeof K!=="object"||y1(K)))H("%s.state: must be set to an object or null",Z);if(typeof X.getChildContext==="function"&&typeof z.childContextTypes!=="object")H("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",Z)}}function XU(b,z){z.updater=KY,b.stateNode=z,iO(z,b),z._reactInternalInstance=bY}function ZU(b,z,Q){var X=!1,Z=H5,J=H5,$=z.contextType;if("contextType"in z){var K=$===null||$!==void 0&&$.$$typeof===P&&$._context===void 0;if(!K&&!HY.has(z)){HY.add(z);var U="";if($===void 0)U=" However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.";else if(typeof $!=="object")U=" However, it is set to a "+typeof $+".";else if($.$$typeof===Z0)U=" Did you accidentally pass the Context.Provider instead?";else if($._context!==void 0)U=" Did you accidentally pass the Context.Consumer instead?";else U=" However, it is set to an object with keys {"+Object.keys($).join(", ")+"}.";H("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",S1(z)||"Component",U)}}if(typeof $==="object"&&$!==null)J=j6($);else{Z=E3(b,z,!0);var N=z.contextTypes;X=N!==null&&N!==void 0,J=X?c3(b,Z):H5}var R=new z(Q,J);if(b.mode&D6){G4(!0);try{R=new z(Q,J)}finally{G4(!1)}}var y=b.memoizedState=R.state!==null&&R.state!==void 0?R.state:null;XU(b,R);{if(typeof z.getDerivedStateFromProps==="function"&&y===null){var D=S1(z)||"Component";if(!QY.has(D))QY.add(D),H("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",D,R.state===null?"null":"undefined",D)}if(typeof z.getDerivedStateFromProps==="function"||typeof R.getSnapshotBeforeUpdate==="function"){var p=null,x=null,a=null;if(typeof R.componentWillMount==="function"&&R.componentWillMount.__suppressDeprecationWarning!==!0)p="componentWillMount";else if(typeof R.UNSAFE_componentWillMount==="function")p="UNSAFE_componentWillMount";if(typeof R.componentWillReceiveProps==="function"&&R.componentWillReceiveProps.__suppressDeprecationWarning!==!0)x="componentWillReceiveProps";else if(typeof R.UNSAFE_componentWillReceiveProps==="function")x="UNSAFE_componentWillReceiveProps";if(typeof R.componentWillUpdate==="function"&&R.componentWillUpdate.__suppressDeprecationWarning!==!0)a="componentWillUpdate";else if(typeof R.UNSAFE_componentWillUpdate==="function")a="UNSAFE_componentWillUpdate";if(p!==null||x!==null||a!==null){var w0=S1(z)||"Component",p0=typeof z.getDerivedStateFromProps==="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";if(!ZY.has(w0))ZY.add(w0),H(`Unsafe legacy lifecycles will not be called for components using new component APIs.
89
+
90
+ %s uses %s but also contains the following legacy lifecycles:%s%s%s
91
+
92
+ The above lifecycles should be removed. Learn more about this warning here:
93
+ https://reactjs.org/link/unsafe-component-lifecycles`,w0,p0,p!==null?`
94
+ `+p:"",x!==null?`
95
+ `+x:"",a!==null?`
96
+ `+a:"")}}}if(X)oG(b,Z,J);return R}function Yw(b,z){var Q=z.state;if(typeof z.componentWillMount==="function")z.componentWillMount();if(typeof z.UNSAFE_componentWillMount==="function")z.UNSAFE_componentWillMount();if(Q!==z.state)H("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",G1(b)||"Component"),KY.enqueueReplaceState(z,z.state,null)}function JU(b,z,Q,X){var Z=z.state;if(typeof z.componentWillReceiveProps==="function")z.componentWillReceiveProps(Q,X);if(typeof z.UNSAFE_componentWillReceiveProps==="function")z.UNSAFE_componentWillReceiveProps(Q,X);if(z.state!==Z){{var J=G1(b)||"Component";if(!zY.has(J))zY.add(J),H("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",J)}KY.enqueueReplaceState(z,z.state,null)}}function UY(b,z,Q,X){Jw(b,z,Q);var Z=b.stateNode;Z.props=Q,Z.state=b.memoizedState,Z.refs={},MJ(b);var J=z.contextType;if(typeof J==="object"&&J!==null)Z.context=j6(J);else{var $=E3(b,z,!0);Z.context=c3(b,$)}{if(Z.state===Q){var K=S1(z)||"Component";if(!YY.has(K))YY.add(K),H("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.",K)}if(b.mode&D6)y5.recordLegacyContextWarning(b,Z);y5.recordUnsafeLifecycleWarnings(b,Z)}Z.state=b.memoizedState;var U=z.getDerivedStateFromProps;if(typeof U==="function")GY(b,z,U,Q),Z.state=b.memoizedState;if(typeof z.getDerivedStateFromProps!=="function"&&typeof Z.getSnapshotBeforeUpdate!=="function"&&(typeof Z.UNSAFE_componentWillMount==="function"||typeof Z.componentWillMount==="function"))Yw(b,Z),rz(b,Q,Z,X),Z.state=b.memoizedState;if(typeof Z.componentDidMount==="function"){var N=f1;if(N|=T7,(b.mode&t5)!==j0)N|=_8;b.flags|=N}}function $w(b,z,Q,X){var{stateNode:Z,memoizedProps:J}=b;Z.props=J;var $=Z.context,K=z.contextType,U=H5;if(typeof K==="object"&&K!==null)U=j6(K);else{var N=E3(b,z,!0);U=c3(b,N)}var R=z.getDerivedStateFromProps,y=typeof R==="function"||typeof Z.getSnapshotBeforeUpdate==="function";if(!y&&(typeof Z.UNSAFE_componentWillReceiveProps==="function"||typeof Z.componentWillReceiveProps==="function")){if(J!==Q||$!==U)JU(b,Z,Q,U)}wK();var D=b.memoizedState,p=Z.state=D;if(rz(b,Q,Z,X),p=b.memoizedState,J===Q&&D===p&&!Cz()&&!nz()){if(typeof Z.componentDidMount==="function"){var x=f1;if(x|=T7,(b.mode&t5)!==j0)x|=_8;b.flags|=x}return!1}if(typeof R==="function")GY(b,z,R,Q),p=b.memoizedState;var a=nz()||QU(b,z,J,Q,D,p,U);if(a){if(!y&&(typeof Z.UNSAFE_componentWillMount==="function"||typeof Z.componentWillMount==="function")){if(typeof Z.componentWillMount==="function")Z.componentWillMount();if(typeof Z.UNSAFE_componentWillMount==="function")Z.UNSAFE_componentWillMount()}if(typeof Z.componentDidMount==="function"){var w0=f1;if(w0|=T7,(b.mode&t5)!==j0)w0|=_8;b.flags|=w0}}else{if(typeof Z.componentDidMount==="function"){var p0=f1;if(p0|=T7,(b.mode&t5)!==j0)p0|=_8;b.flags|=p0}b.memoizedProps=Q,b.memoizedState=p}return Z.props=Q,Z.state=p,Z.context=U,a}function Hw(b,z,Q,X,Z){var J=z.stateNode;MK(b,z);var $=z.memoizedProps,K=z.type===z.elementType?$:g5(z.type,$);J.props=K;var U=z.pendingProps,N=J.context,R=Q.contextType,y=H5;if(typeof R==="object"&&R!==null)y=j6(R);else{var D=E3(z,Q,!0);y=c3(z,D)}var p=Q.getDerivedStateFromProps,x=typeof p==="function"||typeof J.getSnapshotBeforeUpdate==="function";if(!x&&(typeof J.UNSAFE_componentWillReceiveProps==="function"||typeof J.componentWillReceiveProps==="function")){if($!==U||N!==y)JU(z,J,X,y)}wK();var a=z.memoizedState,w0=J.state=a;if(rz(z,X,J,Z),w0=z.memoizedState,$===U&&a===w0&&!Cz()&&!nz()&&!s1){if(typeof J.componentDidUpdate==="function"){if($!==b.memoizedProps||a!==b.memoizedState)z.flags|=f1}if(typeof J.getSnapshotBeforeUpdate==="function"){if($!==b.memoizedProps||a!==b.memoizedState)z.flags|=k7}return!1}if(typeof p==="function")GY(z,Q,p,X),w0=z.memoizedState;var p0=nz()||QU(z,Q,K,X,a,w0,y)||s1;if(p0){if(!x&&(typeof J.UNSAFE_componentWillUpdate==="function"||typeof J.componentWillUpdate==="function")){if(typeof J.componentWillUpdate==="function")J.componentWillUpdate(X,w0,y);if(typeof J.UNSAFE_componentWillUpdate==="function")J.UNSAFE_componentWillUpdate(X,w0,y)}if(typeof J.componentDidUpdate==="function")z.flags|=f1;if(typeof J.getSnapshotBeforeUpdate==="function")z.flags|=k7}else{if(typeof J.componentDidUpdate==="function"){if($!==b.memoizedProps||a!==b.memoizedState)z.flags|=f1}if(typeof J.getSnapshotBeforeUpdate==="function"){if($!==b.memoizedProps||a!==b.memoizedState)z.flags|=k7}z.memoizedProps=X,z.memoizedState=w0}return J.props=X,J.state=w0,J.context=y,p0}function o7(b,z){return{value:b,source:z,stack:u2(z),digest:null}}function qY(b,z,Q){return{value:b,source:null,stack:Q!=null?Q:null,digest:z!=null?z:null}}function Gw(b,z){return!0}function BY(b,z){try{var Q=Gw(b,z);if(Q===!1)return;var{value:X,source:Z,stack:J}=z,$=J!==null?J:"";if(X!=null&&X._suppressLogging){if(b.tag===M)return;console.error(X)}var K=Z?G1(Z):null,U=K?"The above error occurred in the <"+K+"> component:":"The above error occurred in one of your React components:",N;if(b.tag===F)N=`Consider adding an error boundary to your tree to customize error handling behavior.
97
+ Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.`;else{var R=G1(b)||"Anonymous";N="React will try to recreate this component tree from scratch "+("using the error boundary you provided, "+R+".")}var y=U+`
98
+ `+$+`
99
+
100
+ `+(""+N);console.error(y)}catch(D){setTimeout(function(){throw D})}}var Kw=typeof WeakMap==="function"?WeakMap:Map;function YU(b,z,Q){var X=T8(W6,Q);X.tag=WJ,X.payload={element:null};var Z=z.value;return X.callback=function(){$P(Z),BY(b,z)},X}function OY(b,z,Q){var X=T8(W6,Q);X.tag=WJ;var Z=b.type.getDerivedStateFromError;if(typeof Z==="function"){var J=z.value;X.payload=function(){return Z(J)},X.callback=function(){_q(b),BY(b,z)}}var $=b.stateNode;if($!==null&&typeof $.componentDidCatch==="function")X.callback=function(){if(_q(b),BY(b,z),typeof Z!=="function")JP(this);var{value:U,stack:N}=z;if(this.componentDidCatch(U,{componentStack:N!==null?N:""}),typeof Z!=="function"){if(!Z5(b.lanes,b1))H("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",G1(b)||"Unknown")}};return X}function $U(b,z,Q){var X=b.pingCache,Z;if(X===null)X=b.pingCache=new Kw,Z=new Set,X.set(z,Z);else if(Z=X.get(z),Z===void 0)Z=new Set,X.set(z,Z);if(!Z.has(Q)){Z.add(Q);var J=HP.bind(null,b,z,Q);if(S5)q9(b,Q);z.then(J,J)}}function Uw(b,z,Q,X){var Z=b.updateQueue;if(Z===null){var J=new Set;J.add(Q),b.updateQueue=J}else Z.add(Q)}function qw(b,z){var Q=b.tag;if((b.mode&A1)===j0&&(Q===L||Q===C||Q===z0)){var X=b.alternate;if(X)b.updateQueue=X.updateQueue,b.memoizedState=X.memoizedState,b.lanes=X.lanes;else b.updateQueue=null,b.memoizedState=null}}function HU(b){var z=b;do{if(z.tag===j&&oM(z))return z;z=z.return}while(z!==null);return null}function GU(b,z,Q,X,Z){if((b.mode&A1)===j0){if(b===z)b.flags|=c4;else{if(b.flags|=m1,Q.flags|=VX,Q.flags&=~(jO|a2),Q.tag===M){var J=Q.alternate;if(J===null)Q.tag=H0;else{var $=T8(W6,b1);$.tag=iz,Q7(Q,$,b1)}}Q.lanes=q1(Q.lanes,b1)}return b}return b.flags|=c4,b.lanes=Z,b}function Bw(b,z,Q,X,Z){if(Q.flags|=a2,S5)q9(b,Z);if(X!==null&&typeof X==="object"&&typeof X.then==="function"){var J=X;if(qw(Q),_4()&&Q.mode&A1)bK();var $=HU(z);if($!==null){if($.flags&=~N8,GU($,z,Q,b,Z),$.mode&A1)$U(b,J,Z);Uw($,b,J);return}else{if(!mL(Z)){$U(b,J,Z),aY();return}var K=Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");X=K}}else if(_4()&&Q.mode&A1){bK();var U=HU(z);if(U!==null){if((U.flags&c4)===o0)U.flags|=N8;GU(U,z,Q,b,Z),JJ(o7(X,Q));return}}X=o7(X,Q),tR(X);var N=z;do{switch(N.tag){case F:{var R=X;N.flags|=c4;var y=Qb(Z);N.lanes=q1(N.lanes,y);var D=YU(N,R,y);wJ(N,D);return}case M:var p=X,x=N.type,a=N.stateNode;if((N.flags&m1)===o0&&(typeof x.getDerivedStateFromError==="function"||a!==null&&typeof a.componentDidCatch==="function"&&!Gq(a))){N.flags|=c4;var w0=Qb(Z);N.lanes=q1(N.lanes,w0);var p0=OY(N,p,w0);wJ(N,p0);return}break}N=N.return}while(N!==null)}function Ow(){return null}var nb=Y.ReactCurrentOwner,E5=!1,LY,tb,NY,WY,_Y,a7,MY,PQ,sb;LY={},tb={},NY={},WY={},_Y={},a7=!1,MY={},PQ={},sb={};function d4(b,z,Q,X){if(b===null)z.child=qK(z,null,Q,X);else z.child=x3(z,b.child,Q,X)}function Lw(b,z,Q,X){z.child=x3(z,b.child,null,X),z.child=x3(z,null,Q,X)}function KU(b,z,Q,X,Z){if(z.type!==z.elementType){var J=Q.propTypes;if(J)V5(J,X,"prop",S1(Q))}var $=Q.render,K=z.ref,U,N;j3(z,Z),n2(z);{if(nb.current=z,Q5(!0),U=s3(b,z,$,X,K,Z),N=e3(),z.mode&D6){G4(!0);try{U=s3(b,z,$,X,K,Z),N=e3()}finally{G4(!1)}}Q5(!1)}if(A3(),b!==null&&!E5)return kK(b,z,Z),f8(b,z,Z);if(_4()&&N)eZ(z);return z.flags|=v3,d4(b,z,U,Z),z.child}function UU(b,z,Q,X,Z){if(b===null){var J=Q.type;if(AP(J)&&Q.compare===null&&Q.defaultProps===void 0){var $=J;return $=$2(J),z.tag=z0,z.type=$,PY(z,J),qU(b,z,$,X,Z)}{var K=J.propTypes;if(K)V5(K,X,"prop",S1(J));if(Q.defaultProps!==void 0){var U=S1(J)||"Unknown";if(!sb[U])H("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.",U),sb[U]=!0}}var N=J$(Q.type,null,X,z,z.mode,Z);return N.ref=z.ref,N.return=z,z.child=N,N}{var R=Q.type,y=R.propTypes;if(y)V5(y,X,"prop",S1(R))}var D=b.child,p=TY(b,Z);if(!p){var x=D.memoizedProps,a=Q.compare;if(a=a!==null?a:Wb,a(x,X)&&b.ref===z.ref)return f8(b,z,Z)}z.flags|=v3;var w0=e7(D,X);return w0.ref=z.ref,w0.return=z,z.child=w0,w0}function qU(b,z,Q,X,Z){if(z.type!==z.elementType){var J=z.elementType;if(J.$$typeof===g0){var $=J,K=$._payload,U=$._init;try{J=U(K)}catch(y){J=null}var N=J&&J.propTypes;if(N)V5(N,X,"prop",S1(J))}}if(b!==null){var R=b.memoizedProps;if(Wb(R,X)&&b.ref===z.ref&&z.type===b.type){if(E5=!1,z.pendingProps=X=R,!TY(b,Z))return z.lanes=b.lanes,f8(b,z,Z);else if((b.flags&VX)!==o0)E5=!0}}return wY(b,z,Q,X,Z)}function BU(b,z,Q){var X=z.pendingProps,Z=X.children,J=b!==null?b.memoizedState:null;if(X.mode==="hidden"||E1)if((z.mode&A1)===j0){var $={baseLanes:$0,cachePool:null,transitions:null};z.memoizedState=$,yQ(z,Q)}else if(!Z5(Q,X5)){var K=null,U;if(J!==null){var N=J.baseLanes;U=q1(N,Q)}else U=Q;z.lanes=z.childLanes=zz(X5);var R={baseLanes:U,cachePool:K,transitions:null};return z.memoizedState=R,z.updateQueue=null,yQ(z,U),null}else{var y={baseLanes:$0,cachePool:null,transitions:null};z.memoizedState=y;var D=J!==null?J.baseLanes:Q;yQ(z,D)}else{var p;if(J!==null)p=q1(J.baseLanes,Q),z.memoizedState=null;else p=Q;yQ(z,p)}return d4(b,z,Z,Q),z.child}function Nw(b,z,Q){var X=z.pendingProps;return d4(b,z,X,Q),z.child}function Ww(b,z,Q){var X=z.pendingProps.children;return d4(b,z,X,Q),z.child}function _w(b,z,Q){{z.flags|=f1;{var X=z.stateNode;X.effectDuration=0,X.passiveEffectDuration=0}}var Z=z.pendingProps,J=Z.children;return d4(b,z,J,Q),z.child}function OU(b,z){var Q=z.ref;if(b===null&&Q!==null||b!==null&&b.ref!==Q)z.flags|=x8,z.flags|=DX}function wY(b,z,Q,X,Z){if(z.type!==z.elementType){var J=Q.propTypes;if(J)V5(J,X,"prop",S1(Q))}var $;{var K=E3(z,Q,!0);$=c3(z,K)}var U,N;j3(z,Z),n2(z);{if(nb.current=z,Q5(!0),U=s3(b,z,Q,X,$,Z),N=e3(),z.mode&D6){G4(!0);try{U=s3(b,z,Q,X,$,Z),N=e3()}finally{G4(!1)}}Q5(!1)}if(A3(),b!==null&&!E5)return kK(b,z,Z),f8(b,z,Z);if(_4()&&N)eZ(z);return z.flags|=v3,d4(b,z,U,Z),z.child}function LU(b,z,Q,X,Z){{switch(cP(z)){case!1:{var{stateNode:J,type:$}=z,K=new $(z.memoizedProps,J.context),U=K.state;J.updater.enqueueSetState(J,U,null);break}case!0:{z.flags|=m1,z.flags|=c4;var N=Error("Simulated error coming from DevTools"),R=Qb(Z);z.lanes=q1(z.lanes,R);var y=OY(z,o7(N,z),R);wJ(z,y);break}}if(z.type!==z.elementType){var D=Q.propTypes;if(D)V5(D,X,"prop",S1(Q))}}var p;if(b8(Q))p=!0,hz(z);else p=!1;j3(z,Z);var x=z.stateNode,a;if(x===null)FQ(b,z),ZU(z,Q,X),UY(z,Q,X,Z),a=!0;else if(b===null)a=$w(z,Q,X,Z);else a=Hw(b,z,Q,X,Z);var w0=RY(b,z,Q,a,p,Z);{var p0=z.stateNode;if(a&&p0.props!==X){if(!a7)H("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",G1(z)||"a component");a7=!0}}return w0}function RY(b,z,Q,X,Z,J){OU(b,z);var $=(z.flags&m1)!==o0;if(!X&&!$){if(Z)nG(z,Q,!1);return f8(b,z,J)}var K=z.stateNode;nb.current=z;var U;if($&&typeof Q.getDerivedStateFromError!=="function")U=null,eK();else{n2(z);{if(Q5(!0),U=K.render(),z.mode&D6){G4(!0);try{K.render()}finally{G4(!1)}}Q5(!1)}A3()}if(z.flags|=v3,b!==null&&$)Lw(b,z,U,J);else d4(b,z,U,J);if(z.memoizedState=K.state,Z)nG(z,Q,!0);return z.child}function NU(b){var z=b.stateNode;if(z.pendingContext)aG(b,z.pendingContext,z.pendingContext!==z.context);else if(z.context)aG(b,z.context,!1);RJ(b,z.containerInfo)}function Mw(b,z,Q){if(NU(z),b===null)throw Error("Should have a current fiber. This is a bug in React.");var{pendingProps:X,memoizedState:Z}=z,J=Z.element;MK(b,z),rz(z,X,null,Q);var{memoizedState:$,stateNode:K}=z,U=$.element;if(Z.isDehydrated){var N={element:U,isDehydrated:!1,cache:$.cache,pendingSuspenseBoundaries:$.pendingSuspenseBoundaries,transitions:$.transitions},R=z.updateQueue;if(R.baseState=N,z.memoizedState=N,z.flags&N8){var y=o7(Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."),z);return WU(b,z,U,Q,y)}else if(U!==J){var D=o7(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),z);return WU(b,z,U,Q,D)}else{vM(z);var p=qK(z,null,U,Q);z.child=p;var x=p;while(x)x.flags=x.flags&~i6|W8,x=x.sibling}}else{if(p3(),U===J)return f8(b,z,Q);d4(b,z,U,Q)}return z.child}function WU(b,z,Q,X,Z){return p3(),JJ(Z),z.flags|=N8,d4(b,z,Q,X),z.child}function ww(b,z,Q){if(vK(z),b===null)ZJ(z);var{type:X,pendingProps:Z}=z,J=b!==null?b.memoizedProps:null,$=Z.children,K=cZ(X,Z);if(K)$=null;else if(J!==null&&cZ(X,J))z.flags|=o2;return OU(b,z),d4(b,z,$,Q),z.child}function Rw(b,z){if(b===null)ZJ(z);return null}function Pw(b,z,Q,X){FQ(b,z);var Z=z.pendingProps,J=Q,$=J._payload,K=J._init,U=K($);z.type=U;var N=z.tag=kP(U),R=g5(U,Z),y;switch(N){case L:return PY(z,U),z.type=U=$2(U),y=wY(null,z,U,R,X),y;case M:return z.type=U=eY(U),y=LU(null,z,U,R,X),y;case C:return z.type=U=b$(U),y=KU(null,z,U,R,X),y;case o:{if(z.type!==z.elementType){var D=U.propTypes;if(D)V5(D,R,"prop",S1(U))}return y=UU(null,z,U,g5(U.type,R),X),y}}var p="";if(U!==null&&typeof U==="object"&&U.$$typeof===g0)p=" Did you wrap a component in React.lazy() more than once?";throw Error("Element type is invalid. Received a promise that resolves to: "+U+". "+("Lazy element type must resolve to a class or function."+p))}function vw(b,z,Q,X,Z){FQ(b,z),z.tag=M;var J;if(b8(Q))J=!0,hz(z);else J=!1;return j3(z,Z),ZU(z,Q,X),UY(z,Q,X,Z),RY(null,z,Q,!0,J,Z)}function Fw(b,z,Q,X){FQ(b,z);var Z=z.pendingProps,J;{var $=E3(z,Q,!1);J=c3(z,$)}j3(z,X);var K,U;n2(z);{if(Q.prototype&&typeof Q.prototype.render==="function"){var N=S1(Q)||"Unknown";if(!LY[N])H("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.",N,N),LY[N]=!0}if(z.mode&D6)y5.recordLegacyContextWarning(z,null);Q5(!0),nb.current=z,K=s3(null,z,Q,Z,J,X),U=e3(),Q5(!1)}if(A3(),z.flags|=v3,typeof K==="object"&&K!==null&&typeof K.render==="function"&&K.$$typeof===void 0){var R=S1(Q)||"Unknown";if(!tb[R])H("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",R,R,R),tb[R]=!0}if(typeof K==="object"&&K!==null&&typeof K.render==="function"&&K.$$typeof===void 0){{var y=S1(Q)||"Unknown";if(!tb[y])H("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.",y,y,y),tb[y]=!0}z.tag=M,z.memoizedState=null,z.updateQueue=null;var D=!1;if(b8(Q))D=!0,hz(z);else D=!1;return z.memoizedState=K.state!==null&&K.state!==void 0?K.state:null,MJ(z),XU(z,K),UY(z,Q,Z,X),RY(null,z,Q,!0,D,X)}else{if(z.tag=L,z.mode&D6){G4(!0);try{K=s3(null,z,Q,Z,J,X),U=e3()}finally{G4(!1)}}if(_4()&&U)eZ(z);return d4(null,z,K,X),PY(z,Q),z.child}}function PY(b,z){{if(z){if(z.childContextTypes)H("%s(...): childContextTypes cannot be defined on a function component.",z.displayName||z.name||"Component")}if(b.ref!==null){var Q="",X=d8();if(X)Q+=`
101
+
102
+ Check the render method of \``+X+"`.";var Z=X||"",J=b._debugSource;if(J)Z=J.fileName+":"+J.lineNumber;if(!_Y[Z])_Y[Z]=!0,H("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s",Q)}if(z.defaultProps!==void 0){var $=S1(z)||"Unknown";if(!sb[$])H("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.",$),sb[$]=!0}if(typeof z.getDerivedStateFromProps==="function"){var K=S1(z)||"Unknown";if(!WY[K])H("%s: Function components do not support getDerivedStateFromProps.",K),WY[K]=!0}if(typeof z.contextType==="object"&&z.contextType!==null){var U=S1(z)||"Unknown";if(!NY[U])H("%s: Function components do not support contextType.",U),NY[U]=!0}}}var vY={dehydrated:null,treeContext:null,retryLane:K4};function FY(b){return{baseLanes:b,cachePool:Ow(),transitions:null}}function Aw(b,z){var Q=null;return{baseLanes:q1(b.baseLanes,z),cachePool:Q,transitions:b.transitions}}function kw(b,z,Q,X){if(z!==null){var Z=z.memoizedState;if(Z===null)return!1}return FJ(b,db)}function Iw(b,z){return bz(b.childLanes,z)}function _U(b,z,Q){var X=z.pendingProps;if(dP(z))z.flags|=m1;var Z=m5.current,J=!1,$=(z.flags&m1)!==o0;if($||kw(Z,b))J=!0,z.flags&=~m1;else if(b===null||b.memoizedState!==null)Z=jM(Z,AK);if(Z=a3(Z),Z7(z,Z),b===null){ZJ(z);var K=z.memoizedState;if(K!==null){var U=K.dehydrated;if(U!==null)return hw(z,U)}var{children:N,fallback:R}=X;if(J){var y=Tw(z,N,R,Q),D=z.child;return D.memoizedState=FY(Q),z.memoizedState=vY,y}else return AY(z,N)}else{var p=b.memoizedState;if(p!==null){var x=p.dehydrated;if(x!==null)return Vw(b,z,$,X,x,p,Q)}if(J){var{fallback:a,children:w0}=X,p0=Cw(b,z,w0,a,Q),E0=z.child,W1=b.child.memoizedState;return E0.memoizedState=W1===null?FY(Q):Aw(W1,Q),E0.childLanes=Iw(b,Q),z.memoizedState=vY,p0}else{var _1=X.children,c=fw(b,z,_1,Q);return z.memoizedState=null,c}}}function AY(b,z,Q){var X=b.mode,Z={mode:"visible",children:z},J=kY(Z,X);return J.return=b,b.child=J,J}function Tw(b,z,Q,X){var{mode:Z,child:J}=b,$={mode:"hidden",children:z},K,U;if((Z&A1)===j0&&J!==null){if(K=J,K.childLanes=$0,K.pendingProps=$,b.mode&a1)K.actualDuration=0,K.actualStartTime=-1,K.selfBaseDuration=0,K.treeBaseDuration=0;U=q7(Q,Z,X,null)}else K=kY($,Z),U=q7(Q,Z,X,null);return K.return=b,U.return=b,K.sibling=U,b.child=K,U}function kY(b,z,Q){return wq(b,z,$0,null)}function MU(b,z){return e7(b,z)}function fw(b,z,Q,X){var Z=b.child,J=Z.sibling,$=MU(Z,{mode:"visible",children:Q});if((z.mode&A1)===j0)$.lanes=X;if($.return=z,$.sibling=null,J!==null){var K=z.deletions;if(K===null)z.deletions=[J],z.flags|=A7;else K.push(J)}return z.child=$,$}function Cw(b,z,Q,X,Z){var J=z.mode,$=b.child,K=$.sibling,U={mode:"hidden",children:Q},N;if((J&A1)===j0&&z.child!==$){var R=z.child;if(N=R,N.childLanes=$0,N.pendingProps=U,z.mode&a1)N.actualDuration=0,N.actualStartTime=-1,N.selfBaseDuration=$.selfBaseDuration,N.treeBaseDuration=$.treeBaseDuration;z.deletions=null}else N=MU($,U),N.subtreeFlags=$.subtreeFlags&M8;var y;if(K!==null)y=e7(K,X);else y=q7(X,J,Z,null),y.flags|=i6;return y.return=z,N.return=z,N.sibling=y,z.child=N,y}function vQ(b,z,Q,X){if(X!==null)JJ(X);x3(z,b.child,null,Q);var Z=z.pendingProps,J=Z.children,$=AY(z,J);return $.flags|=i6,z.memoizedState=null,$}function Sw(b,z,Q,X,Z){var J=z.mode,$={mode:"visible",children:Q},K=kY($,J),U=q7(X,J,Z,null);if(U.flags|=i6,K.return=z,U.return=z,K.sibling=U,z.child=K,(z.mode&A1)!==j0)x3(z,b.child,null,Z);return U}function hw(b,z,Q){if((b.mode&A1)===j0)H("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components."),b.lanes=zz(b1);else if(xZ(z))b.lanes=zz(h7);else b.lanes=zz(X5);return null}function Vw(b,z,Q,X,Z,J,$){if(!Q){if(RM(),(z.mode&A1)===j0)return vQ(b,z,$,null);if(xZ(Z)){var K,U,N;{var R=g_(Z);K=R.digest,U=R.message,N=R.stack}var y;if(U)y=Error(U);else y=Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");var D=qY(y,K,N);return vQ(b,z,$,D)}var p=Z5($,b.childLanes);if(E5||p){var x=DQ();if(x!==null){var a=xL(x,$);if(a!==K4&&a!==J.retryLane){J.retryLane=a;var w0=W6;n4(b,a),Q4(x,b,a,w0)}}aY();var p0=qY(Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));return vQ(b,z,$,p0)}else if(dG(Z)){z.flags|=m1,z.child=b.child;var E0=GP.bind(null,b);return E_(Z,E0),null}else{FM(z,Z,J.treeContext);var W1=X.children,_1=AY(z,W1);return _1.flags|=W8,_1}}else if(z.flags&N8){z.flags&=~N8;var c=qY(Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));return vQ(b,z,$,c)}else if(z.memoizedState!==null)return z.child=b.child,z.flags|=m1,null;else{var{children:s,fallback:d}=X,G0=Sw(b,z,s,d,$),I0=z.child;return I0.memoizedState=FY($),z.memoizedState=vY,G0}}function wU(b,z,Q){b.lanes=q1(b.lanes,z);var X=b.alternate;if(X!==null)X.lanes=q1(X.lanes,z);LJ(b.return,z,Q)}function Dw(b,z,Q){var X=z;while(X!==null){if(X.tag===j){var Z=X.memoizedState;if(Z!==null)wU(X,Q,b)}else if(X.tag===K0)wU(X,Q,b);else if(X.child!==null){X.child.return=X,X=X.child;continue}if(X===b)return;while(X.sibling===null){if(X.return===null||X.return===b)return;X=X.return}X.sibling.return=X.return,X=X.sibling}}function yw(b){var z=b,Q=null;while(z!==null){var X=z.alternate;if(X!==null&&ez(X)===null)Q=z;z=z.sibling}return Q}function mw(b){if(b!==void 0&&b!=="forwards"&&b!=="backwards"&&b!=="together"&&!MY[b])if(MY[b]=!0,typeof b==="string")switch(b.toLowerCase()){case"together":case"forwards":case"backwards":{H('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.',b,b.toLowerCase());break}case"forward":case"backward":{H('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.',b,b.toLowerCase());break}default:H('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',b);break}else H('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?',b)}function uw(b,z){if(b!==void 0&&!PQ[b]){if(b!=="collapsed"&&b!=="hidden")PQ[b]=!0,H('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?',b);else if(z!=="forwards"&&z!=="backwards")PQ[b]=!0,H('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',b)}}function RU(b,z){{var Q=y1(b),X=!Q&&typeof N6(b)==="function";if(Q||X){var Z=Q?"array":"iterable";return H("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>",Z,z,Z),!1}}return!0}function gw(b,z){if((z==="forwards"||z==="backwards")&&b!==void 0&&b!==null&&b!==!1)if(y1(b)){for(var Q=0;Q<b.length;Q++)if(!RU(b[Q],Q))return}else{var X=N6(b);if(typeof X==="function"){var Z=X.call(b);if(Z){var J=Z.next(),$=0;for(;!J.done;J=Z.next()){if(!RU(J.value,$))return;$++}}}else H('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?',z)}}function IY(b,z,Q,X,Z){var J=b.memoizedState;if(J===null)b.memoizedState={isBackwards:z,rendering:null,renderingStartTime:0,last:X,tail:Q,tailMode:Z};else J.isBackwards=z,J.rendering=null,J.renderingStartTime=0,J.last=X,J.tail=Q,J.tailMode=Z}function PU(b,z,Q){var X=z.pendingProps,Z=X.revealOrder,J=X.tail,$=X.children;mw(Z),uw(J,Z),gw($,Z),d4(b,z,$,Q);var K=m5.current,U=FJ(K,db);if(U)K=AJ(K,db),z.flags|=m1;else{var N=b!==null&&(b.flags&m1)!==o0;if(N)Dw(z,z.child,Q);K=a3(K)}if(Z7(z,K),(z.mode&A1)===j0)z.memoizedState=null;else switch(Z){case"forwards":{var R=yw(z.child),y;if(R===null)y=z.child,z.child=null;else y=R.sibling,R.sibling=null;IY(z,!1,y,R,J);break}case"backwards":{var D=null,p=z.child;z.child=null;while(p!==null){var x=p.alternate;if(x!==null&&ez(x)===null){z.child=p;break}var a=p.sibling;p.sibling=D,D=p,p=a}IY(z,!0,D,null,J);break}case"together":{IY(z,!1,null,null,void 0);break}default:z.memoizedState=null}return z.child}function Ew(b,z,Q){RJ(z,z.stateNode.containerInfo);var X=z.pendingProps;if(b===null)z.child=x3(z,null,X,Q);else d4(b,z,X,Q);return z.child}var vU=!1;function cw(b,z,Q){var X=z.type,Z=X._context,J=z.pendingProps,$=z.memoizedProps,K=J.value;{if(!("value"in J)){if(!vU)vU=!0,H("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")}var U=z.type.propTypes;if(U)V5(U,J,"prop","Context.Provider")}if(LK(z,Z,K),$!==null){var N=$.value;if($5(N,K)){if($.children===J.children&&!Cz())return f8(b,z,Q)}else uM(z,Z,Q)}var R=J.children;return d4(b,z,R,Q),z.child}var FU=!1;function dw(b,z,Q){var X=z.type;if(X._context===void 0){if(X!==X.Consumer){if(!FU)FU=!0,H("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?")}}else X=X._context;var Z=z.pendingProps,J=Z.children;if(typeof J!=="function")H("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");j3(z,Q);var $=j6(X);n2(z);var K;return nb.current=z,Q5(!0),K=J($),Q5(!1),A3(),z.flags|=v3,d4(b,z,K,Q),z.child}function eb(){E5=!0}function FQ(b,z){if((z.mode&A1)===j0){if(b!==null)b.alternate=null,z.alternate=null,z.flags|=i6}}function f8(b,z,Q){if(b!==null)z.dependencies=b.dependencies;if(eK(),U9(z.lanes),!Z5(Q,z.childLanes))return null;return yM(b,z),z.child}function lw(b,z,Q){{var X=z.return;if(X===null)throw Error("Cannot swap the root fiber.");if(b.alternate=null,z.alternate=null,Q.index=z.index,Q.sibling=z.sibling,Q.return=z.return,Q.ref=z.ref,z===X.child)X.child=Q;else{var Z=X.child;if(Z===null)throw Error("Expected parent to have a child.");while(Z.sibling!==z)if(Z=Z.sibling,Z===null)throw Error("Expected to find the previous sibling.");Z.sibling=Q}var J=X.deletions;if(J===null)X.deletions=[b],X.flags|=A7;else J.push(b);return Q.flags|=i6,Q}}function TY(b,z){var Q=b.lanes;if(Z5(Q,z))return!0;return!1}function pw(b,z,Q){switch(z.tag){case F:NU(z);var X=z.stateNode;p3();break;case _:vK(z);break;case M:{var Z=z.type;if(b8(Z))hz(z);break}case v:RJ(z,z.stateNode.containerInfo);break;case S:{var J=z.memoizedProps.value,$=z.type._context;LK(z,$,J);break}case i:{var K=Z5(Q,z.childLanes);if(K)z.flags|=f1;{var U=z.stateNode;U.effectDuration=0,U.passiveEffectDuration=0}}break;case j:{var N=z.memoizedState;if(N!==null){if(N.dehydrated!==null)return Z7(z,a3(m5.current)),z.flags|=m1,null;var R=z.child,y=R.childLanes;if(Z5(Q,y))return _U(b,z,Q);else{Z7(z,a3(m5.current));var D=f8(b,z,Q);if(D!==null)return D.sibling;else return null}}else Z7(z,a3(m5.current));break}case K0:{var p=(b.flags&m1)!==o0,x=Z5(Q,z.childLanes);if(p){if(x)return PU(b,z,Q);z.flags|=m1}var a=z.memoizedState;if(a!==null)a.rendering=null,a.tail=null,a.lastEffect=null;if(Z7(z,m5.current),x)break;else return null}case B0:case J0:return z.lanes=$0,BU(b,z,Q)}return f8(b,z,Q)}function AU(b,z,Q){if(z._debugNeedsRemount&&b!==null)return lw(b,z,J$(z.type,z.key,z.pendingProps,z._debugOwner||null,z.mode,z.lanes));if(b!==null){var X=b.memoizedProps,Z=z.pendingProps;if(X!==Z||Cz()||z.type!==b.type)E5=!0;else{var J=TY(b,Q);if(!J&&(z.flags&m1)===o0)return E5=!1,pw(b,z,Q);if((b.flags&VX)!==o0)E5=!0;else E5=!1}}else if(E5=!1,_4()&&LM(z)){var $=z.index,K=NM();eG(z,K,$)}switch(z.lanes=$0,z.tag){case T:return Fw(b,z,z.type,Q);case V:{var U=z.elementType;return Pw(b,z,U,Q)}case L:{var{type:N,pendingProps:R}=z,y=z.elementType===N?R:g5(N,R);return wY(b,z,N,y,Q)}case M:{var{type:D,pendingProps:p}=z,x=z.elementType===D?p:g5(D,p);return LU(b,z,D,x,Q)}case F:return Mw(b,z,Q);case _:return ww(b,z,Q);case W:return Rw(b,z);case j:return _U(b,z,Q);case v:return Ew(b,z,Q);case C:{var{type:a,pendingProps:w0}=z,p0=z.elementType===a?w0:g5(a,w0);return KU(b,z,a,p0,Q)}case f:return Nw(b,z,Q);case h:return Ww(b,z,Q);case i:return _w(b,z,Q);case S:return cw(b,z,Q);case k:return dw(b,z,Q);case o:{var{type:E0,pendingProps:W1}=z,_1=g5(E0,W1);if(z.type!==z.elementType){var c=E0.propTypes;if(c)V5(c,_1,"prop",S1(E0))}return _1=g5(E0.type,_1),UU(b,z,E0,_1,Q)}case z0:return qU(b,z,z.type,z.pendingProps,Q);case H0:{var{type:s,pendingProps:d}=z,G0=z.elementType===s?d:g5(s,d);return vw(b,z,s,G0,Q)}case K0:return PU(b,z,Q);case q0:break;case B0:return BU(b,z,Q)}throw Error("Unknown unit of work tag ("+z.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function b2(b){b.flags|=f1}function kU(b){b.flags|=x8,b.flags|=DX}var IU,fY,TU,fU;IU=function(b,z,Q,X){var Z=z.child;while(Z!==null){if(Z.tag===_||Z.tag===W)q_(b,Z.stateNode);else if(Z.tag===v);else if(Z.child!==null){Z.child.return=Z,Z=Z.child;continue}if(Z===z)return;while(Z.sibling===null){if(Z.return===null||Z.return===z)return;Z=Z.return}Z.sibling.return=Z.return,Z=Z.sibling}},fY=function(b,z){},TU=function(b,z,Q,X,Z){var J=b.memoizedProps;if(J===X)return;var $=z.stateNode,K=PJ(),U=O_($,Q,J,X,Z,K);if(z.updateQueue=U,U)b2(z)},fU=function(b,z,Q,X){if(Q!==X)b2(z)};function b9(b,z){if(_4())return;switch(b.tailMode){case"hidden":{var Q=b.tail,X=null;while(Q!==null){if(Q.alternate!==null)X=Q;Q=Q.sibling}if(X===null)b.tail=null;else X.sibling=null;break}case"collapsed":{var Z=b.tail,J=null;while(Z!==null){if(Z.alternate!==null)J=Z;Z=Z.sibling}if(J===null)if(!z&&b.tail!==null)b.tail.sibling=null;else b.tail=null;else J.sibling=null;break}}}function w4(b){var z=b.alternate!==null&&b.alternate.child===b.child,Q=$0,X=o0;if(!z){if((b.mode&a1)!==j0){var{actualDuration:Z,selfBaseDuration:J,child:$}=b;while($!==null)Q=q1(Q,q1($.lanes,$.childLanes)),X|=$.subtreeFlags,X|=$.flags,Z+=$.actualDuration,J+=$.treeBaseDuration,$=$.sibling;b.actualDuration=Z,b.treeBaseDuration=J}else{var K=b.child;while(K!==null)Q=q1(Q,q1(K.lanes,K.childLanes)),X|=K.subtreeFlags,X|=K.flags,K.return=b,K=K.sibling}b.subtreeFlags|=X}else{if((b.mode&a1)!==j0){var{selfBaseDuration:U,child:N}=b;while(N!==null)Q=q1(Q,q1(N.lanes,N.childLanes)),X|=N.subtreeFlags&M8,X|=N.flags&M8,U+=N.treeBaseDuration,N=N.sibling;b.treeBaseDuration=U}else{var R=b.child;while(R!==null)Q=q1(Q,q1(R.lanes,R.childLanes)),X|=R.subtreeFlags&M8,X|=R.flags&M8,R.return=b,R=R.sibling}b.subtreeFlags|=X}return b.childLanes=Q,z}function xw(b,z,Q){if(fM()&&(z.mode&A1)!==j0&&(z.flags&m1)===o0)return YK(z),p3(),z.flags|=N8|a2|c4,!1;var X=uz(z);if(Q!==null&&Q.dehydrated!==null)if(b===null){if(!X)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(IM(z),w4(z),(z.mode&a1)!==j0){var Z=Q!==null;if(Z){var J=z.child;if(J!==null)z.treeBaseDuration-=J.treeBaseDuration}}return!1}else{if(p3(),(z.flags&m1)===o0)z.memoizedState=null;if(z.flags|=f1,w4(z),(z.mode&a1)!==j0){var $=Q!==null;if($){var K=z.child;if(K!==null)z.treeBaseDuration-=K.treeBaseDuration}}return!1}else return $K(),!0}function CU(b,z,Q){var X=z.pendingProps;switch(bJ(z),z.tag){case T:case V:case z0:case L:case C:case f:case h:case i:case k:case o:return w4(z),null;case M:{var Z=z.type;if(b8(Z))Sz(z);return w4(z),null}case F:{var J=z.stateNode;if(o3(z),nZ(z),IJ(),J.pendingContext)J.context=J.pendingContext,J.pendingContext=null;if(b===null||b.child===null){var $=uz(z);if($)b2(z);else if(b!==null){var K=b.memoizedState;if(!K.isDehydrated||(z.flags&N8)!==o0)z.flags|=k7,$K()}}return fY(b,z),w4(z),null}case _:{vJ(z);var U=PK(),N=z.type;if(b!==null&&z.stateNode!=null){if(TU(b,z,N,X,U),b.ref!==z.ref)kU(z)}else{if(!X){if(z.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");return w4(z),null}var R=PJ(),y=uz(z);if(y){if(AM(z,U,R))b2(z)}else{var D=U_(N,X,U,R,z);if(IU(D,z,!1,!1),z.stateNode=D,B_(D,N,X,U))b2(z)}if(z.ref!==null)kU(z)}return w4(z),null}case W:{var p=X;if(b&&z.stateNode!=null){var x=b.memoizedProps;fU(b,z,x,p)}else{if(typeof p!=="string"){if(z.stateNode===null)throw Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.")}var a=PK(),w0=PJ(),p0=uz(z);if(p0){if(kM(z))b2(z)}else z.stateNode=L_(p,a,w0,z)}return w4(z),null}case j:{r3(z);var E0=z.memoizedState;if(b===null||b.memoizedState!==null&&b.memoizedState.dehydrated!==null){var W1=xw(b,z,E0);if(!W1)if(z.flags&c4)return z;else return null}if((z.flags&m1)!==o0){if(z.lanes=Q,(z.mode&a1)!==j0)eJ(z);return z}var _1=E0!==null,c=b!==null&&b.memoizedState!==null;if(_1!==c){if(_1){var s=z.child;if(s.flags|=I7,(z.mode&A1)!==j0){var d=b===null&&(z.memoizedProps.unstable_avoidThisFallback!==!0||!p1);if(d||FJ(m5.current,AK))nR();else aY()}}}var G0=z.updateQueue;if(G0!==null)z.flags|=f1;if(w4(z),(z.mode&a1)!==j0){if(_1){var I0=z.child;if(I0!==null)z.treeBaseDuration-=I0.treeBaseDuration}}return null}case v:if(o3(z),fY(b,z),b===null)HM(z.stateNode.containerInfo);return w4(z),null;case S:var P0=z.type._context;return OJ(P0,z),w4(z),null;case H0:{var r0=z.type;if(b8(r0))Sz(z);return w4(z),null}case K0:{r3(z);var J1=z.memoizedState;if(J1===null)return w4(z),null;var n1=(z.flags&m1)!==o0,V1=J1.rendering;if(V1===null)if(!n1){var d6=sR()&&(b===null||(b.flags&m1)===o0);if(!d6){var D1=z.child;while(D1!==null){var y6=ez(D1);if(y6!==null){n1=!0,z.flags|=m1,b9(J1,!1);var D4=y6.updateQueue;if(D4!==null)z.updateQueue=D4,z.flags|=f1;return z.subtreeFlags=o0,mM(z,Q),Z7(z,AJ(m5.current,db)),z.child}D1=D1.sibling}}if(J1.tail!==null&&H4()>sU())z.flags|=m1,n1=!0,b9(J1,!1),z.lanes=TH}else b9(J1,!1);else{if(!n1){var A4=ez(V1);if(A4!==null){z.flags|=m1,n1=!0;var K5=A4.updateQueue;if(K5!==null)z.updateQueue=K5,z.flags|=f1;if(b9(J1,!0),J1.tail===null&&J1.tailMode==="hidden"&&!V1.alternate&&!_4())return w4(z),null}else if(H4()*2-J1.renderingStartTime>sU()&&Q!==X5)z.flags|=m1,n1=!0,b9(J1,!1),z.lanes=TH}if(J1.isBackwards)V1.sibling=z.child,z.child=V1;else{var x4=J1.last;if(x4!==null)x4.sibling=V1;else z.child=V1;J1.last=V1}}if(J1.tail!==null){var i4=J1.tail;J1.rendering=i4,J1.tail=i4.sibling,J1.renderingStartTime=H4(),i4.sibling=null;var y4=m5.current;if(n1)y4=AJ(y4,db);else y4=a3(y4);return Z7(z,y4),i4}return w4(z),null}case q0:break;case B0:case J0:{oY(z);var D8=z.memoizedState,H2=D8!==null;if(b!==null){var N9=b.memoizedState,H8=N9!==null;if(H8!==H2&&!E1)z.flags|=I7}if(!H2||(z.mode&A1)===j0)w4(z);else if(Z5($8,X5)){if(w4(z),z.subtreeFlags&(i6|f1))z.flags|=I7}return null}case v0:return null;case m0:return null}throw Error("Unknown unit of work tag ("+z.tag+"). This error is likely caused by a bug in React. Please file an issue.")}function iw(b,z,Q){switch(bJ(z),z.tag){case M:{var X=z.type;if(b8(X))Sz(z);var Z=z.flags;if(Z&c4){if(z.flags=Z&~c4|m1,(z.mode&a1)!==j0)eJ(z);return z}return null}case F:{var J=z.stateNode;o3(z),nZ(z),IJ();var $=z.flags;if(($&c4)!==o0&&($&m1)===o0)return z.flags=$&~c4|m1,z;return null}case _:return vJ(z),null;case j:{r3(z);var K=z.memoizedState;if(K!==null&&K.dehydrated!==null){if(z.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");p3()}var U=z.flags;if(U&c4){if(z.flags=U&~c4|m1,(z.mode&a1)!==j0)eJ(z);return z}return null}case K0:return r3(z),null;case v:return o3(z),null;case S:var N=z.type._context;return OJ(N,z),null;case B0:case J0:return oY(z),null;case v0:return null;default:return null}}function SU(b,z,Q){switch(bJ(z),z.tag){case M:{var X=z.type.childContextTypes;if(X!==null&&X!==void 0)Sz(z);break}case F:{var Z=z.stateNode;o3(z),nZ(z),IJ();break}case _:{vJ(z);break}case v:o3(z);break;case j:r3(z);break;case K0:r3(z);break;case S:var J=z.type._context;OJ(J,z);break;case B0:case J0:oY(z);break}}var hU=null;hU=new Set;var AQ=!1,R4=!1,jw=typeof WeakSet==="function"?WeakSet:Set,h0=null,z2=null,Q2=null;function ow(b){CX(null,function(){throw b}),SX()}var aw=function(b,z){if(z.props=b.memoizedProps,z.state=b.memoizedState,b.mode&a1)try{J8(),z.componentWillUnmount()}finally{Z8(b)}else z.componentWillUnmount()};function VU(b,z){try{$7(n6,b)}catch(Q){K6(b,z,Q)}}function CY(b,z,Q){try{aw(b,Q)}catch(X){K6(b,z,X)}}function rw(b,z,Q){try{Q.componentDidMount()}catch(X){K6(b,z,X)}}function DU(b,z){try{uU(b)}catch(Q){K6(b,z,Q)}}function X2(b,z){var Q=b.ref;if(Q!==null)if(typeof Q==="function"){var X;try{if(u0&&s0&&b.mode&a1)try{J8(),X=Q(null)}finally{Z8(b)}else X=Q(null)}catch(Z){K6(b,z,Z)}if(typeof X==="function")H("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",G1(b))}else Q.current=null}function kQ(b,z,Q){try{Q()}catch(X){K6(b,z,X)}}var yU=null,mU=!1;function nw(b,z){yU=G_(b.containerInfo),h0=z,tw();var Q=mU;return mU=!1,yU=null,Q}function tw(){while(h0!==null){var b=h0,z=b.child;if((b.subtreeFlags&mX)!==o0&&z!==null)z.return=b,h0=z;else sw()}}function sw(){while(h0!==null){var b=h0;C6(b);try{ew(b)}catch(Q){K6(b,b.return,Q)}$4();var z=b.sibling;if(z!==null){z.return=b.return,h0=z;return}h0=b.return}}function ew(b){var{alternate:z,flags:Q}=b;if((Q&k7)!==o0){switch(C6(b),b.tag){case L:case C:case z0:break;case M:{if(z!==null){var{memoizedProps:X,memoizedState:Z}=z,J=b.stateNode;if(b.type===b.elementType&&!a7){if(J.props!==b.memoizedProps)H("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",G1(b)||"instance");if(J.state!==b.memoizedState)H("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",G1(b)||"instance")}var $=J.getSnapshotBeforeUpdate(b.elementType===b.type?X:g5(b.type,X),Z);{var K=hU;if($===void 0&&!K.has(b.type))K.add(b.type),H("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",G1(b))}J.__reactInternalSnapshotBeforeUpdate=$}break}case F:{{var U=b.stateNode;D_(U.containerInfo)}break}case _:case W:case v:case H0:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}$4()}}function c5(b,z,Q){var X=z.updateQueue,Z=X!==null?X.lastEffect:null;if(Z!==null){var J=Z.next,$=J;do{if(($.tag&b)===b){var K=$.destroy;if($.destroy=void 0,K!==void 0){if((b&M4)!==t4)LL(z);else if((b&n6)!==t4)vH(z);if((b&z8)!==t4)B9(!0);if(kQ(z,Q,K),(b&z8)!==t4)B9(!1);if((b&M4)!==t4)NL();else if((b&n6)!==t4)FH()}}$=$.next}while($!==J)}}function $7(b,z){var Q=z.updateQueue,X=Q!==null?Q.lastEffect:null;if(X!==null){var Z=X.next,J=Z;do{if((J.tag&b)===b){if((b&M4)!==t4)BL(z);else if((b&n6)!==t4)WL(z);var $=J.create;if((b&z8)!==t4)B9(!0);if(J.destroy=$(),(b&z8)!==t4)B9(!1);if((b&M4)!==t4)OL();else if((b&n6)!==t4)_L();{var K=J.destroy;if(K!==void 0&&typeof K!=="function"){var U=void 0;if((J.tag&n6)!==o0)U="useLayoutEffect";else if((J.tag&z8)!==o0)U="useInsertionEffect";else U="useEffect";var N=void 0;if(K===null)N=" You returned null. If your effect does not require clean up, return undefined (or nothing).";else if(typeof K.then==="function")N=`
103
+
104
+ It looks like you wrote `+U+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
105
+
106
+ `+U+`(() => {
107
+ async function fetchData() {
108
+ // You can await here
109
+ const response = await MyAPI.getData(someId);
110
+ // ...
111
+ }
112
+ fetchData();
113
+ }, [someId]); // Or [] if effect doesn't need props or state
114
+
115
+ Learn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching`;else N=" You returned: "+K;H("%s must not return anything besides a function, which is used for clean-up.%s",U,N)}}}J=J.next}while(J!==Z)}}function bR(b,z){if((z.flags&f1)!==o0)switch(z.tag){case i:{var Q=z.stateNode.passiveEffectDuration,X=z.memoizedProps,Z=X.id,J=X.onPostCommit,$=tK(),K=z.alternate===null?"mount":"update";if(nK())K="nested-update";if(typeof J==="function")J(Z,K,Q,$);var U=z.return;b:while(U!==null){switch(U.tag){case F:var N=U.stateNode;N.passiveEffectDuration+=Q;break b;case i:var R=U.stateNode;R.passiveEffectDuration+=Q;break b}U=U.return}break}}}function zR(b,z,Q,X){if((Q.flags&r2)!==o0)switch(Q.tag){case L:case C:case z0:{if(!R4)if(Q.mode&a1)try{J8(),$7(n6|r6,Q)}finally{Z8(Q)}else $7(n6|r6,Q);break}case M:{var Z=Q.stateNode;if(Q.flags&f1){if(!R4)if(z===null){if(Q.type===Q.elementType&&!a7){if(Z.props!==Q.memoizedProps)H("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",G1(Q)||"instance");if(Z.state!==Q.memoizedState)H("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",G1(Q)||"instance")}if(Q.mode&a1)try{J8(),Z.componentDidMount()}finally{Z8(Q)}else Z.componentDidMount()}else{var J=Q.elementType===Q.type?z.memoizedProps:g5(Q.type,z.memoizedProps),$=z.memoizedState;if(Q.type===Q.elementType&&!a7){if(Z.props!==Q.memoizedProps)H("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",G1(Q)||"instance");if(Z.state!==Q.memoizedState)H("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",G1(Q)||"instance")}if(Q.mode&a1)try{J8(),Z.componentDidUpdate(J,$,Z.__reactInternalSnapshotBeforeUpdate)}finally{Z8(Q)}else Z.componentDidUpdate(J,$,Z.__reactInternalSnapshotBeforeUpdate)}}var K=Q.updateQueue;if(K!==null){if(Q.type===Q.elementType&&!a7){if(Z.props!==Q.memoizedProps)H("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",G1(Q)||"instance");if(Z.state!==Q.memoizedState)H("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",G1(Q)||"instance")}RK(Q,K,Z)}break}case F:{var U=Q.updateQueue;if(U!==null){var N=null;if(Q.child!==null)switch(Q.child.tag){case _:N=EZ(Q.child.stateNode);break;case M:N=Q.child.stateNode;break}RK(Q,U,N)}break}case _:{var R=Q.stateNode;if(z===null&&Q.flags&f1){var{type:y,memoizedProps:D}=Q;w_(R,y,D)}break}case W:break;case v:break;case i:{{var p=Q.memoizedProps,x=p.onCommit,a=p.onRender,w0=Q.stateNode.effectDuration,p0=tK(),E0=z===null?"mount":"update";if(nK())E0="nested-update";if(typeof a==="function")a(Q.memoizedProps.id,E0,Q.actualDuration,Q.treeBaseDuration,Q.actualStartTime,p0);{if(typeof x==="function")x(Q.memoizedProps.id,E0,w0,p0);XP(Q);var W1=Q.return;b:while(W1!==null){switch(W1.tag){case F:var _1=W1.stateNode;_1.effectDuration+=w0;break b;case i:var c=W1.stateNode;c.effectDuration+=w0;break b}W1=W1.return}}}break}case j:{GR(b,Q);break}case K0:case H0:case q0:case B0:case J0:case m0:break;default:throw Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.")}if(!R4){if(Q.flags&x8)uU(Q)}}function QR(b){switch(b.tag){case L:case C:case z0:{if(b.mode&a1)try{J8(),VU(b,b.return)}finally{Z8(b)}else VU(b,b.return);break}case M:{var z=b.stateNode;if(typeof z.componentDidMount==="function")rw(b,b.return,z);DU(b,b.return);break}case _:{DU(b,b.return);break}}}function XR(b,z){var Q=null;{var X=b;while(!0){if(X.tag===_){if(Q===null){Q=X;try{var Z=X.stateNode;if(z)C_(Z);else h_(X.stateNode,X.memoizedProps)}catch($){K6(b,b.return,$)}}}else if(X.tag===W){if(Q===null)try{var J=X.stateNode;if(z)S_(J);else V_(J,X.memoizedProps)}catch($){K6(b,b.return,$)}}else if((X.tag===B0||X.tag===J0)&&X.memoizedState!==null&&X!==b);else if(X.child!==null){X.child.return=X,X=X.child;continue}if(X===b)return;while(X.sibling===null){if(X.return===null||X.return===b)return;if(Q===X)Q=null;X=X.return}if(Q===X)Q=null;X.sibling.return=X.return,X=X.sibling}}}function uU(b){var z=b.ref;if(z!==null){var Q=b.stateNode,X;switch(b.tag){case _:X=EZ(Q);break;default:X=Q}if(typeof z==="function"){var Z;if(b.mode&a1)try{J8(),Z=z(X)}finally{Z8(b)}else Z=z(X);if(typeof Z==="function")H("Unexpected return value from a callback ref in %s. A callback ref should not return a function.",G1(b))}else{if(!z.hasOwnProperty("current"))H("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().",G1(b));z.current=X}}}function ZR(b){var z=b.alternate;if(z!==null)z.return=null;b.return=null}function gU(b){var z=b.alternate;if(z!==null)b.alternate=null,gU(z);{if(b.child=null,b.deletions=null,b.sibling=null,b.tag===_){var Q=b.stateNode;if(Q!==null)UM(Q)}b.stateNode=null,b._debugOwner=null,b.return=null,b.dependencies=null,b.memoizedProps=null,b.memoizedState=null,b.pendingProps=null,b.stateNode=null,b.updateQueue=null}}function JR(b){var z=b.return;while(z!==null){if(EU(z))return z;z=z.return}throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.")}function EU(b){return b.tag===_||b.tag===F||b.tag===v}function cU(b){var z=b;b:while(!0){while(z.sibling===null){if(z.return===null||EU(z.return))return null;z=z.return}z.sibling.return=z.return,z=z.sibling;while(z.tag!==_&&z.tag!==W&&z.tag!==Y0){if(z.flags&i6)continue b;if(z.child===null||z.tag===v)continue b;else z.child.return=z,z=z.child}if(!(z.flags&i6))return z.stateNode}}function YR(b){var z=JR(b);switch(z.tag){case _:{var Q=z.stateNode;if(z.flags&o2)cG(Q),z.flags&=~o2;var X=cU(b);hY(b,X,Q);break}case F:case v:{var Z=z.stateNode.containerInfo,J=cU(b);SY(b,J,Z);break}default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function SY(b,z,Q){var X=b.tag,Z=X===_||X===W;if(Z){var J=b.stateNode;if(z)k_(Q,J,z);else F_(Q,J)}else if(X===v);else{var $=b.child;if($!==null){SY($,z,Q);var K=$.sibling;while(K!==null)SY(K,z,Q),K=K.sibling}}}function hY(b,z,Q){var X=b.tag,Z=X===_||X===W;if(Z){var J=b.stateNode;if(z)A_(Q,J,z);else v_(Q,J)}else if(X===v);else{var $=b.child;if($!==null){hY($,z,Q);var K=$.sibling;while(K!==null)hY(K,z,Q),K=K.sibling}}}var P4=null,d5=!1;function $R(b,z,Q){{var X=z;b:while(X!==null){switch(X.tag){case _:{P4=X.stateNode,d5=!1;break b}case F:{P4=X.stateNode.containerInfo,d5=!0;break b}case v:{P4=X.stateNode.containerInfo,d5=!0;break b}}X=X.return}if(P4===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");dU(b,z,Q),P4=null,d5=!1}ZR(Q)}function H7(b,z,Q){var X=Q.child;while(X!==null)dU(b,z,X),X=X.sibling}function dU(b,z,Q){switch(GL(Q),Q.tag){case _:if(!R4)X2(Q,z);case W:{{var X=P4,Z=d5;if(P4=null,H7(b,z,Q),P4=X,d5=Z,P4!==null)if(d5)T_(P4,Q.stateNode);else I_(P4,Q.stateNode)}return}case Y0:{if(P4!==null)if(d5)f_(P4,Q.stateNode);else pZ(P4,Q.stateNode);return}case v:{{var J=P4,$=d5;P4=Q.stateNode.containerInfo,d5=!0,H7(b,z,Q),P4=J,d5=$}return}case L:case C:case o:case z0:{if(!R4){var K=Q.updateQueue;if(K!==null){var U=K.lastEffect;if(U!==null){var N=U.next,R=N;do{var y=R,D=y.destroy,p=y.tag;if(D!==void 0){if((p&z8)!==t4)kQ(Q,z,D);else if((p&n6)!==t4){if(vH(Q),Q.mode&a1)J8(),kQ(Q,z,D),Z8(Q);else kQ(Q,z,D);FH()}}R=R.next}while(R!==N)}}}H7(b,z,Q);return}case M:{if(!R4){X2(Q,z);var x=Q.stateNode;if(typeof x.componentWillUnmount==="function")CY(Q,z,x)}H7(b,z,Q);return}case q0:{H7(b,z,Q);return}case B0:{if(Q.mode&A1){var a=R4;R4=a||Q.memoizedState!==null,H7(b,z,Q),R4=a}else H7(b,z,Q);break}default:{H7(b,z,Q);return}}}function HR(b){var z=b.memoizedState}function GR(b,z){var Q=z.memoizedState;if(Q===null){var X=z.alternate;if(X!==null){var Z=X.memoizedState;if(Z!==null){var J=Z.dehydrated;if(J!==null)a_(J)}}}}function lU(b){var z=b.updateQueue;if(z!==null){b.updateQueue=null;var Q=b.stateNode;if(Q===null)Q=b.stateNode=new jw;z.forEach(function(X){var Z=KP.bind(null,b,X);if(!Q.has(X)){if(Q.add(X),S5)if(z2!==null&&Q2!==null)q9(Q2,z2);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");X.then(Z,Z)}})}}function KR(b,z,Q){z2=Q,Q2=b,C6(z),pU(z,b),C6(z),z2=null,Q2=null}function l5(b,z,Q){var X=z.deletions;if(X!==null)for(var Z=0;Z<X.length;Z++){var J=X[Z];try{$R(b,z,J)}catch(U){K6(J,z,U)}}var $=V9();if(z.subtreeFlags&uX){var K=z.child;while(K!==null)C6(K),pU(K,b),K=K.sibling}C6($)}function pU(b,z,Q){var{alternate:X,flags:Z}=b;switch(b.tag){case L:case C:case o:case z0:{if(l5(z,b),Y8(b),Z&f1){try{c5(z8|r6,b,b.return),$7(z8|r6,b)}catch(r0){K6(b,b.return,r0)}if(b.mode&a1){try{J8(),c5(n6|r6,b,b.return)}catch(r0){K6(b,b.return,r0)}Z8(b)}else try{c5(n6|r6,b,b.return)}catch(r0){K6(b,b.return,r0)}}return}case M:{if(l5(z,b),Y8(b),Z&x8){if(X!==null)X2(X,X.return)}return}case _:{if(l5(z,b),Y8(b),Z&x8){if(X!==null)X2(X,X.return)}{if(b.flags&o2){var J=b.stateNode;try{cG(J)}catch(r0){K6(b,b.return,r0)}}if(Z&f1){var $=b.stateNode;if($!=null){var K=b.memoizedProps,U=X!==null?X.memoizedProps:K,N=b.type,R=b.updateQueue;if(b.updateQueue=null,R!==null)try{R_($,R,N,U,K,b)}catch(r0){K6(b,b.return,r0)}}}}return}case W:{if(l5(z,b),Y8(b),Z&f1){if(b.stateNode===null)throw Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");var{stateNode:y,memoizedProps:D}=b,p=X!==null?X.memoizedProps:D;try{P_(y,p,D)}catch(r0){K6(b,b.return,r0)}}return}case F:{if(l5(z,b),Y8(b),Z&f1){if(X!==null){var x=X.memoizedState;if(x.isDehydrated)try{o_(z.containerInfo)}catch(r0){K6(b,b.return,r0)}}}return}case v:{l5(z,b),Y8(b);return}case j:{l5(z,b),Y8(b);var a=b.child;if(a.flags&I7){var{stateNode:w0,memoizedState:p0}=a,E0=p0!==null;if(w0.isHidden=E0,E0){var W1=a.alternate!==null&&a.alternate.memoizedState!==null;if(!W1)rR()}}if(Z&f1){try{HR(b)}catch(r0){K6(b,b.return,r0)}lU(b)}return}case B0:{var _1=X!==null&&X.memoizedState!==null;if(b.mode&A1){var c=R4;R4=c||_1,l5(z,b),R4=c}else l5(z,b);if(Y8(b),Z&I7){var{stateNode:s,memoizedState:d}=b,G0=d!==null,I0=b;if(s.isHidden=G0,G0){if(!_1){if((I0.mode&A1)!==j0){h0=I0;var P0=I0.child;while(P0!==null)h0=P0,qR(P0),P0=P0.sibling}}}XR(I0,G0)}return}case K0:{if(l5(z,b),Y8(b),Z&f1)lU(b);return}case q0:return;default:{l5(z,b),Y8(b);return}}}function Y8(b){var z=b.flags;if(z&i6){try{YR(b)}catch(Q){K6(b,b.return,Q)}b.flags&=~i6}if(z&W8)b.flags&=~W8}function UR(b,z,Q){z2=Q,Q2=z,h0=b,xU(b,z,Q),z2=null,Q2=null}function xU(b,z,Q){var X=(b.mode&A1)!==j0;while(h0!==null){var Z=h0,J=Z.child;if(Z.tag===B0&&X){var $=Z.memoizedState!==null,K=$||AQ;if(K){VY(b,z,Q);continue}else{var U=Z.alternate,N=U!==null&&U.memoizedState!==null,R=N||R4,y=AQ,D=R4;if(AQ=K,R4=R,R4&&!D)h0=Z,BR(Z);var p=J;while(p!==null)h0=p,xU(p,z,Q),p=p.sibling;h0=Z,AQ=y,R4=D,VY(b,z,Q);continue}}if((Z.subtreeFlags&r2)!==o0&&J!==null)J.return=Z,h0=J;else VY(b,z,Q)}}function VY(b,z,Q){while(h0!==null){var X=h0;if((X.flags&r2)!==o0){var Z=X.alternate;C6(X);try{zR(z,Z,X,Q)}catch($){K6(X,X.return,$)}$4()}if(X===b){h0=null;return}var J=X.sibling;if(J!==null){J.return=X.return,h0=J;return}h0=X.return}}function qR(b){while(h0!==null){var z=h0,Q=z.child;switch(z.tag){case L:case C:case o:case z0:{if(z.mode&a1)try{J8(),c5(n6,z,z.return)}finally{Z8(z)}else c5(n6,z,z.return);break}case M:{X2(z,z.return);var X=z.stateNode;if(typeof X.componentWillUnmount==="function")CY(z,z.return,X);break}case _:{X2(z,z.return);break}case B0:{var Z=z.memoizedState!==null;if(Z){iU(b);continue}break}}if(Q!==null)Q.return=z,h0=Q;else iU(b)}}function iU(b){while(h0!==null){var z=h0;if(z===b){h0=null;return}var Q=z.sibling;if(Q!==null){Q.return=z.return,h0=Q;return}h0=z.return}}function BR(b){while(h0!==null){var z=h0,Q=z.child;if(z.tag===B0){var X=z.memoizedState!==null;if(X){jU(b);continue}}if(Q!==null)Q.return=z,h0=Q;else jU(b)}}function jU(b){while(h0!==null){var z=h0;C6(z);try{QR(z)}catch(X){K6(z,z.return,X)}if($4(),z===b){h0=null;return}var Q=z.sibling;if(Q!==null){Q.return=z.return,h0=Q;return}h0=z.return}}function OR(b,z,Q,X){h0=z,LR(z,b,Q,X)}function LR(b,z,Q,X){while(h0!==null){var Z=h0,J=Z.child;if((Z.subtreeFlags&F3)!==o0&&J!==null)J.return=Z,h0=J;else NR(b,z,Q,X)}}function NR(b,z,Q,X){while(h0!==null){var Z=h0;if((Z.flags&C5)!==o0){C6(Z);try{WR(z,Z,Q,X)}catch($){K6(Z,Z.return,$)}$4()}if(Z===b){h0=null;return}var J=Z.sibling;if(J!==null){J.return=Z.return,h0=J;return}h0=Z.return}}function WR(b,z,Q,X){switch(z.tag){case L:case C:case z0:{if(z.mode&a1){sJ();try{$7(M4|r6,z)}finally{tJ(z)}}else $7(M4|r6,z);break}}}function _R(b){h0=b,MR()}function MR(){while(h0!==null){var b=h0,z=b.child;if((h0.flags&A7)!==o0){var Q=b.deletions;if(Q!==null){for(var X=0;X<Q.length;X++){var Z=Q[X];h0=Z,PR(Z,b)}{var J=b.alternate;if(J!==null){var $=J.child;if($!==null){J.child=null;do{var K=$.sibling;$.sibling=null,$=K}while($!==null)}}}h0=b}}if((b.subtreeFlags&F3)!==o0&&z!==null)z.return=b,h0=z;else wR()}}function wR(){while(h0!==null){var b=h0;if((b.flags&C5)!==o0)C6(b),RR(b),$4();var z=b.sibling;if(z!==null){z.return=b.return,h0=z;return}h0=b.return}}function RR(b){switch(b.tag){case L:case C:case z0:{if(b.mode&a1)sJ(),c5(M4|r6,b,b.return),tJ(b);else c5(M4|r6,b,b.return);break}}}function PR(b,z){while(h0!==null){var Q=h0;C6(Q),FR(Q,z),$4();var X=Q.child;if(X!==null)X.return=Q,h0=X;else vR(b)}}function vR(b){while(h0!==null){var z=h0,Q=z.sibling,X=z.return;if(gU(z),z===b){h0=null;return}if(Q!==null){Q.return=X,h0=Q;return}h0=X}}function FR(b,z){switch(b.tag){case L:case C:case z0:{if(b.mode&a1)sJ(),c5(M4,b,z),tJ(b);else c5(M4,b,z);break}}}function AR(b){switch(b.tag){case L:case C:case z0:{try{$7(n6|r6,b)}catch(Q){K6(b,b.return,Q)}break}case M:{var z=b.stateNode;try{z.componentDidMount()}catch(Q){K6(b,b.return,Q)}break}}}function kR(b){switch(b.tag){case L:case C:case z0:{try{$7(M4|r6,b)}catch(z){K6(b,b.return,z)}break}}}function IR(b){switch(b.tag){case L:case C:case z0:{try{c5(n6|r6,b,b.return)}catch(Q){K6(b,b.return,Q)}break}case M:{var z=b.stateNode;if(typeof z.componentWillUnmount==="function")CY(b,b.return,z);break}}}function TR(b){switch(b.tag){case L:case C:case z0:try{c5(M4|r6,b,b.return)}catch(z){K6(b,b.return,z)}}}var fR=0,CR=1,SR=2,hR=3,VR=4;if(typeof Symbol==="function"&&Symbol.for){var z9=Symbol.for;fR=z9("selector.component"),CR=z9("selector.has_pseudo_class"),SR=z9("selector.role"),hR=z9("selector.test_id"),VR=z9("selector.text")}var DR=[];function yR(){DR.forEach(function(b){return b()})}var mR=Y.ReactCurrentActQueue;function uR(b){{var z=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0,Q=typeof jest<"u";return Q&&z!==!1}}function oU(){{var b=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;if(!b&&mR.current!==null)H("The current testing environment is not configured to support act(...)");return b}}var gR=Math.ceil,DY=Y.ReactCurrentDispatcher,yY=Y.ReactCurrentOwner,v4=Y.ReactCurrentBatchConfig,p5=Y.ReactCurrentActQueue,e6=0,aU=1,F4=2,M5=4,C8=0,Q9=1,r7=2,IQ=3,X9=4,rU=5,mY=6,k1=e6,l4=null,S6=null,b4=$0,$8=$0,uY=s8($0),z4=C8,Z9=null,gY=$0,TQ=$0,J9=$0,fQ=$0,Y9=null,s4=null,EY=0,nU=500,tU=1/0,ER=500,S8=null;function $9(){tU=H4()+ER}function sU(){return tU}var CQ=!1,cY=null,Z2=null,n7=!1,G7=null,H9=$0,dY=[],lY=null,cR=50,G9=0,pY=null,xY=!1,SQ=!1,dR=50,J2=0,hQ=null,K9=W6,VQ=$0,eU=!1;function DQ(){return l4}function p4(){if((k1&(F4|M5))!==e6)return H4();if(K9!==W6)return K9;return K9=H4(),K9}function K7(b){var z=b.mode;if((z&A1)===j0)return b1;else if((k1&F4)!==e6&&b4!==$0)return Qb(b4);var Q=hM()!==SM;if(Q){if(v4.transition!==null){var X=v4.transition;if(!X._updatedFibers)X._updatedFibers=new Set;X._updatedFibers.add(b)}if(VQ===K4)VQ=hH();return VQ}var Z=h5();if(Z!==K4)return Z;var J=N_();return J}function lR(b){var z=b.mode;if((z&A1)===j0)return b1;return cL()}function Q4(b,z,Q,X){if(qP(),eU)H("useInsertionEffect must not schedule updates.");if(xY)SQ=!0;if(Xb(b,Q,X),(k1&F4)!==$0&&b===l4)LP(z);else{if(S5)yH(b,z,Q);if(NP(z),b===l4){if((k1&F4)===e6)J9=q1(J9,Q);if(z4===X9)U7(b,b4)}if(e4(b,X),Q===b1&&k1===e6&&(z.mode&A1)===j0&&!p5.isBatchingLegacy)$9(),sG()}}function pR(b,z,Q){var X=b.current;X.lanes=z,Xb(b,z,Q),e4(b,Q)}function xR(b){return(k1&F4)!==e6}function e4(b,z){var Q=b.callbackNode;DL(b,z);var X=s9(b,b===l4?b4:$0);if(X===$0){if(Q!==null)Lq(Q);b.callbackNode=null,b.callbackPriority=K4;return}var Z=D7(X),J=b.callbackPriority;if(J===Z&&!(p5.current!==null&&Q!==tY)){if(Q==null&&J!==b1)H("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");return}if(Q!=null)Lq(Q);var $;if(Z===b1){if(b.tag===e8){if(p5.isBatchingLegacy!==null)p5.didScheduleLegacyUpdate=!0;OM(Qq.bind(null,b))}else tG(Qq.bind(null,b));if(p5.current!==null)p5.current.push(b7);else __(function(){if((k1&(F4|M5))===e6)b7()});$=null}else{var K;switch(gH(X)){case J5:K=a9;break;case R8:K=gX;break;case P8:K=C7;break;case Qz:K=EX;break;default:K=C7;break}$=sY(K,bq.bind(null,b))}b.callbackPriority=Z,b.callbackNode=$}function bq(b,z){if(Xw(),K9=W6,VQ=$0,(k1&(F4|M5))!==e6)throw Error("Should not already be working.");var Q=b.callbackNode,X=V8();if(X){if(b.callbackNode!==Q)return null}var Z=s9(b,b===l4?b4:$0);if(Z===$0)return null;var J=!e9(b,Z)&&!EL(b,Z)&&!z,$=J?bP(b,Z):mQ(b,Z);if($!==C8){if($===r7){var K=$Z(b);if(K!==$0)Z=K,$=iY(b,K)}if($===Q9){var U=Z9;throw t7(b,$0),U7(b,Z),e4(b,H4()),U}if($===mY)U7(b,Z);else{var N=!e9(b,Z),R=b.current.alternate;if(N&&!jR(R)){if($=mQ(b,Z),$===r7){var y=$Z(b);if(y!==$0)Z=y,$=iY(b,y)}if($===Q9){var D=Z9;throw t7(b,$0),U7(b,Z),e4(b,H4()),D}}b.finishedWork=R,b.finishedLanes=Z,iR(b,$,Z)}}if(e4(b,H4()),b.callbackNode===Q)return bq.bind(null,b);return null}function iY(b,z){var Q=Y9;if(Xz(b)){var X=t7(b,z);X.flags|=N8,$M(b.containerInfo)}var Z=mQ(b,z);if(Z!==r7){var J=s4;if(s4=Q,J!==null)zq(J)}return Z}function zq(b){if(s4===null)s4=b;else s4.push.apply(s4,b)}function iR(b,z,Q){switch(z){case C8:case Q9:throw Error("Root did not complete. This is a bug in React.");case r7:{s7(b,s4,S8);break}case IQ:{if(U7(b,Q),CH(Q)&&!Nq()){var X=EY+nU-H4();if(X>10){var Z=s9(b,$0);if(Z!==$0)break;var J=b.suspendedLanes;if(!f3(J,Q)){var $=p4();DH(b,J);break}b.timeoutHandle=dZ(s7.bind(null,b,s4,S8),X);break}}s7(b,s4,S8);break}case X9:{if(U7(b,Q),gL(Q))break;if(!Nq()){var K=hL(b,Q),U=K,N=H4()-U,R=UP(N)-N;if(R>10){b.timeoutHandle=dZ(s7.bind(null,b,s4,S8),R);break}}s7(b,s4,S8);break}case rU:{s7(b,s4,S8);break}default:throw Error("Unknown root exit status.")}}function jR(b){var z=b;while(!0){if(z.flags&j9){var Q=z.updateQueue;if(Q!==null){var X=Q.stores;if(X!==null)for(var Z=0;Z<X.length;Z++){var J=X[Z],$=J.getSnapshot,K=J.value;try{if(!$5($(),K))return!1}catch(N){return!1}}}}var U=z.child;if(z.subtreeFlags&j9&&U!==null){U.return=z,z=U;continue}if(z===b)return!0;while(z.sibling===null){if(z.return===null||z.return===b)return!0;z=z.return}z.sibling.return=z.return,z=z.sibling}return!0}function U7(b,z){z=bz(z,fQ),z=bz(z,J9),lL(b,z)}function Qq(b){if(Zw(),(k1&(F4|M5))!==e6)throw Error("Should not already be working.");V8();var z=s9(b,$0);if(!Z5(z,b1))return e4(b,H4()),null;var Q=mQ(b,z);if(b.tag!==e8&&Q===r7){var X=$Z(b);if(X!==$0)z=X,Q=iY(b,X)}if(Q===Q9){var Z=Z9;throw t7(b,$0),U7(b,z),e4(b,H4()),Z}if(Q===mY)throw Error("Root did not complete. This is a bug in React.");var J=b.current.alternate;return b.finishedWork=J,b.finishedLanes=z,s7(b,s4,S8),e4(b,H4()),null}function oR(b,z){if(z!==$0){if(UZ(b,q1(z,b1)),e4(b,H4()),(k1&(F4|M5))===e6)$9(),b7()}}function jY(b,z){var Q=k1;k1|=aU;try{return b(z)}finally{if(k1=Q,k1===e6&&!p5.isBatchingLegacy)$9(),sG()}}function aR(b,z,Q,X,Z){var J=h5(),$=v4.transition;try{return v4.transition=null,U4(J5),b(z,Q,X,Z)}finally{if(U4(J),v4.transition=$,k1===e6)$9()}}function h8(b){if(G7!==null&&G7.tag===e8&&(k1&(F4|M5))===e6)V8();var z=k1;k1|=aU;var Q=v4.transition,X=h5();try{if(v4.transition=null,U4(J5),b)return b();else return}finally{if(U4(X),v4.transition=Q,k1=z,(k1&(F4|M5))===e6)b7()}}function Xq(){return(k1&(F4|M5))!==e6}function yQ(b,z){h4(uY,$8,b),$8=q1($8,z),gY=q1(gY,z)}function oY(b){$8=uY.current,S4(uY,b)}function t7(b,z){b.finishedWork=null,b.finishedLanes=$0;var Q=b.timeoutHandle;if(Q!==lZ)b.timeoutHandle=lZ,W_(Q);if(S6!==null){var X=S6.return;while(X!==null){var Z=X.alternate;SU(Z,X),X=X.return}}l4=b;var J=e7(b.current,null);return S6=J,b4=$8=gY=z,z4=C8,Z9=null,TQ=$0,J9=$0,fQ=$0,Y9=null,s4=null,EM(),y5.discardPendingWarnings(),J}function Zq(b,z){do{var Q=S6;try{if(pz(),IK(),$4(),yY.current=null,Q===null||Q.return===null){z4=Q9,Z9=z,S6=null;return}if(u0&&Q.mode&a1)wQ(Q,!0);if(S0)if(A3(),z!==null&&typeof z==="object"&&typeof z.then==="function"){var X=z;wL(Q,X,b4)}else ML(Q,z,b4);Bw(b,Q.return,Q,z,b4),Hq(Q)}catch(Z){if(z=Z,S6===Q&&Q!==null)Q=Q.return,S6=Q;else Q=S6;continue}return}while(!0)}function Jq(){var b=DY.current;if(DY.current=LQ,b===null)return LQ;else return b}function Yq(b){DY.current=b}function rR(){EY=H4()}function U9(b){TQ=q1(b,TQ)}function nR(){if(z4===C8)z4=IQ}function aY(){if(z4===C8||z4===IQ||z4===r7)z4=X9;if(l4!==null&&(HZ(TQ)||HZ(J9)))U7(l4,b4)}function tR(b){if(z4!==X9)z4=r7;if(Y9===null)Y9=[b];else Y9.push(b)}function sR(){return z4===C8}function mQ(b,z){var Q=k1;k1|=F4;var X=Jq();if(l4!==b||b4!==z){if(S5){var Z=b.memoizedUpdaters;if(Z.size>0)q9(b,b4),Z.clear();mH(b,z)}S8=uH(),t7(b,z)}AH(z);do try{eR();break}catch(J){Zq(b,J)}while(!0);if(pz(),k1=Q,Yq(X),S6!==null)throw Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");return kH(),l4=null,b4=$0,z4}function eR(){while(S6!==null)$q(S6)}function bP(b,z){var Q=k1;k1|=F4;var X=Jq();if(l4!==b||b4!==z){if(S5){var Z=b.memoizedUpdaters;if(Z.size>0)q9(b,b4),Z.clear();mH(b,z)}S8=uH(),$9(),t7(b,z)}AH(z);do try{zP();break}catch(J){Zq(b,J)}while(!0);if(pz(),Yq(X),k1=Q,S6!==null)return AL(),C8;else return kH(),l4=null,b4=$0,z4}function zP(){while(S6!==null&&!eO())$q(S6)}function $q(b){var z=b.alternate;C6(b);var Q;if((b.mode&a1)!==j0)nJ(b),Q=rY(z,b,$8),wQ(b,!0);else Q=rY(z,b,$8);if($4(),b.memoizedProps=b.pendingProps,Q===null)Hq(b);else S6=Q;yY.current=null}function Hq(b){var z=b;do{var{alternate:Q,return:X}=z;if((z.flags&a2)===o0){C6(z);var Z=void 0;if((z.mode&a1)===j0)Z=CU(Q,z,$8);else nJ(z),Z=CU(Q,z,$8),wQ(z,!1);if($4(),Z!==null){S6=Z;return}}else{var J=iw(Q,z);if(J!==null){J.flags&=oO,S6=J;return}if((z.mode&a1)!==j0){wQ(z,!1);var{actualDuration:$,child:K}=z;while(K!==null)$+=K.actualDuration,K=K.sibling;z.actualDuration=$}if(X!==null)X.flags|=a2,X.subtreeFlags=o0,X.deletions=null;else{z4=mY,S6=null;return}}var U=z.sibling;if(U!==null){S6=U;return}z=X,S6=z}while(z!==null);if(z4===C8)z4=rU}function s7(b,z,Q){var X=h5(),Z=v4.transition;try{v4.transition=null,U4(J5),QP(b,z,Q,X)}finally{v4.transition=Z,U4(X)}return null}function QP(b,z,Q,X){do V8();while(G7!==null);if(BP(),(k1&(F4|M5))!==e6)throw Error("Should not already be working.");var{finishedWork:Z,finishedLanes:J}=b;if(qL(J),Z===null)return PH(),null;else if(J===$0)H("root.finishedLanes should not be empty during a commit. This is a bug in React.");if(b.finishedWork=null,b.finishedLanes=$0,Z===b.current)throw Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");b.callbackNode=null,b.callbackPriority=K4;var $=q1(Z.lanes,Z.childLanes);if(pL(b,$),b===l4)l4=null,S6=null,b4=$0;if((Z.subtreeFlags&F3)!==o0||(Z.flags&F3)!==o0){if(!n7)n7=!0,lY=Q,sY(C7,function(){return V8(),null})}var K=(Z.subtreeFlags&(mX|uX|r2|F3))!==o0,U=(Z.flags&(mX|uX|r2|F3))!==o0;if(K||U){var N=v4.transition;v4.transition=null;var R=h5();U4(J5);var y=k1;k1|=M5,yY.current=null;var D=nw(b,Z);sK(),KR(b,Z,J),K_(b.containerInfo),b.current=Z,RL(J),UR(Z,b,J),PL(),bL(),k1=y,U4(R),v4.transition=N}else b.current=Z,sK();var p=n7;if(n7)n7=!1,G7=b,H9=J;else J2=0,hQ=null;if($=b.pendingLanes,$===$0)Z2=null;if(!p)qq(b.current,!1);if($L(Z.stateNode,X),S5)b.memoizedUpdaters.clear();if(yR(),e4(b,H4()),z!==null){var x=b.onRecoverableError;for(var a=0;a<z.length;a++){var w0=z[a],p0=w0.stack,E0=w0.digest;x(w0.value,{componentStack:p0,digest:E0})}}if(CQ){CQ=!1;var W1=cY;throw cY=null,W1}if(Z5(H9,b1)&&b.tag!==e8)V8();if($=b.pendingLanes,Z5($,b1))if(Qw(),b===pY)G9++;else G9=0,pY=b;else G9=0;return b7(),PH(),null}function V8(){if(G7!==null){var b=gH(H9),z=oL(P8,b),Q=v4.transition,X=h5();try{return v4.transition=null,U4(z),ZP()}finally{U4(X),v4.transition=Q}}return!1}function XP(b){if(dY.push(b),!n7)n7=!0,sY(C7,function(){return V8(),null})}function ZP(){if(G7===null)return!1;var b=lY;lY=null;var z=G7,Q=H9;if(G7=null,H9=$0,(k1&(F4|M5))!==e6)throw Error("Cannot flush passive effects while already rendering.");xY=!0,SQ=!1,vL(Q);var X=k1;k1|=M5,_R(z.current),OR(z,z.current,Q,b);{var Z=dY;dY=[];for(var J=0;J<Z.length;J++){var $=Z[J];bR(z,$)}}FL(),qq(z.current,!0),k1=X,b7();{if(SQ)if(z===hQ)J2++;else J2=0,hQ=z;else J2=0;xY=!1,SQ=!1}HL(z);{var K=z.current.stateNode;K.effectDuration=0,K.passiveEffectDuration=0}return!0}function Gq(b){return Z2!==null&&Z2.has(b)}function JP(b){if(Z2===null)Z2=new Set([b]);else Z2.add(b)}function YP(b){if(!CQ)CQ=!0,cY=b}var $P=YP;function Kq(b,z,Q){var X=o7(Q,z),Z=YU(b,X,b1),J=Q7(b,Z,b1),$=p4();if(J!==null)Xb(J,b1,$),e4(J,$)}function K6(b,z,Q){if(ow(Q),B9(!1),b.tag===F){Kq(b,b,Q);return}var X=null;X=z;while(X!==null){if(X.tag===F){Kq(X,b,Q);return}else if(X.tag===M){var{type:Z,stateNode:J}=X;if(typeof Z.getDerivedStateFromError==="function"||typeof J.componentDidCatch==="function"&&!Gq(J)){var $=o7(Q,b),K=OY(X,$,b1),U=Q7(X,K,b1),N=p4();if(U!==null)Xb(U,b1,N),e4(U,N);return}}X=X.return}H(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
116
+
117
+ Error message:
118
+
119
+ %s`,Q)}function HP(b,z,Q){var X=b.pingCache;if(X!==null)X.delete(z);var Z=p4();if(DH(b,Q),WP(b),l4===b&&f3(b4,Q))if(z4===X9||z4===IQ&&CH(b4)&&H4()-EY<nU)t7(b,$0);else fQ=q1(fQ,Q);e4(b,Z)}function Uq(b,z){if(z===K4)z=lR(b);var Q=p4(),X=n4(b,z);if(X!==null)Xb(X,z,Q),e4(X,Q)}function GP(b){var z=b.memoizedState,Q=K4;if(z!==null)Q=z.retryLane;Uq(b,Q)}function KP(b,z){var Q=K4,X;switch(b.tag){case j:X=b.stateNode;var Z=b.memoizedState;if(Z!==null)Q=Z.retryLane;break;case K0:X=b.stateNode;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}if(X!==null)X.delete(z);Uq(b,Q)}function UP(b){return b<120?120:b<480?480:b<1080?1080:b<1920?1920:b<3000?3000:b<4320?4320:gR(b/1960)*1960}function qP(){if(G9>cR)throw G9=0,pY=null,Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");if(J2>dR)J2=0,hQ=null,H("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.")}function BP(){y5.flushLegacyContextWarning(),y5.flushPendingUnsafeLifecycleWarnings()}function qq(b,z){{if(C6(b),uQ(b,_8,IR),z)uQ(b,o9,TR);if(uQ(b,_8,AR),z)uQ(b,o9,kR);$4()}}function uQ(b,z,Q){{var X=b,Z=null;while(X!==null){var J=X.subtreeFlags&z;if(X!==Z&&X.child!==null&&J!==o0)X=X.child;else{if((X.flags&z)!==o0)Q(X);if(X.sibling!==null)X=X.sibling;else X=Z=X.return}}}}var gQ=null;function Bq(b){{if((k1&F4)!==e6)return;if(!(b.mode&A1))return;var z=b.tag;if(z!==T&&z!==F&&z!==M&&z!==L&&z!==C&&z!==o&&z!==z0)return;var Q=G1(b)||"ReactComponent";if(gQ!==null){if(gQ.has(Q))return;gQ.add(Q)}else gQ=new Set([Q]);var X=C4;try{C6(b),H("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.")}finally{if(X)C6(b);else $4()}}}var rY;{var OP=null;rY=function(b,z,Q){var X=Rq(OP,z);try{return AU(b,z,Q)}catch(J){if(PM()||J!==null&&typeof J==="object"&&typeof J.then==="function")throw J;if(pz(),IK(),SU(b,z),Rq(z,X),z.mode&a1)nJ(z);if(CX(null,AU,null,b,z,Q),pO()){var Z=SX();if(typeof Z==="object"&&Z!==null&&Z._suppressLogging&&typeof J==="object"&&J!==null&&!J._suppressLogging)J._suppressLogging=!0}throw J}}}var Oq=!1,nY;nY=new Set;function LP(b){if(R7&&!eM())switch(b.tag){case L:case C:case z0:{var z=S6&&G1(S6)||"Unknown",Q=z;if(!nY.has(Q)){nY.add(Q);var X=G1(b)||"Unknown";H("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render",X,z,z)}break}case M:{if(!Oq)H("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),Oq=!0;break}}}function q9(b,z){if(S5){var Q=b.memoizedUpdaters;Q.forEach(function(X){yH(b,X,z)})}}var tY={};function sY(b,z){{var Q=p5.current;if(Q!==null)return Q.push(z),tY;else return RH(b,z)}}function Lq(b){if(b===tY)return;return sO(b)}function Nq(){return p5.current!==null}function NP(b){{if(b.mode&A1){if(!oU())return}else{if(!uR())return;if(k1!==e6)return;if(b.tag!==L&&b.tag!==C&&b.tag!==z0)return}if(p5.current===null){var z=C4;try{C6(b),H(`An update to %s inside a test was not wrapped in act(...).
120
+
121
+ When testing, code that causes React state updates should be wrapped into act(...):
122
+
123
+ act(() => {
124
+ /* fire events that update state */
125
+ });
126
+ /* assert on the output */
127
+
128
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`,G1(b))}finally{if(z)C6(b);else $4()}}}}function WP(b){if(b.tag!==e8&&oU()&&p5.current===null)H(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
129
+
130
+ When testing, code that resolves suspended data should be wrapped into act(...):
131
+
132
+ act(() => {
133
+ /* finish loading suspended data */
134
+ });
135
+ /* assert on the output */
136
+
137
+ This ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act`)}function B9(b){eU=b}var w5=null,Y2=null,_P=function(b){w5=b};function $2(b){{if(w5===null)return b;var z=w5(b);if(z===void 0)return b;return z.current}}function eY(b){return $2(b)}function b$(b){{if(w5===null)return b;var z=w5(b);if(z===void 0){if(b!==null&&b!==void 0&&typeof b.render==="function"){var Q=$2(b.render);if(b.render!==Q){var X={$$typeof:u,render:Q};if(b.displayName!==void 0)X.displayName=b.displayName;return X}}return b}return z.current}}function Wq(b,z){{if(w5===null)return!1;var Q=b.elementType,X=z.type,Z=!1,J=typeof X==="object"&&X!==null?X.$$typeof:null;switch(b.tag){case M:{if(typeof X==="function")Z=!0;break}case L:{if(typeof X==="function")Z=!0;else if(J===g0)Z=!0;break}case C:{if(J===u)Z=!0;else if(J===g0)Z=!0;break}case o:case z0:{if(J===_0)Z=!0;else if(J===g0)Z=!0;break}default:return!1}if(Z){var $=w5(Q);if($!==void 0&&$===w5(X))return!0}return!1}}function _q(b){{if(w5===null)return;if(typeof WeakSet!=="function")return;if(Y2===null)Y2=new WeakSet;Y2.add(b)}}var MP=function(b,z){{if(w5===null)return;var{staleFamilies:Q,updatedFamilies:X}=z;V8(),h8(function(){z$(b.current,X,Q)})}},wP=function(b,z){{if(b.context!==H5)return;V8(),h8(function(){O9(z,b,null,null)})}};function z$(b,z,Q){{var{alternate:X,child:Z,sibling:J,tag:$,type:K}=b,U=null;switch($){case L:case z0:case M:U=K;break;case C:U=K.render;break}if(w5===null)throw Error("Expected resolveFamily to be set during hot reload.");var N=!1,R=!1;if(U!==null){var y=w5(U);if(y!==void 0){if(Q.has(y))R=!0;else if(z.has(y))if($===M)R=!0;else N=!0}}if(Y2!==null){if(Y2.has(b)||X!==null&&Y2.has(X))R=!0}if(R)b._debugNeedsRemount=!0;if(R||N){var D=n4(b,b1);if(D!==null)Q4(D,b,b1,W6)}if(Z!==null&&!R)z$(Z,z,Q);if(J!==null)z$(J,z,Q)}}var RP=function(b,z){{var Q=new Set,X=new Set(z.map(function(Z){return Z.current}));return Q$(b.current,X,Q),Q}};function Q$(b,z,Q){{var{child:X,sibling:Z,tag:J,type:$}=b,K=null;switch(J){case L:case z0:case M:K=$;break;case C:K=$.render;break}var U=!1;if(K!==null){if(z.has(K))U=!0}if(U)PP(b,Q);else if(X!==null)Q$(X,z,Q);if(Z!==null)Q$(Z,z,Q)}}function PP(b,z){{var Q=vP(b,z);if(Q)return;var X=b;while(!0){switch(X.tag){case _:z.add(X.stateNode);return;case v:z.add(X.stateNode.containerInfo);return;case F:z.add(X.stateNode.containerInfo);return}if(X.return===null)throw Error("Expected to reach root first.");X=X.return}}}function vP(b,z){{var Q=b,X=!1;while(!0){if(Q.tag===_)X=!0,z.add(Q.stateNode);else if(Q.child!==null){Q.child.return=Q,Q=Q.child;continue}if(Q===b)return X;while(Q.sibling===null){if(Q.return===null||Q.return===b)return X;Q=Q.return}Q.sibling.return=Q.return,Q=Q.sibling}}return!1}var X$;{X$=!1;try{var Mq=Object.preventExtensions({})}catch(b){X$=!0}}function FP(b,z,Q,X){if(this.tag=b,this.key=Q,this.elementType=null,this.type=null,this.stateNode=null,this.return=null,this.child=null,this.sibling=null,this.index=0,this.ref=null,this.pendingProps=z,this.memoizedProps=null,this.updateQueue=null,this.memoizedState=null,this.dependencies=null,this.mode=X,this.flags=o0,this.subtreeFlags=o0,this.deletions=null,this.lanes=$0,this.childLanes=$0,this.alternate=null,this.actualDuration=Number.NaN,this.actualStartTime=Number.NaN,this.selfBaseDuration=Number.NaN,this.treeBaseDuration=Number.NaN,this.actualDuration=0,this.actualStartTime=-1,this.selfBaseDuration=0,this.treeBaseDuration=0,this._debugSource=null,this._debugOwner=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,!X$&&typeof Object.preventExtensions==="function")Object.preventExtensions(this)}var G5=function(b,z,Q,X){return new FP(b,z,Q,X)};function Z$(b){var z=b.prototype;return!!(z&&z.isReactComponent)}function AP(b){return typeof b==="function"&&!Z$(b)&&b.defaultProps===void 0}function kP(b){if(typeof b==="function")return Z$(b)?M:L;else if(b!==void 0&&b!==null){var z=b.$$typeof;if(z===u)return C;if(z===_0)return o}return T}function e7(b,z){var Q=b.alternate;if(Q===null)Q=G5(b.tag,z,b.key,b.mode),Q.elementType=b.elementType,Q.type=b.type,Q.stateNode=b.stateNode,Q._debugSource=b._debugSource,Q._debugOwner=b._debugOwner,Q._debugHookTypes=b._debugHookTypes,Q.alternate=b,b.alternate=Q;else Q.pendingProps=z,Q.type=b.type,Q.flags=o0,Q.subtreeFlags=o0,Q.deletions=null,Q.actualDuration=0,Q.actualStartTime=-1;Q.flags=b.flags&M8,Q.childLanes=b.childLanes,Q.lanes=b.lanes,Q.child=b.child,Q.memoizedProps=b.memoizedProps,Q.memoizedState=b.memoizedState,Q.updateQueue=b.updateQueue;var X=b.dependencies;switch(Q.dependencies=X===null?null:{lanes:X.lanes,firstContext:X.firstContext},Q.sibling=b.sibling,Q.index=b.index,Q.ref=b.ref,Q.selfBaseDuration=b.selfBaseDuration,Q.treeBaseDuration=b.treeBaseDuration,Q._debugNeedsRemount=b._debugNeedsRemount,Q.tag){case T:case L:case z0:Q.type=$2(b.type);break;case M:Q.type=eY(b.type);break;case C:Q.type=b$(b.type);break}return Q}function IP(b,z){b.flags&=M8|i6;var Q=b.alternate;if(Q===null)b.childLanes=$0,b.lanes=z,b.child=null,b.subtreeFlags=o0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null,b.selfBaseDuration=0,b.treeBaseDuration=0;else{b.childLanes=Q.childLanes,b.lanes=Q.lanes,b.child=Q.child,b.subtreeFlags=o0,b.deletions=null,b.memoizedProps=Q.memoizedProps,b.memoizedState=Q.memoizedState,b.updateQueue=Q.updateQueue,b.type=Q.type;var X=Q.dependencies;b.dependencies=X===null?null:{lanes:X.lanes,firstContext:X.firstContext},b.selfBaseDuration=Q.selfBaseDuration,b.treeBaseDuration=Q.treeBaseDuration}return b}function TP(b,z,Q){var X;if(b===Vz){if(X=A1,z===!0)X|=D6,X|=t5}else X=j0;if(S5)X|=a1;return G5(F,null,null,X)}function J$(b,z,Q,X,Z,J){var $=T,K=b;if(typeof b==="function")if(Z$(b))$=M,K=eY(K);else K=$2(K);else if(typeof b==="string")$=_;else b:switch(b){case h1:return q7(Q.children,Z,J,z);case A:if($=h,Z|=D6,(Z&A1)!==j0)Z|=t5;break;case t:return fP(Q,Z,J,z);case b0:return CP(Q,Z,J,z);case U0:return SP(Q,Z,J,z);case L0:return wq(Q,Z,J,z);case c0:case f0:case P1:case j1:case Q0:default:{if(typeof b==="object"&&b!==null)switch(b.$$typeof){case Z0:$=S;break b;case P:$=k;break b;case u:$=C,K=b$(K);break b;case _0:$=o;break b;case g0:$=V,K=null;break b}var U="";{if(b===void 0||typeof b==="object"&&b!==null&&Object.keys(b).length===0)U+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var N=X?G1(X):null;if(N)U+=`
138
+
139
+ Check the render method of \``+N+"`."}throw Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) "+("but got: "+(b==null?b:typeof b)+"."+U))}}var R=G5($,Q,z,Z);return R.elementType=b,R.type=K,R.lanes=J,R._debugOwner=X,R}function Y$(b,z,Q){var X=null;X=b._owner;var{type:Z,key:J,props:$}=b,K=J$(Z,J,$,X,z,Q);return K._debugSource=b._source,K._debugOwner=b._owner,K}function q7(b,z,Q,X){var Z=G5(f,b,X,z);return Z.lanes=Q,Z}function fP(b,z,Q,X){if(typeof b.id!=="string")H('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof b.id);var Z=G5(i,b,X,z|a1);return Z.elementType=t,Z.lanes=Q,Z.stateNode={effectDuration:0,passiveEffectDuration:0},Z}function CP(b,z,Q,X){var Z=G5(j,b,X,z);return Z.elementType=b0,Z.lanes=Q,Z}function SP(b,z,Q,X){var Z=G5(K0,b,X,z);return Z.elementType=U0,Z.lanes=Q,Z}function wq(b,z,Q,X){var Z=G5(B0,b,X,z);Z.elementType=L0,Z.lanes=Q;var J={isHidden:!1};return Z.stateNode=J,Z}function $$(b,z,Q){var X=G5(W,b,null,z);return X.lanes=Q,X}function hP(){var b=G5(_,null,null,j0);return b.elementType="DELETED",b}function VP(b){var z=G5(Y0,null,null,j0);return z.stateNode=b,z}function H$(b,z,Q){var X=b.children!==null?b.children:[],Z=G5(v,X,b.key,z);return Z.lanes=Q,Z.stateNode={containerInfo:b.containerInfo,pendingChildren:null,implementation:b.implementation},Z}function Rq(b,z){if(b===null)b=G5(T,null,null,j0);return b.tag=z.tag,b.key=z.key,b.elementType=z.elementType,b.type=z.type,b.stateNode=z.stateNode,b.return=z.return,b.child=z.child,b.sibling=z.sibling,b.index=z.index,b.ref=z.ref,b.pendingProps=z.pendingProps,b.memoizedProps=z.memoizedProps,b.updateQueue=z.updateQueue,b.memoizedState=z.memoizedState,b.dependencies=z.dependencies,b.mode=z.mode,b.flags=z.flags,b.subtreeFlags=z.subtreeFlags,b.deletions=z.deletions,b.lanes=z.lanes,b.childLanes=z.childLanes,b.alternate=z.alternate,b.actualDuration=z.actualDuration,b.actualStartTime=z.actualStartTime,b.selfBaseDuration=z.selfBaseDuration,b.treeBaseDuration=z.treeBaseDuration,b._debugSource=z._debugSource,b._debugOwner=z._debugOwner,b._debugNeedsRemount=z._debugNeedsRemount,b._debugHookTypes=z._debugHookTypes,b}function DP(b,z,Q,X,Z){this.tag=z,this.containerInfo=b,this.pendingChildren=null,this.current=null,this.pingCache=null,this.finishedWork=null,this.timeoutHandle=lZ,this.context=null,this.pendingContext=null,this.callbackNode=null,this.callbackPriority=K4,this.eventTimes=KZ($0),this.expirationTimes=KZ(W6),this.pendingLanes=$0,this.suspendedLanes=$0,this.pingedLanes=$0,this.expiredLanes=$0,this.mutableReadLanes=$0,this.finishedLanes=$0,this.entangledLanes=$0,this.entanglements=KZ($0),this.identifierPrefix=X,this.onRecoverableError=Z,this.mutableSourceEagerHydrationData=null,this.effectDuration=0,this.passiveEffectDuration=0;{this.memoizedUpdaters=new Set;var J=this.pendingUpdatersLaneMap=[];for(var $=0;$<dX;$++)J.push(new Set)}switch(z){case Vz:this._debugRootType=Q?"hydrateRoot()":"createRoot()";break;case e8:this._debugRootType=Q?"hydrate()":"render()";break}}function Pq(b,z,Q,X,Z,J,$,K,U,N){var R=new DP(b,z,Q,K,U),y=TP(z,J);R.current=y,y.stateNode=R;{var D={element:X,isDehydrated:Q,cache:null,transitions:null,pendingSuspenseBoundaries:null};y.memoizedState=D}return MJ(y),R}var G$="18.3.1";function yP(b,z,Q){var X=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;return E6(X),{$$typeof:Q6,key:X==null?null:""+X,children:b,containerInfo:z,implementation:Q}}var K$,U$;K$=!1,U$={};function vq(b){if(!b)return H5;var z=P3(b),Q=BM(z);if(z.tag===M){var X=z.type;if(b8(X))return rG(z,X,Q)}return Q}function mP(b,z){{var Q=P3(b);if(Q===void 0)if(typeof b.render==="function")throw Error("Unable to find node on an unmounted component.");else{var X=Object.keys(b).join(",");throw Error("Argument appears to not be a ReactComponent. Keys: "+X)}var Z=_H(Q);if(Z===null)return null;if(Z.mode&D6){var J=G1(Q)||"Component";if(!U$[J]){U$[J]=!0;var $=C4;try{if(C6(Z),Q.mode&D6)H("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",z,z,J);else H("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node",z,z,J)}finally{if($)C6($);else $4()}}}return Z.stateNode}}function Fq(b,z,Q,X,Z,J,$,K){var U=!1,N=null;return Pq(b,z,U,N,Q,X,Z,J,$)}function Aq(b,z,Q,X,Z,J,$,K,U,N){var R=!0,y=Pq(Q,X,R,b,Z,J,$,K,U);y.context=vq(null);var D=y.current,p=p4(),x=K7(D),a=T8(p,x);return a.callback=z!==void 0&&z!==null?z:null,Q7(D,a,x),pR(y,x,p),y}function O9(b,z,Q,X){YL(z,b);var Z=z.current,J=p4(),$=K7(Z);kL($);var K=vq(Q);if(z.context===null)z.context=K;else z.pendingContext=K;if(R7&&C4!==null&&!K$)K$=!0,H(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
140
+
141
+ Check the render method of %s.`,G1(C4)||"Unknown");var U=T8(J,$);if(U.payload={element:b},X=X===void 0?null:X,X!==null){if(typeof X!=="function")H("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",X);U.callback=X}var N=Q7(Z,U,$);if(N!==null)Q4(N,Z,$,J),az(N,Z,$);return $}function EQ(b){var z=b.current;if(!z.child)return null;switch(z.child.tag){case _:return EZ(z.child.stateNode);default:return z.child.stateNode}}function uP(b){switch(b.tag){case F:{var z=b.stateNode;if(Xz(z)){var Q=yL(z);oR(z,Q)}break}case j:{h8(function(){var Z=n4(b,b1);if(Z!==null){var J=p4();Q4(Z,b,b1,J)}});var X=b1;q$(b,X);break}}}function kq(b,z){var Q=b.memoizedState;if(Q!==null&&Q.dehydrated!==null)Q.retryLane=dL(Q.retryLane,z)}function q$(b,z){kq(b,z);var Q=b.alternate;if(Q)kq(Q,z)}function gP(b){if(b.tag!==j)return;var z=e2,Q=n4(b,z);if(Q!==null){var X=p4();Q4(Q,b,z,X)}q$(b,z)}function EP(b){if(b.tag!==j)return;var z=K7(b),Q=n4(b,z);if(Q!==null){var X=p4();Q4(Q,b,z,X)}q$(b,z)}function Iq(b){var z=tO(b);if(z===null)return null;return z.stateNode}var Tq=function(b){return null};function cP(b){return Tq(b)}var fq=function(b){return!1};function dP(b){return fq(b)}var Cq=null,Sq=null,hq=null,Vq=null,Dq=null,yq=null,mq=null,uq=null,gq=null;{var Eq=function(b,z,Q){var X=z[Q],Z=y1(b)?b.slice():L1({},b);if(Q+1===z.length){if(y1(Z))Z.splice(X,1);else delete Z[X];return Z}return Z[X]=Eq(b[X],z,Q+1),Z},cq=function(b,z){return Eq(b,z,0)},dq=function(b,z,Q,X){var Z=z[X],J=y1(b)?b.slice():L1({},b);if(X+1===z.length){var $=Q[X];if(J[$]=J[Z],y1(J))J.splice(Z,1);else delete J[Z]}else J[Z]=dq(b[Z],z,Q,X+1);return J},lq=function(b,z,Q){if(z.length!==Q.length){O("copyWithRename() expects paths of the same length");return}else for(var X=0;X<Q.length-1;X++)if(z[X]!==Q[X]){O("copyWithRename() expects paths to be the same except for the deepest key");return}return dq(b,z,Q,0)},pq=function(b,z,Q,X){if(Q>=z.length)return X;var Z=z[Q],J=y1(b)?b.slice():L1({},b);return J[Z]=pq(b[Z],z,Q+1,X),J},xq=function(b,z,Q){return pq(b,z,0,Q)},B$=function(b,z){var Q=b.memoizedState;while(Q!==null&&z>0)Q=Q.next,z--;return Q};Cq=function(b,z,Q,X){var Z=B$(b,z);if(Z!==null){var J=xq(Z.memoizedState,Q,X);Z.memoizedState=J,Z.baseState=J,b.memoizedProps=L1({},b.memoizedProps);var $=n4(b,b1);if($!==null)Q4($,b,b1,W6)}},Sq=function(b,z,Q){var X=B$(b,z);if(X!==null){var Z=cq(X.memoizedState,Q);X.memoizedState=Z,X.baseState=Z,b.memoizedProps=L1({},b.memoizedProps);var J=n4(b,b1);if(J!==null)Q4(J,b,b1,W6)}},hq=function(b,z,Q,X){var Z=B$(b,z);if(Z!==null){var J=lq(Z.memoizedState,Q,X);Z.memoizedState=J,Z.baseState=J,b.memoizedProps=L1({},b.memoizedProps);var $=n4(b,b1);if($!==null)Q4($,b,b1,W6)}},Vq=function(b,z,Q){if(b.pendingProps=xq(b.memoizedProps,z,Q),b.alternate)b.alternate.pendingProps=b.pendingProps;var X=n4(b,b1);if(X!==null)Q4(X,b,b1,W6)},Dq=function(b,z){if(b.pendingProps=cq(b.memoizedProps,z),b.alternate)b.alternate.pendingProps=b.pendingProps;var Q=n4(b,b1);if(Q!==null)Q4(Q,b,b1,W6)},yq=function(b,z,Q){if(b.pendingProps=lq(b.memoizedProps,z,Q),b.alternate)b.alternate.pendingProps=b.pendingProps;var X=n4(b,b1);if(X!==null)Q4(X,b,b1,W6)},mq=function(b){var z=n4(b,b1);if(z!==null)Q4(z,b,b1,W6)},uq=function(b){Tq=b},gq=function(b){fq=b}}function lP(b){var z=_H(b);if(z===null)return null;return z.stateNode}function pP(b){return null}function xP(){return C4}function iP(b){var z=b.findFiberByHostInstance,Q=Y.ReactCurrentDispatcher;return JL({bundleType:b.bundleType,version:b.version,rendererPackageName:b.rendererPackageName,rendererConfig:b.rendererConfig,overrideHookState:Cq,overrideHookStateDeletePath:Sq,overrideHookStateRenamePath:hq,overrideProps:Vq,overridePropsDeletePath:Dq,overridePropsRenamePath:yq,setErrorHandler:uq,setSuspenseHandler:gq,scheduleUpdate:mq,currentDispatcherRef:Q,findHostInstanceByFiber:lP,findFiberByHostInstance:z||pP,findHostInstancesForRefresh:RP,scheduleRefresh:MP,scheduleRoot:wP,setRefreshHandler:_P,getCurrentFiber:xP,reconcilerVersion:G$})}var iq=typeof reportError==="function"?reportError:function(b){console.error(b)};function O$(b){this._internalRoot=b}cQ.prototype.render=O$.prototype.render=function(b){var z=this._internalRoot;if(z===null)throw Error("Cannot update an unmounted root.");{if(typeof arguments[1]==="function")H("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");else if(dQ(arguments[1]))H("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.");else if(typeof arguments[1]<"u")H("You passed a second argument to root.render(...) but it only accepts one argument.");var Q=z.containerInfo;if(Q.nodeType!==x6){var X=Iq(z.current);if(X){if(X.parentNode!==Q)H("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.")}}}O9(b,z,null,null)},cQ.prototype.unmount=O$.prototype.unmount=function(){if(typeof arguments[0]==="function")H("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");var b=this._internalRoot;if(b!==null){this._internalRoot=null;var z=b.containerInfo;if(Xq())H("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition.");h8(function(){O9(null,b,null,null)}),pG(z)}};function jP(b,z){if(!dQ(b))throw Error("createRoot(...): Target container is not a DOM element.");jq(b);var Q=!1,X=!1,Z="",J=iq,$=null;if(z!==null&&z!==void 0){if(z.hydrate)O("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.");else if(typeof z==="object"&&z!==null&&z.$$typeof===i1)H(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
142
+
143
+ let root = createRoot(domContainer);
144
+ root.render(<App />);`);if(z.unstable_strictMode===!0)Q=!0;if(z.identifierPrefix!==void 0)Z=z.identifierPrefix;if(z.onRecoverableError!==void 0)J=z.onRecoverableError;if(z.transitionCallbacks!==void 0)$=z.transitionCallbacks}var K=Fq(b,Vz,null,Q,X,Z,J);kz(K.current,b);var U=b.nodeType===x6?b.parentNode:b;return wb(U),new O$(K)}function cQ(b){this._internalRoot=b}function oP(b){if(b)ZN(b)}cQ.prototype.unstable_scheduleHydration=oP;function aP(b,z,Q){if(!dQ(b))throw Error("hydrateRoot(...): Target container is not a DOM element.");if(jq(b),z===void 0)H("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var X=Q!=null?Q:null,Z=Q!=null&&Q.hydratedSources||null,J=!1,$=!1,K="",U=iq;if(Q!==null&&Q!==void 0){if(Q.unstable_strictMode===!0)J=!0;if(Q.identifierPrefix!==void 0)K=Q.identifierPrefix;if(Q.onRecoverableError!==void 0)U=Q.onRecoverableError}var N=Aq(z,null,b,Vz,X,J,$,K,U);if(kz(N.current,b),wb(b),Z)for(var R=0;R<Z.length;R++){var y=Z[R];aM(N,y)}return new cQ(N)}function dQ(b){return!!(b&&(b.nodeType===a4||b.nodeType===L8||b.nodeType===MX||!x0))}function L9(b){return!!(b&&(b.nodeType===a4||b.nodeType===L8||b.nodeType===MX||b.nodeType===x6&&b.nodeValue===" react-mount-point-unstable "))}function jq(b){{if(b.nodeType===a4&&b.tagName&&b.tagName.toUpperCase()==="BODY")H("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app.");if(Sb(b))if(b._reactRootContainer)H("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.");else H("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.")}}var rP=Y.ReactCurrentOwner,oq;oq=function(b){if(b._reactRootContainer&&b.nodeType!==x6){var z=Iq(b._reactRootContainer.current);if(z){if(z.parentNode!==b)H("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}}var Q=!!b._reactRootContainer,X=L$(b),Z=!!(X&&t8(X));if(Z&&!Q)H("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render.");if(b.nodeType===a4&&b.tagName&&b.tagName.toUpperCase()==="BODY")H("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function L$(b){if(!b)return null;if(b.nodeType===L8)return b.documentElement;else return b.firstChild}function aq(){}function nP(b,z,Q,X,Z){if(Z){if(typeof X==="function"){var J=X;X=function(){var D=EQ($);J.call(D)}}var $=Aq(z,X,b,e8,null,!1,!1,"",aq);b._reactRootContainer=$,kz($.current,b);var K=b.nodeType===x6?b.parentNode:b;return wb(K),h8(),$}else{var U;while(U=b.lastChild)b.removeChild(U);if(typeof X==="function"){var N=X;X=function(){var D=EQ(R);N.call(D)}}var R=Fq(b,e8,null,!1,!1,"",aq);b._reactRootContainer=R,kz(R.current,b);var y=b.nodeType===x6?b.parentNode:b;return wb(y),h8(function(){O9(z,R,Q,X)}),R}}function tP(b,z){if(b!==null&&typeof b!=="function")H("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",z,b)}function lQ(b,z,Q,X,Z){oq(Q),tP(Z===void 0?null:Z,"render");var J=Q._reactRootContainer,$;if(!J)$=nP(Q,z,b,Z,X);else{if($=J,typeof Z==="function"){var K=Z;Z=function(){var U=EQ($);K.call(U)}}O9(z,$,b,Z)}return EQ($)}var rq=!1;function sP(b){{if(!rq)rq=!0,H("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node");var z=rP.current;if(z!==null&&z.stateNode!==null){var Q=z.stateNode._warnedAboutRefsInRender;if(!Q)H("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",S1(z.type)||"A component");z.stateNode._warnedAboutRefsInRender=!0}}if(b==null)return null;if(b.nodeType===a4)return b;return mP(b,"findDOMNode")}function eP(b,z,Q){if(H("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!L9(z))throw Error("Target container is not a DOM element.");{var X=Sb(z)&&z._reactRootContainer===void 0;if(X)H("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return lQ(null,b,z,!0,Q)}function bv(b,z,Q){if(H("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!L9(z))throw Error("Target container is not a DOM element.");{var X=Sb(z)&&z._reactRootContainer===void 0;if(X)H("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return lQ(null,b,z,!1,Q)}function zv(b,z,Q,X){if(H("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!L9(Q))throw Error("Target container is not a DOM element.");if(b==null||!xO(b))throw Error("parentComponent must be a valid React Component");return lQ(b,z,Q,!1,X)}var nq=!1;function Qv(b){if(!nq)nq=!0,H("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot");if(!L9(b))throw Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var z=Sb(b)&&b._reactRootContainer===void 0;if(z)H("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(b._reactRootContainer){{var Q=L$(b),X=Q&&!t8(Q);if(X)H("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return h8(function(){lQ(null,null,b,!1,function(){b._reactRootContainer=null,pG(b)})}),!0}else{{var Z=L$(b),J=!!(Z&&t8(Z)),$=b.nodeType===a4&&L9(b.parentNode)&&!!b.parentNode._reactRootContainer;if(J)H("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",$?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}if(aL(uP),nL(gP),tL(EP),sL(h5),eL(iL),typeof Map!=="function"||Map.prototype==null||typeof Map.prototype.forEach!=="function"||typeof Set!=="function"||Set.prototype==null||typeof Set.prototype.clear!=="function"||typeof Set.prototype.forEach!=="function")H("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");VO(b_),mO(jY,aR,h8);function Xv(b,z){var Q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!dQ(z))throw Error("Target container is not a DOM element.");return yP(b,z,null,Q)}function Zv(b,z,Q,X){return zv(b,z,Q,X)}var N$={usingClientEntryPoint:!1,Events:[t8,g3,Iz,YH,$H,jY]};function Jv(b,z){if(!N$.usingClientEntryPoint)H('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return jP(b,z)}function Yv(b,z,Q){if(!N$.usingClientEntryPoint)H('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');return aP(b,z,Q)}function $v(b){if(Xq())H("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.");return h8(b)}var Hv=iP({findFiberByHostInstance:g7,bundleType:1,version:G$,rendererPackageName:"react-dom"});if(!Hv&&J6&&window.top===window.self){if(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1){var tq=window.location.protocol;if(/^(https?|file):$/.test(tq))console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(tq==="file:"?`
145
+ You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}}if(Wv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N$,Wv.createPortal=Xv,Wv.createRoot=Jv,Wv.findDOMNode=sP,Wv.flushSync=$v,Wv.hydrate=eP,Wv.hydrateRoot=Yv,Wv.render=bv,Wv.unmountComponentAtNode=Qv,Wv.unstable_batchedUpdates=jY,Wv.unstable_renderSubtreeIntoContainer=Zv,Wv.version=G$,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==="function")__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var QB=b3((lk,zB)=>{var _v=X0(bB());zB.exports=_v});var XB=b3((Mv)=>{var K2=X0(QB());G2=K2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Mv.createRoot=function(Y,G){G2.usingClientEntryPoint=!0;try{return K2.createRoot(Y,G)}finally{G2.usingClientEntryPoint=!1}},Mv.hydrateRoot=function(Y,G,q){G2.usingClientEntryPoint=!0;try{return K2.hydrateRoot(Y,G,q)}finally{G2.usingClientEntryPoint=!1}};var G2});var Y1=b3((wv)=>{var _$=X0(v1());(function(){var Y=Symbol.for("react.element"),G=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),L=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),f=Symbol.iterator,h="@@iterator";function k(A){if(A===null||typeof A!=="object")return null;var t=f&&A[f]||A[h];if(typeof t==="function")return t;return null}var S=_$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(A){{for(var t=arguments.length,Z0=Array(t>1?t-1:0),P=1;P<t;P++)Z0[P-1]=arguments[P];i("error",A,Z0)}}function i(A,t,Z0){{var P=S.ReactDebugCurrentFrame,u=P.getStackAddendum();if(u!=="")t+="%s",Z0=Z0.concat([u]);var b0=Z0.map(function(U0){return String(U0)});b0.unshift("Warning: "+t),Function.prototype.apply.call(console[A],console,b0)}}var j=!1,o=!1,z0=!1,V=!1,H0=!1,Y0;Y0=Symbol.for("react.module.reference");function K0(A){if(typeof A==="string"||typeof A==="function")return!0;if(A===q||A===H||H0||A===O||A===T||A===F||V||A===W||j||o||z0)return!0;if(typeof A==="object"&&A!==null){if(A.$$typeof===_||A.$$typeof===v||A.$$typeof===w||A.$$typeof===L||A.$$typeof===M||A.$$typeof===Y0||A.getModuleId!==void 0)return!0}return!1}function q0(A,t,Z0){var P=A.displayName;if(P)return P;var u=t.displayName||t.name||"";return u!==""?Z0+"("+u+")":Z0}function B0(A){return A.displayName||"Context"}function J0(A){if(A==null)return null;if(typeof A.tag==="number")C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof A==="function")return A.displayName||A.name||null;if(typeof A==="string")return A;switch(A){case q:return"Fragment";case G:return"Portal";case H:return"Profiler";case O:return"StrictMode";case T:return"Suspense";case F:return"SuspenseList"}if(typeof A==="object")switch(A.$$typeof){case L:var t=A;return B0(t)+".Consumer";case w:var Z0=A;return B0(Z0._context)+".Provider";case M:return q0(A,A.render,"ForwardRef");case v:var P=A.displayName||null;if(P!==null)return P;return J0(A.type)||"Memo";case _:{var u=A,b0=u._payload,U0=u._init;try{return J0(U0(b0))}catch(_0){return null}}}return null}var v0=Object.assign,m0=0,F0,B1,s1,E1,p1,x0,U1;function n(){}n.__reactDisabledLog=!0;function S0(){{if(m0===0){F0=console.log,B1=console.info,s1=console.warn,E1=console.error,p1=console.group,x0=console.groupCollapsed,U1=console.groupEnd;var A={configurable:!0,enumerable:!0,value:n,writable:!0};Object.defineProperties(console,{info:A,log:A,warn:A,error:A,group:A,groupCollapsed:A,groupEnd:A})}m0++}}function u0(){{if(m0--,m0===0){var A={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:v0({},A,{value:F0}),info:v0({},A,{value:B1}),warn:v0({},A,{value:s1}),error:v0({},A,{value:E1}),group:v0({},A,{value:p1}),groupCollapsed:v0({},A,{value:x0}),groupEnd:v0({},A,{value:U1})})}if(m0<0)C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var s0=S.ReactCurrentDispatcher,R0;function t0(A,t,Z0){{if(R0===void 0)try{throw Error()}catch(u){var P=u.stack.trim().match(/\n( *(at )?)/);R0=P&&P[1]||""}return`
146
+ `+R0+A}}var $1=!1,O1;{var f6=typeof WeakMap==="function"?WeakMap:Map;O1=new f6}function J6(A,t){if(!A||$1)return"";{var Z0=O1.get(A);if(Z0!==void 0)return Z0}var P;$1=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var b0;b0=s0.current,s0.current=null,S0();try{if(t){var U0=function(){throw Error()};if(Object.defineProperty(U0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(U0,[])}catch(j1){P=j1}Reflect.construct(A,[],U0)}else{try{U0.call()}catch(j1){P=j1}A.call(U0.prototype)}}else{try{throw Error()}catch(j1){P=j1}A()}}catch(j1){if(j1&&P&&typeof j1.stack==="string"){var _0=j1.stack.split(`
147
+ `),g0=P.stack.split(`
148
+ `),f0=_0.length-1,Q0=g0.length-1;while(f0>=1&&Q0>=0&&_0[f0]!==g0[Q0])Q0--;for(;f0>=1&&Q0>=0;f0--,Q0--)if(_0[f0]!==g0[Q0]){if(f0!==1||Q0!==1)do if(f0--,Q0--,Q0<0||_0[f0]!==g0[Q0]){var L0=`
149
+ `+_0[f0].replace(" at new "," at ");if(A.displayName&&L0.includes("<anonymous>"))L0=L0.replace("<anonymous>",A.displayName);if(typeof A==="function")O1.set(A,L0);return L0}while(f0>=1&&Q0>=0);break}}}finally{$1=!1,s0.current=b0,u0(),Error.prepareStackTrace=u}var c0=A?A.displayName||A.name:"",P1=c0?t0(c0):"";if(typeof A==="function")O1.set(A,P1);return P1}function u6(A,t,Z0){return J6(A,!1)}function g6(A){var t=A.prototype;return!!(t&&t.isReactComponent)}function z6(A,t,Z0){if(A==null)return"";if(typeof A==="function")return J6(A,g6(A));if(typeof A==="string")return t0(A);switch(A){case T:return t0("Suspense");case F:return t0("SuspenseList")}if(typeof A==="object")switch(A.$$typeof){case M:return u6(A.render);case v:return z6(A.type,t,Z0);case _:{var P=A,u=P._payload,b0=P._init;try{return z6(b0(u),t,Z0)}catch(U0){}}}return""}var X1=Object.prototype.hasOwnProperty,l6={},E6=S.ReactDebugCurrentFrame;function _6(A){if(A){var t=A._owner,Z0=z6(A.type,A._source,t?t.type:null);E6.setExtraStackFrame(Z0)}else E6.setExtraStackFrame(null)}function v6(A,t,Z0,P,u){{var b0=Function.call.bind(X1);for(var U0 in A)if(b0(A,U0)){var _0=void 0;try{if(typeof A[U0]!=="function"){var g0=Error((P||"React class")+": "+Z0+" type `"+U0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof A[U0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw g0.name="Invariant Violation",g0}_0=A[U0](t,U0,P,Z0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(f0){_0=f0}if(_0&&!(_0 instanceof Error))_6(u),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",P||"React class",Z0,U0,typeof _0),_6(null);if(_0 instanceof Error&&!(_0.message in l6))l6[_0.message]=!0,_6(u),C("Failed %s type: %s",Z0,_0.message),_6(null)}}}var I5=Array.isArray;function Y6(A){return I5(A)}function O4(A){{var t=typeof Symbol==="function"&&Symbol.toStringTag,Z0=t&&A[Symbol.toStringTag]||A.constructor.name||"Object";return Z0}}function $6(A){try{return L4(A),!1}catch(t){return!0}}function L4(A){return""+A}function L6(A){if($6(A))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",O4(A)),L4(A)}var M6=S.ReactCurrentOwner,J4={key:!0,ref:!0,__self:!0,__source:!0},T4,h6,p6;p6={};function N0(A){if(X1.call(A,"ref")){var t=Object.getOwnPropertyDescriptor(A,"ref").get;if(t&&t.isReactWarning)return!1}return A.ref!==void 0}function d0(A){if(X1.call(A,"key")){var t=Object.getOwnPropertyDescriptor(A,"key").get;if(t&&t.isReactWarning)return!1}return A.key!==void 0}function i0(A,t){if(typeof A.ref==="string"&&M6.current&&t&&M6.current.stateNode!==t){var Z0=J0(M6.current.type);if(!p6[Z0])C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',J0(M6.current.type),A.ref),p6[Z0]=!0}}function T1(A,t){{var Z0=function(){if(!T4)T4=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t)};Z0.isReactWarning=!0,Object.defineProperty(A,"key",{get:Z0,configurable:!0})}}function x1(A,t){{var Z0=function(){if(!h6)h6=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t)};Z0.isReactWarning=!0,Object.defineProperty(A,"ref",{get:Z0,configurable:!0})}}var F6=function(A,t,Z0,P,u,b0,U0){var _0={$$typeof:Y,type:A,key:t,ref:Z0,props:U0,_owner:b0};if(_0._store={},Object.defineProperty(_0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(_0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:P}),Object.defineProperty(_0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:u}),Object.freeze)Object.freeze(_0.props),Object.freeze(_0);return _0};function e1(A,t,Z0,P,u){{var b0,U0={},_0=null,g0=null;if(Z0!==void 0)L6(Z0),_0=""+Z0;if(d0(t))L6(t.key),_0=""+t.key;if(N0(t))g0=t.ref,i0(t,u);for(b0 in t)if(X1.call(t,b0)&&!J4.hasOwnProperty(b0))U0[b0]=t[b0];if(A&&A.defaultProps){var f0=A.defaultProps;for(b0 in f0)if(U0[b0]===void 0)U0[b0]=f0[b0]}if(_0||g0){var Q0=typeof A==="function"?A.displayName||A.name||"Unknown":A;if(_0)T1(U0,Q0);if(g0)x1(U0,Q0)}return F6(A,_0,g0,u,P,M6.current,U0)}}var{ReactCurrentOwner:c6,ReactDebugCurrentFrame:H1}=S;function Z1(A){if(A){var t=A._owner,Z0=z6(A.type,A._source,t?t.type:null);H1.setExtraStackFrame(Z0)}else H1.setExtraStackFrame(null)}var m4=!1;function Y4(A){return typeof A==="object"&&A!==null&&A.$$typeof===Y}function u4(){{if(c6.current){var A=J0(c6.current.type);if(A)return`
150
+
151
+ Check the render method of \``+A+"`."}return""}}function j5(A){{if(A!==void 0){var t=A.fileName.replace(/^.*[\\\/]/,""),Z0=A.lineNumber;return`
152
+
153
+ Check your code at `+t+":"+Z0+"."}return""}}var T5={};function o5(A){{var t=u4();if(!t){var Z0=typeof A==="string"?A:A.displayName||A.name;if(Z0)t=`
154
+
155
+ Check the top-level render call using <`+Z0+">."}return t}}function q5(A,t){{if(!A._store||A._store.validated||A.key!=null)return;A._store.validated=!0;var Z0=o5(t);if(T5[Z0])return;T5[Z0]=!0;var P="";if(A&&A._owner&&A._owner!==c6.current)P=" It was passed a child from "+J0(A._owner.type)+".";Z1(A),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Z0,P),Z1(null)}}function f4(A,t){{if(typeof A!=="object")return;if(Y6(A))for(var Z0=0;Z0<A.length;Z0++){var P=A[Z0];if(Y4(P))q5(P,t)}else if(Y4(A)){if(A._store)A._store.validated=!0}else if(A){var u=k(A);if(typeof u==="function"){if(u!==A.entries){var b0=u.call(A),U0;while(!(U0=b0.next()).done)if(Y4(U0.value))q5(U0.value,t)}}}}}function f5(A){{var t=A.type;if(t===null||t===void 0||typeof t==="string")return;var Z0;if(typeof t==="function")Z0=t.propTypes;else if(typeof t==="object"&&(t.$$typeof===M||t.$$typeof===v))Z0=t.propTypes;else return;if(Z0){var P=J0(t);v6(Z0,A.props,"prop",P,A)}else if(t.PropTypes!==void 0&&!m4){m4=!0;var u=J0(t);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",u||"Unknown")}if(typeof t.getDefaultProps==="function"&&!t.getDefaultProps.isReactClassApproved)C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function R1(A){{var t=Object.keys(A.props);for(var Z0=0;Z0<t.length;Z0++){var P=t[Z0];if(P!=="children"&&P!=="key"){Z1(A),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",P),Z1(null);break}}if(A.ref!==null)Z1(A),C("Invalid attribute `ref` supplied to `React.Fragment`."),Z1(null)}}var i1={};function Q6(A,t,Z0,P,u,b0){{var U0=K0(A);if(!U0){var _0="";if(A===void 0||typeof A==="object"&&A!==null&&Object.keys(A).length===0)_0+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var g0=j5(u);if(g0)_0+=g0;else _0+=u4();var f0;if(A===null)f0="null";else if(Y6(A))f0="array";else if(A!==void 0&&A.$$typeof===Y)f0="<"+(J0(A.type)||"Unknown")+" />",_0=" Did you accidentally export a JSX literal instead of a component?";else f0=typeof A;C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",f0,_0)}var Q0=e1(A,t,Z0,u,b0);if(Q0==null)return Q0;if(U0){var L0=t.children;if(L0!==void 0)if(P)if(Y6(L0)){for(var c0=0;c0<L0.length;c0++)f4(L0[c0],A);if(Object.freeze)Object.freeze(L0)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f4(L0,A)}if(X1.call(t,"key")){var P1=J0(A),j1=Object.keys(t).filter(function(N6){return N6!=="key"}),g4=j1.length>0?"{key: someKey, "+j1.join(": ..., ")+": ...}":"{key: someKey}";if(!i1[P1+g4]){var z5=j1.length>0?"{"+j1.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
156
+ let props = %s;
157
+ <%s {...props} />
158
+ React keys must be passed directly to JSX without using spread:
159
+ let props = %s;
160
+ <%s key={someKey} {...props} />`,g4,P1,z5,P1),i1[P1+g4]=!0}}if(A===q)R1(Q0);else f5(Q0);return Q0}}var h1=Q6;wv.Fragment=q,wv.jsxDEV=h1})()});var B6=b3((OF)=>{var h$=X0(v1());(function(){var Y=Symbol.for("react.element"),G=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),L=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),F=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),W=Symbol.for("react.offscreen"),f=Symbol.iterator,h="@@iterator";function k(P){if(P===null||typeof P!=="object")return null;var u=f&&P[f]||P[h];if(typeof u==="function")return u;return null}var S=h$.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function C(P){{for(var u=arguments.length,b0=Array(u>1?u-1:0),U0=1;U0<u;U0++)b0[U0-1]=arguments[U0];i("error",P,b0)}}function i(P,u,b0){{var U0=S.ReactDebugCurrentFrame,_0=U0.getStackAddendum();if(_0!=="")u+="%s",b0=b0.concat([_0]);var g0=b0.map(function(f0){return String(f0)});g0.unshift("Warning: "+u),Function.prototype.apply.call(console[P],console,g0)}}var j=!1,o=!1,z0=!1,V=!1,H0=!1,Y0;Y0=Symbol.for("react.module.reference");function K0(P){if(typeof P==="string"||typeof P==="function")return!0;if(P===q||P===H||H0||P===O||P===T||P===F||V||P===W||j||o||z0)return!0;if(typeof P==="object"&&P!==null){if(P.$$typeof===_||P.$$typeof===v||P.$$typeof===w||P.$$typeof===L||P.$$typeof===M||P.$$typeof===Y0||P.getModuleId!==void 0)return!0}return!1}function q0(P,u,b0){var U0=P.displayName;if(U0)return U0;var _0=u.displayName||u.name||"";return _0!==""?b0+"("+_0+")":b0}function B0(P){return P.displayName||"Context"}function J0(P){if(P==null)return null;if(typeof P.tag==="number")C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");if(typeof P==="function")return P.displayName||P.name||null;if(typeof P==="string")return P;switch(P){case q:return"Fragment";case G:return"Portal";case H:return"Profiler";case O:return"StrictMode";case T:return"Suspense";case F:return"SuspenseList"}if(typeof P==="object")switch(P.$$typeof){case L:var u=P;return B0(u)+".Consumer";case w:var b0=P;return B0(b0._context)+".Provider";case M:return q0(P,P.render,"ForwardRef");case v:var U0=P.displayName||null;if(U0!==null)return U0;return J0(P.type)||"Memo";case _:{var _0=P,g0=_0._payload,f0=_0._init;try{return J0(f0(g0))}catch(Q0){return null}}}return null}var v0=Object.assign,m0=0,F0,B1,s1,E1,p1,x0,U1;function n(){}n.__reactDisabledLog=!0;function S0(){{if(m0===0){F0=console.log,B1=console.info,s1=console.warn,E1=console.error,p1=console.group,x0=console.groupCollapsed,U1=console.groupEnd;var P={configurable:!0,enumerable:!0,value:n,writable:!0};Object.defineProperties(console,{info:P,log:P,warn:P,error:P,group:P,groupCollapsed:P,groupEnd:P})}m0++}}function u0(){{if(m0--,m0===0){var P={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:v0({},P,{value:F0}),info:v0({},P,{value:B1}),warn:v0({},P,{value:s1}),error:v0({},P,{value:E1}),group:v0({},P,{value:p1}),groupCollapsed:v0({},P,{value:x0}),groupEnd:v0({},P,{value:U1})})}if(m0<0)C("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var s0=S.ReactCurrentDispatcher,R0;function t0(P,u,b0){{if(R0===void 0)try{throw Error()}catch(_0){var U0=_0.stack.trim().match(/\n( *(at )?)/);R0=U0&&U0[1]||""}return`
161
+ `+R0+P}}var $1=!1,O1;{var f6=typeof WeakMap==="function"?WeakMap:Map;O1=new f6}function J6(P,u){if(!P||$1)return"";{var b0=O1.get(P);if(b0!==void 0)return b0}var U0;$1=!0;var _0=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var g0;g0=s0.current,s0.current=null,S0();try{if(u){var f0=function(){throw Error()};if(Object.defineProperty(f0.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(f0,[])}catch(N6){U0=N6}Reflect.construct(P,[],f0)}else{try{f0.call()}catch(N6){U0=N6}P.call(f0.prototype)}}else{try{throw Error()}catch(N6){U0=N6}P()}}catch(N6){if(N6&&U0&&typeof N6.stack==="string"){var Q0=N6.stack.split(`
162
+ `),L0=U0.stack.split(`
163
+ `),c0=Q0.length-1,P1=L0.length-1;while(c0>=1&&P1>=0&&Q0[c0]!==L0[P1])P1--;for(;c0>=1&&P1>=0;c0--,P1--)if(Q0[c0]!==L0[P1]){if(c0!==1||P1!==1)do if(c0--,P1--,P1<0||Q0[c0]!==L0[P1]){var j1=`
164
+ `+Q0[c0].replace(" at new "," at ");if(P.displayName&&j1.includes("<anonymous>"))j1=j1.replace("<anonymous>",P.displayName);if(typeof P==="function")O1.set(P,j1);return j1}while(c0>=1&&P1>=0);break}}}finally{$1=!1,s0.current=g0,u0(),Error.prepareStackTrace=_0}var g4=P?P.displayName||P.name:"",z5=g4?t0(g4):"";if(typeof P==="function")O1.set(P,z5);return z5}function u6(P,u,b0){return J6(P,!1)}function g6(P){var u=P.prototype;return!!(u&&u.isReactComponent)}function z6(P,u,b0){if(P==null)return"";if(typeof P==="function")return J6(P,g6(P));if(typeof P==="string")return t0(P);switch(P){case T:return t0("Suspense");case F:return t0("SuspenseList")}if(typeof P==="object")switch(P.$$typeof){case M:return u6(P.render);case v:return z6(P.type,u,b0);case _:{var U0=P,_0=U0._payload,g0=U0._init;try{return z6(g0(_0),u,b0)}catch(f0){}}}return""}var X1=Object.prototype.hasOwnProperty,l6={},E6=S.ReactDebugCurrentFrame;function _6(P){if(P){var u=P._owner,b0=z6(P.type,P._source,u?u.type:null);E6.setExtraStackFrame(b0)}else E6.setExtraStackFrame(null)}function v6(P,u,b0,U0,_0){{var g0=Function.call.bind(X1);for(var f0 in P)if(g0(P,f0)){var Q0=void 0;try{if(typeof P[f0]!=="function"){var L0=Error((U0||"React class")+": "+b0+" type `"+f0+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof P[f0]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw L0.name="Invariant Violation",L0}Q0=P[f0](u,f0,U0,b0,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(c0){Q0=c0}if(Q0&&!(Q0 instanceof Error))_6(_0),C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",U0||"React class",b0,f0,typeof Q0),_6(null);if(Q0 instanceof Error&&!(Q0.message in l6))l6[Q0.message]=!0,_6(_0),C("Failed %s type: %s",b0,Q0.message),_6(null)}}}var I5=Array.isArray;function Y6(P){return I5(P)}function O4(P){{var u=typeof Symbol==="function"&&Symbol.toStringTag,b0=u&&P[Symbol.toStringTag]||P.constructor.name||"Object";return b0}}function $6(P){try{return L4(P),!1}catch(u){return!0}}function L4(P){return""+P}function L6(P){if($6(P))return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",O4(P)),L4(P)}var M6=S.ReactCurrentOwner,J4={key:!0,ref:!0,__self:!0,__source:!0},T4,h6,p6;p6={};function N0(P){if(X1.call(P,"ref")){var u=Object.getOwnPropertyDescriptor(P,"ref").get;if(u&&u.isReactWarning)return!1}return P.ref!==void 0}function d0(P){if(X1.call(P,"key")){var u=Object.getOwnPropertyDescriptor(P,"key").get;if(u&&u.isReactWarning)return!1}return P.key!==void 0}function i0(P,u){if(typeof P.ref==="string"&&M6.current&&u&&M6.current.stateNode!==u){var b0=J0(M6.current.type);if(!p6[b0])C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',J0(M6.current.type),P.ref),p6[b0]=!0}}function T1(P,u){{var b0=function(){if(!T4)T4=!0,C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u)};b0.isReactWarning=!0,Object.defineProperty(P,"key",{get:b0,configurable:!0})}}function x1(P,u){{var b0=function(){if(!h6)h6=!0,C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",u)};b0.isReactWarning=!0,Object.defineProperty(P,"ref",{get:b0,configurable:!0})}}var F6=function(P,u,b0,U0,_0,g0,f0){var Q0={$$typeof:Y,type:P,key:u,ref:b0,props:f0,_owner:g0};if(Q0._store={},Object.defineProperty(Q0._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Q0,"_self",{configurable:!1,enumerable:!1,writable:!1,value:U0}),Object.defineProperty(Q0,"_source",{configurable:!1,enumerable:!1,writable:!1,value:_0}),Object.freeze)Object.freeze(Q0.props),Object.freeze(Q0);return Q0};function e1(P,u,b0,U0,_0){{var g0,f0={},Q0=null,L0=null;if(b0!==void 0)L6(b0),Q0=""+b0;if(d0(u))L6(u.key),Q0=""+u.key;if(N0(u))L0=u.ref,i0(u,_0);for(g0 in u)if(X1.call(u,g0)&&!J4.hasOwnProperty(g0))f0[g0]=u[g0];if(P&&P.defaultProps){var c0=P.defaultProps;for(g0 in c0)if(f0[g0]===void 0)f0[g0]=c0[g0]}if(Q0||L0){var P1=typeof P==="function"?P.displayName||P.name||"Unknown":P;if(Q0)T1(f0,P1);if(L0)x1(f0,P1)}return F6(P,Q0,L0,_0,U0,M6.current,f0)}}var{ReactCurrentOwner:c6,ReactDebugCurrentFrame:H1}=S;function Z1(P){if(P){var u=P._owner,b0=z6(P.type,P._source,u?u.type:null);H1.setExtraStackFrame(b0)}else H1.setExtraStackFrame(null)}var m4=!1;function Y4(P){return typeof P==="object"&&P!==null&&P.$$typeof===Y}function u4(){{if(c6.current){var P=J0(c6.current.type);if(P)return`
165
+
166
+ Check the render method of \``+P+"`."}return""}}function j5(P){{if(P!==void 0){var u=P.fileName.replace(/^.*[\\\/]/,""),b0=P.lineNumber;return`
167
+
168
+ Check your code at `+u+":"+b0+"."}return""}}var T5={};function o5(P){{var u=u4();if(!u){var b0=typeof P==="string"?P:P.displayName||P.name;if(b0)u=`
169
+
170
+ Check the top-level render call using <`+b0+">."}return u}}function q5(P,u){{if(!P._store||P._store.validated||P.key!=null)return;P._store.validated=!0;var b0=o5(u);if(T5[b0])return;T5[b0]=!0;var U0="";if(P&&P._owner&&P._owner!==c6.current)U0=" It was passed a child from "+J0(P._owner.type)+".";Z1(P),C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',b0,U0),Z1(null)}}function f4(P,u){{if(typeof P!=="object")return;if(Y6(P))for(var b0=0;b0<P.length;b0++){var U0=P[b0];if(Y4(U0))q5(U0,u)}else if(Y4(P)){if(P._store)P._store.validated=!0}else if(P){var _0=k(P);if(typeof _0==="function"){if(_0!==P.entries){var g0=_0.call(P),f0;while(!(f0=g0.next()).done)if(Y4(f0.value))q5(f0.value,u)}}}}}function f5(P){{var u=P.type;if(u===null||u===void 0||typeof u==="string")return;var b0;if(typeof u==="function")b0=u.propTypes;else if(typeof u==="object"&&(u.$$typeof===M||u.$$typeof===v))b0=u.propTypes;else return;if(b0){var U0=J0(u);v6(b0,P.props,"prop",U0,P)}else if(u.PropTypes!==void 0&&!m4){m4=!0;var _0=J0(u);C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",_0||"Unknown")}if(typeof u.getDefaultProps==="function"&&!u.getDefaultProps.isReactClassApproved)C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function R1(P){{var u=Object.keys(P.props);for(var b0=0;b0<u.length;b0++){var U0=u[b0];if(U0!=="children"&&U0!=="key"){Z1(P),C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",U0),Z1(null);break}}if(P.ref!==null)Z1(P),C("Invalid attribute `ref` supplied to `React.Fragment`."),Z1(null)}}var i1={};function Q6(P,u,b0,U0,_0,g0){{var f0=K0(P);if(!f0){var Q0="";if(P===void 0||typeof P==="object"&&P!==null&&Object.keys(P).length===0)Q0+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";var L0=j5(_0);if(L0)Q0+=L0;else Q0+=u4();var c0;if(P===null)c0="null";else if(Y6(P))c0="array";else if(P!==void 0&&P.$$typeof===Y)c0="<"+(J0(P.type)||"Unknown")+" />",Q0=" Did you accidentally export a JSX literal instead of a component?";else c0=typeof P;C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c0,Q0)}var P1=e1(P,u,b0,_0,g0);if(P1==null)return P1;if(f0){var j1=u.children;if(j1!==void 0)if(U0)if(Y6(j1)){for(var g4=0;g4<j1.length;g4++)f4(j1[g4],P);if(Object.freeze)Object.freeze(j1)}else C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f4(j1,P)}if(X1.call(u,"key")){var z5=J0(P),N6=Object.keys(u).filter(function(a5){return a5!=="key"}),L1=N6.length>0?"{key: someKey, "+N6.join(": ..., ")+": ...}":"{key: someKey}";if(!i1[z5+L1]){var K8=N6.length>0?"{"+N6.join(": ..., ")+": ...}":"{}";C(`A props object containing a "key" prop is being spread into JSX:
171
+ let props = %s;
172
+ <%s {...props} />
173
+ React keys must be passed directly to JSX without using spread:
174
+ let props = %s;
175
+ <%s key={someKey} {...props} />`,L1,z5,K8,z5),i1[z5+L1]=!0}}if(P===q)R1(P1);else f5(P1);return P1}}function h1(P,u,b0){return Q6(P,u,b0,!0)}function A(P,u,b0){return Q6(P,u,b0,!1)}var t=A,Z0=h1;OF.Fragment=q,OF.jsx=t,OF.jsxs=Z0})()});var k5=X0(v1(),1),xB=X0(XB(),1);var W$={memory:!0,tasks:!1,vision:!0,operator:!1,mcp:!1,realtime:!1,files:!1,agents:!1};var X4=X0(v1(),1),JB=X0(Y1(),1),ZB=X4.createContext(null),Rv=200;function M$({children:Y}){let[G,q]=X4.useState(!1),[O,H]=X4.useState([]),[w,L]=X4.useState({}),[M,T]=X4.useState({}),F=X4.useRef(null),v=X4.useRef(null);X4.useEffect(()=>{let f=setInterval(()=>{let h=Date.now();T((k)=>{let S={};for(let[C,i]of Object.entries(k))if(i.expiresAt>h)S[C]=i;return S})},500);return()=>clearInterval(f)},[]);let _=X4.useCallback(()=>{if(F.current)F.current.close(),F.current=null;try{let f=new EventSource("/api/telemetry/stream");F.current=f,f.onopen=()=>{q(!0)},f.onmessage=(h)=>{if(!h.data||h.data.trim()==="")return;try{let k=JSON.parse(h.data);if(k.connected){q(!0);return}if(Array.isArray(k))H((S)=>{return[...k,...S].slice(0,Rv)}),L((S)=>{let C={...S};for(let i of k){let j=C[i.agent_id];if(!j||new Date(i.timestamp)>new Date(j.timestamp))C[i.agent_id]={timestamp:i.timestamp,category:i.category,type:i.type}}return C}),T((S)=>{let C={...S},i=Date.now()+3000;for(let j of k)C[j.agent_id]={type:j.type,expiresAt:i};return C})}catch{}},f.onerror=()=>{if(q(!1),f.close(),F.current=null,v.current)clearTimeout(v.current);v.current=setTimeout(_,2000)}}catch{if(q(!1),v.current)clearTimeout(v.current);v.current=setTimeout(_,2000)}},[]);X4.useEffect(()=>{return _(),()=>{if(F.current)F.current.close();if(v.current)clearTimeout(v.current)}},[_]);let W=X4.useCallback(()=>{H([])},[]);return JB.jsxDEV(ZB.Provider,{value:{connected:G,events:O,lastActivityByAgent:w,activeAgents:M,clearEvents:W},children:Y},void 0,!1,void 0,this)}function U2(){let Y=X4.useContext(ZB);if(!Y)throw Error("useTelemetryContext must be used within TelemetryProvider");return Y}function _9(Y){let{activeAgents:G}=U2(),q=G[Y];return{isActive:!!q,type:q?.type}}var A6=X0(v1(),1),$B=X0(Y1(),1),YB=A6.createContext(null);function d1(){let Y=A6.useContext(YB);if(!Y)throw Error("useAuth must be used within an AuthProvider");return Y}function w$({children:Y}){let[G,q]=A6.useState(null),[O,H]=A6.useState(null),[w,L]=A6.useState(!0),[M,T]=A6.useState(null),F=A6.useRef(null),v=A6.useRef(!1),_=A6.useRef(!1),W=A6.useCallback((o)=>{F.current=o,H(o)},[]),f=A6.useCallback(async()=>{if(v.current)return!1;v.current=!0;try{let o=await fetch("/api/auth/refresh",{method:"POST",credentials:"include"});if(!o.ok)return!1;let z0=await o.json();W(z0.accessToken);let V=await fetch("/api/auth/me",{headers:{Authorization:`Bearer ${z0.accessToken}`}});if(V.ok){let H0=await V.json();return q(H0.user),!0}return!1}catch(o){return console.error("Token refresh failed:",o),!1}finally{v.current=!1}},[W]),h=A6.useCallback(async()=>{try{let o=F.current,V=await(await fetch("/api/auth/check",{headers:o?{Authorization:`Bearer ${o}`}:{}})).json();if(T(V.hasUsers),V.authenticated&&V.user)q(V.user);else if(q(null),V.hasUsers){if(!await f())W(null)}}catch(o){console.error("Auth check failed:",o),q(null),W(null)}finally{L(!1)}},[f,W]),k=A6.useCallback(async(o,z0)=>{try{let V=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:o,password:z0})}),H0=await V.json();if(!V.ok)return{success:!1,error:H0.error||"Login failed"};return W(H0.accessToken),q(H0.user),T(!0),{success:!0}}catch(V){return console.error("Login failed:",V),{success:!1,error:"Login failed"}}},[W]),S=A6.useCallback(async()=>{try{let o=F.current;await fetch("/api/auth/logout",{method:"POST",credentials:"include",headers:o?{Authorization:`Bearer ${o}`}:{}})}catch(o){console.error("Logout failed:",o)}finally{q(null),W(null)}},[W]),C=A6.useCallback(async(o,z0={})=>{let V=new Headers(z0.headers),H0=F.current;if(H0)V.set("Authorization",`Bearer ${H0}`);return fetch(o,{...z0,headers:V})},[]),i=A6.useCallback(async()=>{return f()},[f]);A6.useEffect(()=>{if(_.current)return;_.current=!0,h()},[h]),A6.useEffect(()=>{if(!O)return;let o=setInterval(()=>{f()},840000);return()=>clearInterval(o)},[O,f]);let j={user:G,isAuthenticated:!!G,isLoading:w,hasUsers:M,accessToken:O,login:k,logout:S,refreshToken:i,checkAuth:h,authFetch:C};return $B.jsxDEV(YB.Provider,{value:j,children:Y},void 0,!1,void 0,this)}var q4=X0(v1(),1);var GB=X0(Y1(),1),HB=q4.createContext(null);function B4(){let Y=q4.useContext(HB);if(!Y)throw Error("useProjects must be used within a ProjectProvider");return Y}var R$="apteva_current_project";function P$({children:Y}){let{authFetch:G,isAuthenticated:q,isLoading:O}=d1(),[H,w]=q4.useState([]),[L,M]=q4.useState(()=>{if(typeof window<"u")return localStorage.getItem(R$);return null}),[T,F]=q4.useState(!0),[v,_]=q4.useState(null),[W,f]=q4.useState(0),h=q4.useCallback((z0)=>{if(M(z0),typeof window<"u")if(z0===null)localStorage.removeItem(R$);else localStorage.setItem(R$,z0)},[]),k=H.find((z0)=>z0.id===L)||null,S=q4.useCallback(async()=>{if(!q&&!O){w([]),F(!1);return}try{_(null);let z0=await G("/api/projects");if(!z0.ok)throw Error("Failed to fetch projects");let V=await z0.json();if(w(V.projects||[]),f(V.unassignedCount||0),L&&L!=="unassigned"&&!V.projects.find((H0)=>H0.id===L))h(null)}catch(z0){console.error("Failed to fetch projects:",z0),_("Failed to load projects")}finally{F(!1)}},[G,q,O,L,h]),C=q4.useCallback(async(z0)=>{try{let V=await G("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(z0)});if(!V.ok){let Y0=await V.json();throw Error(Y0.error||"Failed to create project")}let H0=await V.json();return await S(),H0.project}catch(V){return console.error("Failed to create project:",V),null}},[G,S]),i=q4.useCallback(async(z0,V)=>{try{let H0=await G(`/api/projects/${z0}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)});if(!H0.ok){let K0=await H0.json();throw Error(K0.error||"Failed to update project")}let Y0=await H0.json();return await S(),Y0.project}catch(H0){return console.error("Failed to update project:",H0),null}},[G,S]),j=q4.useCallback(async(z0)=>{try{let V=await G(`/api/projects/${z0}`,{method:"DELETE"});if(!V.ok){let H0=await V.json();throw Error(H0.error||"Failed to delete project")}if(L===z0)h(null);return await S(),!0}catch(V){return console.error("Failed to delete project:",V),!1}},[G,L,h,S]);q4.useEffect(()=>{if(!O)S()},[O,S]);let o={projects:H,currentProjectId:L,currentProject:k,isLoading:T,error:v,unassignedCount:W,setCurrentProjectId:h,createProject:C,updateProject:i,deleteProject:j,refreshProjects:S};return GB.jsxDEV(HB.Provider,{value:o,children:Y},void 0,!1,void 0,this)}var B7=X0(v1(),1);function v$(Y){let{accessToken:G}=d1(),[q,O]=B7.useState([]),[H,w]=B7.useState(!0),L=B7.useCallback(()=>{let f={"Content-Type":"application/json"};if(G)f.Authorization=`Bearer ${G}`;return f},[G]),M=B7.useCallback(async()=>{let h=await(await fetch("/api/agents",{headers:L()})).json();O(h.agents||[]),w(!1)},[L]);B7.useEffect(()=>{if(Y)M()},[Y,M]);let T=async(f)=>{await fetch("/api/agents",{method:"POST",headers:L(),body:JSON.stringify(f)}),await M()},F=async(f)=>{await fetch(`/api/agents/${f}`,{method:"DELETE",headers:L()}),await M()},v=async(f,h)=>{let k=await fetch(`/api/agents/${f}`,{method:"PUT",headers:L(),body:JSON.stringify(h)}),S=await k.json();if(await M(),!k.ok&&S.error)return{error:S.error};return{}},_=async(f)=>{let h=f.status==="running"?"stop":"start",k=await fetch(`/api/agents/${f.id}/${h}`,{method:"POST",headers:L()}),S=await k.json();if(await M(),!k.ok&&S.error)return{error:S.error};return{}},W=q.filter((f)=>f.status==="running").length;return{agents:q,loading:H,runningCount:W,fetchAgents:M,createAgent:T,updateAgent:v,deleteAgent:F,toggleAgent:_}}var Q3=X0(v1(),1);function F$(Y){let{accessToken:G}=d1(),[q,O]=Q3.useState([]),H=Q3.useCallback(()=>{let F={"Content-Type":"application/json"};if(G)F.Authorization=`Bearer ${G}`;return F},[G]),w=Q3.useCallback(async()=>{let v=await(await fetch("/api/providers",{headers:H()})).json();O(v.providers||[])},[H]);Q3.useEffect(()=>{if(Y)w()},[Y,w]);let L=q.filter((F)=>F.hasKey);return{providers:q,configuredProviders:L,fetchProviders:w,saveKey:async(F,v)=>{let W=await(await fetch(`/api/keys/${F}/test`,{method:"POST",headers:H(),body:JSON.stringify({key:v})})).json();if(!W.valid)return{success:!1,error:W.error||"API key is invalid"};let f=await fetch(`/api/keys/${F}`,{method:"POST",headers:H(),body:JSON.stringify({key:v})});if(!f.ok)return{success:!1,error:(await f.json()).error||"Failed to save key"};return await w(),{success:!0}},deleteKey:async(F)=>{await fetch(`/api/keys/${F}`,{method:"DELETE",headers:H()}),await w()}}}var X3=X0(v1(),1);function A$(){let{accessToken:Y,isAuthenticated:G}=d1(),[q,O]=X3.useState(null),H=X3.useCallback(()=>{let L={};if(Y)L.Authorization=`Bearer ${Y}`;return L},[Y]);X3.useEffect(()=>{if(!G){O(null);return}fetch("/api/onboarding/status",{headers:H()}).then((L)=>L.json()).then((L)=>{O(L.completed||L.has_any_keys)}).catch(()=>O(!0))},[G,H]);let w=X3.useCallback(async()=>{await fetch("/api/onboarding/complete",{method:"POST",headers:H()}),O(!0)},[H]);return{isComplete:q,setIsComplete:O,complete:w}}var O7=X0(Y1(),1);function Z3({message:Y="Loading...",fullScreen:G=!1}){let q=O7.jsxDEV("div",{className:"flex items-center gap-3 text-[#666]",children:[O7.jsxDEV("svg",{className:"animate-spin h-5 w-5",viewBox:"0 0 24 24",children:[O7.jsxDEV("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"},void 0,!1,void 0,this),O7.jsxDEV("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O7.jsxDEV("span",{children:Y},void 0,!1,void 0,this)]},void 0,!0,void 0,this);if(G)return O7.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center",children:q},void 0,!1,void 0,this);return O7.jsxDEV("div",{className:"flex items-center justify-center py-20",children:q},void 0,!1,void 0,this)}var k$=X0(Y1(),1);function q2({children:Y,onClose:G}){return k$.jsxDEV("div",{className:"fixed inset-0 bg-black/70 flex items-center justify-center z-50 p-4",children:k$.jsxDEV("div",{className:"bg-[#111] rounded p-6 w-full max-w-xl lg:max-w-2xl border border-[#1a1a1a] max-h-[90vh] overflow-y-auto",children:Y},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var B2=X0(v1(),1),k4=X0(Y1(),1);function R5({value:Y,options:G,onChange:q,placeholder:O="Select..."}){let[H,w]=B2.useState(!1),L=B2.useRef(null),M=G.find((T)=>T.value===Y);return B2.useEffect(()=>{function T(F){if(L.current&&!L.current.contains(F.target))w(!1)}return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]),k4.jsxDEV("div",{ref:L,className:"relative",children:[k4.jsxDEV("button",{type:"button",onClick:()=>w(!H),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 text-left flex items-center justify-between focus:outline-none focus:border-[#f97316] text-[#e0e0e0] hover:border-[#333] transition",children:[k4.jsxDEV("span",{className:M?"text-[#e0e0e0]":"text-[#666]",children:M?k4.jsxDEV(k4.Fragment,{children:[M.label,M.recommended&&k4.jsxDEV("span",{className:"text-[#f97316] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):O},void 0,!1,void 0,this),k4.jsxDEV(Pv,{isOpen:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H&&k4.jsxDEV("div",{className:"absolute z-50 w-full min-w-max mt-1 bg-[#111] border border-[#222] rounded shadow-lg max-h-60 overflow-y-auto scrollbar-hide",children:G.map((T)=>k4.jsxDEV("button",{type:"button",onClick:()=>{q(T.value),w(!1)},className:`w-full px-3 py-2 text-left flex items-center justify-between hover:bg-[#1a1a1a] transition ${T.value===Y?"bg-[#1a1a1a] text-[#f97316]":"text-[#e0e0e0]"}`,children:[k4.jsxDEV("span",{children:[T.label,T.recommended&&k4.jsxDEV("span",{className:"text-[#f97316] text-xs ml-2",children:"(Recommended)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),T.value===Y&&k4.jsxDEV("svg",{className:"w-4 h-4 text-[#f97316]",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:k4.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},T.value,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Pv({isOpen:Y}){return k4.jsxDEV("svg",{className:`w-4 h-4 text-[#666] transition-transform ${Y?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:k4.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var I1=X0(Y1(),1);function P5({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function L7({className:Y="w-5 h-5"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function xQ({className:Y="w-5 h-5"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function iQ({className:Y="w-5 h-5"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function jQ({className:Y="w-5 h-5"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"},void 0,!1,void 0,this),I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function J3({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function v5({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function Y3({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"},void 0,!1,void 0,this),I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function $3({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function F5({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function H3({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 11a7 7 0 01-7 7m0 0a7 7 0 01-7-7m7 7v4m0 0H8m4 0h4m-4-8a3 3 0 01-3-3V5a3 3 0 116 0v6a3 3 0 01-3 3z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function I$({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function O2({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function L2({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function KB({className:Y="w-5 h-5"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function UB({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function qB({className:Y="w-4 h-4"}){return I1.jsxDEV("svg",{className:Y,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:I1.jsxDEV("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var T$=X0(v1(),1);var M1=X0(Y1(),1);function oQ({onMenuClick:Y}){let{connected:G}=U2(),{user:q,logout:O}=d1(),{projects:H,currentProjectId:w,currentProject:L,setCurrentProjectId:M,unassignedCount:T}=B4(),[F,v]=T$.useState(!1),[_,W]=T$.useState(!1),f=async()=>{await O(),v(!1)},h=(C)=>{M(C),W(!1)},k=()=>{if(w===null)return"All Projects";if(w==="unassigned")return"Unassigned";return L?.name||"Select Project"},S=()=>{if(w===null)return"#666";if(w==="unassigned")return"#888";return L?.color||"#6366f1"};return M1.jsxDEV("header",{className:"border-b border-[#1a1a1a] px-4 md:px-6 py-4 flex-shrink-0",children:M1.jsxDEV("div",{className:"flex items-center justify-between",children:[M1.jsxDEV("div",{className:"flex items-center gap-3",children:[M1.jsxDEV("button",{onClick:Y,className:"p-2 -ml-2 text-[#666] hover:text-[#e0e0e0] transition md:hidden",children:M1.jsxDEV(KB,{},void 0,!1,void 0,this)},void 0,!1,void 0,this),M1.jsxDEV("div",{className:"flex items-center gap-2",children:[M1.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),M1.jsxDEV("span",{className:"text-xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H.length>0&&M1.jsxDEV("div",{className:"relative ml-2 md:ml-4",children:[M1.jsxDEV("button",{onClick:()=>W(!_),className:"flex items-center gap-2 px-3 py-1.5 rounded border border-[#222] bg-[#111] hover:bg-[#1a1a1a] transition text-sm",children:[M1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:S()}},void 0,!1,void 0,this),M1.jsxDEV("span",{className:"hidden sm:inline max-w-[120px] md:max-w-[180px] truncate",children:k()},void 0,!1,void 0,this),M1.jsxDEV(UB,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_&&M1.jsxDEV("div",{className:"absolute left-0 top-full mt-1 w-56 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:M1.jsxDEV("div",{className:"py-1 max-h-64 overflow-y-auto",children:[M1.jsxDEV("button",{onClick:()=>h(null),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${w===null?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[M1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full bg-[#666]"},void 0,!1,void 0,this),"All Projects"]},void 0,!0,void 0,this),H.map((C)=>M1.jsxDEV("button",{onClick:()=>h(C.id),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${w===C.id?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[M1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:C.color}},void 0,!1,void 0,this),M1.jsxDEV("span",{className:"truncate",children:C.name},void 0,!1,void 0,this),M1.jsxDEV("span",{className:"ml-auto text-xs text-[#666]",children:C.agentCount},void 0,!1,void 0,this)]},C.id,!0,void 0,this)),T>0&&M1.jsxDEV("button",{onClick:()=>h("unassigned"),className:`w-full px-4 py-2 text-left text-sm flex items-center gap-2 hover:bg-[#1a1a1a] transition ${w==="unassigned"?"bg-[#1a1a1a] text-[#f97316]":""}`,children:[M1.jsxDEV("span",{className:"w-2.5 h-2.5 rounded-full bg-[#888]"},void 0,!1,void 0,this),M1.jsxDEV("span",{className:"truncate",children:"Unassigned"},void 0,!1,void 0,this),M1.jsxDEV("span",{className:"ml-auto text-xs text-[#666]",children:T},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),M1.jsxDEV("div",{className:"flex items-center gap-3 md:gap-4",children:[M1.jsxDEV("div",{className:"flex items-center gap-2",children:[M1.jsxDEV("span",{className:`w-2 h-2 rounded-full ${G?"bg-green-400":"bg-red-400"}`},void 0,!1,void 0,this),M1.jsxDEV("span",{className:"text-xs text-[#666] hidden sm:inline",children:G?"Live":"Offline"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q&&M1.jsxDEV("div",{className:"relative",children:[M1.jsxDEV("button",{onClick:()=>v(!F),className:"flex items-center gap-2 px-2 md:px-3 py-2 rounded hover:bg-[#1a1a1a] transition",children:[M1.jsxDEV("div",{className:"w-8 h-8 rounded-full bg-[#f97316] flex items-center justify-center text-black font-medium text-sm",children:q.username.charAt(0).toUpperCase()},void 0,!1,void 0,this),M1.jsxDEV("span",{className:"text-sm text-[#888] hidden sm:block",children:q.username},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F&&M1.jsxDEV("div",{className:"absolute right-0 top-full mt-1 w-48 bg-[#111] border border-[#222] rounded-lg shadow-xl z-50",children:[M1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#222]",children:[M1.jsxDEV("p",{className:"text-sm font-medium",children:q.username},void 0,!1,void 0,this),M1.jsxDEV("p",{className:"text-xs text-[#f97316] mt-1",children:q.role},void 0,!1,void 0,this)]},void 0,!0,void 0,this),M1.jsxDEV("button",{onClick:f,className:"w-full px-4 py-2 text-left text-sm text-red-400 hover:bg-[#1a1a1a] transition",children:"Sign out"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var U6=X0(Y1(),1);function aQ({route:Y,agentCount:G,taskCount:q,onNavigate:O,isOpen:H,onClose:w}){let L=(M)=>{O(M),w?.()};return U6.jsxDEV(U6.Fragment,{children:[H&&U6.jsxDEV("div",{className:"fixed inset-0 bg-black/60 z-40 md:hidden",onClick:w},void 0,!1,void 0,this),U6.jsxDEV("aside",{className:`
176
+ fixed inset-y-0 left-0 z-50 w-64 bg-[#0a0a0a] border-r border-[#1a1a1a] p-4 transform transition-transform duration-200 ease-in-out
177
+ md:relative md:w-56 md:translate-x-0 md:z-auto
178
+ ${H?"translate-x-0":"-translate-x-full"}
179
+ `,children:[U6.jsxDEV("div",{className:"flex items-center justify-between mb-4 md:hidden",children:[U6.jsxDEV("div",{className:"flex items-center gap-2",children:[U6.jsxDEV("span",{className:"text-[#f97316]",children:">_"},void 0,!1,void 0,this),U6.jsxDEV("span",{className:"text-lg tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U6.jsxDEV("button",{onClick:w,className:"p-2 text-[#666] hover:text-[#e0e0e0] transition",children:U6.jsxDEV(L7,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),U6.jsxDEV("nav",{className:"space-y-1",children:[U6.jsxDEV(N2,{icon:U6.jsxDEV(xQ,{},void 0,!1,void 0,this),label:"Dashboard",active:Y==="dashboard",onClick:()=>L("dashboard")},void 0,!1,void 0,this),U6.jsxDEV(N2,{icon:U6.jsxDEV(iQ,{},void 0,!1,void 0,this),label:"Agents",active:Y==="agents",onClick:()=>L("agents"),badge:G>0?String(G):void 0},void 0,!1,void 0,this),U6.jsxDEV(N2,{icon:U6.jsxDEV(v5,{},void 0,!1,void 0,this),label:"Tasks",active:Y==="tasks",onClick:()=>L("tasks"),badge:q&&q>0?String(q):void 0},void 0,!1,void 0,this),U6.jsxDEV(N2,{icon:U6.jsxDEV(F5,{},void 0,!1,void 0,this),label:"MCP",active:Y==="mcp",onClick:()=>L("mcp")},void 0,!1,void 0,this),U6.jsxDEV(N2,{icon:U6.jsxDEV(I$,{},void 0,!1,void 0,this),label:"Telemetry",active:Y==="telemetry",onClick:()=>L("telemetry")},void 0,!1,void 0,this),U6.jsxDEV(N2,{icon:U6.jsxDEV(jQ,{},void 0,!1,void 0,this),label:"Settings",active:Y==="settings",onClick:()=>L("settings")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function N2({icon:Y,label:G,active:q,onClick:O,badge:H}){return U6.jsxDEV("button",{onClick:O,className:`w-full flex items-center gap-3 px-3 py-2 rounded font-medium transition ${q?"bg-[#111] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:[Y,G,H&&U6.jsxDEV("span",{className:"ml-auto bg-[#333] text-[#888] text-xs px-2 py-0.5 rounded-full",children:H},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var M9=X0(Y1(),1);function rQ({message:Y,onDismiss:G}){return M9.jsxDEV("div",{className:"bg-red-500/10 border-b border-red-500/30 px-6 py-3 text-red-400 text-sm flex items-center justify-between",children:[M9.jsxDEV("span",{children:Y},void 0,!1,void 0,this),M9.jsxDEV("button",{onClick:G,className:"hover:text-red-300",children:M9.jsxDEV(L7,{className:"w-4 h-4"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var w9=X0(v1(),1);var o6=X0(Y1(),1);function nQ(){let{login:Y}=d1(),[G,q]=w9.useState(""),[O,H]=w9.useState(""),[w,L]=w9.useState(null),[M,T]=w9.useState(!1);return o6.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:o6.jsxDEV("div",{className:"w-full max-w-md",children:[o6.jsxDEV("div",{className:"text-center mb-8",children:[o6.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[o6.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),o6.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o6.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o6.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[o6.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome back"},void 0,!1,void 0,this),o6.jsxDEV("p",{className:"text-[#666] mb-6",children:"Sign in to continue to apteva"},void 0,!1,void 0,this),o6.jsxDEV("form",{onSubmit:async(v)=>{v.preventDefault(),L(null),T(!0);let _=await Y(G,O);if(!_.success)L(_.error||"Login failed");T(!1)},className:"space-y-4",children:[o6.jsxDEV("div",{children:[o6.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),o6.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(v)=>q(v.target.value),placeholder:"Enter your username",autoFocus:!0,required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),o6.jsxDEV("div",{children:[o6.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),o6.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(v)=>H(v.target.value),placeholder:"Enter your password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w&&o6.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:w},void 0,!1,void 0,this),o6.jsxDEV("button",{type:"submit",disabled:M||!G||!O,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:M?"Signing in...":"Sign In"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var N7=X0(v1(),1),q6=X0(Y1(),1);function tQ({onComplete:Y}){let[G,q]=N7.useState(""),[O,H]=N7.useState(""),[w,L]=N7.useState(""),[M,T]=N7.useState(""),[F,v]=N7.useState(!1),[_,W]=N7.useState(null),[f,h]=N7.useState(!1);return q6.jsxDEV(q6.Fragment,{children:[q6.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Create your account"},void 0,!1,void 0,this),q6.jsxDEV("p",{className:"text-[#666] mb-6",children:"Set up your admin account to get started with apteva."},void 0,!1,void 0,this),q6.jsxDEV("form",{onSubmit:async(S)=>{if(S.preventDefault(),W(null),O!==w){W("Passwords do not match");return}h(!0);try{let C=await fetch("/api/onboarding/user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:G,password:O,...M&&{email:M}})}),i=await C.json();if(!C.ok){W(i.error||"Failed to create account"),h(!1);return}let j=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({username:G,password:O})});if(!j.ok){W("Account created but login failed. Please try logging in."),h(!1);return}let o=await j.json();if(o.accessToken)sessionStorage.setItem("accessToken",o.accessToken);Y({username:G})}catch(C){W("Failed to create account"),h(!1)}},className:"space-y-4",children:[q6.jsxDEV("div",{children:[q6.jsxDEV("label",{htmlFor:"username",className:"block text-sm text-[#888] mb-1",children:"Username"},void 0,!1,void 0,this),q6.jsxDEV("input",{id:"username",type:"text",value:G,onChange:(S)=>q(S.target.value),placeholder:"Choose a username",autoFocus:!0,required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),q6.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"3-20 characters, letters, numbers, underscore"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q6.jsxDEV("div",{children:[q6.jsxDEV("label",{htmlFor:"password",className:"block text-sm text-[#888] mb-1",children:"Password"},void 0,!1,void 0,this),q6.jsxDEV("input",{id:"password",type:"password",value:O,onChange:(S)=>H(S.target.value),placeholder:"Enter a password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),q6.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"Min 8 characters, uppercase, lowercase, number"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q6.jsxDEV("div",{children:[q6.jsxDEV("label",{htmlFor:"confirmPassword",className:"block text-sm text-[#888] mb-1",children:"Confirm Password"},void 0,!1,void 0,this),q6.jsxDEV("input",{id:"confirmPassword",type:"password",value:w,onChange:(S)=>L(S.target.value),placeholder:"Confirm your password",required:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),!F?q6.jsxDEV("button",{type:"button",onClick:()=>v(!0),className:"text-sm text-[#666] hover:text-[#888] transition",children:"+ Add email for password recovery (optional)"},void 0,!1,void 0,this):q6.jsxDEV("div",{children:[q6.jsxDEV("label",{htmlFor:"email",className:"block text-sm text-[#888] mb-1",children:["Email ",q6.jsxDEV("span",{className:"text-[#666]",children:"(optional)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q6.jsxDEV("input",{id:"email",type:"email",value:M,onChange:(S)=>T(S.target.value),placeholder:"For password recovery only",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),q6.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:"Only used for password recovery, never shared"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_&&q6.jsxDEV("div",{className:"p-3 bg-red-500/10 border border-red-500/30 rounded text-red-400 text-sm",children:_},void 0,!1,void 0,this),q6.jsxDEV("button",{type:"submit",disabled:f||!G||!O||!w,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:f?"Creating account...":"Create Account"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q6.jsxDEV("p",{className:"text-xs text-[#666] mt-4 text-center",children:"This will be your admin account with full access to apteva."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var A5=X0(v1(),1);var V0=X0(Y1(),1);function R9({onComplete:Y,needsAccount:G=!1}){let[q,O]=A5.useState(G?0:1),[H,w]=A5.useState([]),[L,M]=A5.useState(null),[T,F]=A5.useState(""),[v,_]=A5.useState(!1),[W,f]=A5.useState(!1),[h,k]=A5.useState(null),[S,C]=A5.useState(null),[i,j]=A5.useState(!1),o=()=>{let B0=sessionStorage.getItem("accessToken");return B0?{Authorization:`Bearer ${B0}`}:{}};A5.useEffect(()=>{if(G&&!i&&q===0)return;fetch("/api/providers",{headers:o()}).then((B0)=>B0.json()).then((B0)=>{let J0=(B0.providers||[]).filter((v0)=>v0.type==="llm");w(J0)})},[i,q,G]);let z0=H.filter((B0)=>B0.hasKey),V=async()=>{if(!L||!T)return;_(!0),k(null),C(null);try{f(!0);let J0=await(await fetch(`/api/keys/${L}/test`,{method:"POST",headers:{"Content-Type":"application/json",...o()},body:JSON.stringify({key:T})})).json();if(f(!1),!J0.valid){k(J0.error||"API key is invalid"),_(!1);return}let v0=await fetch(`/api/keys/${L}`,{method:"POST",headers:{"Content-Type":"application/json",...o()},body:JSON.stringify({key:T})}),m0=await v0.json();if(!v0.ok)k(m0.error||"Failed to save key");else{C("API key saved successfully!"),F("");let B1=await(await fetch("/api/providers",{headers:o()})).json();w(B1.providers||[]),M(null)}}catch(B0){k("Failed to save key")}_(!1)},H0=async()=>{try{let B0=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json",...o()},body:JSON.stringify({name:"My Project",description:"Default project for organizing agents",color:"#f97316"})});if(B0.ok){let J0=await B0.json();if(J0.project?.id)localStorage.setItem("apteva_current_project",J0.project.id)}}catch(B0){console.error("Failed to create default project:",B0)}await fetch("/api/onboarding/complete",{method:"POST",headers:o()}),Y()},Y0=()=>{j(!0),O(1)},K0=G?3:2,q0=G?q:q-1;return V0.jsxDEV("div",{className:"min-h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex items-center justify-center p-8",children:V0.jsxDEV("div",{className:"w-full max-w-2xl",children:[V0.jsxDEV("div",{className:"text-center mb-8",children:[V0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-2",children:[V0.jsxDEV("span",{className:"text-[#f97316] text-3xl",children:">_"},void 0,!1,void 0,this),V0.jsxDEV("span",{className:"text-3xl tracking-wider",children:"apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V0.jsxDEV("p",{className:"text-[#666]",children:"Run AI agents locally"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V0.jsxDEV("div",{className:"flex items-center justify-center gap-2 mb-8",children:[G&&V0.jsxDEV(V0.Fragment,{children:[V0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${q>=0?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),V0.jsxDEV("div",{className:`w-16 h-0.5 ${q>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${q>=1?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),V0.jsxDEV("div",{className:`w-16 h-0.5 ${q>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this),V0.jsxDEV("div",{className:`w-3 h-3 rounded-full ${q>=2?"bg-[#f97316]":"bg-[#333]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),V0.jsxDEV("div",{className:"bg-[#111] rounded-lg border border-[#1a1a1a] p-8",children:[q===0&&G&&V0.jsxDEV(tQ,{onComplete:Y0},void 0,!1,void 0,this),q===1&&V0.jsxDEV(vv,{providers:H,configuredProviders:z0,selectedProvider:L,apiKey:T,saving:v,testing:W,error:h,success:S,onSelectProvider:M,onApiKeyChange:F,onSaveKey:V,onContinue:()=>O(2)},void 0,!1,void 0,this),q===2&&V0.jsxDEV(Av,{configuredProviders:z0,onAddMore:()=>O(1),onComplete:H0},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function vv({providers:Y,configuredProviders:G,selectedProvider:q,apiKey:O,saving:H,testing:w,error:L,success:M,onSelectProvider:T,onApiKeyChange:F,onSaveKey:v,onContinue:_}){let W=Y.find((f)=>f.id===q);if(q&&W)return V0.jsxDEV(V0.Fragment,{children:[V0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:["Add ",W.name," Key"]},void 0,!0,void 0,this),V0.jsxDEV("p",{className:"text-[#666] mb-6",children:"Enter your API key below. It will be encrypted and stored locally."},void 0,!1,void 0,this),V0.jsxDEV("div",{className:"mb-6",children:[V0.jsxDEV("div",{className:"p-4 rounded border border-[#f97316] bg-[#f97316]/5 mb-4",children:V0.jsxDEV("div",{className:"flex items-center justify-between",children:[V0.jsxDEV("div",{children:[V0.jsxDEV("p",{className:"font-medium",children:W.name},void 0,!1,void 0,this),V0.jsxDEV("p",{className:"text-sm text-[#666]",children:[W.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),V0.jsxDEV("a",{href:W.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),V0.jsxDEV("div",{className:"space-y-3",children:[V0.jsxDEV("input",{type:"password",value:O,onChange:(f)=>F(f.target.value),placeholder:"Enter your API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-4 py-3 focus:outline-none focus:border-[#f97316] text-lg"},void 0,!1,void 0,this),L&&V0.jsxDEV("p",{className:"text-red-400 text-sm",children:L},void 0,!1,void 0,this),M&&V0.jsxDEV("p",{className:"text-green-400 text-sm",children:M},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),V0.jsxDEV("div",{className:"flex gap-3",children:[V0.jsxDEV("button",{onClick:()=>{T(null),F("")},className:"flex-1 border border-[#333] hover:border-[#666] px-4 py-3 rounded font-medium transition",children:"Back"},void 0,!1,void 0,this),V0.jsxDEV("button",{onClick:v,disabled:!O||H,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-3 rounded font-medium transition",children:w?"Testing...":H?"Saving...":"Save API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this);return V0.jsxDEV(V0.Fragment,{children:[V0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"Welcome to apteva"},void 0,!1,void 0,this),V0.jsxDEV("p",{className:"text-[#666] mb-6",children:"To get started, you'll need to add at least one AI provider API key. Your keys are encrypted and stored locally."},void 0,!1,void 0,this),V0.jsxDEV("div",{className:"space-y-3 mb-6",children:Y.map((f)=>V0.jsxDEV(Fv,{provider:f,selected:!1,onSelect:()=>!f.hasKey&&T(f.id)},f.id,!1,void 0,this))},void 0,!1,void 0,this),V0.jsxDEV("button",{onClick:_,disabled:G.length===0,className:"w-full bg-[#222] hover:bg-[#333] disabled:opacity-50 disabled:cursor-not-allowed px-4 py-3 rounded font-medium transition",children:G.length===0?"Add at least one API key to continue":`Continue with ${G.length} provider${G.length>1?"s":""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Fv({provider:Y,selected:G,onSelect:q}){return V0.jsxDEV("div",{onClick:q,className:`p-4 rounded border transition cursor-pointer ${Y.hasKey?"border-green-500/30 bg-green-500/5":G?"border-[#f97316] bg-[#f97316]/5":"border-[#222] hover:border-[#333]"}`,children:V0.jsxDEV("div",{className:"flex items-center justify-between",children:[V0.jsxDEV("div",{children:[V0.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),V0.jsxDEV("p",{className:"text-sm text-[#666]",children:[Y.models.length," models available"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?V0.jsxDEV("span",{className:"text-green-400 text-sm flex items-center gap-1",children:[V0.jsxDEV(P5,{},void 0,!1,void 0,this),"Configured (",Y.keyHint,")"]},void 0,!0,void 0,this):V0.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",onClick:(O)=>O.stopPropagation(),className:"text-sm text-[#3b82f6] hover:underline",children:"Get API Key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function Av({configuredProviders:Y,onAddMore:G,onComplete:q}){return V0.jsxDEV(V0.Fragment,{children:[V0.jsxDEV("h2",{className:"text-2xl font-semibold mb-2",children:"You're all set!"},void 0,!1,void 0,this),V0.jsxDEV("p",{className:"text-[#666] mb-6",children:["You've configured ",Y.length," provider",Y.length>1?"s":"",". You can add more providers later in Settings."]},void 0,!0,void 0,this),V0.jsxDEV("div",{className:"space-y-2 mb-6",children:Y.map((O)=>V0.jsxDEV("div",{className:"flex items-center gap-3 p-3 bg-[#0a0a0a] rounded",children:[V0.jsxDEV(P5,{className:"w-5 h-5 text-green-400"},void 0,!1,void 0,this),V0.jsxDEV("span",{children:O.name},void 0,!1,void 0,this),V0.jsxDEV("span",{className:"text-[#666] text-sm",children:["(",O.keyHint,")"]},void 0,!0,void 0,this)]},O.id,!0,void 0,this))},void 0,!1,void 0,this),V0.jsxDEV("div",{className:"flex gap-3",children:[V0.jsxDEV("button",{onClick:G,className:"flex-1 border border-[#333] hover:border-[#f97316] px-4 py-3 rounded font-medium transition",children:"Add More"},void 0,!1,void 0,this),V0.jsxDEV("button",{onClick:q,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-3 rounded font-medium transition",children:"Start Using apteva"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var b6=X0(v1(),1);var g=X0(Y1(),1);function eQ(){let[Y,G]=b6.useState("providers");return g.jsxDEV("div",{className:"flex-1 flex overflow-hidden",children:[g.jsxDEV("div",{className:"w-48 border-r border-[#1a1a1a] p-4",children:[g.jsxDEV("h2",{className:"text-sm font-medium text-[#666] uppercase tracking-wider mb-3",children:"Settings"},void 0,!1,void 0,this),g.jsxDEV("nav",{className:"space-y-1",children:[g.jsxDEV(sQ,{label:"Providers",active:Y==="providers",onClick:()=>G("providers")},void 0,!1,void 0,this),g.jsxDEV(sQ,{label:"Projects",active:Y==="projects",onClick:()=>G("projects")},void 0,!1,void 0,this),g.jsxDEV(sQ,{label:"Updates",active:Y==="updates",onClick:()=>G("updates")},void 0,!1,void 0,this),g.jsxDEV(sQ,{label:"Data",active:Y==="data",onClick:()=>G("data")},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[Y==="providers"&&g.jsxDEV(kv,{},void 0,!1,void 0,this),Y==="projects"&&g.jsxDEV(Iv,{},void 0,!1,void 0,this),Y==="updates"&&g.jsxDEV(fv,{},void 0,!1,void 0,this),Y==="data"&&g.jsxDEV(hv,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function sQ({label:Y,active:G,onClick:q}){return g.jsxDEV("button",{onClick:q,className:`w-full text-left px-3 py-2 rounded text-sm transition ${G?"bg-[#1a1a1a] text-[#e0e0e0]":"text-[#666] hover:bg-[#111] hover:text-[#888]"}`,children:Y},void 0,!1,void 0,this)}function kv(){let{authFetch:Y}=d1(),[G,q]=b6.useState([]),[O,H]=b6.useState(null),[w,L]=b6.useState(""),[M,T]=b6.useState(!1),[F,v]=b6.useState(!1),[_,W]=b6.useState(null),[f,h]=b6.useState(null),k=async()=>{let H0=await(await Y("/api/providers")).json();q(H0.providers||[])};b6.useEffect(()=>{k()},[]);let S=async()=>{if(!O||!w)return;T(!0),W(null),h(null);try{v(!0);let H0=await(await Y(`/api/keys/${O}/test`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:w})})).json();if(v(!1),!H0.valid){W(H0.error||"API key is invalid"),T(!1);return}let Y0=await Y(`/api/keys/${O}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({key:w})});if(!Y0.ok){let K0=await Y0.json();W(K0.error||"Failed to save key")}else h("API key saved!"),L(""),H(null),k()}catch(V){W("Failed to save key")}T(!1)},C=async(V)=>{if(!confirm("Are you sure you want to remove this API key?"))return;await Y(`/api/keys/${V}`,{method:"DELETE"}),k()},i=G.filter((V)=>V.type==="llm"),j=G.filter((V)=>V.type==="integration"),o=i.filter((V)=>V.hasKey).length,z0=j.filter((V)=>V.hasKey).length;return g.jsxDEV("div",{className:"space-y-10",children:[g.jsxDEV("div",{children:[g.jsxDEV("div",{className:"mb-6",children:[g.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"AI Providers"},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-[#666]",children:["Manage your API keys for AI providers. ",o," of ",i.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:i.map((V)=>g.jsxDEV(Cv,{provider:V,isEditing:O===V.id,apiKey:w,saving:M,testing:F,error:O===V.id?_:null,success:O===V.id?f:null,onStartEdit:()=>{H(V.id),W(null),h(null)},onCancelEdit:()=>{H(null),L(""),W(null)},onApiKeyChange:L,onSave:S,onDelete:()=>C(V.id)},V.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{children:[g.jsxDEV("div",{className:"mb-6",children:[g.jsxDEV("h2",{className:"text-xl font-semibold mb-1",children:"MCP Integrations"},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-[#666]",children:["Connect to MCP gateways for tool integrations. ",z0," of ",j.length," configured."]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4",children:j.map((V)=>g.jsxDEV(Sv,{provider:V,isEditing:O===V.id,apiKey:w,saving:M,testing:F,error:O===V.id?_:null,success:O===V.id?f:null,onStartEdit:()=>{H(V.id),W(null),h(null)},onCancelEdit:()=>{H(null),L(""),W(null)},onApiKeyChange:L,onSave:S,onDelete:()=>C(V.id)},V.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var f$=["#f97316","#6366f1","#22c55e","#ef4444","#3b82f6","#a855f7","#14b8a6","#f59e0b"];function Iv(){let{projects:Y,createProject:G,updateProject:q,deleteProject:O}=B4(),[H,w]=b6.useState(!1),[L,M]=b6.useState(null),T=async(W)=>{if(!confirm("Are you sure you want to delete this project? Agents in this project will become unassigned."))return;await O(W)},F=()=>{M(null),w(!0)},v=(W)=>{M(W),w(!0)},_=()=>{w(!1),M(null)};return g.jsxDEV("div",{className:"max-w-4xl w-full",children:[g.jsxDEV("div",{className:"mb-6 flex items-center justify-between gap-4",children:[g.jsxDEV("div",{children:[g.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Projects"},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-[#666]",children:"Organize agents into projects for better management."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("button",{onClick:F,className:"flex items-center gap-2 bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition flex-shrink-0",children:[g.jsxDEV(qB,{className:"w-4 h-4"},void 0,!1,void 0,this),"New Project"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Y.length===0?g.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:[g.jsxDEV("p",{className:"text-lg mb-2",children:"No projects yet"},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-sm",children:"Create a project to organize your agents."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):g.jsxDEV("div",{className:"space-y-3",children:Y.map((W)=>g.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 flex items-center gap-4",children:[g.jsxDEV("div",{className:"w-4 h-4 rounded-full flex-shrink-0",style:{backgroundColor:W.color}},void 0,!1,void 0,this),g.jsxDEV("div",{className:"flex-1 min-w-0",children:[g.jsxDEV("h3",{className:"font-medium",children:W.name},void 0,!1,void 0,this),W.description&&g.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:W.description},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:[W.agentCount," agent",W.agentCount!==1?"s":""]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"flex items-center gap-2",children:[g.jsxDEV("button",{onClick:()=>v(W),className:"text-sm text-[#888] hover:text-[#e0e0e0] px-2 py-1",children:"Edit"},void 0,!1,void 0,this),g.jsxDEV("button",{onClick:()=>T(W.id),className:"text-sm text-red-400 hover:text-red-300 px-2 py-1",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},W.id,!0,void 0,this))},void 0,!1,void 0,this),H&&g.jsxDEV(Tv,{project:L,onSave:async(W)=>{if(L){let f=await q(L.id,W);if(f)_();return!!f}else{let f=await G(W);if(f)_();return!!f}},onClose:_},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Tv({project:Y,onSave:G,onClose:q}){let[O,H]=b6.useState(Y?.name||""),[w,L]=b6.useState(Y?.description||""),[M,T]=b6.useState(Y?.color||f$[Math.floor(Math.random()*f$.length)]),[F,v]=b6.useState(!1),[_,W]=b6.useState(null),f=async()=>{if(!O.trim()){W("Name is required");return}v(!0),W(null);let h=await G({name:O,description:w||void 0,color:M});if(v(!1),!h)W(Y?"Failed to update project":"Failed to create project")};return g.jsxDEV(q2,{onClose:q,children:[g.jsxDEV("h2",{className:"text-xl font-semibold mb-6",children:Y?"Edit Project":"Create New Project"},void 0,!1,void 0,this),g.jsxDEV("div",{className:"space-y-4",children:[g.jsxDEV("div",{children:[g.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),g.jsxDEV("input",{type:"text",value:O,onChange:(h)=>H(h.target.value),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]",placeholder:"My Project",autoFocus:!0},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{children:[g.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Description (optional)"},void 0,!1,void 0,this),g.jsxDEV("input",{type:"text",value:w,onChange:(h)=>L(h.target.value),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]",placeholder:"A short description"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{children:[g.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Color"},void 0,!1,void 0,this),g.jsxDEV("div",{className:"flex gap-3 flex-wrap",children:f$.map((h)=>g.jsxDEV("button",{type:"button",onClick:()=>T(h),className:`w-10 h-10 rounded-full transition ${M===h?"ring-2 ring-white ring-offset-2 ring-offset-[#111]":"hover:scale-110"}`,style:{backgroundColor:h}},h,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_&&g.jsxDEV("p",{className:"text-red-400 text-sm",children:_},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"flex gap-3 mt-6",children:[g.jsxDEV("button",{onClick:q,className:"flex-1 border border-[#333] hover:border-[#f97316] hover:text-[#f97316] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),g.jsxDEV("button",{onClick:f,disabled:F||!O.trim(),className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:F?"Saving...":Y?"Update":"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function fv(){let{authFetch:Y}=d1(),[G,q]=b6.useState(null),[O,H]=b6.useState(!1),[w,L]=b6.useState(!1),[M,T]=b6.useState(null),[F,v]=b6.useState(null),[_,W]=b6.useState(null),f=async()=>{H(!0),T(null);try{let C=await Y("/api/version");if(!C.ok)throw Error("Failed to check for updates");let i=await C.json();q(i)}catch(C){T("Failed to check for updates")}H(!1)},h=async()=>{L(!0),T(null),v(null);try{let i=await(await Y("/api/version/update",{method:"POST"})).json();if(!i.success)T(i.error||"Update failed");else v(`Agent updated to v${i.version}. New agents will use this version.`),await f()}catch(C){T("Failed to update agent")}L(!1)};b6.useEffect(()=>{f()},[]);let k=(C,i)=>{navigator.clipboard.writeText(C),W(i),setTimeout(()=>W(null),2000)},S=G?.apteva.updateAvailable||G?.agent.updateAvailable;return g.jsxDEV("div",{className:"max-w-4xl w-full",children:[g.jsxDEV("div",{className:"mb-6",children:[g.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Updates"},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-[#666]",children:"Check for new versions of apteva and the agent binary."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O&&!G?g.jsxDEV("div",{className:"text-[#666]",children:"Checking version info..."},void 0,!1,void 0,this):M&&!G?g.jsxDEV("div",{className:"text-red-400",children:M},void 0,!1,void 0,this):G?.isDocker?g.jsxDEV("div",{className:"space-y-6",children:[g.jsxDEV("div",{className:"bg-blue-500/10 border border-blue-500/30 rounded-lg p-4",children:[g.jsxDEV("div",{className:"flex items-center gap-2 text-blue-400 mb-2",children:[g.jsxDEV("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:g.jsxDEV("path",{d:"M13.983 11.078h2.119a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.119a.185.185 0 00-.185.185v1.888c0 .102.083.185.185.185m-2.954-5.43h2.118a.186.186 0 00.186-.186V3.574a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m0 2.716h2.118a.187.187 0 00.186-.186V6.29a.186.186 0 00-.186-.185h-2.118a.185.185 0 00-.185.185v1.887c0 .102.082.186.185.186m-2.93 0h2.12a.186.186 0 00.184-.186V6.29a.185.185 0 00-.185-.185H8.1a.185.185 0 00-.185.185v1.887c0 .102.083.186.185.186m-2.964 0h2.119a.186.186 0 00.185-.186V6.29a.186.186 0 00-.185-.185H5.136a.186.186 0 00-.186.185v1.887c0 .102.084.186.186.186m5.893 2.715h2.118a.186.186 0 00.186-.185V9.006a.186.186 0 00-.186-.186h-2.118a.185.185 0 00-.185.185v1.888c0 .102.082.185.185.185m-2.93 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.185.185 0 00-.184.185v1.888c0 .102.083.185.185.185m-2.964 0h2.119a.185.185 0 00.185-.185V9.006a.185.185 0 00-.185-.186H5.136a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185m-2.92 0h2.12a.185.185 0 00.184-.185V9.006a.185.185 0 00-.184-.186h-2.12a.186.186 0 00-.186.186v1.887c0 .102.084.185.186.185M23.763 9.89c-.065-.051-.672-.51-1.954-.51-.338.001-.676.03-1.01.087-.248-1.7-1.653-2.53-1.716-2.566l-.344-.199-.226.327c-.284.438-.49.922-.612 1.43-.23.97-.09 1.882.403 2.661-.595.332-1.55.413-1.744.42H.751a.751.751 0 00-.75.748 11.376 11.376 0 00.692 4.062c.545 1.428 1.355 2.48 2.41 3.124 1.18.723 3.1 1.137 5.275 1.137.983.003 1.963-.086 2.93-.266a12.248 12.248 0 003.823-1.389c.98-.567 1.86-1.288 2.61-2.136 1.252-1.418 1.998-2.997 2.553-4.4h.221c1.372 0 2.215-.549 2.68-1.009.309-.293.55-.65.707-1.046l.098-.288Z"},void 0,!1,void 0,this)},void 0,!1,void 0,this),g.jsxDEV("span",{className:"font-medium",children:"Docker Environment"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("p",{className:"text-sm text-[#888]",children:"Updates are automatic when you pull a new image version."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[g.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[g.jsxDEV("div",{children:[g.jsxDEV("h3",{className:"font-medium text-lg",children:"Current Version"},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-sm text-[#666]",children:"apteva + agent binary"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"text-right",children:g.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.apteva.installed||"?"]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),S?g.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[g.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:["A newer version (v",G.apteva.latest,") is available. To update:"]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"space-y-2",children:[g.jsxDEV("code",{className:"block bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"docker pull apteva/apteva:latest"},void 0,!1,void 0,this),g.jsxDEV("code",{className:"block bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"docker compose up -d"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("button",{onClick:()=>{navigator.clipboard.writeText("docker pull apteva/apteva:latest && docker compose up -d"),W("docker"),setTimeout(()=>W(null),2000)},className:"mt-3 px-3 py-1.5 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:_==="docker"?"Copied!":"Copy commands"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):g.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[g.jsxDEV(P5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("p",{className:"text-xs text-[#555]",children:"Your data is stored in a Docker volume and persists across updates."},void 0,!1,void 0,this)]},void 0,!0,void 0,this):G?g.jsxDEV("div",{className:"space-y-6",children:[F&&g.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 text-green-400",children:F},void 0,!1,void 0,this),M&&g.jsxDEV("div",{className:"bg-red-500/10 border border-red-500/30 rounded-lg p-4 text-red-400",children:M},void 0,!1,void 0,this),g.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[g.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[g.jsxDEV("div",{children:[g.jsxDEV("h3",{className:"font-medium text-lg",children:"apteva"},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-sm text-[#666]",children:"The app you're running"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"text-right",children:[g.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.apteva.installed||"?"]},void 0,!0,void 0,this),G.apteva.updateAvailable&&g.jsxDEV("div",{className:"text-sm text-[#f97316]",children:["→ v",G.apteva.latest]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G.apteva.updateAvailable?g.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[g.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:"Update by running:"},void 0,!1,void 0,this),g.jsxDEV("div",{className:"flex items-center gap-2",children:[g.jsxDEV("code",{className:"flex-1 bg-[#0a0a0a] px-3 py-2 rounded font-mono text-sm text-[#888]",children:"npx apteva@latest"},void 0,!1,void 0,this),g.jsxDEV("button",{onClick:()=>k("npx apteva@latest","apteva"),className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] rounded text-sm",children:_==="apteva"?"Copied!":"Copy"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):g.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[g.jsxDEV(P5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-5",children:[g.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[g.jsxDEV("div",{children:[g.jsxDEV("h3",{className:"font-medium text-lg",children:"Agent Binary"},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-sm text-[#666]",children:"The Go binary that runs agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"text-right",children:[g.jsxDEV("div",{className:"text-xl font-mono",children:["v",G.agent.installed||"?"]},void 0,!0,void 0,this),G.agent.updateAvailable&&g.jsxDEV("div",{className:"text-sm text-[#f97316]",children:["→ v",G.agent.latest]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),G.agent.updateAvailable?g.jsxDEV("div",{className:"bg-[#f97316]/10 border border-[#f97316]/30 rounded-lg p-4",children:[g.jsxDEV("p",{className:"text-sm text-[#888] mb-3",children:"A new version is available. Stop all agents before updating."},void 0,!1,void 0,this),g.jsxDEV("div",{className:"flex items-center gap-2",children:g.jsxDEV("button",{onClick:h,disabled:w,className:"px-4 py-2 bg-[#f97316] text-black rounded font-medium text-sm disabled:opacity-50",children:w?"Updating...":"Update Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this):g.jsxDEV("div",{className:"flex items-center gap-2 text-green-400 text-sm",children:[g.jsxDEV(P5,{className:"w-4 h-4"},void 0,!1,void 0,this),"Up to date"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!S&&!F&&g.jsxDEV("div",{className:"bg-green-500/10 border border-green-500/30 rounded-lg p-4 flex items-center gap-2 text-green-400",children:[g.jsxDEV(P5,{className:"w-5 h-5"},void 0,!1,void 0,this),"Everything is up to date!"]},void 0,!0,void 0,this),g.jsxDEV("button",{onClick:f,disabled:O,className:"text-sm text-[#666] hover:text-[#888] disabled:opacity-50",children:O?"Checking...":"Check for updates"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):null]},void 0,!0,void 0,this)}function Cv({provider:Y,isEditing:G,apiKey:q,saving:O,testing:H,error:w,success:L,onStartEdit:M,onCancelEdit:T,onApiKeyChange:F,onSave:v,onDelete:_}){return g.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-green-500/20":"border-[#1a1a1a]"}`,children:[g.jsxDEV("div",{className:"flex items-start justify-between gap-2 mb-2",children:[g.jsxDEV("div",{className:"min-w-0",children:[g.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-sm text-[#666] truncate",children:Y.type==="integration"?Y.description||"MCP integration":`${Y.models.length} models`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?g.jsxDEV("span",{className:"text-green-400 text-xs flex items-center gap-1 bg-green-500/10 px-2 py-1 rounded whitespace-nowrap flex-shrink-0",children:[g.jsxDEV(P5,{className:"w-3 h-3"},void 0,!1,void 0,this),Y.keyHint]},void 0,!0,void 0,this):g.jsxDEV("span",{className:"text-[#666] text-xs bg-[#1a1a1a] px-2 py-1 rounded whitespace-nowrap flex-shrink-0",children:"Not configured"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?g.jsxDEV("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-[#1a1a1a]",children:[g.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"View docs"},void 0,!1,void 0,this),g.jsxDEV("button",{onClick:_,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):g.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?g.jsxDEV("div",{className:"space-y-3",children:[g.jsxDEV("input",{type:"password",value:q,onChange:(W)=>F(W.target.value),placeholder:"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),w&&g.jsxDEV("p",{className:"text-red-400 text-sm",children:w},void 0,!1,void 0,this),L&&g.jsxDEV("p",{className:"text-green-400 text-sm",children:L},void 0,!1,void 0,this),g.jsxDEV("div",{className:"flex gap-2",children:[g.jsxDEV("button",{onClick:T,className:"flex-1 px-3 py-1.5 border border-[#333] rounded text-sm hover:border-[#666]",children:"Cancel"},void 0,!1,void 0,this),g.jsxDEV("button",{onClick:v,disabled:!q||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:H?"Validating...":O?"Saving...":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):g.jsxDEV("div",{className:"flex items-center justify-between",children:[g.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API key"},void 0,!1,void 0,this),g.jsxDEV("button",{onClick:M,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:"+ Add key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Sv({provider:Y,isEditing:G,apiKey:q,saving:O,testing:H,error:w,success:L,onStartEdit:M,onCancelEdit:T,onApiKeyChange:F,onSave:v,onDelete:_}){return g.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 ${Y.hasKey?"border-[#f97316]/20":"border-[#1a1a1a]"}`,children:[g.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[g.jsxDEV("div",{children:[g.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-sm text-[#666]",children:Y.description||"MCP integration"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?g.jsxDEV("span",{className:"text-[#f97316] text-xs flex items-center gap-1 bg-[#f97316]/10 px-2 py-1 rounded",children:[g.jsxDEV(P5,{className:"w-3 h-3"},void 0,!1,void 0,this),Y.keyHint]},void 0,!0,void 0,this):g.jsxDEV("span",{className:"text-[#666] text-xs bg-[#1a1a1a] px-2 py-1 rounded",children:"Not configured"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y.hasKey?g.jsxDEV("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-[#1a1a1a]",children:[g.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"View docs"},void 0,!1,void 0,this),g.jsxDEV("button",{onClick:_,className:"text-red-400 hover:text-red-300 text-sm",children:"Remove key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):g.jsxDEV("div",{className:"mt-3 pt-3 border-t border-[#1a1a1a]",children:G?g.jsxDEV("div",{className:"space-y-3",children:[g.jsxDEV("input",{type:"password",value:q,onChange:(W)=>F(W.target.value),placeholder:"Enter API key...",autoFocus:!0,className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),w&&g.jsxDEV("p",{className:"text-red-400 text-sm",children:w},void 0,!1,void 0,this),L&&g.jsxDEV("p",{className:"text-green-400 text-sm",children:L},void 0,!1,void 0,this),g.jsxDEV("div",{className:"flex gap-2",children:[g.jsxDEV("button",{onClick:T,className:"flex-1 px-3 py-1.5 border border-[#333] rounded text-sm hover:border-[#666]",children:"Cancel"},void 0,!1,void 0,this),g.jsxDEV("button",{onClick:v,disabled:!q||O,className:"flex-1 px-3 py-1.5 bg-[#f97316] text-black rounded text-sm font-medium disabled:opacity-50",children:H?"Validating...":O?"Saving...":"Save"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this):g.jsxDEV("div",{className:"flex items-center justify-between",children:[g.jsxDEV("a",{href:Y.docsUrl,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#3b82f6] hover:underline",children:"Get API key"},void 0,!1,void 0,this),g.jsxDEV("button",{onClick:M,className:"text-sm text-[#f97316] hover:text-[#fb923c]",children:"+ Add key"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function hv(){let{authFetch:Y}=d1(),[G,q]=b6.useState(!1),[O,H]=b6.useState(null),[w,L]=b6.useState(null),M=async()=>{try{let v=await(await Y("/api/telemetry/stats")).json();L(v.stats?.total_events||0)}catch{L(null)}};b6.useEffect(()=>{M()},[]);let T=async()=>{if(!confirm("Are you sure you want to delete all telemetry data? This cannot be undone."))return;q(!0),H(null);try{let F=await Y("/api/telemetry/clear",{method:"POST"}),v=await F.json();if(F.ok)H({type:"success",text:`Cleared ${v.deleted||0} telemetry events.`}),L(0);else H({type:"error",text:v.error||"Failed to clear telemetry"})}catch{H({type:"error",text:"Failed to clear telemetry"})}q(!1)};return g.jsxDEV("div",{className:"max-w-4xl w-full",children:[g.jsxDEV("div",{className:"mb-6",children:[g.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"Data Management"},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-[#666]",children:"Manage stored data and telemetry."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),g.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[g.jsxDEV("h3",{className:"font-medium mb-2",children:"Telemetry Data"},void 0,!1,void 0,this),g.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:w!==null?`${w.toLocaleString()} events stored`:"Loading..."},void 0,!1,void 0,this),O&&g.jsxDEV("div",{className:`mb-4 p-3 rounded text-sm ${O.type==="success"?"bg-green-500/10 text-green-400 border border-green-500/30":"bg-red-500/10 text-red-400 border border-red-500/30"}`,children:O.text},void 0,!1,void 0,this),g.jsxDEV("button",{onClick:T,disabled:G||w===0,className:"px-4 py-2 bg-red-500/20 text-red-400 hover:bg-red-500/30 disabled:opacity-50 disabled:cursor-not-allowed rounded text-sm font-medium transition",children:G?"Clearing...":"Clear All Telemetry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}var a6=X0(Y1(),1),Vv=[{key:"memory",icon:J3,label:"Memory"},{key:"tasks",icon:v5,label:"Tasks"},{key:"files",icon:O2,label:"Files"},{key:"vision",icon:Y3,label:"Vision"},{key:"operator",icon:$3,label:"Operator"},{key:"mcp",icon:F5,label:"MCP"},{key:"realtime",icon:H3,label:"Realtime"},{key:"agents",icon:L2,label:"Multi-Agent"}];function bX({agent:Y,selected:G,onSelect:q,onToggle:O,showProject:H}){let w=Vv.filter((_)=>Y.features?.[_.key]),L=Y.mcpServerDetails||[],{isActive:M,type:T}=_9(Y.id),{projects:F}=B4(),v=Y.projectId?F.find((_)=>_.id===Y.projectId):null;return a6.jsxDEV("div",{onClick:q,className:`bg-[#111] rounded p-5 border transition cursor-pointer ${G?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,children:[a6.jsxDEV("div",{className:"flex items-start justify-between mb-3",children:[a6.jsxDEV("div",{children:[a6.jsxDEV("h3",{className:"font-semibold text-lg",children:Y.name},void 0,!1,void 0,this),a6.jsxDEV("p",{className:"text-sm text-[#666]",children:[Y.provider," / ",Y.model,Y.port&&a6.jsxDEV("span",{className:"text-[#444]",children:[" · :",Y.port]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),H&&v&&a6.jsxDEV("p",{className:"text-sm text-[#666] flex items-center gap-1.5 mt-1",children:[a6.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:v.color}},void 0,!1,void 0,this),v.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),a6.jsxDEV(Dv,{status:Y.status,isActive:M&&Y.status==="running",activityType:T},void 0,!1,void 0,this)]},void 0,!0,void 0,this),w.length>0&&a6.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:w.map(({key:_,icon:W,label:f})=>a6.jsxDEV("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded bg-[#f97316]/10 text-[#f97316]/70 text-xs",title:f,children:[a6.jsxDEV(W,{className:"w-3 h-3"},void 0,!1,void 0,this),f]},_,!0,void 0,this))},void 0,!1,void 0,this),L.length>0&&a6.jsxDEV("div",{className:"flex flex-wrap gap-1.5 mb-3",children:L.map((_)=>a6.jsxDEV("span",{className:`inline-flex items-center gap-1 px-2 py-0.5 rounded text-xs ${_.status==="running"?"bg-green-500/10 text-green-400":"bg-[#222] text-[#666]"}`,title:`MCP: ${_.name} (${_.status})`,children:[a6.jsxDEV(F5,{className:"w-3 h-3"},void 0,!1,void 0,this),_.name]},_.id,!0,void 0,this))},void 0,!1,void 0,this),a6.jsxDEV("p",{className:"text-sm text-[#666] line-clamp-2 mb-4",children:Y.systemPrompt},void 0,!1,void 0,this),a6.jsxDEV("button",{onClick:O,className:`w-full px-3 py-1.5 rounded text-sm font-medium transition ${Y.status==="running"?"bg-[#f97316]/20 text-[#f97316] hover:bg-[#f97316]/30":"bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30"}`,children:Y.status==="running"?"Stop":"Start"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function Dv({status:Y,isActive:G,activityType:q}){if(Y==="running"&&G&&q)return a6.jsxDEV("span",{className:"px-2 py-1 rounded text-xs font-medium bg-green-500/20 text-green-400 animate-pulse",children:q},void 0,!1,void 0,this);return a6.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${Y==="running"?"bg-[#3b82f6]/20 text-[#3b82f6]":"bg-[#333] text-[#666]"}`,children:Y},void 0,!1,void 0,this)}var BB=X0(v1(),1);var u1=X0(Y1(),1),yv=[{key:"memory",label:"Memory",description:"Persistent recall",icon:J3},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:v5},{key:"files",label:"Files",description:"File storage and management",icon:O2},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:Y3},{key:"operator",label:"Operator",description:"Browser automation",icon:$3},{key:"mcp",label:"MCP",description:"External tools/services",icon:F5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:H3},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:L2}];function zX({form:Y,providers:G,configuredProviders:q,onFormChange:O,onProviderChange:H,onCreate:w,onClose:L,onGoToSettings:M}){let{projects:T,currentProjectId:F}=B4(),v=G.find((k)=>k.id===Y.provider),_=q.map((k)=>({value:k.id,label:k.name})),W=v?.models.map((k)=>({value:k.value,label:k.label,recommended:k.recommended}))||[],f=[{value:"",label:"No Project"},...T.map((k)=>({value:k.id,label:k.name}))];BB.default.useEffect(()=>{if(Y.projectId===void 0&&F&&F!=="unassigned")O({...Y,projectId:F})},[F]);let h=(k)=>{O({...Y,features:{...Y.features,[k]:!Y.features[k]}})};return u1.jsxDEV(q2,{children:[u1.jsxDEV("h2",{className:"text-xl font-semibold mb-4",children:"Create New Agent"},void 0,!1,void 0,this),q.length===0?u1.jsxDEV(mv,{onGoToSettings:M},void 0,!1,void 0,this):u1.jsxDEV(u1.Fragment,{children:[u1.jsxDEV("div",{className:"space-y-4",children:[u1.jsxDEV(W2,{label:"Name",children:u1.jsxDEV("input",{type:"text",value:Y.name,onChange:(k)=>O({...Y,name:k.target.value}),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] text-[#e0e0e0]",placeholder:"My Agent"},void 0,!1,void 0,this)},void 0,!1,void 0,this),T.length>0&&u1.jsxDEV(W2,{label:"Project",children:u1.jsxDEV(R5,{value:Y.projectId||"",options:f,onChange:(k)=>O({...Y,projectId:k||null}),placeholder:"Select project..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),u1.jsxDEV(W2,{label:"Provider",children:u1.jsxDEV(R5,{value:Y.provider,options:_,onChange:H,placeholder:"Select provider..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),u1.jsxDEV(W2,{label:"Model",children:u1.jsxDEV(R5,{value:Y.model,options:W,onChange:(k)=>O({...Y,model:k}),placeholder:"Select model..."},void 0,!1,void 0,this)},void 0,!1,void 0,this),u1.jsxDEV(W2,{label:"System Prompt",children:u1.jsxDEV("textarea",{value:Y.systemPrompt,onChange:(k)=>O({...Y,systemPrompt:k.target.value}),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 h-24 resize-none focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),u1.jsxDEV(W2,{label:"Features",children:u1.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:yv.map(({key:k,label:S,description:C,icon:i})=>u1.jsxDEV("button",{type:"button",onClick:()=>h(k),className:`flex items-center gap-3 p-3 rounded border text-left transition ${Y.features[k]?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[u1.jsxDEV(i,{className:`w-5 h-5 flex-shrink-0 ${Y.features[k]?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),u1.jsxDEV("div",{className:"flex-1 min-w-0",children:[u1.jsxDEV("div",{className:`text-sm font-medium ${Y.features[k]?"text-[#f97316]":""}`,children:S},void 0,!1,void 0,this),u1.jsxDEV("div",{className:"text-xs text-[#666]",children:C},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},k,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),u1.jsxDEV("div",{className:"flex gap-3 mt-6",children:[u1.jsxDEV("button",{onClick:L,className:"flex-1 border border-[#333] hover:border-[#f97316] hover:text-[#f97316] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),u1.jsxDEV("button",{onClick:w,disabled:!Y.name,className:"flex-1 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:"Create"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function W2({label:Y,children:G}){return u1.jsxDEV("div",{children:[u1.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),G]},void 0,!0,void 0,this)}function mv({onGoToSettings:Y}){return u1.jsxDEV("div",{className:"text-center py-6",children:[u1.jsxDEV("p",{className:"text-[#666] mb-4",children:"No API keys configured. Add a provider key first."},void 0,!1,void 0,this),u1.jsxDEV("button",{onClick:Y,className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Go to Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var C1=X0(v1(),1);var l1=X0(v1(),1),R2=X0(v1(),1),K3=X0(v1(),1);function OB(Y){var G,q,O="";if(typeof Y=="string"||typeof Y=="number")O+=Y;else if(typeof Y=="object")if(Array.isArray(Y)){var H=Y.length;for(G=0;G<H;G++)Y[G]&&(q=OB(Y[G]))&&(O&&(O+=" "),O+=q)}else for(q in Y)Y[q]&&(O&&(O+=" "),O+=q);return O}function LB(){for(var Y,G,q=0,O="",H=arguments.length;q<H;q++)(Y=arguments[q])&&(G=OB(Y))&&(O&&(O+=" "),O+=G);return O}var uv=(Y)=>{let G=Ev(Y),{conflictingClassGroups:q,conflictingClassGroupModifiers:O}=Y;return{getClassGroupId:(L)=>{let M=L.split("-");if(M[0]===""&&M.length!==1)M.shift();return _B(M,G)||gv(L)},getConflictingClassGroupIds:(L,M)=>{let T=q[L]||[];if(M&&O[L])return[...T,...O[L]];return T}}},_B=(Y,G)=>{if(Y.length===0)return G.classGroupId;let q=Y[0],O=G.nextPart.get(q),H=O?_B(Y.slice(1),O):void 0;if(H)return H;if(G.validators.length===0)return;let w=Y.join("-");return G.validators.find(({validator:L})=>L(w))?.classGroupId},NB=/^\[(.+)\]$/,gv=(Y)=>{if(NB.test(Y)){let G=NB.exec(Y)[1],q=G?.substring(0,G.indexOf(":"));if(q)return"arbitrary.."+q}},Ev=(Y)=>{let{theme:G,prefix:q}=Y,O={nextPart:new Map,validators:[]};return dv(Object.entries(Y.classGroups),q).forEach(([w,L])=>{S$(L,O,w,G)}),O},S$=(Y,G,q,O)=>{Y.forEach((H)=>{if(typeof H==="string"){let w=H===""?G:WB(G,H);w.classGroupId=q;return}if(typeof H==="function"){if(cv(H)){S$(H(O),G,q,O);return}G.validators.push({validator:H,classGroupId:q});return}Object.entries(H).forEach(([w,L])=>{S$(L,WB(G,w),q,O)})})},WB=(Y,G)=>{let q=Y;return G.split("-").forEach((O)=>{if(!q.nextPart.has(O))q.nextPart.set(O,{nextPart:new Map,validators:[]});q=q.nextPart.get(O)}),q},cv=(Y)=>Y.isThemeGetter,dv=(Y,G)=>{if(!G)return Y;return Y.map(([q,O])=>{let H=O.map((w)=>{if(typeof w==="string")return G+w;if(typeof w==="object")return Object.fromEntries(Object.entries(w).map(([L,M])=>[G+L,M]));return w});return[q,H]})},lv=(Y)=>{if(Y<1)return{get:()=>{return},set:()=>{}};let G=0,q=new Map,O=new Map,H=(w,L)=>{if(q.set(w,L),G++,G>Y)G=0,O=q,q=new Map};return{get(w){let L=q.get(w);if(L!==void 0)return L;if((L=O.get(w))!==void 0)return H(w,L),L},set(w,L){if(q.has(w))q.set(w,L);else H(w,L)}}};var pv=(Y)=>{let{separator:G,experimentalParseClassName:q}=Y,O=G.length===1,H=G[0],w=G.length,L=(M)=>{let T=[],F=0,v=0,_;for(let S=0;S<M.length;S++){let C=M[S];if(F===0){if(C===H&&(O||M.slice(S,S+w)===G)){T.push(M.slice(v,S)),v=S+w;continue}if(C==="/"){_=S;continue}}if(C==="[")F++;else if(C==="]")F--}let W=T.length===0?M:M.substring(v),f=W.startsWith("!"),h=f?W.substring(1):W,k=_&&_>v?_-v:void 0;return{modifiers:T,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:k}};if(q)return(M)=>q({className:M,parseClassName:L});return L},xv=(Y)=>{if(Y.length<=1)return Y;let G=[],q=[];return Y.forEach((O)=>{if(O[0]==="[")G.push(...q.sort(),O),q=[];else q.push(O)}),G.push(...q.sort()),G},iv=(Y)=>({cache:lv(Y.cacheSize),parseClassName:pv(Y),...uv(Y)}),jv=/\s+/,ov=(Y,G)=>{let{parseClassName:q,getClassGroupId:O,getConflictingClassGroupIds:H}=G,w=[],L=Y.trim().split(jv),M="";for(let T=L.length-1;T>=0;T-=1){let F=L[T],{modifiers:v,hasImportantModifier:_,baseClassName:W,maybePostfixModifierPosition:f}=q(F),h=Boolean(f),k=O(h?W.substring(0,f):W);if(!k){if(!h){M=F+(M.length>0?" "+M:M);continue}if(k=O(W),!k){M=F+(M.length>0?" "+M:M);continue}h=!1}let S=xv(v).join(":"),C=_?S+"!":S,i=C+k;if(w.includes(i))continue;w.push(i);let j=H(k,h);for(let o=0;o<j.length;++o){let z0=j[o];w.push(C+z0)}M=F+(M.length>0?" "+M:M)}return M};function av(){let Y=0,G,q,O="";while(Y<arguments.length)if(G=arguments[Y++]){if(q=MB(G))O&&(O+=" "),O+=q}return O}var MB=(Y)=>{if(typeof Y==="string")return Y;let G,q="";for(let O=0;O<Y.length;O++)if(Y[O]){if(G=MB(Y[O]))q&&(q+=" "),q+=G}return q};function rv(Y,...G){let q,O,H,w=L;function L(T){let F=G.reduce((v,_)=>_(v),Y());return q=iv(F),O=q.cache.get,H=q.cache.set,w=M,M(T)}function M(T){let F=O(T);if(F)return F;let v=ov(T,q);return H(T,v),v}return function(){return w(av.apply(null,arguments))}}var P6=(Y)=>{let G=(q)=>q[Y]||[];return G.isThemeGetter=!0,G},wB=/^\[(?:([a-z-]+):)?(.+)\]$/i,nv=/^\d+\/\d+$/,tv=new Set(["px","full","screen"]),sv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ev=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,bF=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zF=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,QF=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,y8=(Y)=>_2(Y)||tv.has(Y)||nv.test(Y),W7=(Y)=>M2(Y,"length",KF),_2=(Y)=>Boolean(Y)&&!Number.isNaN(Number(Y)),C$=(Y)=>M2(Y,"number",_2),P9=(Y)=>Boolean(Y)&&Number.isInteger(Number(Y)),XF=(Y)=>Y.endsWith("%")&&_2(Y.slice(0,-1)),N1=(Y)=>wB.test(Y),_7=(Y)=>sv.test(Y),ZF=new Set(["length","size","percentage"]),JF=(Y)=>M2(Y,ZF,RB),YF=(Y)=>M2(Y,"position",RB),$F=new Set(["image","url"]),HF=(Y)=>M2(Y,$F,qF),GF=(Y)=>M2(Y,"",UF),v9=()=>!0,M2=(Y,G,q)=>{let O=wB.exec(Y);if(O){if(O[1])return typeof G==="string"?O[1]===G:G.has(O[1]);return q(O[2])}return!1},KF=(Y)=>ev.test(Y)&&!bF.test(Y),RB=()=>!1,UF=(Y)=>zF.test(Y),qF=(Y)=>QF.test(Y);var BF=()=>{let Y=P6("colors"),G=P6("spacing"),q=P6("blur"),O=P6("brightness"),H=P6("borderColor"),w=P6("borderRadius"),L=P6("borderSpacing"),M=P6("borderWidth"),T=P6("contrast"),F=P6("grayscale"),v=P6("hueRotate"),_=P6("invert"),W=P6("gap"),f=P6("gradientColorStops"),h=P6("gradientColorStopPositions"),k=P6("inset"),S=P6("margin"),C=P6("opacity"),i=P6("padding"),j=P6("saturate"),o=P6("scale"),z0=P6("sepia"),V=P6("skew"),H0=P6("space"),Y0=P6("translate"),K0=()=>["auto","contain","none"],q0=()=>["auto","hidden","clip","visible","scroll"],B0=()=>["auto",N1,G],J0=()=>[N1,G],v0=()=>["",y8,W7],m0=()=>["auto",_2,N1],F0=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B1=()=>["solid","dashed","dotted","double","none"],s1=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],E1=()=>["start","end","center","between","around","evenly","stretch"],p1=()=>["","0",N1],x0=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U1=()=>[_2,N1];return{cacheSize:500,separator:":",theme:{colors:[v9],spacing:[y8,W7],blur:["none","",_7,N1],brightness:U1(),borderColor:[Y],borderRadius:["none","","full",_7,N1],borderSpacing:J0(),borderWidth:v0(),contrast:U1(),grayscale:p1(),hueRotate:U1(),invert:p1(),gap:J0(),gradientColorStops:[Y],gradientColorStopPositions:[XF,W7],inset:B0(),margin:B0(),opacity:U1(),padding:J0(),saturate:U1(),scale:U1(),sepia:p1(),skew:U1(),space:J0(),translate:J0()},classGroups:{aspect:[{aspect:["auto","square","video",N1]}],container:["container"],columns:[{columns:[_7]}],"break-after":[{"break-after":x0()}],"break-before":[{"break-before":x0()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...F0(),N1]}],overflow:[{overflow:q0()}],"overflow-x":[{"overflow-x":q0()}],"overflow-y":[{"overflow-y":q0()}],overscroll:[{overscroll:K0()}],"overscroll-x":[{"overscroll-x":K0()}],"overscroll-y":[{"overscroll-y":K0()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-y":[{"inset-y":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",P9,N1]}],basis:[{basis:B0()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",N1]}],grow:[{grow:p1()}],shrink:[{shrink:p1()}],order:[{order:["first","last","none",P9,N1]}],"grid-cols":[{"grid-cols":[v9]}],"col-start-end":[{col:["auto",{span:["full",P9,N1]},N1]}],"col-start":[{"col-start":m0()}],"col-end":[{"col-end":m0()}],"grid-rows":[{"grid-rows":[v9]}],"row-start-end":[{row:["auto",{span:[P9,N1]},N1]}],"row-start":[{"row-start":m0()}],"row-end":[{"row-end":m0()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",N1]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",N1]}],gap:[{gap:[W]}],"gap-x":[{"gap-x":[W]}],"gap-y":[{"gap-y":[W]}],"justify-content":[{justify:["normal",...E1()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...E1(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...E1(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[i]}],px:[{px:[i]}],py:[{py:[i]}],ps:[{ps:[i]}],pe:[{pe:[i]}],pt:[{pt:[i]}],pr:[{pr:[i]}],pb:[{pb:[i]}],pl:[{pl:[i]}],m:[{m:[S]}],mx:[{mx:[S]}],my:[{my:[S]}],ms:[{ms:[S]}],me:[{me:[S]}],mt:[{mt:[S]}],mr:[{mr:[S]}],mb:[{mb:[S]}],ml:[{ml:[S]}],"space-x":[{"space-x":[H0]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[H0]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",N1,G]}],"min-w":[{"min-w":[N1,G,"min","max","fit"]}],"max-w":[{"max-w":[N1,G,"none","full","min","max","fit","prose",{screen:[_7]},_7]}],h:[{h:[N1,G,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[N1,G,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[N1,G,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[N1,G,"auto","min","max","fit"]}],"font-size":[{text:["base",_7,W7]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",C$]}],"font-family":[{font:[v9]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",N1]}],"line-clamp":[{"line-clamp":["none",_2,C$]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",y8,N1]}],"list-image":[{"list-image":["none",N1]}],"list-style-type":[{list:["none","disc","decimal",N1]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[Y]}],"placeholder-opacity":[{"placeholder-opacity":[C]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[Y]}],"text-opacity":[{"text-opacity":[C]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B1(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",y8,W7]}],"underline-offset":[{"underline-offset":["auto",y8,N1]}],"text-decoration-color":[{decoration:[Y]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:J0()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",N1]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",N1]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[C]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...F0(),YF]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",JF]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},HF]}],"bg-color":[{bg:[Y]}],"gradient-from-pos":[{from:[h]}],"gradient-via-pos":[{via:[h]}],"gradient-to-pos":[{to:[h]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[w]}],"rounded-s":[{"rounded-s":[w]}],"rounded-e":[{"rounded-e":[w]}],"rounded-t":[{"rounded-t":[w]}],"rounded-r":[{"rounded-r":[w]}],"rounded-b":[{"rounded-b":[w]}],"rounded-l":[{"rounded-l":[w]}],"rounded-ss":[{"rounded-ss":[w]}],"rounded-se":[{"rounded-se":[w]}],"rounded-ee":[{"rounded-ee":[w]}],"rounded-es":[{"rounded-es":[w]}],"rounded-tl":[{"rounded-tl":[w]}],"rounded-tr":[{"rounded-tr":[w]}],"rounded-br":[{"rounded-br":[w]}],"rounded-bl":[{"rounded-bl":[w]}],"border-w":[{border:[M]}],"border-w-x":[{"border-x":[M]}],"border-w-y":[{"border-y":[M]}],"border-w-s":[{"border-s":[M]}],"border-w-e":[{"border-e":[M]}],"border-w-t":[{"border-t":[M]}],"border-w-r":[{"border-r":[M]}],"border-w-b":[{"border-b":[M]}],"border-w-l":[{"border-l":[M]}],"border-opacity":[{"border-opacity":[C]}],"border-style":[{border:[...B1(),"hidden"]}],"divide-x":[{"divide-x":[M]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[M]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[C]}],"divide-style":[{divide:B1()}],"border-color":[{border:[H]}],"border-color-x":[{"border-x":[H]}],"border-color-y":[{"border-y":[H]}],"border-color-s":[{"border-s":[H]}],"border-color-e":[{"border-e":[H]}],"border-color-t":[{"border-t":[H]}],"border-color-r":[{"border-r":[H]}],"border-color-b":[{"border-b":[H]}],"border-color-l":[{"border-l":[H]}],"divide-color":[{divide:[H]}],"outline-style":[{outline:["",...B1()]}],"outline-offset":[{"outline-offset":[y8,N1]}],"outline-w":[{outline:[y8,W7]}],"outline-color":[{outline:[Y]}],"ring-w":[{ring:v0()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[Y]}],"ring-opacity":[{"ring-opacity":[C]}],"ring-offset-w":[{"ring-offset":[y8,W7]}],"ring-offset-color":[{"ring-offset":[Y]}],shadow:[{shadow:["","inner","none",_7,GF]}],"shadow-color":[{shadow:[v9]}],opacity:[{opacity:[C]}],"mix-blend":[{"mix-blend":[...s1(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":s1()}],filter:[{filter:["","none"]}],blur:[{blur:[q]}],brightness:[{brightness:[O]}],contrast:[{contrast:[T]}],"drop-shadow":[{"drop-shadow":["","none",_7,N1]}],grayscale:[{grayscale:[F]}],"hue-rotate":[{"hue-rotate":[v]}],invert:[{invert:[_]}],saturate:[{saturate:[j]}],sepia:[{sepia:[z0]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[q]}],"backdrop-brightness":[{"backdrop-brightness":[O]}],"backdrop-contrast":[{"backdrop-contrast":[T]}],"backdrop-grayscale":[{"backdrop-grayscale":[F]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[v]}],"backdrop-invert":[{"backdrop-invert":[_]}],"backdrop-opacity":[{"backdrop-opacity":[C]}],"backdrop-saturate":[{"backdrop-saturate":[j]}],"backdrop-sepia":[{"backdrop-sepia":[z0]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[L]}],"border-spacing-x":[{"border-spacing-x":[L]}],"border-spacing-y":[{"border-spacing-y":[L]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",N1]}],duration:[{duration:U1()}],ease:[{ease:["linear","in","out","in-out",N1]}],delay:[{delay:U1()}],animate:[{animate:["none","spin","ping","pulse","bounce",N1]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[o]}],"scale-x":[{"scale-x":[o]}],"scale-y":[{"scale-y":[o]}],rotate:[{rotate:[P9,N1]}],"translate-x":[{"translate-x":[Y0]}],"translate-y":[{"translate-y":[Y0]}],"skew-x":[{"skew-x":[V]}],"skew-y":[{"skew-y":[V]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",N1]}],accent:[{accent:["auto",Y]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",N1]}],"caret-color":[{caret:[Y]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":J0()}],"scroll-mx":[{"scroll-mx":J0()}],"scroll-my":[{"scroll-my":J0()}],"scroll-ms":[{"scroll-ms":J0()}],"scroll-me":[{"scroll-me":J0()}],"scroll-mt":[{"scroll-mt":J0()}],"scroll-mr":[{"scroll-mr":J0()}],"scroll-mb":[{"scroll-mb":J0()}],"scroll-ml":[{"scroll-ml":J0()}],"scroll-p":[{"scroll-p":J0()}],"scroll-px":[{"scroll-px":J0()}],"scroll-py":[{"scroll-py":J0()}],"scroll-ps":[{"scroll-ps":J0()}],"scroll-pe":[{"scroll-pe":J0()}],"scroll-pt":[{"scroll-pt":J0()}],"scroll-pr":[{"scroll-pr":J0()}],"scroll-pb":[{"scroll-pb":J0()}],"scroll-pl":[{"scroll-pl":J0()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",N1]}],fill:[{fill:[Y,"none"]}],"stroke-w":[{stroke:[y8,W7,C$]}],stroke:[{stroke:[Y,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var PB=rv(BF);var CB=X0(v1(),1),i5=X0(B6(),1),P2=X0(v1(),1),I4=X0(B6(),1),SB=X0(B6(),1),u$=X0(B6(),1),v2=X0(v1(),1),m6=X0(B6(),1),hB=X0(v1(),1),Z4=X0(B6(),1),A9=X0(B6(),1),W0=X0(B6(),1),b5=X0(B6(),1),E$=X0(B6(),1),l0=X0(B6(),1),k6=X0(B6(),1),g1=X0(B6(),1),T0=X0(B6(),1),Q1=X0(B6(),1),F9=X0(B6(),1),G8=X0(v1(),1),n0=X0(B6(),1),u8=X0(v1(),1),y0=X0(B6(),1),j4=X0(B6(),1),QA=X0(v1(),1),DB=X0(B6(),1),c$=X0(v1(),1),d$=X0(B6(),1),XA=X0(v1(),1),yB=X0(B6(),1),mB=X0(v1(),1),uB=X0(B6(),1),ZA=X0(v1(),1),gB=X0(B6(),1),EB=X0(B6(),1),cB=X0(B6(),1),LF=Object.defineProperty,NF=(Y,G,q)=>(G in Y)?LF(Y,G,{enumerable:!0,configurable:!0,writable:!0,value:q}):Y[G]=q,WF=(Y,G,q)=>NF(Y,typeof G!=="symbol"?G+"":G,q);function X6(...Y){return PB(LB(Y))}var fT=[{id:"msg-1",role:"assistant",content:"Hello! I'm your AI assistant. How can I help you today?",timestamp:new Date(Date.now()-3600000)},{id:"msg-2",role:"user",content:"I want to plan a trip to Europe",timestamp:new Date(Date.now()-3500000)},{id:"msg-3",role:"assistant",content:"Great choice! Europe has amazing destinations. What's your budget and how many days do you have?",timestamp:new Date(Date.now()-3400000)},{id:"msg-4",role:"user",content:"Around $2000 for 5 days",timestamp:new Date(Date.now()-3300000)},{id:"msg-5",role:"assistant",content:"Perfect! I found some great destinations that fit your budget:",widgets:[{type:"list",id:"destinations-1",props:{items:[{id:"paris",title:"Paris, France",subtitle:"5 days • $1,850",description:"The City of Light with iconic landmarks",metadata:{city:"Paris",country:"France",lat:48.8566,lng:2.3522,price:1850,days:5}},{id:"rome",title:"Rome, Italy",subtitle:"5 days • $1,650",description:"Ancient history meets modern culture",metadata:{city:"Rome",country:"Italy",lat:41.9028,lng:12.4964,price:1650,days:5}},{id:"barcelona",title:"Barcelona, Spain",subtitle:"5 days • $1,450",description:"Beautiful beaches and Gaudí architecture",metadata:{city:"Barcelona",country:"Spain",lat:41.3851,lng:2.1734,price:1450,days:5}}]},actions:[{type:"select_destination",label:"Select",handler:"client",payload:{}},{type:"view_details",label:"Details",handler:"server",payload:{}}]}],timestamp:new Date(Date.now()-3200000)}],CT=[{id:"thread-1",title:"Trip to Europe",preview:"Planning a 5-day trip...",createdAt:new Date(Date.now()-86400000),updatedAt:new Date(Date.now()-3600000),messageCount:12},{id:"thread-2",title:"Restaurant Recommendations",preview:"Looking for good places...",createdAt:new Date(Date.now()-172800000),updatedAt:new Date(Date.now()-86400000),messageCount:8},{id:"thread-3",title:"Budget Planning",preview:"Help with monthly budget",createdAt:new Date(Date.now()-259200000),updatedAt:new Date(Date.now()-172800000),messageCount:15}];function _F(Y=1000){return new Promise((G)=>{setTimeout(()=>{G({id:`msg-${Date.now()}`,role:"assistant",content:"This is a mock response. In production, this would come from your AI agent API.",timestamp:new Date})},Y)})}function MF(Y){let G=Y.toLowerCase();if(G.includes("analyze")||G.includes("analysis"))return`Analysis complete for "${Y}". Found 247 records with an average value of $1,234. The data shows a 23% increase compared to last quarter. Key insights: Revenue is up, customer satisfaction improved by 15%, and operational costs decreased by 8%.`;if(G.includes("sales")||G.includes("revenue"))return"Sales data processed: Q4 2024 revenue reached $2.4M, representing 18% growth year-over-year. Top performing products: Enterprise Plan (+45%), Pro Plan (+32%), Basic Plan (+12%). Regional breakdown: North America (52%), Europe (31%), APAC (17%).";if(G.includes("report")||G.includes("summary"))return"Report generated successfully. Executive Summary: Overall performance exceeded targets by 12%. Marketing ROI improved to 3.2x, customer acquisition cost reduced by 18%, and lifetime value increased by 24%. Detailed breakdown available in attached widgets.";if(G.includes("data")||G.includes("metrics"))return"Data metrics retrieved: 1,847 active users, 12,394 sessions this month, 94.2% uptime, average response time 127ms. Performance is within acceptable parameters. No critical issues detected.";if(G.includes("customer")||G.includes("user"))return"Customer analysis complete: 523 new customers this month, 89% retention rate, average satisfaction score 4.6/5. Top feedback themes: excellent support (87%), easy to use (72%), good value (68%). 3 support tickets pending review.";return"This is a mock response showing how your agent would process and respond to commands. The actual response would be generated by your AI agent based on real data and context."}function wF(Y){let G=MF(Y),q=Y.toLowerCase(),O=[],H;if(q.includes("sales")||q.includes("revenue")||q.includes("analyze"))O.push({type:"card",id:`widget-${Date.now()}-1`,props:{title:"Q4 2024 Performance",description:"Revenue: $2.4M (+18% YoY)",footer:"Updated: "+new Date().toLocaleDateString()},actions:[{type:"view_details",label:"View Details",handler:"client",payload:{reportId:"q4-2024"}}]});if(q.includes("customer")||q.includes("user"))O.push({type:"list",id:`widget-${Date.now()}-2`,props:{items:[{id:"metric-1",title:"Active Users",subtitle:"1,847 users",description:"+12% from last month"},{id:"metric-2",title:"Retention Rate",subtitle:"89%",description:"Above industry average"},{id:"metric-3",title:"Satisfaction Score",subtitle:"4.6/5",description:"Based on 234 reviews"}]}});if(q.includes("task")||q.includes("todo")||q.includes("work")||q.includes("completed"))O.push({type:"list",id:`widget-${Date.now()}-tasks`,props:{items:[{id:"task-1",title:"Implement user authentication",subtitle:"Created just now",description:"Added OAuth 2.0 support with Google and GitHub providers",backgroundColor:"rgba(59, 130, 246, 0.15)",metadata:{status:"created",priority:"high",tags:["backend","security"]}},{id:"task-2",title:"Update API documentation",subtitle:"Modified 2 minutes ago",description:"Changed endpoint descriptions and added new examples",backgroundColor:"rgba(234, 179, 8, 0.15)",metadata:{status:"modified",priority:"medium",tags:["docs"]}},{id:"task-3",title:"Fix login redirect bug",subtitle:"Completed 5 minutes ago",description:"Users now properly redirected after successful login",backgroundColor:"rgba(34, 197, 94, 0.15)",metadata:{status:"completed",priority:"urgent",tags:["bugfix","auth"]}}]},actions:[{type:"view_task",label:"View",handler:"client",payload:{}},{type:"undo",label:"Undo",handler:"server",payload:{}}]}),H={type:"update_database",payload:{table:"tasks",operation:"mark_as_viewed",taskIds:["task-1","task-2","task-3"],timestamp:new Date().toISOString()}};if(q.includes("analyze")||q.includes("analysis"))H={type:"send_notification",payload:{recipient:"team@company.com",subject:"Analysis Complete",message:"Your requested analysis has been completed and is ready for review."}};return{message:G,widgets:O,action:H}}function RF(Y,G,q,O,H=30){let{message:w,widgets:L}=wF(Y),M=w.split(" "),T=0,F=setInterval(()=>{try{if(T<M.length)G({type:"token",content:M[T]+" "}),T++;else{clearInterval(F),L.forEach((_)=>{G({type:"widget",widget:_})});let v=`mock_thread_${Date.now()}`;G({type:"complete"}),q(v)}}catch(v){clearInterval(F),O(v instanceof Error?v:Error("Mock streaming error"))}},H)}function PF(Y){return new Promise((G,q)=>{let O=new FileReader;O.onload=()=>{let w=O.result.split(",")[1];G(w)},O.onerror=()=>q(Error("Failed to read file")),O.readAsDataURL(Y)})}function vF(Y){if(Y.startsWith("image/"))return"image";return"document"}function FF(Y){return["image/jpeg","image/png","image/gif","image/webp","application/pdf","text/plain","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(Y.type)}async function AF(Y){let G=await PF(Y);return{type:vF(Y.type),source:{type:"base64",media_type:Y.type,data:G}}}async function kF(Y){let G=Array.from(Y);return await Promise.all(G.map((O)=>AF(O)))}async function vB(Y,G){if(!G||G.length===0)return Y;let q=[];if(Y.trim())q.push({type:"text",text:Y.trim()});let O=await kF(G);return q.push(...O),q}function XX(Y){if(Y<1024)return`${Y} B`;if(Y<1048576)return`${(Y/1024).toFixed(1)} KB`;return`${(Y/1048576).toFixed(1)} MB`}var FB=10485760;function IB(Y){if(!FF(Y))return{valid:!1,error:`Unsupported file type: ${Y.type}`};if(Y.size>FB)return{valid:!1,error:`File too large: ${XX(Y.size)} (max ${XX(FB)})`};return{valid:!0}}var IF=["list","table"];function TF(Y){let G=[],q=!1,O=Y.match(/"items"\s*:\s*\[/);if(!O)return{items:G,isStreaming:!1};let H=Y.indexOf("[",O.index);if(H===-1)return{items:G,isStreaming:!0};let w=0,L=!1,M=!1,T=-1;for(let _=H+1;_<Y.length;_++){let W=Y[_];if(M){M=!1;continue}if(W==="\\"&&L){M=!0;continue}if(W==='"'){L=!L;continue}if(L)continue;if(W==="{"){if(w===0)T=_;w++}else if(W==="}"){if(w--,w===0&&T!==-1){let f=Y.slice(T,_+1);try{let h=JSON.parse(f);if(!h.id)h.id=`item-${G.length}-${y$(f)}`;G.push(h)}catch(h){}T=-1}}else if(W==="]"&&w===0){q=!1;break}}if(w>0||T!==-1)q=!0;let F=Y.slice(H);if(m$(F,0)===-1)q=!0;return{items:G,isStreaming:q}}function y$(Y){let G=0;for(let q=0;q<Y.length;q++){let O=Y.charCodeAt(q);G=(G<<5)-G+O,G=G&G}return Math.abs(G).toString(36)}function m$(Y,G){let q=0,O=!1,H=!1;for(let w=G;w<Y.length;w++){let L=Y[w];if(H){H=!1;continue}if(L==="\\"&&O){H=!0;continue}if(L==='"'){O=!O;continue}if(O)continue;if(L==="["||L==="{")q++;else if(L==="]"||L==="}"){if(q--,q===0)return w}}return-1}function QX(Y){let G=[],q=!1,O=!1,H=0,w=null,L=Y,M=Y.lastIndexOf("@ui:");if(M!==-1){let v=Y.slice(M),_=v.match(/^@ui:(\w+)/);if(_){let W=_[1],f=v.indexOf("[");if(f===-1)L=Y.slice(0,M),w=W,O=!0;else{let h=M+f;if(m$(Y,h)===-1)if(IF.includes(W)){let S=Y.slice(h+1),{items:C,isStreaming:i}=TF(S);if(C.length>0){L=Y.slice(0,M);let j=`widget-${W}-streaming-${y$(S)}`,o=L.replace(/[\s:;\-–—\.]+$/g,"").trim();if(o)G.push({type:"text",content:o});G.push({type:"widget",widget:{type:W,id:j,props:W==="table"?{rows:C,columns:[]}:{items:C},isStreaming:i}}),q=!0,O=!1,L=""}else L=Y.slice(0,M),w=W,O=!0}else L=Y.slice(0,M),w=W,O=!0}}}if(O)L=L.replace(/[\s:;\-–—\.]+$/g,"");let T=/@ui:(\w+)\[/g,F;while((F=T.exec(L))!==null){let v=F[1],_=F.index+F[0].length-1,W=m$(L,_);if(W===-1)continue;let f=L.slice(_+1,W);if(F.index>H){let h=L.slice(H,F.index).trim();if(h)G.push({type:"text",content:h})}try{let h=f.trim(),k=JSON.parse(h),S=`widget-${v}-${y$(h)}`,{metadata:C,actions:i,...j}=k;G.push({type:"widget",widget:{type:v,id:S,props:j,...i&&{actions:i},...C&&{metadata:C}}}),q=!0}catch(h){}H=W+1,T.lastIndex=H}if(H<L.length){let v=L.slice(H).trim();if(v)G.push({type:"text",content:v})}if(G.length===0&&L.trim())G.push({type:"text",content:L.trim()});if(w)G.push({type:"widget_pending",pendingType:w});return{segments:G,hasWidgets:q,hasPendingWidget:O}}var TB={card:{schema:"title, description?, image?, footer?, actions?: [{type, label}]",example:'@ui:card[{"title": "Summary", "description": "Details here"}]'},list:{schema:"items: [{id, title, subtitle?, description?, image?, metadata?: {any extra data}}], actions?: [{type, label}] - metadata is sent as action payload when clicked",example:'@ui:list[{"items": [{"id": "1", "title": "Item", "subtitle": "Info", "metadata": {"key": "value"}}]}]'},button_group:{schema:"buttons: [{id, label, variant?}] - Use for standalone buttons only, NOT for form submits",example:'@ui:button_group[{"buttons": [{"id": "ok", "label": "OK"}]}]'},form:{schema:"title?, fields: [{name, type: text|password|number|select|checkbox|textarea|date, label, required?, placeholder?, options?}], actions: [{type, label}] - Button is built-in via actions, do NOT add separate button",example:'@ui:form[{"title": "Settings", "fields": [{"name": "apiKey", "type": "password", "label": "API Key", "required": true}], "actions": [{"type": "save", "label": "Save"}]}]'},table:{schema:"columns: [{key, label}], rows: [...], striped?, compact?",example:'@ui:table[{"columns": [{"key": "name", "label": "Name"}], "rows": [{"name": "A"}]}]'},image:{schema:"src, alt, caption?",example:'@ui:image[{"src": "url", "alt": "desc"}]'},chart:{schema:"chartType: line|bar|pie, data: {labels, datasets}",example:'@ui:chart[{"chartType": "bar", "data": {"labels": ["A"], "datasets": [{"label": "X", "data": [10]}]}}]'},flow:{schema:"title, subtitle?, icon?: research|schedule|analyze|deploy|recurring|automation|data, steps: [{id, label, type?, color?: blue|purple|cyan|amber|emerald|rose|indigo|orange, status?: pending|active|completed|error|skipped}] - Horizontal pipeline. Use @label for agents. Types auto-detected from label.",example:'@ui:flow[{"title": "Deploy Pipeline", "icon": "deploy", "steps": [{"id": "1", "label": "Test", "color": "cyan"}, {"id": "2", "label": "Build", "color": "amber"}, {"id": "3", "label": "Deploy", "color": "rose"}]}]'}},fF=Object.keys(TB),CF=["flow"],fB=fF.filter((Y)=>!CF.includes(Y));function SF(Y){let G=Y||fB,q=`
180
+ ## UI Widgets
181
+ SYNTAX: @ui:type[{json}] - MUST use SQUARE BRACKETS [] around the JSON object.
182
+ CORRECT: @ui:list[{"items": [...]}]
183
+ WRONG: @ui:list{"items": [...]} (missing square brackets)
184
+
185
+ `;for(let O of G){let H=TB[O];if(!H)continue;q+=`${O}: ${H.schema} | ${H.example}
186
+ `}return q+=`
187
+ Per-item "metadata" is sent as payload on action click.
188
+ `,q}function hF(Y){return`
189
+ Widgets: @ui:type[{json}] - MUST use square brackets []. Example: @ui:list[{"items": [...]}]. Types: ${(Y||fB).join(", ")}. Per-item "metadata" is sent as action payload.
190
+ `}function VF({widget:Y,onAction:G}){let{title:q,description:O,image:H,footer:w}=Y.props;return i5.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[H&&i5.jsx("img",{src:H,alt:q,className:"w-full h-48 object-cover"}),i5.jsxs("div",{className:"p-4",children:[i5.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white",children:q}),O&&i5.jsx("p",{className:"!text-neutral-600 dark:!text-neutral-400 mt-2",children:O})]}),(w||Y.actions&&Y.actions.length>0)&&i5.jsxs("div",{className:"border-t border-neutral-200 dark:border-neutral-700 p-4 flex justify-between items-center",children:[w&&i5.jsx("span",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:w}),Y.actions&&Y.actions.length>0&&i5.jsx("div",{className:"flex gap-2",children:Y.actions.map((L,M)=>i5.jsx("button",{onClick:()=>G?.({type:L.type,payload:L.payload,widgetId:Y.id,timestamp:new Date}),className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:L.label},M))})]})]})}function DF({widget:Y,onAction:G}){let{items:q}=Y.props,O=Y.isStreaming??!1,H=P2.useRef(new Set),[w,L]=P2.useState(new Set);return P2.useEffect(()=>{let M=new Set(q.map((F)=>F.id)),T=new Set;if(q.forEach((F)=>{if(!H.current.has(F.id))T.add(F.id)}),q.forEach((F)=>H.current.add(F.id)),T.size>0){L(T);let F=setTimeout(()=>{L(new Set)},500);return()=>clearTimeout(F)}},[q]),I4.jsxs("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[q.map((M,T)=>{let F=w.has(M.id),v=T===q.length-1;return I4.jsxs("div",{className:`apteva-list-item flex items-center p-4 transition-colors ${!v||O?"border-b border-neutral-200 dark:border-neutral-700":""} ${!M.backgroundColor?"hover:bg-neutral-50 dark:hover:bg-neutral-800":""} ${F?"apteva-list-item-new":""}`,style:M.backgroundColor?{backgroundColor:M.backgroundColor}:void 0,children:[M.image&&I4.jsx("img",{src:M.image,alt:M.title,className:"w-16 h-16 rounded object-cover"}),I4.jsxs("div",{className:`flex-1 ${M.image?"ml-4":""}`,children:[I4.jsx("h4",{className:"font-semibold !text-neutral-900 dark:!text-white",children:M.title}),M.subtitle&&I4.jsx("p",{className:"!text-sm !text-neutral-600 dark:!text-neutral-400",children:M.subtitle}),M.description&&I4.jsx("p",{className:"!text-xs !text-neutral-500 dark:!text-neutral-500 mt-1",children:M.description})]}),Y.actions&&Y.actions.length>0&&I4.jsx("div",{className:"flex gap-2",children:Y.actions.map((_,W)=>I4.jsx("button",{onClick:()=>G?.({type:_.type,payload:M.metadata||M,widgetId:Y.id,timestamp:new Date}),className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:_.label},W))})]},M.id)}),O&&I4.jsxs("div",{className:"apteva-list-streaming flex items-center gap-3 p-4 text-neutral-500 dark:text-neutral-400",children:[I4.jsxs("div",{className:"apteva-streaming-dots flex gap-1",children:[I4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),I4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),I4.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),I4.jsx("span",{className:"text-sm",children:"Loading more..."})]})]})}function yF({widget:Y,onAction:G}){let{label:q,variant:O="primary",disabled:H=!1}=Y.props;return SB.jsx("button",{onClick:()=>Y.actions?.[0]&&G?.({type:Y.actions[0].type,payload:Y.actions[0].payload,widgetId:Y.id,timestamp:new Date}),disabled:H,className:X6("px-4 py-2 rounded-lg font-medium transition-colors",{primary:"bg-blue-500 !text-white hover:bg-blue-600",secondary:"bg-neutral-500 !text-white hover:bg-neutral-600",outline:"border-2 border-blue-500 !text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900",ghost:"!text-blue-500 hover:bg-blue-50 dark:hover:bg-blue-900"}[O],{"opacity-50 cursor-not-allowed":H}),children:q})}function mF({widget:Y,onAction:G}){let{layout:q="horizontal",buttons:O}=Y.props,H={primary:"bg-blue-500 !text-white hover:bg-blue-600",secondary:"bg-neutral-200 dark:bg-neutral-700 !text-neutral-800 dark:!text-neutral-200 hover:bg-neutral-300 dark:hover:bg-neutral-600",outline:"border border-neutral-300 dark:border-neutral-600 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800"},w=(L)=>{return Y.actions?.find((M)=>M.payload?.buttonId===L)||Y.actions?.[0]};return u$.jsx("div",{className:X6("flex gap-2",q==="vertical"?"flex-col":"flex-row flex-wrap"),children:O.map((L)=>{let M=w(L.id);return u$.jsx("button",{onClick:()=>{if(M)G?.({type:M.type,payload:{...M.payload,buttonId:L.id},widgetId:Y.id,timestamp:new Date})},className:X6("px-4 py-2 rounded-lg font-medium transition-colors text-sm",H[L.variant||"secondary"]),children:L.label},L.id)})})}function uF({widget:Y,onAction:G}){let{columns:q,rows:O,caption:H,compact:w=!1,striped:L=!1}=Y.props,M=Y.isStreaming??!1,T=v2.useRef(new Set),[F,v]=v2.useState(new Set);v2.useEffect(()=>{let W=new Set;if(O.forEach((f,h)=>{let k=f.id||`row-${h}`;if(!T.current.has(k))W.add(k)}),O.forEach((f,h)=>{let k=f.id||`row-${h}`;T.current.add(k)}),W.size>0){v(W);let f=setTimeout(()=>{v(new Set)},500);return()=>clearTimeout(f)}},[O]);let _=(W)=>{switch(W){case"center":return"text-center";case"right":return"text-right";default:return"text-left"}};return m6.jsx("div",{className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:m6.jsx("div",{className:"overflow-x-auto",children:m6.jsxs("table",{className:"w-full",children:[H&&m6.jsx("caption",{className:"px-4 py-2 text-sm text-neutral-600 dark:text-neutral-400 text-left bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:H}),m6.jsx("thead",{children:m6.jsx("tr",{className:"bg-neutral-50 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:q.map((W)=>m6.jsx("th",{className:X6("font-semibold text-neutral-900 dark:text-white",w?"px-3 py-2 text-xs":"px-4 py-3 text-sm",_(W.align)),style:W.width?{width:W.width}:void 0,children:W.label},W.key))})}),m6.jsxs("tbody",{children:[O.map((W,f)=>{let h=W.id||`row-${f}`,k=F.has(h);return m6.jsx("tr",{className:X6("apteva-table-row border-b border-neutral-200 dark:border-neutral-700 last:border-b-0","transition-colors hover:bg-neutral-50 dark:hover:bg-neutral-800",L&&f%2===1&&"bg-neutral-50/50 dark:bg-neutral-800/50",k&&"apteva-table-row-new"),onClick:()=>{if(Y.actions&&Y.actions.length>0)G?.({type:Y.actions[0].type,payload:W,widgetId:Y.id,timestamp:new Date})},style:{cursor:Y.actions?.length?"pointer":"default"},children:q.map((S)=>m6.jsx("td",{className:X6("text-neutral-700 dark:text-neutral-300",w?"px-3 py-2 text-xs":"px-4 py-3 text-sm",_(S.align)),children:W[S.key]??"—"},S.key))},h)}),O.length===0&&!M&&m6.jsx("tr",{children:m6.jsx("td",{colSpan:q.length||1,className:"px-4 py-8 text-center text-sm text-neutral-500 dark:text-neutral-400",children:"No data available"})}),M&&m6.jsx("tr",{className:"apteva-table-streaming",children:m6.jsx("td",{colSpan:q.length||1,className:"px-4 py-3 text-center",children:m6.jsxs("div",{className:"flex items-center justify-center gap-3 text-neutral-500 dark:text-neutral-400",children:[m6.jsxs("div",{className:"flex gap-1",children:[m6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"0ms"}}),m6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"150ms"}}),m6.jsx("span",{className:"w-2 h-2 bg-current rounded-full animate-pulse",style:{animationDelay:"300ms"}})]}),m6.jsx("span",{className:"text-sm",children:"Loading more..."})]})})})]})]})})})}function gF({widget:Y,onAction:G}){let{title:q,fields:O}=Y.props,[H,w]=hB.useState(()=>{let v={};return O.forEach((_)=>{v[_.name]=_.defaultValue??(_.type==="checkbox"?!1:"")}),v}),L=(v,_)=>{w((W)=>({...W,[v]:_}))},M=(v)=>{if(v.preventDefault(),Y.actions?.[0]&&G)G({type:Y.actions[0].type,payload:{...Y.actions[0].payload,formData:H},widgetId:Y.id,timestamp:new Date})},T=(v)=>{switch(v.type){case"text":case"password":case"number":case"date":return Z4.jsx("input",{type:v.type,name:v.name,value:H[v.name]||"",onChange:(W)=>L(v.name,v.type==="number"?Number(W.target.value):W.target.value),placeholder:v.placeholder,required:v.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"textarea":return Z4.jsx("textarea",{name:v.name,value:H[v.name]||"",onChange:(W)=>L(v.name,W.target.value),placeholder:v.placeholder,required:v.required,rows:3,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent"});case"select":return Z4.jsxs("select",{name:v.name,value:H[v.name]||"",onChange:(W)=>L(v.name,W.target.value),required:v.required,className:"w-full px-3 py-2 rounded-lg border transition-colors border-neutral-200 dark:border-neutral-600 bg-neutral-50 dark:bg-neutral-800 !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",children:[Z4.jsx("option",{value:"",children:v.placeholder||"Select..."}),v.options?.map((W)=>Z4.jsx("option",{value:W.value,children:W.label},W.value))]});case"checkbox":return Z4.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[Z4.jsx("input",{type:"checkbox",name:v.name,checked:H[v.name]||!1,onChange:(W)=>L(v.name,W.target.checked),className:"w-4 h-4 rounded border-neutral-300 dark:border-neutral-600 text-blue-500 focus:ring-blue-500"}),Z4.jsx("span",{className:"!text-neutral-700 dark:!text-neutral-300",children:v.label})]});default:return null}},F=Y.actions?.find((v)=>v.type==="submit")||Y.actions?.[0];return Z4.jsxs("form",{onSubmit:M,className:"border border-neutral-200 dark:border-neutral-700 rounded-xl bg-white dark:bg-neutral-900 overflow-hidden",children:[Z4.jsxs("div",{className:"p-4",children:[q&&Z4.jsx("h3",{className:"!text-lg font-semibold !text-neutral-900 dark:!text-white mb-4",children:q}),Z4.jsx("div",{className:"space-y-3",children:O.map((v)=>Z4.jsxs("div",{className:v.type==="checkbox"?"":"space-y-1",children:[v.type!=="checkbox"&&Z4.jsxs("label",{className:"block !text-sm font-medium !text-neutral-600 dark:!text-neutral-400",children:[v.label,v.required&&Z4.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),T(v)]},v.name))})]}),F&&Z4.jsx("div",{className:"px-4 pb-4",children:Z4.jsx("button",{type:"submit",className:"px-3 py-1.5 !text-sm rounded-lg font-medium transition-colors bg-blue-500 !text-white hover:bg-blue-600",children:F.label||"Submit"})})]})}function EF({widget:Y}){let{src:G,alt:q,caption:O}=Y.props;return A9.jsxs("figure",{className:"overflow-hidden rounded-xl",children:[A9.jsx("img",{src:G,alt:q,className:"w-full h-auto object-contain bg-neutral-100 dark:bg-neutral-800",loading:"lazy"}),O&&A9.jsx("figcaption",{className:"mt-2 text-center text-sm text-neutral-600 dark:text-neutral-400",children:O})]})}function cF({type:Y,status:G}){if(G==="completed")return W0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M5 13l4 4L19 7"})});if(G==="error")return W0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2.5,d:"M6 18L18 6M6 6l12 12"})});if(G==="active")return W0.jsx("div",{className:"w-3.5 h-3.5 rounded-full bg-current animate-pulse"});let q="w-4 h-4";if(Y==="time"||Y==="schedule"||Y==="clock")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})});if(Y==="recurring"||Y==="repeat")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})});if(Y==="agent"||Y?.startsWith("@"))return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0z"})});if(Y==="email"||Y==="mail")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})});if(Y==="slack"||Y==="message"||Y==="chat")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})});if(Y==="webhook"||Y==="api")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})});if(Y==="build"||Y==="compile"||Y==="package")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M20 7l-8-4-8 4m16 0l-8 4m8-4v10l-8 4m0-10L4 7m8 4v10M4 7v10l8 4"})});if(Y==="test"||Y==="check"||Y==="verify")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"})});if(Y==="deploy"||Y==="rocket"||Y==="launch")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})});if(Y==="push"||Y==="upload"||Y==="cloud")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})});if(Y==="generate"||Y==="create"||Y==="document"||Y==="file")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})});if(Y==="review"||Y==="inspect"||Y==="eye")return W0.jsxs("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"}),W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"})]});if(Y==="analyze"||Y==="research"||Y==="chart")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})});if(Y==="scrape"||Y==="crawl"||Y==="spider")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})});if(Y==="data"||Y==="database"||Y==="storage")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4m0 5c0 2.21-3.582 4-8 4s-8-1.79-8-4"})});if(Y==="notification"||Y==="bell"||Y==="alert")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 17h5l-1.405-1.405A2.032 2.032 0 0118 14.158V11a6.002 6.002 0 00-4-5.659V5a2 2 0 10-4 0v.341C7.67 6.165 6 8.388 6 11v3.159c0 .538-.214 1.055-.595 1.436L4 17h5m6 0v1a3 3 0 11-6 0v-1m6 0H9"})});if(Y==="transform"||Y==="process"||Y==="convert")return W0.jsx("svg",{className:q,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})});return W0.jsx("div",{className:"w-2 h-2 rounded-full bg-current opacity-50"})}function dF({icon:Y}){if(Y==="research"||Y==="multi-agent"||Y==="agents")return W0.jsx("div",{className:"w-10 h-10 rounded-lg bg-purple-100 dark:bg-purple-500/20 flex items-center justify-center",children:W0.jsx("svg",{className:"w-6 h-6 text-purple-600 dark:text-purple-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="schedule"||Y==="report"||Y==="calendar")return W0.jsx("div",{className:"w-10 h-10 rounded-lg bg-amber-100 dark:bg-amber-500/20 flex items-center justify-center",children:W0.jsx("svg",{className:"w-6 h-6 text-amber-600 dark:text-amber-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})});if(Y==="recurring"||Y==="repeat"||Y==="sync")return W0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:W0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})});if(Y==="analyze"||Y==="analysis"||Y==="chart")return W0.jsx("div",{className:"w-10 h-10 rounded-lg bg-cyan-100 dark:bg-cyan-500/20 flex items-center justify-center",children:W0.jsx("svg",{className:"w-6 h-6 text-cyan-600 dark:text-cyan-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})});if(Y==="deploy"||Y==="rocket"||Y==="launch")return W0.jsx("div",{className:"w-10 h-10 rounded-lg bg-blue-100 dark:bg-blue-500/20 flex items-center justify-center",children:W0.jsx("svg",{className:"w-6 h-6 text-blue-600 dark:text-blue-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})})});if(Y==="automation"||Y==="workflow"||Y==="process")return W0.jsx("div",{className:"w-10 h-10 rounded-lg bg-indigo-100 dark:bg-indigo-500/20 flex items-center justify-center",children:W0.jsx("svg",{className:"w-6 h-6 text-indigo-600 dark:text-indigo-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"})})});if(Y==="data"||Y==="pipeline"||Y==="etl")return W0.jsx("div",{className:"w-10 h-10 rounded-lg bg-emerald-100 dark:bg-emerald-500/20 flex items-center justify-center",children:W0.jsx("svg",{className:"w-6 h-6 text-emerald-600 dark:text-emerald-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 7v10c0 2.21 3.582 4 8 4s8-1.79 8-4V7M4 7c0 2.21 3.582 4 8 4s8-1.79 8-4M4 7c0-2.21 3.582-4 8-4s8 1.79 8 4"})})});return W0.jsx("div",{className:"w-10 h-10 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center",children:W0.jsx("svg",{className:"w-6 h-6 text-neutral-600 dark:text-neutral-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})})}function lF(){return W0.jsx("svg",{className:"w-4 h-4 text-neutral-400 dark:text-neutral-500 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:W0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})}var x5={blue:"bg-blue-100 dark:bg-blue-900/40 !text-blue-700 dark:!text-blue-300 border-blue-300 dark:border-blue-500",purple:"bg-purple-100 dark:bg-purple-900/40 !text-purple-700 dark:!text-purple-300 border-purple-300 dark:border-purple-500",cyan:"bg-cyan-100 dark:bg-cyan-900/40 !text-cyan-700 dark:!text-cyan-300 border-cyan-300 dark:border-cyan-500",amber:"bg-amber-100 dark:bg-amber-900/40 !text-amber-700 dark:!text-amber-300 border-amber-300 dark:border-amber-500",emerald:"bg-emerald-100 dark:bg-emerald-900/40 !text-emerald-700 dark:!text-emerald-300 border-emerald-300 dark:border-emerald-500",rose:"bg-rose-100 dark:bg-rose-900/40 !text-rose-700 dark:!text-rose-300 border-rose-300 dark:border-rose-500",indigo:"bg-indigo-100 dark:bg-indigo-900/40 !text-indigo-700 dark:!text-indigo-300 border-indigo-300 dark:border-indigo-500",orange:"bg-orange-100 dark:bg-orange-900/40 !text-orange-700 dark:!text-orange-300 border-orange-300 dark:border-orange-500",neutral:"bg-neutral-100 dark:bg-neutral-800 !text-neutral-600 dark:!text-neutral-300 border-neutral-300 dark:border-neutral-600"};function pF(Y,G){if(Y.color&&x5[Y.color])return x5[Y.color];if(G==="time"||G==="schedule"||G==="clock")return x5.blue;if(G==="agent"||G?.startsWith("@"))return x5.purple;if(G==="email"||G==="slack"||G==="message"||G==="notification")return x5.cyan;if(G==="generate"||G==="document"||G==="create")return x5.amber;if(G==="deploy"||G==="rocket"||G==="launch")return x5.rose;if(G==="build"||G==="compile"||G==="package")return x5.indigo;if(G==="test"||G==="check"||G==="verify")return x5.emerald;if(G==="data"||G==="database"||G==="storage")return x5.orange;return x5.blue}function xF({widget:Y}){let{title:G,subtitle:q,icon:O,steps:H}=Y.props;return W0.jsxs("div",{className:"rounded-xl bg-white dark:bg-neutral-900 border border-neutral-200 dark:border-neutral-700 overflow-hidden",children:[W0.jsxs("div",{className:"px-4 py-4 flex items-center gap-4",children:[W0.jsx(dF,{icon:O}),W0.jsxs("div",{className:"flex-1 min-w-0",children:[W0.jsx("h3",{className:"font-semibold text-base text-neutral-900 dark:text-white truncate",children:G}),q&&W0.jsx("p",{className:"text-sm text-neutral-500 dark:text-neutral-400 truncate mt-0.5",children:q})]})]}),W0.jsx("div",{className:"px-4 pb-4",children:W0.jsx("div",{className:"flex flex-wrap items-center gap-2",children:H.map((w,L)=>{let M=L===H.length-1,T=w.status==="active",F=w.status==="completed",v=w.status==="error",_=w.status==="skipped",W=w.label,f=w.type;if(!f)if(W.startsWith("@"))f="agent";else if(/^\d+[ap]m$/i.test(W)||/^(mon|tue|wed|thu|fri|sat|sun)/i.test(W))f="time";else{let S=W.toLowerCase();f={test:"test",build:"build",push:"push",deploy:"deploy",email:"email",slack:"slack",generate:"generate",review:"review",analyze:"analyze",scrape:"scrape",transform:"transform",notify:"notification",alert:"notification",webhook:"webhook",api:"api",data:"data",process:"process"}[S]}let h,k="";if(T)h="bg-blue-100 dark:bg-blue-900/40 !text-blue-700 dark:!text-blue-300 border-blue-400 dark:border-blue-400 ring-2 ring-blue-400";else if(F)h="bg-emerald-100 dark:bg-emerald-900/40 !text-emerald-700 dark:!text-emerald-300 border-emerald-400 dark:border-emerald-400";else if(v)h="bg-red-100 dark:bg-red-900/40 !text-red-700 dark:!text-red-300 border-red-400 dark:border-red-400";else if(_)h="bg-neutral-100 dark:bg-neutral-800 !text-neutral-400 dark:!text-neutral-500 border-neutral-300 dark:border-neutral-600",k="line-through";else h=pF(w,f);return W0.jsxs("div",{className:"flex items-center gap-2",children:[W0.jsxs("span",{className:`inline-flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium border transition-colors ${h} ${k}`,children:[W0.jsx(cF,{type:f,status:w.status}),W]}),!M&&W0.jsx(lF,{})]},w.id)})})})]})}function g$({widget:Y,onAction:G}){return b5.jsx("div",{className:"apteva-widget",children:(()=>{switch(Y.type){case"card":return b5.jsx(VF,{widget:Y,onAction:G});case"list":return b5.jsx(DF,{widget:Y,onAction:G});case"button":return b5.jsx(yF,{widget:Y,onAction:G});case"button_group":return b5.jsx(mF,{widget:Y,onAction:G});case"table":return b5.jsx(uF,{widget:Y,onAction:G});case"form":return b5.jsx(gF,{widget:Y,onAction:G});case"image":return b5.jsx(EF,{widget:Y});case"flow":return b5.jsx(xF,{widget:Y});default:return b5.jsxs("div",{className:"p-4 border border-yellow-300 bg-yellow-50 rounded-lg",children:[b5.jsxs("p",{className:"text-sm text-yellow-800",children:["Unknown widget type: ",Y.type]}),b5.jsx("pre",{className:"text-xs mt-2 overflow-auto",children:JSON.stringify(Y,null,2)})]})}})()})}function V$({widgets:Y,onAction:G,onWidgetMount:q,layout:O="stack",spacing:H="normal",columns:w=3,className:L}){CB.useEffect(()=>{Y.forEach((F)=>{q?.(F.id)})},[Y,q]);let M={stack:"flex flex-col",grid:`grid grid-cols-1 md:grid-cols-${w}`,masonry:"columns-1 md:columns-2 lg:columns-3"},T={tight:"gap-2",normal:"gap-4",loose:"gap-6"};return E$.jsx("div",{className:X6(M[O],T[H],L),children:Y.map((F)=>E$.jsx(g$,{widget:F,onAction:G},F.id))})}function AB({type:Y,className:G}){switch(Y){case"card":return l0.jsx("div",{className:X6("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:l0.jsxs("div",{className:"p-4 space-y-3",children:[l0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"}),l0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"}),l0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-5/6"})]})});case"list":return l0.jsx("div",{className:X6("apteva-widget-skeleton animate-pulse space-y-2",G),children:[1,2,3].map((q)=>l0.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg border border-neutral-200 dark:border-neutral-800",children:[l0.jsx("div",{className:"w-10 h-10 bg-neutral-200 dark:bg-neutral-700 rounded-full flex-shrink-0"}),l0.jsxs("div",{className:"flex-1 space-y-2",children:[l0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2"}),l0.jsx("div",{className:"h-2 bg-neutral-200 dark:bg-neutral-700 rounded w-3/4"})]})]},q))});case"button_group":return l0.jsxs("div",{className:X6("apteva-widget-skeleton animate-pulse flex gap-2",G),children:[l0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),l0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"}),l0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded-lg w-20"})]});case"form":return l0.jsxs("div",{className:X6("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4 space-y-4",G),children:[l0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/3"}),l0.jsxs("div",{className:"space-y-3",children:[l0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"}),l0.jsx("div",{className:"h-10 bg-neutral-200 dark:bg-neutral-700 rounded"})]}),l0.jsx("div",{className:"h-9 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})]});case"chart":return l0.jsxs("div",{className:X6("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[l0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/4 mb-4"}),l0.jsxs("div",{className:"flex items-end gap-2 h-32",children:[l0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/2"}),l0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-3/4"}),l0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-1/3"}),l0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-full"}),l0.jsx("div",{className:"flex-1 bg-neutral-200 dark:bg-neutral-700 rounded-t h-2/3"})]})]});case"image":return l0.jsx("div",{className:X6("apteva-widget-skeleton animate-pulse",G),children:l0.jsx("div",{className:"aspect-video bg-neutral-200 dark:bg-neutral-700 rounded-lg"})});case"gallery":return l0.jsx("div",{className:X6("apteva-widget-skeleton animate-pulse grid grid-cols-3 gap-2",G),children:[1,2,3].map((q)=>l0.jsx("div",{className:"aspect-square bg-neutral-200 dark:bg-neutral-700 rounded-lg"},q))});case"map":return l0.jsx("div",{className:X6("apteva-widget-skeleton animate-pulse",G),children:l0.jsx("div",{className:"h-48 bg-neutral-200 dark:bg-neutral-700 rounded-lg flex items-center justify-center",children:l0.jsxs("svg",{className:"w-8 h-8 text-neutral-400 dark:text-neutral-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[l0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"}),l0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 11a3 3 0 11-6 0 3 3 0 016 0z"})]})})});case"table":return l0.jsxs("div",{className:X6("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 overflow-hidden",G),children:[l0.jsxs("div",{className:"flex bg-neutral-100 dark:bg-neutral-800 border-b border-neutral-200 dark:border-neutral-700",children:[l0.jsx("div",{className:"flex-1 px-4 py-3",children:l0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-16"})}),l0.jsx("div",{className:"flex-1 px-4 py-3",children:l0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-20"})}),l0.jsx("div",{className:"flex-1 px-4 py-3",children:l0.jsx("div",{className:"h-3 bg-neutral-300 dark:bg-neutral-600 rounded w-14"})})]}),[1,2,3].map((q)=>l0.jsxs("div",{className:"flex border-b border-neutral-200 dark:border-neutral-800 last:border-b-0",children:[l0.jsx("div",{className:"flex-1 px-4 py-3",children:l0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-24"})}),l0.jsx("div",{className:"flex-1 px-4 py-3",children:l0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-16"})}),l0.jsx("div",{className:"flex-1 px-4 py-3",children:l0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-20"})})]},q))]});default:return l0.jsxs("div",{className:X6("apteva-widget-skeleton animate-pulse rounded-lg border border-neutral-200 dark:border-neutral-800 p-4",G),children:[l0.jsx("div",{className:"h-4 bg-neutral-200 dark:bg-neutral-700 rounded w-1/2 mb-2"}),l0.jsx("div",{className:"h-3 bg-neutral-200 dark:bg-neutral-700 rounded w-full"})]})}}function iF(Y){return/\.(jpg|jpeg|png|gif|webp|svg|bmp|ico)(\?.*)?$/i.test(Y)}function G3(Y,G=""){let q=[],O=/!\[([^\]]*)\]\(([^)]+)\)|\[([^\]]+)\]\(([^)]+)\)|(\*\*|__)(.+?)\5|`([^`]+)`/g,H=0,w,L=0;while((w=O.exec(Y))!==null){if(w.index>H)q.push(Y.slice(H,w.index));if(w[1]!==void 0||w[2]!==void 0){let M=w[1]||"",T=w[2];q.push(k6.jsx("img",{src:T,alt:M,className:"apteva-md-img"},`${G}img${L++}`))}else if(w[3]!==void 0||w[4]!==void 0){let M=w[3],T=w[4];if(iF(T))q.push(k6.jsx("img",{src:T,alt:M,className:"apteva-md-img"},`${G}img${L++}`));else q.push(k6.jsx("a",{href:T,target:"_blank",rel:"noopener noreferrer",className:"apteva-md-link",children:M},`${G}a${L++}`))}else if(w[5]!==void 0)q.push(k6.jsx("strong",{children:w[6]},`${G}b${L++}`));else if(w[7]!==void 0)q.push(k6.jsx("code",{className:"apteva-md-inline-code",children:w[7]},`${G}code${L++}`));H=w.index+w[0].length}if(H<Y.length)q.push(Y.slice(H));return q.length>0?q:[Y]}function jF(Y){let G=Y.split(`
191
+ `),q=[],O=0,H=0;while(H<G.length){let w=G[H],L=w.match(/^##\s+(.*)$/);if(L){q.push(k6.jsx("h2",{className:"apteva-md-h2",children:G3(L[1],`${O}`)},`h2${O++}`)),H++;continue}let M=w.match(/^###\s+(.*)$/);if(M){q.push(k6.jsx("h3",{className:"apteva-md-h3",children:G3(M[1],`${O}`)},`h3${O++}`)),H++;continue}let T=w.match(/^(\s*)([-*+])\s+(.*)$/);if(T){let _=[],W=T[1].length;while(H<G.length){let f=G[H].match(/^(\s*)([-*+])\s+(.*)$/);if(f&&f[1].length===W)_.push(k6.jsx("li",{className:"apteva-md-li",children:G3(f[3],`${O}`)},`li${O++}`)),H++;else break}q.push(k6.jsx("ul",{className:"apteva-md-ul",children:_},`ul${O++}`));continue}let F=w.match(/^(\s*)(\d+)\.\s+(.*)$/);if(F){let _=[],W=F[1].length;while(H<G.length){let f=G[H].match(/^(\s*)(\d+)\.\s+(.*)$/);if(f&&f[1].length===W)_.push(k6.jsx("li",{className:"apteva-md-li",children:G3(f[3],`${O}`)},`li${O++}`)),H++;else break}q.push(k6.jsx("ol",{className:"apteva-md-ol",children:_},`ol${O++}`));continue}if(w.match(/^\|(.+)\|$/)&&H+1<G.length){if(G[H+1].match(/^\|([\s:-]+\|)+$/)){let f=w.split("|").filter((k)=>k.trim()!=="").map((k)=>k.trim());H+=2;let h=[];while(H<G.length)if(G[H].match(/^\|(.+)\|$/)){let S=G[H].split("|").filter((C)=>C.trim()!=="").map((C)=>C.trim());h.push(S),H++}else break;q.push(k6.jsx("div",{className:"apteva-md-table-wrapper",children:k6.jsxs("table",{className:"apteva-md-table",children:[k6.jsx("thead",{children:k6.jsx("tr",{children:f.map((k,S)=>k6.jsx("th",{className:"apteva-md-th",children:G3(k,`th${O}${S}`)},`th${S}`))})}),k6.jsx("tbody",{children:h.map((k,S)=>k6.jsx("tr",{children:k.map((C,i)=>k6.jsx("td",{className:"apteva-md-td",children:G3(C,`td${O}${S}${i}`)},`td${i}`))},`tr${S}`))})]})},`table-wrapper${O++}`));continue}}if(w==="")q.push(k6.jsx("br",{},`br${O++}`));else q.push(k6.jsxs("span",{children:[G3(w,`${O}`),H<G.length-1?`
192
+ `:""]},`p${O++}`));H++}return q}function m8({content:Y,className:G=""}){return k6.jsx("div",{className:`apteva-md ${G}`,children:jF(Y)})}function oF({name:Y,status:G,isReceiving:q=!1,inputLength:O=0,streamOutput:H}){if(G==="preparing")return g1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-preparing",children:[g1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[g1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),g1.jsxs("span",{className:"apteva-tool-label",children:[g1.jsx("strong",{children:Y}),g1.jsx("span",{className:"apteva-tool-status-text",children:" preparing..."})]})]});if(G==="running")return g1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-running",children:[g1.jsxs("svg",{className:"apteva-tool-icon apteva-tool-icon-spin",fill:"none",viewBox:"0 0 24 24",children:[g1.jsx("circle",{className:"apteva-tool-spinner-track",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),g1.jsx("path",{className:"apteva-tool-spinner-fill",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),g1.jsxs("span",{className:"apteva-tool-label",children:[g1.jsx("strong",{children:Y}),H?g1.jsx("span",{className:"apteva-tool-stream-separator",children:" · "}):null,H?g1.jsx("span",{className:"apteva-tool-stream-output",children:H}):g1.jsxs(g1.Fragment,{children:[g1.jsx("span",{className:"apteva-tool-status-text",children:" running"}),g1.jsxs("span",{className:"apteva-tool-dots",children:[g1.jsx("span",{children:"."}),g1.jsx("span",{children:"."}),g1.jsx("span",{children:"."})]})]})]})]});if(G==="completed")return g1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-completed",children:[g1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),g1.jsx("span",{className:"apteva-tool-label",children:Y})]});return g1.jsxs("div",{className:"apteva-tool-card apteva-tool-card-error",children:[g1.jsx("svg",{className:"apteva-tool-icon",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:g1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),g1.jsxs("span",{className:"apteva-tool-label",children:[Y," failed"]})]})}function aF({message:Y,onAction:G,enableWidgets:q,onWidgetRender:O}){let H=Y.role==="user",w=Y.metadata?.content_segments,L=Y.metadata?.isStreaming===!0,M=Y.content||w&&w.length>0,T=K3.useRef(new Set),F=K3.useMemo(()=>{if(!q||H||!Y.content)return[];return QX(Y.content).segments.filter((o)=>o.type==="widget"&&!!o.widget).map((o)=>o.widget)},[q,H,Y.content]);K3.useEffect(()=>{if(O&&Y.widgets){for(let j of Y.widgets)if(!T.current.has(j.id))T.current.add(j.id),O(j)}},[Y.widgets,O]),K3.useEffect(()=>{if(O&&F.length>0){for(let j of F)if(!T.current.has(j.id))T.current.add(j.id),O(j)}},[F,O]);let v=(j)=>{if(!q||H)return T0.jsx(m8,{content:j});let z0=QX(j).segments.filter((V)=>V.type==="text"&&V.content).map((V)=>V.content).join("");if(!z0.trim())return null;return T0.jsx(m8,{content:z0})},_=()=>{if(!q||H||!Y.content)return null;let j=QX(Y.content),o=[],z0="";if(j.segments.forEach((V,H0)=>{if(V.type==="text"&&V.content)z0+=V.content;else if(V.type==="widget"&&V.widget){if(z0.trim())o.push(T0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:T0.jsx("div",{className:"apteva-message-content-assistant",children:T0.jsx(m8,{content:z0})})},`text-${H0}`)),z0="";o.push(T0.jsx("div",{className:"apteva-widget-standalone",children:T0.jsx(g$,{widget:V.widget,onAction:G})},`widget-${H0}`))}else if(V.type==="widget_pending"&&V.pendingType){if(z0.trim())o.push(T0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:T0.jsx("div",{className:"apteva-message-content-assistant",children:T0.jsx(m8,{content:z0})})},`text-${H0}`)),z0="";o.push(T0.jsx("div",{className:"apteva-widget-standalone",children:T0.jsx(AB,{type:V.pendingType})},`pending-${H0}`))}}),z0.trim())o.push(T0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:T0.jsx("div",{className:"apteva-message-content-assistant",children:T0.jsx(m8,{content:z0})})},"text-final"));return o.length>0?o:null},W=Y.metadata?.attachments||[],f=W.length>0,h=()=>{if(!f)return null;return T0.jsx("div",{className:"apteva-message-attachments flex flex-wrap gap-2 mb-2 justify-end",children:W.map((j,o)=>{let z0=j.type.startsWith("image/"),V=j.type==="application/pdf";if(z0&&j.preview)return T0.jsx("div",{className:"apteva-attachment-image relative rounded-lg overflow-hidden shadow-sm",children:T0.jsx("img",{src:j.preview,alt:j.name,className:"max-w-[150px] max-h-[150px] object-cover"})},o);return T0.jsxs("div",{className:"apteva-attachment-doc flex items-center gap-3 px-4 py-3 bg-neutral-100 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-xl shadow-sm",children:[T0.jsx("div",{className:"w-10 h-10 flex items-center justify-center bg-red-100 dark:bg-red-900/30 rounded-lg text-red-600 dark:text-red-400",children:V?T0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:T0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}):T0.jsx("svg",{className:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:T0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})}),T0.jsxs("div",{className:"flex flex-col min-w-0",children:[T0.jsx("span",{className:"text-sm font-medium text-neutral-800 dark:text-neutral-200 truncate max-w-[180px]",children:j.name}),T0.jsxs("span",{className:"text-xs text-neutral-500 dark:text-neutral-400",children:[V?"PDF":"Document"," · ",XX(j.size)]})]})]},o)})})},k=()=>{if(H)return T0.jsx("div",{className:"apteva-message-text",children:Y.content});if(L&&!M)return T0.jsxs("div",{className:"apteva-typing-indicator",children:[T0.jsx("span",{}),T0.jsx("span",{}),T0.jsx("span",{})]});if(w&&w.length>0)return null;return v(Y.content)},S=(j,o)=>{if(!q)return T0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:T0.jsx("div",{className:"apteva-message-content-assistant",children:T0.jsx(m8,{content:j})})},o);let z0=QX(j),V=[],H0="";if(z0.segments.forEach((Y0,K0)=>{if(Y0.type==="text"&&Y0.content)H0+=Y0.content;else if(Y0.type==="widget"&&Y0.widget){if(H0.trim())V.push(T0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:T0.jsx("div",{className:"apteva-message-content-assistant",children:T0.jsx(m8,{content:H0})})},`${o}-text-${K0}`)),H0="";V.push(T0.jsx("div",{className:"apteva-widget-standalone",children:T0.jsx(g$,{widget:Y0.widget,onAction:G})},`${o}-widget-${K0}`))}else if(Y0.type==="widget_pending"&&Y0.pendingType){if(H0.trim())V.push(T0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:T0.jsx("div",{className:"apteva-message-content-assistant",children:T0.jsx(m8,{content:H0})})},`${o}-text-${K0}`)),H0="";V.push(T0.jsx("div",{className:"apteva-widget-standalone",children:T0.jsx(AB,{type:Y0.pendingType})},`${o}-pending-${K0}`))}}),H0.trim())V.push(T0.jsx("div",{className:"apteva-message-bubble apteva-message-assistant",children:T0.jsx("div",{className:"apteva-message-content-assistant",children:T0.jsx(m8,{content:H0})})},`${o}-text-final`));return V},C=()=>{if(!w||w.length===0)return null;let j=[];return w.forEach((o,z0)=>{if(o.type==="text"&&o.content){let V=S(o.content,`seg-${z0}`);if(Array.isArray(V))j.push(...V);else j.push(V)}else if(o.type==="tool")j.push(T0.jsx("div",{className:"apteva-tool-call-standalone",children:T0.jsx(oF,{name:o.name,status:o.status||(o.result!==void 0?"completed":"running"),isReceiving:o.isReceiving,inputLength:o.inputLength,streamOutput:o.streamOutput})},o.id))}),j};if(!H&&(w&&w.length>0))return T0.jsxs("div",{className:"apteva-message-segmented",children:[C(),Y.widgets&&Y.widgets.length>0&&T0.jsx("div",{className:"apteva-widget-standalone",children:T0.jsx(V$,{widgets:Y.widgets,onAction:G,layout:"stack"})}),T0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});let i=_();if(!H&&q&&i)return T0.jsxs("div",{className:"apteva-message-segmented",children:[i,Y.widgets&&Y.widgets.length>0&&T0.jsx("div",{className:"apteva-widget-standalone",children:T0.jsx(V$,{widgets:Y.widgets,onAction:G,layout:"stack"})}),T0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-assistant",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});if(H&&f)return T0.jsxs("div",{className:"apteva-message-segmented apteva-message-user-with-attachments flex flex-col items-end",children:[h(),Y.content&&T0.jsx("div",{className:"apteva-message-bubble apteva-message-user",children:T0.jsx("div",{className:"apteva-message-content-user",children:T0.jsx("div",{className:"apteva-message-text",children:Y.content})})}),T0.jsx("div",{className:"apteva-message-timestamp apteva-message-timestamp-user",suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]});return T0.jsxs("div",{className:X6("apteva-message-bubble",H?"apteva-message-user":"apteva-message-assistant"),children:[T0.jsx("div",{className:H?"apteva-message-content-user":"apteva-message-content-assistant",children:k()}),Y.widgets&&Y.widgets.length>0&&T0.jsx("div",{className:"apteva-widget-standalone",children:T0.jsx(V$,{widgets:Y.widgets,onAction:G,layout:"stack"})}),T0.jsx("div",{className:X6("apteva-message-timestamp",H?"apteva-message-timestamp-user":"apteva-message-timestamp-assistant"),suppressHydrationWarning:!0,children:Y.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})}var kB=()=>Q1.jsx("svg",{className:"w-12 h-12 sm:w-16 sm:h-16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:Q1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),D$=()=>Q1.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:Q1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})});function rF({title:Y,subtitle:G,icon:q,prompts:O,variant:H="centered",chatVariant:w="default",onPromptClick:L}){let M=(O||[]).map((v)=>typeof v==="string"?{text:v}:v),T=M.length>0,F=Y||G||q;if(!F&&!T)return Q1.jsx("div",{className:"flex items-center justify-center h-full !text-neutral-500 dark:!text-neutral-400",children:Q1.jsxs("div",{className:"text-center space-y-2",children:[Q1.jsx("div",{className:"flex justify-center",children:Q1.jsx(kB,{})}),Q1.jsx("p",{className:"text-sm",children:"No messages yet. Start a conversation!"})]})});if(H==="minimal")return Q1.jsxs("div",{className:"flex flex-col h-full px-4 py-4",children:[F&&Q1.jsxs("div",{className:"mb-4",children:[Y&&Q1.jsx("h2",{className:"text-lg font-semibold !text-neutral-900 dark:!text-white",children:Y}),G&&Q1.jsx("p",{className:"text-sm !text-neutral-500 dark:!text-neutral-400 mt-1",children:G})]}),T&&Q1.jsx("div",{className:"flex-1 space-y-2",children:M.map((v,_)=>Q1.jsx("button",{onClick:()=>L(v.text),className:X6("w-full text-left px-4 py-3 rounded-xl","bg-neutral-50 dark:bg-neutral-800/50","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-100 dark:hover:bg-neutral-800","hover:border-neutral-300 dark:hover:border-neutral-600","transition-all duration-200","group"),children:Q1.jsxs("div",{className:"flex items-center gap-3",children:[Q1.jsx("div",{className:"flex-shrink-0 !text-neutral-400 dark:!text-neutral-500 group-hover:!text-blue-500 dark:group-hover:!text-blue-400 transition-colors",children:v.icon||Q1.jsx(D$,{})}),Q1.jsxs("div",{className:"flex-1 min-w-0",children:[Q1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white truncate",children:v.text}),v.description&&Q1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 truncate",children:v.description})]})]})},_))})]});return Q1.jsxs("div",{className:"flex flex-col items-center justify-center h-full px-4 py-6 sm:py-8",children:[Q1.jsxs("div",{className:"text-center mb-6 sm:mb-8 max-w-md",children:[Q1.jsx("div",{className:"mb-4 !text-neutral-400 dark:!text-neutral-500 flex justify-center",children:q||Q1.jsx(kB,{})}),Y&&Q1.jsx("h1",{className:"text-xl sm:text-2xl font-semibold !text-neutral-900 dark:!text-white mb-2",children:Y}),G&&Q1.jsx("p",{className:"text-sm sm:text-base !text-neutral-500 dark:!text-neutral-400",children:G})]}),T&&Q1.jsxs("div",{className:"w-full max-w-2xl",children:[Q1.jsx("div",{className:"sm:hidden space-y-2",children:M.map((v,_)=>Q1.jsx("button",{onClick:()=>L(v.text),className:X6("w-full text-left px-4 py-3 rounded-xl","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-50 dark:hover:bg-neutral-700","hover:border-blue-300 dark:hover:border-blue-600","active:scale-[0.98]","transition-all duration-200","shadow-sm hover:shadow","group"),children:Q1.jsxs("div",{className:"flex items-center gap-3",children:[Q1.jsx("div",{className:"flex-shrink-0 w-8 h-8 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors",children:v.icon||Q1.jsx(D$,{})}),Q1.jsxs("div",{className:"flex-1 min-w-0",children:[Q1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white",children:v.text}),v.description&&Q1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-0.5 line-clamp-1",children:v.description})]}),Q1.jsx("svg",{className:"w-4 h-4 !text-neutral-400 group-hover:!text-blue-500 transition-colors flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:Q1.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})},_))}),Q1.jsx("div",{className:"hidden sm:grid sm:grid-cols-2 gap-3",children:M.map((v,_)=>Q1.jsx("button",{onClick:()=>L(v.text),className:X6("text-left p-4 rounded-xl","bg-white dark:bg-neutral-800","border border-neutral-200 dark:border-neutral-700","hover:bg-neutral-50 dark:hover:bg-neutral-700","hover:border-blue-300 dark:hover:border-blue-600","hover:shadow-md","active:scale-[0.98]","transition-all duration-200","group"),children:Q1.jsxs("div",{className:"flex items-start gap-3",children:[Q1.jsx("div",{className:"flex-shrink-0 w-9 h-9 rounded-lg bg-neutral-100 dark:bg-neutral-700 flex items-center justify-center !text-neutral-500 dark:!text-neutral-400 group-hover:bg-blue-100 dark:group-hover:bg-blue-900/30 group-hover:!text-blue-600 dark:group-hover:!text-blue-400 transition-colors",children:v.icon||Q1.jsx(D$,{})}),Q1.jsxs("div",{className:"flex-1 min-w-0",children:[Q1.jsx("p",{className:"text-sm font-medium !text-neutral-900 dark:!text-white leading-snug",children:v.text}),v.description&&Q1.jsx("p",{className:"text-xs !text-neutral-500 dark:!text-neutral-400 mt-1 line-clamp-2",children:v.description})]})]})},_))})]})]})}function nF({messages:Y,onAction:G,welcomeTitle:q,welcomeSubtitle:O,welcomeIcon:H,suggestedPrompts:w,welcomeVariant:L,chatVariant:M,onPromptClick:T,enableWidgets:F,onWidgetRender:v}){let _=R2.useRef(null),W=R2.useRef(!0),f=R2.useRef(0),h=()=>{if(_.current){let{scrollTop:k,scrollHeight:S,clientHeight:C}=_.current;W.current=S-k-C<100}};return R2.useEffect(()=>{if(_.current&&W.current){let k=_.current.scrollHeight;if(k!==f.current)_.current.scrollTop=k,f.current=k}},[Y]),F9.jsx("div",{ref:_,className:"apteva-message-list apteva-scrollbar-hidden",onScroll:h,children:Y.length===0?F9.jsx(rF,{title:q,subtitle:O,icon:H,prompts:w,variant:L,chatVariant:M,onPromptClick:T||(()=>{})}):Y.map((k)=>F9.jsx("div",{className:k.role==="user"?"apteva-message-row-user":"apteva-message-row-assistant",children:F9.jsx(aF,{message:k,onAction:G,enableWidgets:F,onWidgetRender:v})},k.id))})}function tF({onSendMessage:Y,placeholder:G="Type a message...",disabled:q=!1,isLoading:O=!1,onStop:H,onFileUpload:w,onSwitchMode:L}){let[M,T]=G8.useState(""),[F,v]=G8.useState(!1),[_,W]=G8.useState([]),[f,h]=G8.useState(null),[k,S]=G8.useState(!1),C=G8.useRef(null),i=G8.useRef(null),j=G8.useRef(null),o=(q0)=>{if(q0.key==="Enter"&&!q0.shiftKey)q0.preventDefault(),z0()},z0=()=>{let q0=M.trim(),B0=_.length>0;if((q0||B0)&&!q){let J0=_.map((v0)=>v0.file);if(Y(M.trim(),J0.length>0?J0:void 0),T(""),W([]),h(null),S(!1),C.current)C.current.style.height="auto"}},V=(q0)=>{T(q0.target.value),q0.target.style.height="auto";let B0=q0.target.scrollHeight;q0.target.style.height=`${B0}px`;let J0=q0.target.value.includes(`
193
+ `),m0=B0>36;if(!k&&(J0||m0))S(!0);else if(k&&!J0&&!m0&&q0.target.value.length<20)S(!1)},H0=(q0)=>{if(q0.target.files&&q0.target.files.length>0){let B0=Array.from(q0.target.files),J0=[],v0=[];if(B0.forEach((m0)=>{let F0=IB(m0);if(F0.valid){let B1={file:m0};if(m0.type.startsWith("image/"))B1.preview=URL.createObjectURL(m0);J0.push(B1)}else v0.push(F0.error||"Invalid file")}),J0.length>0)W((m0)=>[...m0,...J0]);if(v0.length>0)h(v0.join(", ")),setTimeout(()=>h(null),5000);w?.(q0.target.files),v(!1),q0.target.value=""}},Y0=(q0)=>{W((B0)=>{let J0=B0[q0];if(J0.preview)URL.revokeObjectURL(J0.preview);return B0.filter((v0,m0)=>m0!==q0)})},K0=(q0)=>{if(q0.startsWith("image/"))return n0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})});if(q0==="application/pdf")return n0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})});return n0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})};return n0.jsxs("div",{className:"px-4 py-3 relative",children:[f&&n0.jsx("div",{className:"absolute bottom-full left-4 right-4 mb-2 p-3 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg z-20",children:n0.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-sm",children:[n0.jsx("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),n0.jsx("span",{children:f})]})}),_.length>0&&n0.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:_.map((q0,B0)=>n0.jsxs("div",{className:"relative group flex items-center gap-2 px-3 py-2 bg-neutral-100 dark:bg-neutral-800 border border-neutral-200 dark:border-neutral-700 rounded-lg",children:[q0.preview?n0.jsx("img",{src:q0.preview,alt:q0.file.name,className:"w-8 h-8 object-cover rounded"}):n0.jsx("div",{className:"w-8 h-8 flex items-center justify-center bg-neutral-200 dark:bg-neutral-700 rounded !text-neutral-500 dark:!text-neutral-400",children:K0(q0.file.type)}),n0.jsxs("div",{className:"flex flex-col min-w-0",children:[n0.jsx("span",{className:"text-xs font-medium !text-neutral-700 dark:!text-neutral-300 truncate max-w-[120px]",children:q0.file.name}),n0.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:XX(q0.file.size)})]}),n0.jsx("button",{onClick:()=>Y0(B0),className:"absolute -top-1.5 -right-1.5 w-5 h-5 bg-neutral-500 hover:bg-red-500 text-white rounded-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",title:"Remove file",children:n0.jsx("svg",{className:"w-3 h-3",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},B0))}),n0.jsxs("div",{className:"apteva-composer",style:{gridTemplateColumns:"auto 1fr auto",gridTemplateAreas:k?'"textarea textarea textarea" "plus . send"':'"plus textarea send"',alignItems:"end"},children:[n0.jsxs("div",{className:"relative flex-shrink-0 self-end",style:{gridArea:"plus"},children:[n0.jsx("button",{ref:j,onClick:()=>v(!F),className:"apteva-composer-menu-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800",title:"More options",children:n0.jsx("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n0.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),F&&n0.jsxs(n0.Fragment,{children:[n0.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>v(!1)}),n0.jsxs("div",{className:"apteva-composer-menu fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",style:{left:j.current?.getBoundingClientRect().left??0,bottom:window.innerHeight-(j.current?.getBoundingClientRect().top??0)+8},children:[n0.jsxs("button",{onClick:()=>{i.current?.click(),v(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",children:[n0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n0.jsx("path",{d:"M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(2, 3)"})}),n0.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),L&&n0.jsxs("button",{onClick:()=>{L(),v(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",children:[n0.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:n0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 10V3L4 14h7v7l9-11h-7z"})}),n0.jsx("span",{className:"!text-sm font-medium",children:"Switch to command mode"})]})]})]})]}),n0.jsx("textarea",{ref:C,value:M,onChange:V,onKeyDown:o,placeholder:G,disabled:q,className:"apteva-composer-textarea resize-none bg-transparent border-none focus:outline-none !text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500 py-1 disabled:opacity-50 disabled:cursor-not-allowed overflow-y-auto max-h-[200px]",style:{gridArea:"textarea"},rows:1}),n0.jsx("div",{className:"self-end",style:{gridArea:"send"},children:O&&H?n0.jsx("button",{onClick:H,className:"apteva-composer-stop-btn",title:"Stop generation",children:n0.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n0.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}):n0.jsx("button",{onClick:z0,disabled:!M.trim()&&_.length===0||q,className:"apteva-composer-send-btn w-8 h-8 rounded-lg flex items-center justify-center font-bold transition-all flex-shrink-0 border border-neutral-300 dark:border-neutral-600 bg-white dark:bg-neutral-800 !text-neutral-700 dark:!text-neutral-300 hover:bg-neutral-50 dark:hover:bg-neutral-700 disabled:opacity-30 disabled:cursor-not-allowed !text-lg",title:"Send message",children:n0.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:n0.jsx("path",{d:"M8 3L8 13M8 3L4 7M8 3L12 7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),n0.jsx("input",{ref:i,type:"file",multiple:!0,onChange:H0,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}function sF({onExecute:Y,state:G,response:q,error:O,plan:H,streamedContent:w,toolName:L,onApprove:M,onReject:T,onReset:F,onStop:v,onExpand:_,placeholder:W="Enter your command...",disabled:f=!1}){let[h,k]=u8.useState(""),[S,C]=u8.useState([]),[i,j]=u8.useState(null),[o,z0]=u8.useState(!1),V=u8.useRef(null),H0=u8.useRef(null),Y0=u8.useRef(null),K0=()=>{let x0=h.trim(),U1=S.length>0;if((x0||U1)&&!f&&G==="idle"){let n=S.map((S0)=>S0.file);Y(h.trim(),n.length>0?n:void 0),k(""),C([])}},q0=(x0)=>{if(x0.key==="Enter"&&!x0.shiftKey)x0.preventDefault(),K0()},B0=()=>{F?.(),V.current?.focus()},J0=(x0)=>{if(k(x0),V.current)V.current.style.height="auto",V.current.style.height=`${Math.min(V.current.scrollHeight,120)}px`},v0=(x0)=>{if(x0.target.files&&x0.target.files.length>0){let U1=Array.from(x0.target.files),n=[],S0=[];if(U1.forEach((u0)=>{let s0=IB(u0);if(s0.valid){let R0={file:u0};if(u0.type.startsWith("image/"))R0.preview=URL.createObjectURL(u0);n.push(R0)}else S0.push(s0.error||"Invalid file")}),n.length>0)C((u0)=>[...u0,...n]);if(S0.length>0)j(S0.join(", ")),setTimeout(()=>j(null),5000);z0(!1),x0.target.value=""}},m0=(x0)=>{C((U1)=>{let n=U1[x0];if(n.preview)URL.revokeObjectURL(n.preview);return U1.filter((S0,u0)=>u0!==x0)})},F0=(x0)=>{if(x0.startsWith("image/"))return y0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})});if(x0==="application/pdf")return y0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})});return y0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})},B1=()=>{if(G==="loading"){if(L)return{text:L,isToolCall:!0};if(w)return{text:w,isToolCall:!1};return{text:"Processing...",isToolCall:!1}}if(G==="success"&&q)return{text:q,isToolCall:!1};if(G==="error"&&O)return{text:O,isToolCall:!1};if(G==="plan-pending"&&H)return{text:H,isToolCall:!1};return{text:"",isToolCall:!1}},s1=G!=="idle",{text:E1,isToolCall:p1}=B1();return y0.jsxs("div",{className:"w-full relative",children:[i&&y0.jsx("div",{className:"absolute -top-12 left-0 right-0 mx-3 p-2 bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-800 rounded-lg z-30",children:y0.jsxs("div",{className:"flex items-center gap-2 !text-red-700 dark:!text-red-300 text-xs",children:[y0.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),y0.jsx("span",{children:i})]})}),y0.jsxs("div",{className:X6("apteva-composer flex items-center gap-2 px-3 py-2 border-2 bg-white dark:bg-neutral-900 transition-all duration-200",G==="idle"&&"border-neutral-200 dark:border-neutral-700",G==="loading"&&"border-blue-400 dark:border-blue-500",G==="plan-pending"&&"border-amber-400 dark:border-amber-500",G==="success"&&"border-green-400 dark:border-green-500",G==="error"&&"border-red-400 dark:border-red-500"),children:[y0.jsxs("div",{className:"w-8 h-8 flex items-center justify-center flex-shrink-0",children:[G==="idle"&&y0.jsxs("div",{className:"relative",children:[y0.jsx("button",{ref:Y0,onClick:()=>z0(!o),className:"apteva-composer-menu-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all !text-neutral-500 dark:!text-neutral-400 hover:!text-neutral-700 dark:hover:!text-neutral-200 hover:bg-neutral-100 dark:hover:bg-neutral-800",title:"More options",children:y0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y0.jsx("path",{d:"M10 5v10M5 10h10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}),o&&y0.jsxs(y0.Fragment,{children:[y0.jsx("div",{className:"fixed inset-0 z-[9998]",onClick:()=>z0(!1)}),y0.jsxs("div",{className:"apteva-composer-menu fixed bg-neutral-800 dark:bg-neutral-800 rounded-xl shadow-lg overflow-hidden z-[9999] min-w-[200px]",style:{left:Y0.current?.getBoundingClientRect().left??0,top:(Y0.current?.getBoundingClientRect().bottom??0)+8},children:[y0.jsxs("button",{onClick:()=>{H0.current?.click(),z0(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left",children:[y0.jsx("svg",{width:"18",height:"18",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y0.jsx("path",{d:"M10.5 3.5L5.5 8.5C4.67157 9.32843 4.67157 10.6716 5.5 11.5C6.32843 12.3284 7.67157 12.3284 8.5 11.5L14.5 5.5C15.8807 4.11929 15.8807 1.88071 14.5 0.5C13.1193 -0.880711 10.8807 -0.880711 9.5 0.5L3.5 6.5C1.56846 8.43154 1.56846 11.5685 3.5 13.5C5.43154 15.4315 8.56846 15.4315 10.5 13.5L15.5 8.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",transform:"translate(2, 3)"})}),y0.jsx("span",{className:"!text-sm font-medium",children:"Add photos & files"})]}),_&&y0.jsxs("button",{onClick:()=>{_(),z0(!1)},className:"w-full flex items-center gap-3 px-4 py-3 hover:bg-neutral-700 dark:hover:bg-neutral-700 transition-colors !text-white text-left border-t border-neutral-700 dark:border-neutral-700",children:[y0.jsx("svg",{className:"w-4.5 h-4.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"})}),y0.jsx("span",{className:"!text-sm font-medium",children:"Expand to chat"})]})]})]})]}),G==="loading"&&!L&&y0.jsx("div",{className:"w-4 h-4 border-2 border-blue-200 border-t-blue-500 rounded-full animate-spin"}),G==="loading"&&L&&y0.jsx("div",{className:"w-2 h-2 rounded-full bg-blue-500 animate-pulse"})]}),S.length>0&&G==="idle"&&y0.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:S.map((x0,U1)=>y0.jsxs("div",{className:"relative group flex items-center justify-center w-6 h-6 bg-neutral-100 dark:bg-neutral-800 rounded overflow-hidden",title:x0.file.name,children:[x0.preview?y0.jsx("img",{src:x0.preview,alt:x0.file.name,className:"w-6 h-6 object-cover"}):y0.jsx("span",{className:"text-xs !text-neutral-500 dark:!text-neutral-400",children:F0(x0.file.type)}),y0.jsx("button",{onClick:()=>m0(U1),className:"absolute inset-0 bg-black/50 opacity-0 group-hover:opacity-100 flex items-center justify-center transition-opacity",title:"Remove",children:y0.jsx("svg",{className:"w-3 h-3 text-white",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},U1))}),G==="idle"?y0.jsx("textarea",{ref:V,value:h,onChange:(x0)=>J0(x0.target.value),onKeyDown:q0,placeholder:S.length>0?"Add a message...":W,disabled:f,rows:1,className:X6("flex-1 resize-none bg-transparent border-none focus:outline-none","!text-neutral-900 dark:!text-neutral-100 placeholder-neutral-400 dark:placeholder-neutral-500","text-sm leading-relaxed py-1","disabled:opacity-50"),style:{minHeight:"24px",maxHeight:"120px"}}):y0.jsx("div",{className:X6("flex-1 text-sm py-1 truncate flex items-center gap-2",G==="loading"&&!p1&&"!text-neutral-600 dark:!text-neutral-400",G==="loading"&&p1&&"!text-blue-600 dark:!text-blue-400",G==="success"&&"!text-neutral-900 dark:!text-neutral-100",G==="error"&&"!text-red-600 dark:!text-red-400",G==="plan-pending"&&"!text-amber-700 dark:!text-amber-300"),children:p1?y0.jsxs(y0.Fragment,{children:[y0.jsx("span",{className:"font-mono",children:E1}),y0.jsx("span",{className:"text-neutral-400 dark:text-neutral-500",children:"Running..."})]}):E1}),y0.jsx("div",{className:"w-8 h-8 flex items-center justify-center flex-shrink-0",children:G==="plan-pending"?y0.jsxs("div",{className:"flex items-center gap-1",children:[y0.jsx("button",{onClick:M,className:"px-2 py-1 bg-amber-500 text-white rounded-lg hover:bg-amber-600 transition-colors text-xs font-medium",children:"Approve"}),y0.jsx("button",{onClick:T,className:"px-2 py-1 bg-neutral-200 dark:bg-neutral-700 text-neutral-700 dark:text-neutral-300 rounded-lg hover:bg-neutral-300 dark:hover:bg-neutral-600 transition-colors text-xs font-medium",children:"Modify"})]}):y0.jsxs(y0.Fragment,{children:[G==="loading"&&v&&y0.jsx("button",{onClick:v,className:"apteva-composer-stop-btn",title:"Stop generation",children:y0.jsx("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:y0.jsx("rect",{x:"2",y:"2",width:"10",height:"10",rx:"1",fill:"currentColor"})})}),(G==="success"||G==="error")&&y0.jsx("button",{onClick:B0,className:"w-8 h-8 rounded-lg flex items-center justify-center !text-neutral-400 hover:!text-neutral-600 dark:hover:!text-neutral-300 hover:bg-neutral-100 dark:hover:bg-neutral-800 transition-colors",title:"New command",children:y0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),G==="idle"&&y0.jsx("button",{onClick:K0,disabled:!h.trim()&&S.length===0||f,className:X6("apteva-composer-send-btn w-8 h-8 rounded-lg flex items-center justify-center transition-all","border border-neutral-200 dark:border-neutral-700","disabled:opacity-30 disabled:cursor-not-allowed",h.trim()||S.length>0?"bg-neutral-900 dark:bg-white !text-white dark:!text-neutral-900 border-neutral-900 dark:border-white":"bg-white dark:bg-neutral-800 !text-neutral-400"),title:"Execute command",children:y0.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y0.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 12h14M12 5l7 7-7 7"})})})]})})]}),y0.jsx("input",{ref:H0,type:"file",multiple:!0,onChange:v0,className:"hidden",accept:"image/*,application/pdf,.doc,.docx,.txt"})]})}var eF="http://91.99.200.48:3000/agents",bA="agt_894abd5966bc9f1e9f8f17f2a6f6b5e0",zA=class{constructor(){WF(this,"config"),this.config={apiUrl:eF,apiKey:bA}}configure(Y){if(Y.apiUrl)this.config.apiUrl=Y.apiUrl;if(Y.apiKey)this.config.apiKey=Y.apiKey}getConfig(){return{...this.config}}async chat(Y){try{console.log("[AptevaClient] Chat request:",{agent_id:Y.agent_id,message:typeof Y.message==="string"?Y.message.substring(0,100)+"...":"[multi-part message]",system:Y.system,stream:Y.stream});let G=await fetch(`${this.config.apiUrl}/chat`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey},body:JSON.stringify(Y)});if(!G.ok){let O=await G.json().catch(()=>({error:"Request failed"}));throw Error(O.error||`Request failed with status ${G.status}`)}let q=await G.json();return{message:q.response||q.message||"",thread_id:q.thread_id,widgets:q.widgets}}catch(G){throw console.error("Chat API error:",G),G}}async chatStream(Y,G,q,O){try{console.log("[AptevaClient] Chat stream request:",{agent_id:Y.agent_id,message:typeof Y.message==="string"?Y.message.substring(0,100)+"...":"[multi-part message]",system:Y.system,stream:Y.stream});let H=await fetch(`${this.config.apiUrl}/chat`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey,Accept:"text/event-stream"},body:JSON.stringify({...Y,stream:!0})});if(!H.ok){let F=await H.json().catch(()=>({error:"Request failed"}));throw Error(F.error||`Request failed with status ${H.status}`)}let w=H.body?.getReader();if(!w)throw Error("Response body is not readable");let L=new TextDecoder,M="",T="";while(!0){let{done:F,value:v}=await w.read();if(F)break;M+=L.decode(v,{stream:!0});let _=M.split(`
194
+ `);M=_.pop()||"";for(let W of _){if(!W.trim()||W.startsWith(":"))continue;if(W.startsWith("data: ")){let f=W.slice(6);if(f==="[DONE]"){q?.(T);return}try{let h=JSON.parse(f);if(h.thread_id)T=h.thread_id;G(h)}catch(h){console.warn("[AptevaClient] Failed to parse SSE data:",f)}}}}q?.(T)}catch(H){let w=H instanceof Error?H:Error("Unknown error");throw O?.(w),w}}async createThread(Y,G){let q=await fetch(`${this.config.apiUrl}/agents/${Y}/threads`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey},body:JSON.stringify({metadata:G})});if(!q.ok){let H=await q.json().catch(()=>({error:"Request failed"}));throw Error(H.error||`Request failed with status ${q.status}`)}return(await q.json()).thread_id}async getThreadMessages(Y){let G=await fetch(`${this.config.apiUrl}/threads/${Y}/messages`,{method:"GET",headers:{"X-API-Key":this.config.apiKey}});if(!G.ok){let O=await G.json().catch(()=>({error:"Request failed"}));throw Error(O.error||`Request failed with status ${G.status}`)}return(await G.json()).messages}async cancelRequest(Y,G){try{let q=await fetch(`${this.config.apiUrl}/agents/${Y}/requests/${G}/cancel`,{method:"POST",headers:{"Content-Type":"application/json","X-API-Key":this.config.apiKey}});if(!q.ok){let O=await q.json().catch(()=>({error:"Cancel request failed"}));throw Error(O.error||`Cancel request failed with status ${q.status}`)}}catch(q){throw console.error("[AptevaClient] Cancel request error:",q),q}}},w2=new zA,VB=l1.forwardRef(function({agentId:G,threadId:q,initialMessages:O=[],context:H,apiUrl:w,apiKey:L,useMock:M=!1,initialMode:T="chat",showModeToggle:F=!1,onModeChange:v,commandVariant:_="default",planMode:W=!1,onPlanModeChange:f,enableStreaming:h=!0,showProgress:k=!0,loadingText:S="Processing...",welcomeTitle:C,welcomeSubtitle:i,welcomeIcon:j,suggestedPrompts:o,welcomeVariant:z0,onThreadChange:V,onMessageSent:H0,onAction:Y0,onFileUpload:K0,onComplete:q0,onError:B0,onToolCall:J0,onToolResult:v0,variant:m0="default",placeholder:F0,showHeader:B1=!0,headerTitle:s1="Chat",enableWidgets:E1=!1,availableWidgets:p1,compactWidgetContext:x0=!1,onWidgetRender:U1,className:n},S0){let[u0,s0]=l1.useState(O),[R0,t0]=l1.useState(!1),[$1,O1]=l1.useState(q||null),[f6,J6]=l1.useState(T),[u6,g6]=l1.useState(null),[z6,X1]=l1.useState("idle"),[l6,E6]=l1.useState(null),[_6,v6]=l1.useState(null),[I5,Y6]=l1.useState(0),[O4,$6]=l1.useState(""),[L4,L6]=l1.useState(""),[M6,J4]=l1.useState(null),[T4,h6]=l1.useState(null),[p6,N0]=l1.useState(""),[d0,i0]=l1.useState(""),[T1,x1]=l1.useState(W),[F6,e1]=l1.useState(!1),c6=l1.useRef(null),H1=l1.useRef(null);l1.useImperativeHandle(S0,()=>({sendMessage:async(R1)=>{if(H1.current)await H1.current(R1)},sendSystemMessage:async(R1)=>{if(H1.current)await H1.current(R1,void 0,!0)},getMessages:()=>u0,clearMessages:()=>s0([])}),[u0]);let Z1=l1.useMemo(()=>{if(!E1)return H;let R1=x0?hF(p1):SF(p1);return H?`${H}
195
+ ${R1}`:R1},[H,E1,p1,x0]);l1.useEffect(()=>{if(w||L)w2.configure({...w&&{apiUrl:w},...L&&{apiKey:L}})},[w,L]),l1.useEffect(()=>{if(q)V?.(q)},[q,V]),l1.useEffect(()=>{x1(W)},[W]),l1.useEffect(()=>{let R1=(i1)=>{let Q6=i1.target;if(F6&&!Q6.closest(".settings-menu-container"))e1(!1)};return document.addEventListener("mousedown",R1),()=>document.removeEventListener("mousedown",R1)},[F6]);let m4=(R1)=>{if(J6(R1),v?.(R1),R1==="command")X1("idle"),E6(null),v6(null)},Y4=f6==="chat"?"Type a message...":"Enter your command...",u4=async(R1,i1,Q6)=>{let h1=i1&&i1.length>0,A=h1?i1.map((t)=>({name:t.name,type:t.type,size:t.size,preview:t.type.startsWith("image/")?URL.createObjectURL(t):void 0})):[];if(!Q6){let t={id:`msg-${Date.now()}`,role:"user",content:R1,timestamp:new Date,metadata:h1?{attachments:A}:void 0};s0((Z0)=>[...Z0,t]),H0?.(t)}t0(!0);try{let t=await vB(R1,i1);if(M){let Z0=await _F(1000);s0((P)=>[...P,Z0])}else{let Z0=[],P="",u=[],b0=$1,U0={},_0={},g0=`msg-${Date.now()}`,f0=()=>{let Q0=[...Z0];if(P){let L0=Q0[Q0.length-1];if(L0&&L0.type==="text")L0.content=P;else Q0.push({type:"text",content:P})}s0((L0)=>{let c0=L0[L0.length-1];if(c0&&c0.role==="assistant")return[...L0.slice(0,-1),{...c0,content:P,widgets:u.length>0?u:void 0,metadata:{...c0.metadata,content_segments:Q0,isStreaming:!0}}];else return[...L0,{id:g0,role:"assistant",content:P,widgets:u.length>0?u:void 0,timestamp:new Date,metadata:{content_segments:Q0,isStreaming:!0}}]})};await w2.chatStream({agent_id:G,message:t,stream:!0,...$1&&{thread_id:$1},...Z1&&{system:Z1}},(Q0)=>{switch(Q0.type){case"thread_id":if(Q0.thread_id){if(b0=Q0.thread_id,!$1)O1(Q0.thread_id),V?.(Q0.thread_id)}break;case"request_id":if(Q0.request_id)h6(Q0.request_id);break;case"content":case"token":if(Q0.content)P+=Q0.content,f0();break;case"tool_call":if(Q0.tool_id&&Q0.tool_name){let L0=Q0.tool_display_name||Q0.tool_name;if(P)Z0.push({type:"text",content:P}),P="";Z0.push({type:"tool",id:Q0.tool_id,name:L0,status:"preparing"}),U0[Q0.tool_id]="",g6(L0),J0?.(Q0.tool_name,Q0.tool_id),f0()}break;case"tool_input_delta":if(Q0.tool_id&&Q0.content){let L0=Q0.tool_id;if(U0[L0]===void 0)U0[L0]="";U0[L0]+=Q0.content;let c0=Z0.find((P1)=>P1.type==="tool"&&P1.id===L0);if(c0){if(c0.isReceiving=!0,c0.inputLength=U0[L0].length,f0(),_0[L0])clearTimeout(_0[L0]);_0[L0]=setTimeout(()=>{if(c0.status==="preparing")c0.isReceiving=!1,f0()},150)}}break;case"tool_use":if(Q0.tool_id){let L0=Z0.find((c0)=>c0.type==="tool"&&c0.id===Q0.tool_id);if(L0&&L0.status==="preparing")L0.status="running",L0.isReceiving=!1,f0()}break;case"tool_stream":if(Q0.tool_id){let L0=Z0.find((c0)=>c0.type==="tool"&&c0.id===Q0.tool_id);if(L0){if(Q0.event==="chunk"&&Q0.content){if(L0.pendingReset)L0.streamOutput="",L0.pendingReset=!1;L0.streamOutput=(L0.streamOutput||"")+Q0.content,f0()}else if(Q0.event==="log"||Q0.event==="progress")L0.pendingReset=!0}}break;case"tool_result":if(Q0.tool_id){let L0=Z0.find((c0)=>c0.type==="tool"&&c0.id===Q0.tool_id);if(L0)L0.result=Q0.content,L0.status="completed",L0.isReceiving=!1,v0?.(L0.name,Q0.content);g6(null),f0()}break;case"widget":if(Q0.widget)u.push(Q0.widget),f0();break;case"error":throw Error(Q0.message||"Stream error")}},(Q0)=>{if(P){let L0=Z0[Z0.length-1];if(L0&&L0.type==="text")L0.content=P;else Z0.push({type:"text",content:P})}if(s0((L0)=>{let c0=L0[L0.length-1];if(c0&&c0.role==="assistant")return[...L0.slice(0,-1),{...c0,content:P||"Response received",widgets:u.length>0?u:void 0,metadata:{thread_id:Q0,content_segments:Z0,isStreaming:!1}}];return L0}),Q0&&Q0!==$1)O1(Q0),V?.(Q0);t0(!1),h6(null),g6(null)},(Q0)=>{let L0={id:`msg-${Date.now()}-error`,role:"assistant",content:`Error: ${Q0.message}`,timestamp:new Date,metadata:{error:!0}};s0((c0)=>{let P1=c0[c0.length-1];if(P1&&P1.id.includes("streaming"))return[...c0.slice(0,-1),L0];return[...c0,L0]}),t0(!1),h6(null),g6(null),B0?.(Q0)})}}catch(t){let Z0={id:`msg-${Date.now()}-error`,role:"assistant",content:t instanceof Error?`Error: ${t.message}`:"An error occurred",timestamp:new Date,metadata:{error:!0}};s0((P)=>[...P,Z0]),B0?.(t instanceof Error?t:Error("Unknown error"))}finally{t0(!1)}};H1.current=u4;let j5=async(R1,i1)=>{let Q6=R1||O4;if(!Q6.trim()&&(!i1||i1.length===0)){v6(Error("Please enter a command")),X1("error");return}if(T1&&z6!=="plan-pending"){if(X1("loading"),v6(null),$6(""),M)setTimeout(()=>{let h1=`1. Analyze the request: "${Q6}"
196
+ 2. Process the data
197
+ 3. Generate response
198
+ 4. Return results`;N0(h1),i0(Q6),X1("plan-pending")},800);else try{let A=Z1?`${Z1}
199
+
200
+ CRITICAL PLANNING MODE: You are ONLY creating a plan. Write a numbered list of steps describing what WOULD be done. DO NOT execute anything.`:"CRITICAL PLANNING MODE: You are ONLY creating a plan. Write a numbered list of steps describing what WOULD be done. DO NOT execute anything.",t=await w2.chat({agent_id:G,message:Q6,stream:!1,system:A});N0(t.message),i0(Q6),X1("plan-pending")}catch(h1){let A=h1 instanceof Error?h1:Error("Failed to generate plan");v6(A),X1("error"),B0?.(A)}return}X1("loading"),v6(null),Y6(0),L6(""),$6("");try{if(M)if(h){let h1="";RF(Q6,(A)=>{if(A.type==="token"&&A.content){h1+=A.content,L6(h1);let t=Math.min(Math.round(h1.length/10),90);Y6(t)}},(A)=>{let t={success:!0,data:{summary:h1,thread_id:A},message:h1||"Command executed successfully"};E6(t),X1("success"),Y6(100),q0?.(t)},(A)=>{v6(A),X1("error"),B0?.(A)})}else{await new Promise((A)=>setTimeout(A,1500));let h1={success:!0,data:{summary:`Executed: ${Q6}`},message:"Command executed successfully"};E6(h1),X1("success"),Y6(100),q0?.(h1)}else{let A=Z1?`${Z1}
201
+
202
+ CRITICAL COMMAND MODE: Maximum 10 words per response. Execute the command immediately. Make reasonable assumptions based on context. Use sensible defaults for missing details. DO NOT ask questions unless something is truly impossible without user input (e.g., missing required password). State what you're doing or the result. Examples: "Analyzing customer data from last quarter..." or "Created 5 new database entries successfully" or "Search complete: found 12 matching results". NO greetings, NO filler words, NO clarification requests. Action/result only.`:`CRITICAL COMMAND MODE: Maximum 10 words per response. Execute the command immediately. Make reasonable assumptions based on context. Use sensible defaults for missing details. DO NOT ask questions unless something is truly impossible without user input (e.g., missing required password). State what you're doing or the result. Examples: "Analyzing customer data from last quarter..." or "Created 5 new database entries successfully" or "Search complete: found 12 matching results". NO greetings, NO filler words, NO clarification requests. Action/result only.`,t=i1&&i1.length>0?await vB(Q6,i1):Q6;if(h){let Z0="",P="";await w2.chatStream({agent_id:G,message:t,stream:!0,...$1&&{thread_id:$1},system:A},(u)=>{if((u.type==="token"||u.type==="content")&&u.content){Z0+=u.content,L6(Z0),J4(null);let b0=Math.min(Math.round(Z0.length/10),90);Y6(b0)}else if(u.type==="tool_call"&&u.tool_name){let b0=u.tool_display_name||u.tool_name;P=u.tool_name,J4(b0),J0?.(u.tool_name,u.tool_id||""),Z0="",L6("")}else if(u.type==="tool_result")v0?.(P,u.content),J4(null);else if(u.type==="thread_id"&&u.thread_id){if(!$1)O1(u.thread_id),V?.(u.thread_id)}else if(u.type==="request_id"&&u.request_id)h6(u.request_id)},(u)=>{let b0={success:!0,data:{summary:Z0,thread_id:u},message:Z0||"Command executed successfully"};E6(b0),X1("success"),Y6(100),h6(null),q0?.(b0)},(u)=>{v6(u),X1("error"),h6(null),B0?.(u)})}else{let Z0=await w2.chat({agent_id:G,message:t,stream:!1,...$1&&{thread_id:$1},system:A}),P={success:!0,data:{summary:Z0.message,thread_id:Z0.thread_id},widgets:Z0.widgets,message:Z0.message};E6(P),X1("success"),Y6(100),q0?.(P)}}}catch(h1){let A=h1 instanceof Error?h1:Error("Unknown error");v6(A),X1("error"),B0?.(A)}},T5=()=>{X1("idle"),E6(null),v6(null),Y6(0),$6(""),N0(""),i0(""),L6(""),J4(null)},o5=()=>{let R1=p6;N0(""),i0("");let i1=`Execute this plan now:
203
+
204
+ ${R1}`;j5(i1)},q5=()=>{$6(d0),N0(""),i0(""),X1("idle")},f4=async()=>{if(T4&&G)try{await w2.cancelRequest(G,T4)}catch(R1){console.error("Failed to cancel request:",R1)}if(t0(!1),z6==="loading")X1("idle"),L6(""),J4(null),Y6(0);h6(null)},f5=_==="compact";return j4.jsxs("div",{className:X6("apteva-chat flex flex-col h-full",m0!=="default"&&`apteva-chat-${m0}`,n),children:[B1&&f6==="chat"&&j4.jsx("div",{className:"apteva-chat-header px-4 py-3 flex items-center justify-between",children:j4.jsxs("div",{children:[j4.jsx("div",{className:"apteva-chat-title",children:s1}),j4.jsx("div",{className:X6("apteva-chat-status",R0?u6?"apteva-chat-status-tool":"apteva-chat-status-thinking":"apteva-chat-status-ready"),children:R0?u6?`Using ${u6}...`:"Thinking...":"Ready"})]})}),f6==="chat"&&j4.jsxs(j4.Fragment,{children:[j4.jsx(nF,{messages:u0,onAction:Y0,welcomeTitle:C,welcomeSubtitle:i,welcomeIcon:j,suggestedPrompts:o,welcomeVariant:z0,chatVariant:m0,onPromptClick:(R1)=>u4(R1),enableWidgets:E1,onWidgetRender:U1}),j4.jsx(tF,{onSendMessage:u4,placeholder:F0||Y4,disabled:R0,isLoading:R0,onStop:f4,onFileUpload:K0,onSwitchMode:F?()=>m4("command"):void 0})]}),f6==="command"&&j4.jsx("div",{className:"w-full",children:j4.jsx(sF,{onExecute:(R1,i1)=>{$6(R1),j5(R1,i1)},state:z6,response:l6?.data?.summary||l6?.message,error:_6?.message,plan:p6,streamedContent:L4,toolName:M6,onApprove:o5,onReject:q5,onReset:T5,onStop:f4,onExpand:F?()=>m4("chat"):void 0,placeholder:F0||"Enter your command..."})}),j4.jsx("style",{dangerouslySetInnerHTML:{__html:`
205
+ @keyframes pulse-border {
206
+ 0%, 100% { border-color: rgb(59, 130, 246); }
207
+ 50% { border-color: rgb(147, 197, 253); }
208
+ }
209
+ .animate-pulse-border {
210
+ animation: pulse-border 2s ease-in-out infinite;
211
+ }
212
+ .apteva-composer {
213
+ border-radius: var(--apteva-border-radius, 1rem) !important;
214
+ }
215
+ `}})]})});var E=X0(Y1(),1),JA=[{key:"memory",label:"Memory",description:"Persistent recall",icon:J3},{key:"tasks",label:"Tasks",description:"Schedule and execute tasks",icon:v5},{key:"files",label:"Files",description:"File storage and management",icon:O2},{key:"vision",label:"Vision",description:"Process images and PDFs",icon:Y3},{key:"operator",label:"Operator",description:"Browser automation",icon:$3},{key:"mcp",label:"MCP",description:"External tools/services",icon:F5},{key:"realtime",label:"Realtime",description:"Voice conversations",icon:H3},{key:"agents",label:"Multi-Agent",description:"Communicate with peer agents",icon:L2}];function ZX({agent:Y,providers:G,onClose:q,onStartAgent:O,onUpdateAgent:H,onDeleteAgent:w}){let[L,M]=C1.useState("chat");return E.jsxDEV("div",{className:"w-full h-full flex flex-col overflow-hidden bg-[#0a0a0a] border-l border-[#1a1a1a]",children:[E.jsxDEV("div",{className:"border-b border-[#1a1a1a] flex items-center",children:[E.jsxDEV("div",{className:"flex-1 overflow-x-auto scrollbar-hide px-2 md:px-4",children:E.jsxDEV("div",{className:"flex gap-1",children:[E.jsxDEV(F2,{active:L==="chat",onClick:()=>M("chat"),children:"Chat"},void 0,!1,void 0,this),E.jsxDEV(F2,{active:L==="threads",onClick:()=>M("threads"),children:"Threads"},void 0,!1,void 0,this),E.jsxDEV(F2,{active:L==="tasks",onClick:()=>M("tasks"),children:"Tasks"},void 0,!1,void 0,this),E.jsxDEV(F2,{active:L==="memory",onClick:()=>M("memory"),children:"Memory"},void 0,!1,void 0,this),E.jsxDEV(F2,{active:L==="files",onClick:()=>M("files"),children:"Files"},void 0,!1,void 0,this),E.jsxDEV(F2,{active:L==="settings",onClick:()=>M("settings"),children:"Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),E.jsxDEV("button",{onClick:q,className:"text-[#666] hover:text-[#e0e0e0] transition p-2 flex-shrink-0 mr-2",children:E.jsxDEV(L7,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E.jsxDEV("div",{className:"flex-1 min-h-0 flex flex-col overflow-hidden",children:[L==="chat"&&E.jsxDEV(YA,{agent:Y,onStartAgent:O},void 0,!1,void 0,this),L==="threads"&&E.jsxDEV($A,{agent:Y},void 0,!1,void 0,this),L==="tasks"&&E.jsxDEV(HA,{agent:Y},void 0,!1,void 0,this),L==="memory"&&E.jsxDEV(GA,{agent:Y},void 0,!1,void 0,this),L==="files"&&E.jsxDEV(KA,{agent:Y},void 0,!1,void 0,this),L==="settings"&&E.jsxDEV(UA,{agent:Y,providers:G,onUpdateAgent:H,onDeleteAgent:w},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function F2({active:Y,onClick:G,children:q}){return E.jsxDEV("button",{onClick:G,className:`px-4 py-3 text-sm font-medium border-b-2 transition ${Y?"border-[#f97316] text-[#e0e0e0]":"border-transparent text-[#666] hover:text-[#888]"}`,children:q},void 0,!1,void 0,this)}function YA({agent:Y,onStartAgent:G}){if(Y.status==="running"&&Y.port)return E.jsxDEV(VB,{agentId:"default",apiUrl:`/api/agents/${Y.id}`,placeholder:"Message this agent...",context:Y.systemPrompt,variant:"terminal",headerTitle:Y.name},void 0,!1,void 0,this);return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("div",{className:"text-center",children:[E.jsxDEV("p",{className:"text-lg mb-2",children:"Agent is not running"},void 0,!1,void 0,this),E.jsxDEV("button",{onClick:G,className:"bg-[#3b82f6]/20 text-[#3b82f6] hover:bg-[#3b82f6]/30 px-4 py-2 rounded font-medium transition",children:"Start Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function $A({agent:Y}){let[G,q]=C1.useState([]),[O,H]=C1.useState(!0),[w,L]=C1.useState(null),[M,T]=C1.useState(null),[F,v]=C1.useState([]),[_,W]=C1.useState(!1);C1.useEffect(()=>{q([]),T(null),v([]),L(null),H(!0)},[Y.id]),C1.useEffect(()=>{if(Y.status!=="running"){H(!1);return}(async()=>{try{let S=await fetch(`/api/agents/${Y.id}/threads`);if(!S.ok)throw Error("Failed to fetch threads");let C=await S.json();q(C.threads||[]),L(null)}catch(S){L(S instanceof Error?S.message:"Failed to load threads")}finally{H(!1)}})()},[Y.id,Y.status]);let f=async(k)=>{T(k),W(!0);try{let S=await fetch(`/api/agents/${Y.id}/threads/${k}/messages`);if(!S.ok)throw Error("Failed to fetch messages");let C=await S.json();v(C.messages||[])}catch{v([])}finally{W(!1)}},h=async(k,S)=>{if(S.stopPropagation(),!confirm("Delete this thread?"))return;try{if(await fetch(`/api/agents/${Y.id}/threads/${k}`,{method:"DELETE"}),q((C)=>C.filter((i)=>i.id!==k)),M===k)T(null),v([])}catch{}};if(Y.status!=="running")return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("p",{children:"Start the agent to view threads"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("p",{children:"Loading threads..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(w)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:E.jsxDEV("p",{children:w},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(M){let k=G.find((S)=>S.id===M);return E.jsxDEV("div",{className:"flex-1 flex flex-col overflow-hidden",children:[E.jsxDEV("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-[#1a1a1a]",children:[E.jsxDEV("button",{onClick:()=>{T(null),v([])},className:"text-[#666] hover:text-[#e0e0e0] transition text-lg",children:"←"},void 0,!1,void 0,this),E.jsxDEV("div",{className:"flex-1",children:[E.jsxDEV("p",{className:"text-sm font-medium",children:k?.title||`Thread ${M.slice(0,8)}`},void 0,!1,void 0,this),E.jsxDEV("p",{className:"text-xs text-[#666]",children:k&&new Date(k.updated_at||k.created_at).toLocaleString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E.jsxDEV("button",{onClick:(S)=>h(M,S),className:"text-[#666] hover:text-red-400 text-sm px-2 py-1",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:_?E.jsxDEV("p",{className:"text-[#666]",children:"Loading messages..."},void 0,!1,void 0,this):F.length===0?E.jsxDEV("p",{className:"text-[#666]",children:"No messages in this thread"},void 0,!1,void 0,this):E.jsxDEV("div",{className:"space-y-4",children:F.map((S,C)=>E.jsxDEV("div",{className:`${S.role==="user"?"text-right":""}`,children:E.jsxDEV("div",{className:`inline-block max-w-[80%] p-3 rounded ${S.role==="user"?"bg-[#f97316]/20 text-[#f97316]":"bg-[#1a1a1a] text-[#e0e0e0]"}`,children:[E.jsxDEV("p",{className:"text-sm whitespace-pre-wrap",children:S.content},void 0,!1,void 0,this),E.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:new Date(S.created_at).toLocaleTimeString()},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},C,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}return E.jsxDEV("div",{className:"flex-1 overflow-auto",children:G.length===0?E.jsxDEV("div",{className:"flex items-center justify-center h-full text-[#666]",children:E.jsxDEV("p",{children:"No conversation threads yet"},void 0,!1,void 0,this)},void 0,!1,void 0,this):E.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:G.map((k)=>E.jsxDEV("div",{onClick:()=>f(k.id),className:"p-4 cursor-pointer hover:bg-[#111] transition flex items-center justify-between",children:[E.jsxDEV("div",{className:"flex-1 min-w-0",children:[E.jsxDEV("p",{className:"text-sm font-medium truncate",children:k.title||`Thread ${k.id.slice(0,8)}`},void 0,!1,void 0,this),E.jsxDEV("p",{className:"text-xs text-[#666] mt-1",children:[new Date(k.updated_at||k.created_at).toLocaleString(),k.message_count!==void 0&&` • ${k.message_count} messages`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),E.jsxDEV("button",{onClick:(S)=>h(k.id,S),className:"text-[#666] hover:text-red-400 text-lg ml-4",children:"×"},void 0,!1,void 0,this)]},k.id,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)}function HA({agent:Y}){let[G,q]=C1.useState([]),[O,H]=C1.useState(!0),[w,L]=C1.useState(null),[M,T]=C1.useState("all");C1.useEffect(()=>{q([]),L(null),H(!0)},[Y.id]);let F=async()=>{if(Y.status!=="running"){H(!1);return}try{let _=await fetch(`/api/agents/${Y.id}/tasks?status=${M}`);if(!_.ok)throw Error("Failed to fetch tasks");let W=await _.json();q(W.tasks||[]),L(null)}catch(_){L(_ instanceof Error?_.message:"Failed to load tasks")}finally{H(!1)}};C1.useEffect(()=>{H(!0),F()},[Y.id,Y.status,M]),C1.useEffect(()=>{if(Y.status!=="running")return;let _=setInterval(F,5000);return()=>clearInterval(_)},[Y.id,Y.status,M]);let v=(_)=>{switch(_){case"pending":return"bg-yellow-500/20 text-yellow-400";case"running":return"bg-blue-500/20 text-blue-400";case"completed":return"bg-green-500/20 text-green-400";case"failed":return"bg-red-500/20 text-red-400";default:return"bg-[#222] text-[#666]"}};if(Y.status!=="running")return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("p",{children:"Start the agent to view tasks"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!Y.features?.tasks)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("div",{className:"text-center",children:[E.jsxDEV("p",{className:"mb-2",children:"Tasks feature is not enabled"},void 0,!1,void 0,this),E.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to schedule tasks"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(O)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("p",{children:"Loading tasks..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(w)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:E.jsxDEV("p",{children:w},void 0,!1,void 0,this)},void 0,!1,void 0,this);return E.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[E.jsxDEV("div",{className:"flex gap-2 mb-4",children:["all","pending","running","completed"].map((_)=>E.jsxDEV("button",{onClick:()=>T(_),className:`px-3 py-1 text-xs rounded transition ${M===_?"bg-[#f97316] text-black":"bg-[#1a1a1a] text-[#666] hover:text-[#888]"}`,children:_.charAt(0).toUpperCase()+_.slice(1)},_,!1,void 0,this))},void 0,!1,void 0,this),G.length===0?E.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:E.jsxDEV("p",{children:["No ",M==="all"?"":M+" ","tasks"]},void 0,!0,void 0,this)},void 0,!1,void 0,this):E.jsxDEV("div",{className:"space-y-3",children:G.map((_)=>E.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[E.jsxDEV("div",{className:"flex items-start justify-between",children:[E.jsxDEV("div",{className:"flex-1 min-w-0",children:[E.jsxDEV("p",{className:"text-sm font-medium text-[#e0e0e0]",children:_.name},void 0,!1,void 0,this),_.description&&E.jsxDEV("p",{className:"text-xs text-[#666] mt-1 line-clamp-2",children:_.description},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ml-2 ${v(_.status)}`,children:_.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E.jsxDEV("div",{className:"flex items-center gap-4 mt-2 text-xs text-[#666]",children:[E.jsxDEV("span",{children:["Created: ",new Date(_.created_at).toLocaleString()]},void 0,!0,void 0,this),_.scheduled_at&&E.jsxDEV("span",{children:["Scheduled: ",new Date(_.scheduled_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),_.status==="completed"&&_.result&&E.jsxDEV("div",{className:"mt-2 p-2 bg-[#0a0a0a] rounded text-xs text-[#888]",children:[E.jsxDEV("p",{className:"text-[#666] mb-1",children:"Result:"},void 0,!1,void 0,this),E.jsxDEV("p",{className:"whitespace-pre-wrap",children:_.result},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_.status==="failed"&&_.error&&E.jsxDEV("div",{className:"mt-2 p-2 bg-red-500/10 rounded text-xs text-red-400",children:[E.jsxDEV("p",{className:"text-red-400/70 mb-1",children:"Error:"},void 0,!1,void 0,this),E.jsxDEV("p",{className:"whitespace-pre-wrap",children:_.error},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},_.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function GA({agent:Y}){let[G,q]=C1.useState([]),[O,H]=C1.useState(!0),[w,L]=C1.useState(null),[M,T]=C1.useState(!1);C1.useEffect(()=>{q([]),L(null),H(!0)},[Y.id]);let F=async()=>{if(Y.status!=="running"){H(!1);return}try{let W=await fetch(`/api/agents/${Y.id}/memories`);if(!W.ok)throw Error("Failed to fetch memories");let f=await W.json();q(f.memories||[]),T(f.enabled??!1),L(null)}catch(W){L(W instanceof Error?W.message:"Failed to load memories")}finally{H(!1)}};C1.useEffect(()=>{F()},[Y.id,Y.status]);let v=async(W)=>{try{await fetch(`/api/agents/${Y.id}/memories/${W}`,{method:"DELETE"}),q((f)=>f.filter((h)=>h.id!==W))}catch{}},_=async()=>{if(!confirm("Clear all memories?"))return;try{await fetch(`/api/agents/${Y.id}/memories`,{method:"DELETE"}),q([])}catch{}};if(!Y.features?.memory)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("div",{className:"text-center",children:[E.jsxDEV("p",{className:"mb-2",children:"Memory feature is not enabled"},void 0,!1,void 0,this),E.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to persist knowledge"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(Y.status!=="running")return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("p",{children:"Start the agent to view memories"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("p",{children:"Loading memories..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(w)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:E.jsxDEV("p",{children:w},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(!M)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("div",{className:"text-center",children:[E.jsxDEV("p",{className:"mb-2",children:"Memory system not initialized"},void 0,!1,void 0,this),E.jsxDEV("p",{className:"text-sm",children:"Check OPENAI_API_KEY for embeddings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);return E.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[E.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[E.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Stored Memories (",G.length,")"]},void 0,!0,void 0,this),G.length>0&&E.jsxDEV("button",{onClick:_,className:"text-xs text-red-400 hover:text-red-300",children:"Clear All"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.length===0?E.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[E.jsxDEV("p",{children:"No memories stored yet"},void 0,!1,void 0,this),E.jsxDEV("p",{className:"text-sm mt-1",children:"The agent will remember important information from conversations"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):E.jsxDEV("div",{className:"space-y-3",children:G.map((W)=>E.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3",children:[E.jsxDEV("div",{className:"flex items-start justify-between gap-2",children:[E.jsxDEV("p",{className:"text-sm text-[#e0e0e0] flex-1",children:W.content},void 0,!1,void 0,this),E.jsxDEV("button",{onClick:()=>v(W.id),className:"text-[#666] hover:text-red-400 text-sm flex-shrink-0",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),E.jsxDEV("div",{className:"flex items-center gap-3 mt-2",children:[E.jsxDEV("span",{className:`text-xs px-2 py-0.5 rounded ${W.type==="preference"?"bg-purple-500/20 text-purple-400":W.type==="fact"?"bg-green-500/20 text-green-400":"bg-blue-500/20 text-blue-400"}`,children:W.type},void 0,!1,void 0,this),E.jsxDEV("span",{className:"text-xs text-[#666]",children:new Date(W.created_at).toLocaleString()},void 0,!1,void 0,this),W.importance&&E.jsxDEV("span",{className:"text-xs text-[#555]",children:["importance: ",W.importance.toFixed(1)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},W.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function KA({agent:Y}){let[G,q]=C1.useState([]),[O,H]=C1.useState(!0),[w,L]=C1.useState(null);C1.useEffect(()=>{q([]),L(null),H(!0)},[Y.id]);let M=async()=>{if(Y.status!=="running"){H(!1);return}try{let W=await fetch(`/api/agents/${Y.id}/files`);if(!W.ok)throw Error("Failed to fetch files");let f=await W.json();q(f.files||[]),L(null)}catch(W){L(W instanceof Error?W.message:"Failed to load files")}finally{H(!1)}};C1.useEffect(()=>{M()},[Y.id,Y.status]);let T=async(W)=>{if(!confirm("Delete this file?"))return;try{await fetch(`/api/agents/${Y.id}/files/${W}`,{method:"DELETE"}),q((f)=>f.filter((h)=>h.id!==W))}catch{}},F=(W,f)=>{let h=document.createElement("a");h.href=`/api/agents/${Y.id}/files/${W}/download`,h.download=f,h.click()},v=(W)=>{if(W<1024)return`${W} B`;if(W<1048576)return`${(W/1024).toFixed(1)} KB`;return`${(W/1048576).toFixed(1)} MB`},_=(W)=>{if(W.startsWith("image/"))return"\uD83D\uDDBC";if(W.includes("pdf"))return"\uD83D\uDCD5";if(W.includes("json"))return"{}";if(W.includes("javascript")||W.includes("typescript"))return"⚡";if(W.startsWith("text/"))return"\uD83D\uDCC4";if(W.startsWith("audio/"))return"\uD83C\uDFB5";if(W.startsWith("video/"))return"\uD83C\uDFAC";return"\uD83D\uDCC1"};if(!Y.features?.files)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("div",{className:"text-center",children:[E.jsxDEV("p",{className:"mb-2",children:"Files feature is not enabled"},void 0,!1,void 0,this),E.jsxDEV("p",{className:"text-sm",children:"Enable it in Settings to manage files"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this);if(Y.status!=="running")return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("p",{children:"Start the agent to view files"},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(O)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-[#666]",children:E.jsxDEV("p",{children:"Loading files..."},void 0,!1,void 0,this)},void 0,!1,void 0,this);if(w)return E.jsxDEV("div",{className:"flex-1 flex items-center justify-center text-red-400",children:E.jsxDEV("p",{children:w},void 0,!1,void 0,this)},void 0,!1,void 0,this);return E.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:[E.jsxDEV("div",{className:"flex items-center justify-between mb-4",children:[E.jsxDEV("h3",{className:"text-sm font-medium text-[#888]",children:["Agent Files (",G.length,")"]},void 0,!0,void 0,this),E.jsxDEV("button",{onClick:M,className:"text-xs text-[#666] hover:text-[#888]",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.length===0?E.jsxDEV("div",{className:"text-center py-10 text-[#666]",children:[E.jsxDEV("p",{children:"No files stored yet"},void 0,!1,void 0,this),E.jsxDEV("p",{className:"text-sm mt-1",children:"Files created or uploaded by the agent will appear here"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):E.jsxDEV("div",{className:"space-y-2",children:G.map((W)=>E.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded p-3 flex items-center gap-3",children:[E.jsxDEV("div",{className:"w-10 h-10 bg-[#1a1a1a] rounded flex items-center justify-center text-[#666]",children:_(W.mime_type)},void 0,!1,void 0,this),E.jsxDEV("div",{className:"flex-1 min-w-0",children:[E.jsxDEV("p",{className:"text-sm text-[#e0e0e0] truncate",children:W.filename},void 0,!1,void 0,this),E.jsxDEV("p",{className:"text-xs text-[#666]",children:[v(W.size_bytes)," • ",new Date(W.created_at).toLocaleString(),W.source&&W.source!=="upload"&&` • ${W.source}`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),E.jsxDEV("div",{className:"flex items-center gap-2",children:[E.jsxDEV("button",{onClick:()=>F(W.id,W.filename),className:"text-xs text-[#666] hover:text-[#f97316] px-2 py-1",children:"↓"},void 0,!1,void 0,this),E.jsxDEV("button",{onClick:()=>T(W.id),className:"text-[#666] hover:text-red-400 text-sm",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},W.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function UA({agent:Y,providers:G,onUpdateAgent:q,onDeleteAgent:O}){let[H,w]=C1.useState({name:Y.name,provider:Y.provider,model:Y.model,systemPrompt:Y.systemPrompt,features:{...Y.features},mcpServers:[...Y.mcpServers||[]]}),[L,M]=C1.useState(!1),[T,F]=C1.useState(!1),[v,_]=C1.useState(null),[W,f]=C1.useState([]);C1.useEffect(()=>{(async()=>{try{let Y0=await(await fetch("/api/mcp/servers")).json();f(Y0.servers||[])}catch(H0){console.error("Failed to fetch MCP servers:",H0)}})()},[]),C1.useEffect(()=>{w({name:Y.name,provider:Y.provider,model:Y.model,systemPrompt:Y.systemPrompt,features:{...Y.features},mcpServers:[...Y.mcpServers||[]]}),_(null)},[Y.id]);let h=G.find((V)=>V.id===H.provider),k=G.filter((V)=>V.configured).map((V)=>({value:V.id,label:V.name})),S=h?.models.map((V)=>({value:V.value,label:V.label,recommended:V.recommended}))||[],C=(V)=>{let H0=G.find((K0)=>K0.id===V),Y0=H0?.models.find((K0)=>K0.recommended)?.value||H0?.models[0]?.value||"";w((K0)=>({...K0,provider:V,model:Y0}))},i=(V)=>{w((H0)=>({...H0,features:{...H0.features,[V]:!H0.features[V]}}))},j=(V)=>{w((H0)=>({...H0,mcpServers:H0.mcpServers.includes(V)?H0.mcpServers.filter((Y0)=>Y0!==V):[...H0.mcpServers,V]}))},o=async()=>{M(!0),_(null);let V=await q(H);if(M(!1),V.error)_({type:"error",text:V.error});else _({type:"success",text:"Settings saved"}),setTimeout(()=>_(null),2000)},z0=H.name!==Y.name||H.provider!==Y.provider||H.model!==Y.model||H.systemPrompt!==Y.systemPrompt||JSON.stringify(H.features)!==JSON.stringify(Y.features)||JSON.stringify(H.mcpServers.sort())!==JSON.stringify((Y.mcpServers||[]).sort());return E.jsxDEV("div",{className:"flex-1 overflow-auto p-4",children:E.jsxDEV("div",{className:"space-y-4",children:[E.jsxDEV(A2,{label:"Name",children:E.jsxDEV("input",{type:"text",value:H.name,onChange:(V)=>w((H0)=>({...H0,name:V.target.value})),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),E.jsxDEV(A2,{label:"Provider",children:E.jsxDEV(R5,{value:H.provider,options:k,onChange:C},void 0,!1,void 0,this)},void 0,!1,void 0,this),E.jsxDEV(A2,{label:"Model",children:E.jsxDEV(R5,{value:H.model,options:S,onChange:(V)=>w((H0)=>({...H0,model:V}))},void 0,!1,void 0,this)},void 0,!1,void 0,this),E.jsxDEV(A2,{label:"System Prompt",children:E.jsxDEV("textarea",{value:H.systemPrompt,onChange:(V)=>w((H0)=>({...H0,systemPrompt:V.target.value})),className:"w-full bg-[#0a0a0a] border border-[#222] rounded px-3 py-2 h-24 resize-none focus:outline-none focus:border-[#f97316] text-[#e0e0e0]"},void 0,!1,void 0,this)},void 0,!1,void 0,this),E.jsxDEV(A2,{label:"Features",children:E.jsxDEV("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:JA.map(({key:V,label:H0,description:Y0,icon:K0})=>E.jsxDEV("button",{type:"button",onClick:()=>i(V),className:`flex items-center gap-3 p-3 rounded border text-left transition ${H.features[V]?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[E.jsxDEV(K0,{className:`w-5 h-5 flex-shrink-0 ${H.features[V]?"text-[#f97316]":"text-[#666]"}`},void 0,!1,void 0,this),E.jsxDEV("div",{className:"flex-1 min-w-0",children:[E.jsxDEV("div",{className:`text-sm font-medium ${H.features[V]?"text-[#f97316]":""}`,children:H0},void 0,!1,void 0,this),E.jsxDEV("div",{className:"text-xs text-[#666]",children:Y0},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},V,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),H.features.mcp&&E.jsxDEV(A2,{label:"MCP Servers",children:W.length===0?E.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP servers configured. Add servers in the MCP page first."},void 0,!1,void 0,this):E.jsxDEV("div",{className:"space-y-2",children:[W.map((V)=>E.jsxDEV("button",{type:"button",onClick:()=>j(V.id),className:`w-full flex items-center gap-3 p-3 rounded border text-left transition ${H.mcpServers.includes(V.id)?"border-[#f97316] bg-[#f97316]/10":"border-[#222] hover:border-[#333]"}`,children:[E.jsxDEV("div",{className:`w-2 h-2 rounded-full flex-shrink-0 ${V.status==="running"?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),E.jsxDEV("div",{className:"flex-1 min-w-0",children:[E.jsxDEV("div",{className:`text-sm font-medium ${H.mcpServers.includes(V.id)?"text-[#f97316]":""}`,children:V.name},void 0,!1,void 0,this),E.jsxDEV("div",{className:"text-xs text-[#666]",children:[V.type," • ",V.package||V.command||"custom",V.status==="running"&&V.port&&` • :${V.port}`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),E.jsxDEV("div",{className:`text-xs px-2 py-0.5 rounded ${V.status==="running"?"bg-green-500/20 text-green-400":"bg-[#222] text-[#666]"}`,children:V.status},void 0,!1,void 0,this)]},V.id,!0,void 0,this)),E.jsxDEV("p",{className:"text-xs text-[#666] mt-2",children:"Only running servers will be connected to the agent."},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),v&&E.jsxDEV("div",{className:`text-sm px-3 py-2 rounded ${v.type==="success"?"bg-green-500/10 text-green-400":"bg-red-500/10 text-red-400"}`,children:v.text},void 0,!1,void 0,this),E.jsxDEV("button",{onClick:o,disabled:!z0||L||!H.name,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:L?"Saving...":"Save Changes"},void 0,!1,void 0,this),Y.status==="running"&&z0&&E.jsxDEV("p",{className:"text-xs text-[#666] text-center",children:"Changes will be applied to the running agent"},void 0,!1,void 0,this),E.jsxDEV("div",{className:"mt-8 pt-6 border-t border-[#222]",children:[E.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Danger Zone"},void 0,!1,void 0,this),T?E.jsxDEV("div",{className:"flex gap-2",children:[E.jsxDEV("button",{onClick:()=>F(!1),className:"flex-1 border border-[#333] hover:border-[#444] px-4 py-2 rounded font-medium transition",children:"Cancel"},void 0,!1,void 0,this),E.jsxDEV("button",{onClick:O,className:"flex-1 bg-red-500/20 text-red-400 hover:bg-red-500/30 px-4 py-2 rounded font-medium transition",children:"Confirm Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):E.jsxDEV("button",{onClick:()=>F(!0),className:"w-full border border-red-500/30 text-red-400/70 hover:border-red-500/50 hover:text-red-400 px-4 py-2 rounded font-medium transition",children:"Delete Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function A2({label:Y,children:G}){return E.jsxDEV("div",{children:[E.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),G]},void 0,!0,void 0,this)}var dB=X0(v1(),1);var O6=X0(Y1(),1);function JX({agents:Y,loading:G,selectedAgent:q,providers:O,onSelectAgent:H,onCloseAgent:w,onToggleAgent:L,onDeleteAgent:M,onUpdateAgent:T,onNewAgent:F,canCreateAgent:v=!0}){let{currentProjectId:_,currentProject:W}=B4(),f=dB.useMemo(()=>{if(_===null)return Y;if(_==="unassigned")return Y.filter((k)=>!k.projectId);return Y.filter((k)=>k.projectId===_)},[Y,_]),h=_===null?"Agents":_==="unassigned"?"Unassigned Agents":W?.name||"Agents";return O6.jsxDEV("div",{className:"flex-1 flex overflow-hidden relative",children:[O6.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[O6.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[O6.jsxDEV("div",{className:"flex items-center gap-3",children:[W&&O6.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:W.color}},void 0,!1,void 0,this),O6.jsxDEV("h1",{className:"text-xl font-semibold",children:h},void 0,!1,void 0,this),_!==null&&O6.jsxDEV("span",{className:"text-sm text-[#666]",children:["(",f.length," agent",f.length!==1?"s":"",")"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F&&O6.jsxDEV("button",{onClick:F,disabled:!v,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:"+ New Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G?O6.jsxDEV(Z3,{message:"Loading agents..."},void 0,!1,void 0,this):f.length===0?O6.jsxDEV(qA,{onNewAgent:F,canCreateAgent:v,hasProjectFilter:_!==null},void 0,!1,void 0,this):O6.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2 xl:grid-cols-3",children:f.map((k)=>O6.jsxDEV(bX,{agent:k,selected:q?.id===k.id,onSelect:()=>H(k),onToggle:(S)=>L(k,S),showProject:_===null},k.id,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),q&&O6.jsxDEV("div",{className:"absolute inset-0 bg-black/40 backdrop-blur-[2px] z-10",onClick:w},void 0,!1,void 0,this),q&&O6.jsxDEV("div",{className:"absolute right-0 top-0 bottom-0 w-full sm:w-[500px] lg:w-[600px] xl:w-[700px] z-20",children:O6.jsxDEV(ZX,{agent:q,providers:O,onClose:w,onStartAgent:(k)=>L(q,k),onUpdateAgent:(k)=>T(q.id,k),onDeleteAgent:()=>M(q.id)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function qA({onNewAgent:Y,canCreateAgent:G,hasProjectFilter:q}){return O6.jsxDEV("div",{className:"text-center py-20 text-[#666]",children:[q?O6.jsxDEV(O6.Fragment,{children:[O6.jsxDEV("p",{className:"text-lg",children:"No agents in this project"},void 0,!1,void 0,this),O6.jsxDEV("p",{className:"text-sm mt-1",children:"Create an agent or assign existing agents to this project"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):O6.jsxDEV(O6.Fragment,{children:[O6.jsxDEV("p",{className:"text-lg",children:"No agents yet"},void 0,!1,void 0,this),O6.jsxDEV("p",{className:"text-sm mt-1",children:"Create your first agent to get started"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Y&&O6.jsxDEV("button",{onClick:Y,disabled:!G,className:"mt-4 bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 disabled:cursor-not-allowed text-black px-4 py-2 rounded font-medium transition",children:"+ New Agent"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var U5=X0(v1(),1);var K1=X0(Y1(),1);function $X({agents:Y,loading:G,runningCount:q,configuredProviders:O,onNavigate:H,onSelectAgent:w}){let{authFetch:L}=d1(),{currentProjectId:M}=B4(),[T,F]=U5.useState(null),[v,_]=U5.useState([]),W=U5.useMemo(()=>{if(!M)return Y;if(M==="unassigned")return Y.filter((i)=>!i.projectId);return Y.filter((i)=>i.projectId===M)},[Y,M]),f=U5.useMemo(()=>{return W.filter((i)=>i.status==="running").length},[W]),h=U5.useMemo(()=>{return new Set(W.map((i)=>i.id))},[W]),k=U5.useCallback(async()=>{try{let[i,j]=await Promise.all([L("/api/dashboard"),L("/api/tasks?status=all")]);if(i.ok){let o=await i.json();F(o)}if(j.ok){let o=await j.json();_((o.tasks||[]).slice(0,5))}}catch(i){console.error("Failed to fetch dashboard data:",i)}},[L]);U5.useEffect(()=>{k();let i=setInterval(k,1e4);return()=>clearInterval(i)},[k]);let S=U5.useMemo(()=>{if(!M)return v;return v.filter((i)=>h.has(i.agentId))},[v,M,h]),C=U5.useMemo(()=>{if(!M)return T?.tasks||{total:0,pending:0,running:0,completed:0};let i=S.length,j=S.filter((V)=>V.status==="pending").length,o=S.filter((V)=>V.status==="running").length,z0=S.filter((V)=>V.status==="completed").length;return{total:i,pending:j,running:o,completed:z0}},[T,M,S]);return K1.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[K1.jsxDEV("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-4 mb-6",children:[K1.jsxDEV(YX,{label:"Agents",value:W.length,subValue:`${f} running`},void 0,!1,void 0,this),K1.jsxDEV(YX,{label:"Tasks",value:C.total,subValue:`${C.pending} pending`},void 0,!1,void 0,this),K1.jsxDEV(YX,{label:"Completed",value:C.completed,color:"text-green-400"},void 0,!1,void 0,this),K1.jsxDEV(YX,{label:"Providers",value:O.length,color:"text-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K1.jsxDEV("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[K1.jsxDEV(lB,{title:"Agents",actionLabel:"View All",onAction:()=>H("agents"),children:G?K1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):W.length===0?K1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:"No agents yet"},void 0,!1,void 0,this):K1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:W.slice(0,5).map((i)=>K1.jsxDEV(BA,{agent:i,onSelect:()=>w(i),showProject:!M},i.id,!1,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this),K1.jsxDEV(lB,{title:"Recent Tasks",actionLabel:"View All",onAction:()=>H("tasks"),children:S.length===0?K1.jsxDEV("div",{className:"p-4 text-center text-[#666]",children:[K1.jsxDEV("p",{children:"No tasks yet"},void 0,!1,void 0,this),K1.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Tasks will appear when agents create them"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):K1.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:S.map((i)=>K1.jsxDEV("div",{className:"px-4 py-3 flex items-center justify-between",children:[K1.jsxDEV("div",{className:"flex-1 min-w-0",children:[K1.jsxDEV("p",{className:"font-medium truncate",children:i.title},void 0,!1,void 0,this),K1.jsxDEV("p",{className:"text-sm text-[#666]",children:i.agentName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),K1.jsxDEV(OA,{status:i.status},void 0,!1,void 0,this)]},`${i.agentId}-${i.id}`,!0,void 0,this))},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function YX({label:Y,value:G,subValue:q,color:O}){return K1.jsxDEV("div",{className:"bg-[#111] rounded p-4 border border-[#1a1a1a]",children:[K1.jsxDEV("p",{className:"text-sm text-[#666] mb-1",children:Y},void 0,!1,void 0,this),K1.jsxDEV("p",{className:`text-2xl font-semibold ${O||""}`,children:G},void 0,!1,void 0,this),q&&K1.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:q},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function lB({title:Y,actionLabel:G,onAction:q,children:O}){return K1.jsxDEV("div",{className:"bg-[#111] rounded border border-[#1a1a1a] overflow-hidden",children:[K1.jsxDEV("div",{className:"px-4 py-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[K1.jsxDEV("h3",{className:"font-semibold",children:Y},void 0,!1,void 0,this),K1.jsxDEV("button",{onClick:q,className:"text-sm text-[#3b82f6] hover:text-[#60a5fa]",children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O]},void 0,!0,void 0,this)}function BA({agent:Y,onSelect:G,showProject:q}){let{isActive:O}=_9(Y.id),{projects:H}=B4(),w=Y.projectId?H.find((L)=>L.id===Y.projectId):null;return K1.jsxDEV("div",{onClick:G,className:"px-4 py-3 hover:bg-[#1a1a1a] cursor-pointer flex items-center justify-between",children:[K1.jsxDEV("div",{className:"flex-1 min-w-0",children:[K1.jsxDEV("p",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),K1.jsxDEV("div",{className:"flex items-center gap-2 text-sm text-[#666]",children:[K1.jsxDEV("span",{children:Y.provider},void 0,!1,void 0,this),q&&w&&K1.jsxDEV(K1.Fragment,{children:[K1.jsxDEV("span",{className:"text-[#444]",children:"·"},void 0,!1,void 0,this),K1.jsxDEV("span",{className:"flex items-center gap-1",children:[K1.jsxDEV("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:w.color}},void 0,!1,void 0,this),w.name]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),K1.jsxDEV("span",{className:`w-2 h-2 rounded-full flex-shrink-0 ${Y.status==="running"?O?"bg-green-400 animate-pulse":"bg-[#3b82f6]":"bg-[#444]"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function OA({status:Y}){let G={pending:"bg-yellow-500/20 text-yellow-400",running:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",failed:"bg-red-500/20 text-red-400",cancelled:"bg-gray-500/20 text-gray-400"};return K1.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${G[Y]||G.pending}`,children:Y},void 0,!1,void 0,this)}var M7=X0(v1(),1);var Z6=X0(Y1(),1);function HX({onSelectAgent:Y}){let{authFetch:G}=d1(),[q,O]=M7.useState([]),[H,w]=M7.useState(!0),[L,M]=M7.useState("all"),T=M7.useCallback(async()=>{try{let W=await(await G(`/api/tasks?status=${L}`)).json();O(W.tasks||[])}catch(_){console.error("Failed to fetch tasks:",_)}finally{w(!1)}},[G,L]);M7.useEffect(()=>{T();let _=setInterval(T,1e4);return()=>clearInterval(_)},[T]);let F={pending:"bg-yellow-500/20 text-yellow-400",running:"bg-blue-500/20 text-blue-400",completed:"bg-green-500/20 text-green-400",failed:"bg-red-500/20 text-red-400",cancelled:"bg-gray-500/20 text-gray-400"};return Z6.jsxDEV("div",{className:"flex-1 p-4 md:p-6 overflow-auto",children:Z6.jsxDEV("div",{className:"max-w-4xl mx-auto",children:[Z6.jsxDEV("div",{className:"mb-6",children:[Z6.jsxDEV("div",{className:"mb-4",children:[Z6.jsxDEV("h1",{className:"text-xl md:text-2xl font-semibold mb-1",children:"Tasks"},void 0,!1,void 0,this),Z6.jsxDEV("p",{className:"text-sm text-[#666]",children:"View tasks from all running agents"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),Z6.jsxDEV("div",{className:"flex gap-2 overflow-x-auto scrollbar-hide pb-1",children:[{value:"all",label:"All"},{value:"pending",label:"Pending"},{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"}].map((_)=>Z6.jsxDEV("button",{onClick:()=>M(_.value),className:`px-3 py-1.5 rounded text-sm transition whitespace-nowrap ${L===_.value?"bg-[#f97316] text-black":"bg-[#1a1a1a] hover:bg-[#222]"}`,children:_.label},_.value,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),H?Z6.jsxDEV("div",{className:"text-center py-12 text-[#666]",children:"Loading tasks..."},void 0,!1,void 0,this):q.length===0?Z6.jsxDEV("div",{className:"text-center py-12",children:[Z6.jsxDEV(v5,{className:"w-12 h-12 mx-auto mb-4 text-[#333]"},void 0,!1,void 0,this),Z6.jsxDEV("p",{className:"text-[#666]",children:"No tasks found"},void 0,!1,void 0,this),Z6.jsxDEV("p",{className:"text-sm text-[#444] mt-1",children:"Tasks will appear here when agents create them"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):Z6.jsxDEV("div",{className:"space-y-3",children:q.map((_)=>Z6.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 hover:border-[#333] transition",children:[Z6.jsxDEV("div",{className:"flex items-start justify-between mb-2",children:[Z6.jsxDEV("div",{className:"flex-1",children:[Z6.jsxDEV("h3",{className:"font-medium",children:_.title},void 0,!1,void 0,this),Z6.jsxDEV("p",{className:"text-sm text-[#666]",children:[_.agentName,_.execute_at&&Z6.jsxDEV("span",{className:"ml-2",children:["· Scheduled: ",new Date(_.execute_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),Z6.jsxDEV("span",{className:`px-2 py-1 rounded text-xs font-medium ${F[_.status]||F.pending}`,children:_.status},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_.description&&Z6.jsxDEV("p",{className:"text-sm text-[#888] mb-2 line-clamp-2",children:_.description},void 0,!1,void 0,this),Z6.jsxDEV("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-[#555]",children:[Z6.jsxDEV("span",{children:["Type: ",_.type]},void 0,!0,void 0,this),Z6.jsxDEV("span",{children:["Priority: ",_.priority]},void 0,!0,void 0,this),_.recurrence&&Z6.jsxDEV("span",{children:["Recurrence: ",_.recurrence]},void 0,!0,void 0,this),Z6.jsxDEV("span",{children:["Created: ",new Date(_.created_at).toLocaleString()]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},`${_.agentId}-${_.id}`,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var w1=X0(v1(),1);var m=X0(Y1(),1);function GX(){let{authFetch:Y}=d1(),[G,q]=w1.useState([]),[O,H]=w1.useState(!0),[w,L]=w1.useState(!1),[M,T]=w1.useState(null),[F,v]=w1.useState("servers"),_=async()=>{try{let S=await(await Y("/api/mcp/servers")).json();q(S.servers||[])}catch(k){console.error("Failed to fetch MCP servers:",k)}H(!1)};w1.useEffect(()=>{_()},[Y]);let W=async(k)=>{try{await Y(`/api/mcp/servers/${k}/start`,{method:"POST"}),_()}catch(S){console.error("Failed to start server:",S)}},f=async(k)=>{try{await Y(`/api/mcp/servers/${k}/stop`,{method:"POST"}),_()}catch(S){console.error("Failed to stop server:",S)}},h=async(k)=>{if(!confirm("Delete this MCP server?"))return;try{if(await Y(`/api/mcp/servers/${k}`,{method:"DELETE"}),M?.id===k)T(null);_()}catch(S){console.error("Failed to delete server:",S)}};return m.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:[m.jsxDEV("div",{className:"max-w-6xl",children:[m.jsxDEV("div",{className:"flex items-center justify-between mb-6",children:[m.jsxDEV("div",{children:[m.jsxDEV("h1",{className:"text-2xl font-semibold mb-1",children:"MCP Servers"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-[#666]",children:"Manage Model Context Protocol servers for tool integrations."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F==="servers"&&m.jsxDEV("button",{onClick:()=>L(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"+ Add Server"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"flex gap-1 mb-6 bg-[#111] border border-[#1a1a1a] rounded-lg p-1 w-fit",children:[m.jsxDEV("button",{onClick:()=>v("servers"),className:`px-4 py-2 rounded text-sm font-medium transition ${F==="servers"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"My Servers"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:()=>v("hosted"),className:`px-4 py-2 rounded text-sm font-medium transition ${F==="hosted"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Hosted Services"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:()=>v("registry"),className:`px-4 py-2 rounded text-sm font-medium transition ${F==="registry"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Browse Registry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),F==="servers"&&m.jsxDEV(m.Fragment,{children:[O&&m.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this),!O&&G.length===0&&m.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[m.jsxDEV(F5,{className:"w-12 h-12 text-[#333] mx-auto mb-4"},void 0,!1,void 0,this),m.jsxDEV("h3",{className:"text-lg font-medium mb-2",children:"No MCP servers configured"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-[#666] mb-6 max-w-md mx-auto",children:"MCP servers extend your agents with tools like file access, web browsing, database connections, and more."},void 0,!1,void 0,this),m.jsxDEV("div",{className:"flex gap-3 justify-center",children:[m.jsxDEV("button",{onClick:()=>L(!0),className:"bg-[#f97316] hover:bg-[#fb923c] text-black px-4 py-2 rounded font-medium transition",children:"Add Manually"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:()=>v("registry"),className:"border border-[#333] hover:border-[#666] px-4 py-2 rounded font-medium transition",children:"Browse Registry"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),!O&&G.length>0&&m.jsxDEV("div",{className:"flex gap-6",children:[m.jsxDEV("div",{className:`space-y-3 ${M?"w-1/2":"w-full"}`,children:G.map((k)=>m.jsxDEV(LA,{server:k,selected:M?.id===k.id,onSelect:()=>T(k.status==="running"?k:null),onStart:()=>W(k.id),onStop:()=>f(k.id),onDelete:()=>h(k.id)},k.id,!1,void 0,this))},void 0,!1,void 0,this),M&&m.jsxDEV("div",{className:"w-1/2",children:m.jsxDEV(NA,{server:M,onClose:()=>T(null)},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F==="hosted"&&m.jsxDEV(MA,{},void 0,!1,void 0,this),F==="registry"&&m.jsxDEV(_A,{onInstall:(k)=>{_(),v("servers")}},void 0,!1,void 0,this),F==="servers"&&m.jsxDEV("div",{className:"mt-8 p-4 bg-[#111] border border-[#1a1a1a] rounded-lg",children:[m.jsxDEV("h3",{className:"font-medium mb-2",children:"Quick Start"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-sm text-[#666] mb-3",children:"Add an MCP server by providing its npm package name. For example:"},void 0,!1,void 0,this),m.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[{name:"filesystem",pkg:"@modelcontextprotocol/server-filesystem"},{name:"fetch",pkg:"@modelcontextprotocol/server-fetch"},{name:"memory",pkg:"@modelcontextprotocol/server-memory"}].map((k)=>m.jsxDEV("code",{className:"text-xs bg-[#0a0a0a] px-2 py-1 rounded",children:k.pkg},k.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),w&&m.jsxDEV(RA,{onClose:()=>L(!1),onAdded:()=>{L(!1),_()}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function LA({server:Y,selected:G,onSelect:q,onStart:O,onStop:H,onDelete:w}){return m.jsxDEV("div",{className:`bg-[#111] border rounded-lg p-4 cursor-pointer transition ${G?"border-[#f97316]":"border-[#1a1a1a] hover:border-[#333]"}`,onClick:Y.status==="running"?q:void 0,children:m.jsxDEV("div",{className:"flex items-center justify-between",children:[m.jsxDEV("div",{className:"flex items-center gap-3",children:[m.jsxDEV("div",{className:`w-2 h-2 rounded-full ${Y.status==="running"?"bg-green-400":"bg-[#444]"}`},void 0,!1,void 0,this),m.jsxDEV("div",{children:[m.jsxDEV("h3",{className:"font-medium",children:Y.name},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-sm text-[#666]",children:[Y.type," • ",Y.package||Y.command||"custom",Y.status==="running"&&Y.port&&` • :${Y.port}`]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"flex items-center gap-2",children:[Y.status==="running"?m.jsxDEV(m.Fragment,{children:[m.jsxDEV("button",{onClick:(L)=>{L.stopPropagation(),q()},className:"text-sm text-[#f97316] hover:text-[#fb923c] px-3 py-1 transition",children:"Tools"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:(L)=>{L.stopPropagation(),H()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Stop"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):m.jsxDEV("button",{onClick:(L)=>{L.stopPropagation(),O()},className:"text-sm text-[#666] hover:text-green-400 px-3 py-1 transition",children:"Start"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:(L)=>{L.stopPropagation(),w()},className:"text-sm text-[#666] hover:text-red-400 px-3 py-1 transition",children:"Delete"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function NA({server:Y,onClose:G}){let{authFetch:q}=d1(),[O,H]=w1.useState([]),[w,L]=w1.useState(null),[M,T]=w1.useState(!0),[F,v]=w1.useState(null),[_,W]=w1.useState(null);return w1.useEffect(()=>{(async()=>{T(!0),v(null);try{let h=await q(`/api/mcp/servers/${Y.id}/tools`),k=await h.json();if(!h.ok){v(k.error||"Failed to fetch tools");return}H(k.tools||[]),L(k.serverInfo||null)}catch(h){v(`Failed to fetch tools: ${h}`)}finally{T(!1)}})()},[Y.id,q]),m.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:[m.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between",children:[m.jsxDEV("div",{children:[m.jsxDEV("h3",{className:"font-medium",children:[Y.name," Tools"]},void 0,!0,void 0,this),w&&m.jsxDEV("p",{className:"text-xs text-[#666]",children:[w.name," v",w.version]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("button",{onClick:G,className:"text-[#666] hover:text-[#888] text-xl leading-none",children:"×"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"p-4 max-h-[500px] overflow-auto",children:[M&&m.jsxDEV("p",{className:"text-[#666]",children:"Loading tools..."},void 0,!1,void 0,this),F&&m.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:F},void 0,!1,void 0,this),!M&&!F&&O.length===0&&m.jsxDEV("p",{className:"text-[#666]",children:"No tools available from this server."},void 0,!1,void 0,this),!M&&!F&&O.length>0&&!_&&m.jsxDEV("div",{className:"space-y-2",children:O.map((f)=>m.jsxDEV("button",{onClick:()=>W(f),className:"w-full text-left p-3 bg-[#0a0a0a] hover:bg-[#1a1a1a] border border-[#222] hover:border-[#333] rounded transition",children:[m.jsxDEV("div",{className:"font-medium text-sm",children:f.name},void 0,!1,void 0,this),f.description&&m.jsxDEV("div",{className:"text-xs text-[#666] mt-1",children:f.description},void 0,!1,void 0,this)]},f.name,!0,void 0,this))},void 0,!1,void 0,this),_&&m.jsxDEV(WA,{serverId:Y.id,tool:_,onBack:()=>W(null)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function WA({serverId:Y,tool:G,onBack:q}){let{authFetch:O}=d1(),[H,w]=w1.useState("{}"),[L,M]=w1.useState(null),[T,F]=w1.useState(null),[v,_]=w1.useState(!1);w1.useEffect(()=>{let f=G.inputSchema;if(f&&typeof f==="object"&&"properties"in f){let h=f.properties,k={};for(let[S,C]of Object.entries(h))if(C.default!==void 0)k[S]=C.default;else if(C.type==="string")k[S]="";else if(C.type==="number"||C.type==="integer")k[S]=0;else if(C.type==="boolean")k[S]=!1;else if(C.type==="array")k[S]=[];else if(C.type==="object")k[S]={};w(JSON.stringify(k,null,2))}},[G]);let W=async()=>{_(!0),F(null),M(null);try{let f=JSON.parse(H),h=await O(`/api/mcp/servers/${Y}/tools/${encodeURIComponent(G.name)}/call`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({arguments:f})}),k=await h.json();if(!h.ok){F(k.error||"Failed to call tool");return}M(k.result)}catch(f){F(`Error: ${f}`)}finally{_(!1)}};return m.jsxDEV("div",{className:"space-y-4",children:[m.jsxDEV("div",{className:"flex items-center gap-2",children:[m.jsxDEV("button",{onClick:q,className:"text-[#666] hover:text-[#888] text-sm",children:"← Back"},void 0,!1,void 0,this),m.jsxDEV("span",{className:"text-[#444]",children:"/"},void 0,!1,void 0,this),m.jsxDEV("span",{className:"font-medium",children:G.name},void 0,!1,void 0,this)]},void 0,!0,void 0,this),G.description&&m.jsxDEV("p",{className:"text-sm text-[#666]",children:G.description},void 0,!1,void 0,this),G.inputSchema&&m.jsxDEV("div",{className:"text-xs",children:m.jsxDEV("details",{className:"cursor-pointer",children:[m.jsxDEV("summary",{className:"text-[#666] hover:text-[#888]",children:"Input Schema"},void 0,!1,void 0,this),m.jsxDEV("pre",{className:"mt-2 p-2 bg-[#0a0a0a] rounded text-[#888] overflow-auto max-h-32",children:JSON.stringify(G.inputSchema,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),m.jsxDEV("div",{children:[m.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Arguments (JSON)"},void 0,!1,void 0,this),m.jsxDEV("textarea",{value:H,onChange:(f)=>w(f.target.value),className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 h-32 font-mono text-sm focus:outline-none focus:border-[#f97316] resize-none",placeholder:"{}"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("button",{onClick:W,disabled:v,className:"w-full bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-4 py-2 rounded font-medium transition",children:v?"Calling...":"Call Tool"},void 0,!1,void 0,this),T&&m.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 rounded",children:T},void 0,!1,void 0,this),L&&m.jsxDEV("div",{className:"space-y-2",children:[m.jsxDEV("div",{className:"text-sm text-[#666]",children:["Result ",L.isError&&m.jsxDEV("span",{className:"text-red-400",children:"(error)"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:`p-3 rounded text-sm ${L.isError?"bg-red-500/10":"bg-green-500/10"}`,children:L.content.map((f,h)=>m.jsxDEV("div",{className:"mb-2 last:mb-0",children:[f.type==="text"&&m.jsxDEV("pre",{className:"whitespace-pre-wrap font-mono text-xs",children:f.text},void 0,!1,void 0,this),f.type==="image"&&f.data&&m.jsxDEV("img",{src:`data:${f.mimeType||"image/png"};base64,${f.data}`,alt:"Tool result",className:"max-w-full rounded"},void 0,!1,void 0,this)]},h,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function _A({onInstall:Y}){let{authFetch:G}=d1(),[q,O]=w1.useState(""),[H,w]=w1.useState([]),[L,M]=w1.useState(!1),[T,F]=w1.useState(!1),[v,_]=w1.useState(null),[W,f]=w1.useState(null),h=async(C)=>{M(!0),f(null);try{let i=await G(`/api/mcp/registry?search=${encodeURIComponent(C)}&limit=20`),j=await i.json();if(!i.ok)f(j.error||"Failed to search registry"),w([]);else w(j.servers||[])}catch(i){f(`Failed to search: ${i}`),w([])}finally{M(!1),F(!0)}},k=(C)=>{if(C.preventDefault(),q.trim())h(q.trim())};w1.useEffect(()=>{h("")},[]);let S=async(C)=>{if(!C.npmPackage){f("This server does not have an npm package");return}_(C.id),f(null);try{let i=await G("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:C.name,type:"npm",package:C.npmPackage})});if(!i.ok){let j=await i.json();f(j.error||"Failed to add server");return}Y(C)}catch(i){f(`Failed to add server: ${i}`)}finally{_(null)}};return m.jsxDEV("div",{className:"space-y-6",children:[m.jsxDEV("form",{onSubmit:k,className:"flex gap-2",children:[m.jsxDEV("input",{type:"text",value:q,onChange:(C)=>O(C.target.value),placeholder:"Search MCP servers (e.g., filesystem, github, slack...)",className:"flex-1 bg-[#111] border border-[#333] rounded-lg px-4 py-3 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),m.jsxDEV("button",{type:"submit",disabled:L,className:"bg-[#f97316] hover:bg-[#fb923c] disabled:opacity-50 text-black px-6 py-3 rounded-lg font-medium transition",children:L?"...":"Search"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),W&&m.jsxDEV("div",{className:"text-red-400 text-sm p-3 bg-red-500/10 border border-red-500/20 rounded-lg",children:W},void 0,!1,void 0,this),!L&&T&&H.length===0&&m.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"No servers found. Try a different search term."},void 0,!1,void 0,this),H.length>0&&m.jsxDEV("div",{className:"grid gap-4 md:grid-cols-2",children:H.map((C)=>m.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 hover:border-[#333] transition",children:m.jsxDEV("div",{className:"flex items-start justify-between gap-3",children:[m.jsxDEV("div",{className:"flex-1 min-w-0",children:[m.jsxDEV("h3",{className:"font-medium truncate",children:C.name},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-sm text-[#666] mt-1 line-clamp-2",children:C.description||"No description"},void 0,!1,void 0,this),m.jsxDEV("div",{className:"flex items-center gap-2 mt-2 text-xs text-[#555]",children:[C.version&&m.jsxDEV("span",{children:["v",C.version]},void 0,!0,void 0,this),m.jsxDEV("span",{className:`px-1.5 py-0.5 rounded ${C.npmPackage?"bg-green-500/10 text-green-400":"bg-blue-500/10 text-blue-400"}`,children:C.npmPackage?"npm":"remote"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("code",{className:"text-xs text-[#555] bg-[#0a0a0a] px-2 py-0.5 rounded mt-2 inline-block truncate max-w-full",children:C.npmPackage||C.fullName},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"flex-shrink-0",children:C.npmPackage?m.jsxDEV("button",{onClick:()=>S(C),disabled:v===C.id,className:"text-sm bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-3 py-1.5 rounded transition disabled:opacity-50",children:v===C.id?"Adding...":"Add"},void 0,!1,void 0,this):C.repository?m.jsxDEV("a",{href:C.repository,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-[#666] hover:text-[#f97316] transition",children:"View →"},void 0,!1,void 0,this):null},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},C.id,!1,void 0,this))},void 0,!1,void 0,this),L&&m.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Searching registry..."},void 0,!1,void 0,this),m.jsxDEV("div",{className:"p-4 bg-[#111] border border-[#1a1a1a] rounded-lg text-sm text-[#666]",children:m.jsxDEV("p",{children:["Servers are sourced from the"," ",m.jsxDEV("a",{href:"https://github.com/modelcontextprotocol/servers",target:"_blank",rel:"noopener noreferrer",className:"text-[#f97316] hover:underline",children:"official MCP registry"},void 0,!1,void 0,this),". Not all servers have npm packages - some require manual setup."]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function MA(){let{authFetch:Y}=d1(),[G,q]=w1.useState(!1),[O,H]=w1.useState(!1),[w,L]=w1.useState([]),[M,T]=w1.useState(!0),[F,v]=w1.useState(!1),_=async()=>{try{let S=(await(await Y("/api/providers")).json()).providers||[],C=S.find((j)=>j.id==="composio"),i=S.find((j)=>j.id==="smithery");if(q(C?.hasKey||!1),H(i?.hasKey||!1),C?.hasKey)W()}catch(h){console.error("Failed to fetch providers:",h)}T(!1)},W=async()=>{v(!0);try{let k=await(await Y("/api/integrations/composio/configs")).json();L(k.configs||[])}catch(h){console.error("Failed to fetch Composio configs:",h)}v(!1)};if(w1.useEffect(()=>{_()},[Y]),M)return m.jsxDEV("div",{className:"text-center py-8 text-[#666]",children:"Loading..."},void 0,!1,void 0,this);if(!(G||O))return m.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-8 text-center",children:[m.jsxDEV("p",{className:"text-[#888] mb-2",children:"No hosted MCP services connected"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-sm text-[#666] mb-4",children:"Connect Composio or Smithery in Settings to access cloud-based MCP servers."},void 0,!1,void 0,this),m.jsxDEV("a",{href:"/settings",className:"inline-block bg-[#1a1a1a] hover:bg-[#222] border border-[#333] hover:border-[#f97316] px-4 py-2 rounded text-sm font-medium transition",children:"Go to Settings →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this);return m.jsxDEV("div",{className:"space-y-6",children:[G&&m.jsxDEV("div",{children:[m.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[m.jsxDEV("div",{className:"flex items-center gap-2",children:[m.jsxDEV("h2",{className:"font-medium",children:"Composio"},void 0,!1,void 0,this),m.jsxDEV("span",{className:"text-xs text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"flex items-center gap-3",children:[m.jsxDEV("button",{onClick:W,disabled:F,className:"text-xs text-[#666] hover:text-[#888] transition",children:F?"Loading...":"Refresh"},void 0,!1,void 0,this),m.jsxDEV("a",{href:"https://app.composio.dev/mcp_configs",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#f97316] transition",children:"Create Config →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),F?m.jsxDEV("div",{className:"text-center py-6 text-[#666]",children:"Loading configs..."},void 0,!1,void 0,this):w.length===0?m.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:[m.jsxDEV("p",{className:"text-sm text-[#666]",children:"No MCP configs found"},void 0,!1,void 0,this),m.jsxDEV("a",{href:"https://app.composio.dev/mcp_configs",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#f97316] hover:text-[#fb923c] mt-1 inline-block",children:"Create one in Composio →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this):m.jsxDEV("div",{className:"space-y-2",children:w.map((h)=>m.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-3 hover:border-[#333] transition flex items-center justify-between",children:[m.jsxDEV("div",{className:"flex-1 min-w-0",children:[m.jsxDEV("div",{className:"flex items-center gap-2",children:[m.jsxDEV("span",{className:"font-medium text-sm",children:h.name},void 0,!1,void 0,this),m.jsxDEV("span",{className:"text-xs text-[#555]",children:[h.toolsCount," tools"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),h.toolkits.length>0&&m.jsxDEV("div",{className:"flex flex-wrap gap-1 mt-1",children:[h.toolkits.slice(0,4).map((k)=>m.jsxDEV("span",{className:"text-xs bg-[#1a1a1a] text-[#666] px-1.5 py-0.5 rounded",children:k},k,!1,void 0,this)),h.toolkits.length>4&&m.jsxDEV("span",{className:"text-xs text-[#555]",children:["+",h.toolkits.length-4]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"flex items-center gap-2 ml-3",children:[m.jsxDEV("button",{onClick:()=>navigator.clipboard.writeText(`composio:${h.id}`),className:"text-xs text-[#666] hover:text-[#f97316] px-2 py-1 transition",title:"Copy config ID",children:"Copy ID"},void 0,!1,void 0,this),m.jsxDEV("a",{href:`https://app.composio.dev/mcp_configs/${h.id}`,target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#888] transition",children:"Edit"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},h.id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O&&m.jsxDEV("div",{children:[m.jsxDEV("div",{className:"flex items-center justify-between mb-3",children:[m.jsxDEV("div",{className:"flex items-center gap-2",children:[m.jsxDEV("h2",{className:"font-medium",children:"Smithery"},void 0,!1,void 0,this),m.jsxDEV("span",{className:"text-xs text-green-400",children:"Connected"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("a",{href:"https://smithery.ai/servers",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-[#666] hover:text-[#f97316] transition",children:"View Servers →"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4 text-center",children:m.jsxDEV("p",{className:"text-sm text-[#666]",children:"Smithery servers can be added from the Registry tab."},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"p-3 bg-[#0a0a0a] border border-[#222] rounded text-xs text-[#666]",children:[m.jsxDEV("strong",{className:"text-[#888]",children:"Tip:"},void 0,!1,void 0,this)," Copy a config ID (e.g., ",m.jsxDEV("code",{className:"bg-[#111] px-1 rounded",children:"composio:abc123"},void 0,!1,void 0,this),") and add it to your agent's MCP servers."," · ",m.jsxDEV("a",{href:"/settings",className:"text-[#f97316] hover:text-[#fb923c]",children:"Add more providers in Settings"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)}function wA(Y){let G=[],q=Y,O=null,H=Y.match(/(?:npx\s+-y\s+)?(@?[\w-]+\/)?(@?[\w-]+)(?:@[\w.-]+)?/);if(H){let M=H[2]||H[1];if(M)O=M.replace(/^@/,"").replace(/-mcp$/,"").replace(/-server$/,"").replace(/^server-/,"").replace(/^mcp-/,"")}let w=/--(\w+[-\w]*)\s+(YOUR_\w+|<[\w_]+>|\{[\w_]+\}|\$[\w_]+|[\w_]*(?:TOKEN|KEY|SECRET|PASSWORD|USER|ID|APIKEY)[\w_]*)/gi,L;while((L=w.exec(Y))!==null){let M=L[1],T=L[2],F=M.toUpperCase().replace(/-/g,"_"),v=O?`${O.toUpperCase().replace(/-/g,"_")}_${F}`:F;G.push({key:v,flag:M}),q=q.replace(new RegExp(`(--${M}\\s+)${T.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}`,"i"),`--${M} $${v}`)}return{cleanCommand:q,credentials:G,serverName:O}}function RA({onClose:Y,onAdded:G}){let{authFetch:q}=d1(),[O,H]=w1.useState("npm"),[w,L]=w1.useState(""),[M,T]=w1.useState(""),[F,v]=w1.useState(""),[_,W]=w1.useState([]),[f,h]=w1.useState(!1),[k,S]=w1.useState(null),C=()=>{W([..._,{key:"",value:""}])},i=(Y0,K0,q0)=>{let B0=[..._];B0[Y0][K0]=q0,W(B0)},j=(Y0)=>{W(_.filter((K0,q0)=>q0!==Y0))},o=(Y0)=>{if(v(Y0),Y0.includes("YOUR_")||Y0.includes("<")||Y0.includes("{")||/TOKEN|KEY|SECRET|PASSWORD/i.test(Y0)){let{cleanCommand:K0,credentials:q0,serverName:B0}=wA(Y0);if(!w&&B0)L(B0);if(q0.length>0){let J0=new Set(_.map((m0)=>m0.key)),v0=q0.filter((m0)=>!J0.has(m0.key)).map((m0)=>({key:m0.key,value:""}));if(v0.length>0)W([..._,...v0]),v(K0)}}},z0=(Y0)=>{if(Y0.startsWith("npx ")||Y0.includes(" --")||Y0.includes("YOUR_")||Y0.includes("<")||/\s+(TOKEN|KEY|SECRET|PASSWORD)/i.test(Y0))H("command"),o(Y0);else if(T(Y0),!w&&Y0){let q0=Y0.replace(/^@[\w-]+\//,"").replace(/@[\w.-]+$/,"").replace(/^server-/,"").replace(/-server$/,"").replace(/^mcp-/,"").replace(/-mcp$/,"");if(q0&&q0!==Y0)L(q0)}},V=async()=>{if(!w){S("Name is required");return}if(O==="npm"&&!M){S("npm package is required");return}if(O==="command"&&!F){S("Command is required");return}h(!0),S(null);let Y0={};for(let{key:K0,value:q0}of _)if(K0.trim())Y0[K0.trim()]=q0;try{let K0={name:w};if(O==="npm")K0.type="npm",K0.package=M;else{let B0=F.trim().split(/\s+/);K0.type="custom",K0.command=B0[0],K0.args=B0.slice(1).join(" ")}if(Object.keys(Y0).length>0)K0.env=Y0;let q0=await q("/api/mcp/servers",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(K0)});if(!q0.ok){let B0=await q0.json();S(B0.error||"Failed to add server"),h(!1);return}G()}catch(K0){S("Failed to add server"),h(!1)}},H0=(Y0,K0)=>{H("npm"),L(Y0),T(K0)};return m.jsxDEV("div",{className:"fixed inset-0 bg-black/50 backdrop-blur-[2px] z-50 flex items-center justify-center p-4",children:m.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg w-full max-w-lg max-h-[90vh] overflow-y-auto",children:[m.jsxDEV("div",{className:"p-4 border-b border-[#1a1a1a] flex items-center justify-between sticky top-0 bg-[#111]",children:[m.jsxDEV("h2",{className:"text-lg font-semibold",children:"Add MCP Server"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:Y,className:"text-[#666] hover:text-[#888]",children:"✕"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"p-4 space-y-4",children:[m.jsxDEV("div",{children:[m.jsxDEV("p",{className:"text-sm text-[#666] mb-2",children:"Quick add:"},void 0,!1,void 0,this),m.jsxDEV("div",{className:"flex flex-wrap gap-2",children:[{name:"filesystem",pkg:"@modelcontextprotocol/server-filesystem"},{name:"fetch",pkg:"@modelcontextprotocol/server-fetch"},{name:"memory",pkg:"@modelcontextprotocol/server-memory"},{name:"github",pkg:"@modelcontextprotocol/server-github"}].map((Y0)=>m.jsxDEV("button",{onClick:()=>H0(Y0.name,Y0.pkg),className:"text-sm bg-[#1a1a1a] hover:bg-[#222] px-3 py-1 rounded transition",children:Y0.name},Y0.name,!1,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"flex gap-1 bg-[#0a0a0a] border border-[#222] rounded p-1",children:[m.jsxDEV("button",{onClick:()=>H("npm"),className:`flex-1 px-3 py-1.5 rounded text-sm transition ${O==="npm"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"npm Package"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:()=>H("command"),className:`flex-1 px-3 py-1.5 rounded text-sm transition ${O==="command"?"bg-[#1a1a1a] text-white":"text-[#666] hover:text-[#888]"}`,children:"Custom Command"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{children:[m.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Name"},void 0,!1,void 0,this),m.jsxDEV("input",{type:"text",value:w,onChange:(Y0)=>L(Y0.target.value),placeholder:"e.g., pushover",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O==="npm"&&m.jsxDEV("div",{children:[m.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"npm Package"},void 0,!1,void 0,this),m.jsxDEV("input",{type:"text",value:M,onChange:(Y0)=>z0(Y0.target.value),placeholder:"e.g., @modelcontextprotocol/server-filesystem or paste full command",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Package name or paste a full npx command with credentials"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),O==="command"&&m.jsxDEV("div",{children:[m.jsxDEV("label",{className:"block text-sm text-[#666] mb-1",children:"Command"},void 0,!1,void 0,this),m.jsxDEV("input",{type:"text",value:F,onChange:(Y0)=>o(Y0.target.value),placeholder:"e.g., npx -y pushover-mcp@latest start --token YOUR_TOKEN",className:"w-full bg-[#0a0a0a] border border-[#333] rounded px-3 py-2 font-mono text-sm focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),m.jsxDEV("p",{className:"text-xs text-[#555] mt-1",children:"Paste the full command - credentials like YOUR_TOKEN will be auto-extracted"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{children:[m.jsxDEV("div",{className:"flex items-center justify-between mb-2",children:[m.jsxDEV("label",{className:"text-sm text-[#666]",children:"Environment Variables / Credentials"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:C,className:"text-xs text-[#f97316] hover:text-[#fb923c] transition",children:"+ Add Variable"},void 0,!1,void 0,this)]},void 0,!0,void 0,this),_.length===0&&m.jsxDEV("p",{className:"text-xs text-[#555] bg-[#0a0a0a] border border-[#222] rounded p-3",children:"Add environment variables for API tokens and credentials. These are stored encrypted and passed to the server at startup."},void 0,!1,void 0,this),_.length>0&&m.jsxDEV("div",{className:"space-y-2",children:_.map((Y0,K0)=>m.jsxDEV("div",{className:"flex gap-2",children:[m.jsxDEV("input",{type:"text",value:Y0.key,onChange:(q0)=>i(K0,"key",q0.target.value),placeholder:"KEY",className:"w-1/3 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),m.jsxDEV("input",{type:"password",value:Y0.value,onChange:(q0)=>i(K0,"value",q0.target.value),placeholder:"value",className:"flex-1 bg-[#0a0a0a] border border-[#333] rounded px-2 py-1.5 text-sm font-mono focus:outline-none focus:border-[#f97316]"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:()=>j(K0),className:"text-[#666] hover:text-red-400 px-2 transition",children:"✕"},void 0,!1,void 0,this)]},K0,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this),k&&m.jsxDEV("p",{className:"text-red-400 text-sm",children:k},void 0,!1,void 0,this)]},void 0,!0,void 0,this),m.jsxDEV("div",{className:"p-4 border-t border-[#1a1a1a] flex justify-end gap-2 sticky bottom-0 bg-[#111]",children:[m.jsxDEV("button",{onClick:Y,className:"px-4 py-2 border border-[#333] hover:border-[#666] rounded transition",children:"Cancel"},void 0,!1,void 0,this),m.jsxDEV("button",{onClick:V,disabled:f||!w||(O==="npm"?!M:!F),className:"px-4 py-2 bg-[#f97316] hover:bg-[#fb923c] text-black rounded font-medium transition disabled:opacity-50",children:f?"Adding...":"Add Server"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}var I6=X0(v1(),1);var C0=X0(Y1(),1);function pB(Y){let G=Y.category==="LLM",q=Y.category==="TOOL",O=Y.level==="error",H=Y.data?.input_tokens||0,w=Y.data?.output_tokens||0;return{llm_calls:G?1:0,tool_calls:q?1:0,errors:O?1:0,input_tokens:H,output_tokens:w}}function l$(){let{events:Y}=U2(),{currentProjectId:G,currentProject:q}=B4(),{authFetch:O}=d1(),[H,w]=I6.useState(null),[L,M]=I6.useState([]),[T,F]=I6.useState([]),[v,_]=I6.useState(!0),[W,f]=I6.useState({level:"",agent_id:""}),[h,k]=I6.useState(new Set(["DATABASE"])),[S,C]=I6.useState([]),[i,j]=I6.useState(null),o=I6.useRef(new Set),[z0,V]=I6.useState(new Set),H0=I6.useRef(new Set);I6.useEffect(()=>{(async()=>{try{let u0=await(await O("/api/agents")).json();C(u0.agents||[])}catch(S0){console.error("Failed to fetch agents:",S0)}})()},[O]);let Y0=I6.useMemo(()=>{if(G===null)return S;if(G==="unassigned")return S.filter((n)=>!n.projectId);return S.filter((n)=>n.projectId===G)},[S,G]),K0=I6.useMemo(()=>new Set(Y0.map((n)=>n.id)),[Y0]),q0=async()=>{_(!0);try{let n=G==="unassigned"?"null":G||"",S0=new URLSearchParams;if(n)S0.set("project_id",n);let s0=await(await O(`/api/telemetry/stats${S0.toString()?`?${S0}`:""}`)).json();w(s0.stats);let R0=new URLSearchParams;if(W.level)R0.set("level",W.level);if(W.agent_id)R0.set("agent_id",W.agent_id);if(n)R0.set("project_id",n);R0.set("limit","100");let O1=(await(await O(`/api/telemetry/events?${R0}`)).json()).events||[];M(O1),o.current=new Set(O1.map((g6)=>g6.id));let f6=new URLSearchParams;if(f6.set("group_by","agent"),n)f6.set("project_id",n);let u6=await(await O(`/api/telemetry/usage?${f6}`)).json();F(u6.usage||[])}catch(n){console.error("Failed to fetch telemetry:",n)}_(!1)};I6.useEffect(()=>{q0();let n=setInterval(q0,60000);return()=>clearInterval(n)},[W,G,O]);let B0=I6.useMemo(()=>{if(!H)return null;let n=0,S0=0,u0=0,s0=0,R0=0,t0=0;for(let $1 of Y)if(!o.current.has($1.id)){n++;let O1=pB($1);S0+=O1.llm_calls,u0+=O1.tool_calls,s0+=O1.errors,R0+=O1.input_tokens,t0+=O1.output_tokens}return{total_events:H.total_events+n,total_llm_calls:H.total_llm_calls+S0,total_tool_calls:H.total_tool_calls+u0,total_errors:H.total_errors+s0,total_input_tokens:H.total_input_tokens+R0,total_output_tokens:H.total_output_tokens+t0}},[H,Y]),J0=I6.useMemo(()=>{let n=new Map;for(let S0 of T)n.set(S0.agent_id,{...S0});for(let S0 of Y)if(!o.current.has(S0.id)){let u0=pB(S0),s0=n.get(S0.agent_id);if(s0)s0.llm_calls+=u0.llm_calls,s0.tool_calls+=u0.tool_calls,s0.errors+=u0.errors,s0.input_tokens+=u0.input_tokens,s0.output_tokens+=u0.output_tokens;else n.set(S0.agent_id,{agent_id:S0.agent_id,llm_calls:u0.llm_calls,tool_calls:u0.tool_calls,errors:u0.errors,input_tokens:u0.input_tokens,output_tokens:u0.output_tokens})}return Array.from(n.values())},[T,Y]),v0=I6.default.useMemo(()=>{let n=Y;if(G!==null)n=n.filter((R0)=>K0.has(R0.agent_id));if(W.agent_id)n=n.filter((R0)=>R0.agent_id===W.agent_id);if(h.size>0)n=n.filter((R0)=>!h.has(R0.category));if(W.level)n=n.filter((R0)=>R0.level===W.level);let S0=L;if(h.size>0)S0=S0.filter((R0)=>!h.has(R0.category));let u0=new Set(n.map((R0)=>R0.id)),s0=[...n];for(let R0 of S0)if(!u0.has(R0.id))s0.push(R0),u0.add(R0.id);return s0.sort((R0,t0)=>new Date(t0.timestamp).getTime()-new Date(R0.timestamp).getTime()),s0.slice(0,100)},[Y,L,W,h,G,K0]);I6.useEffect(()=>{let n=[];for(let S0 of Y)if(!H0.current.has(S0.id))H0.current.add(S0.id),n.push(S0.id);if(n.length>0)V((S0)=>{let u0=new Set(S0);return n.forEach((s0)=>u0.add(s0)),u0}),setTimeout(()=>{V((S0)=>{let u0=new Set(S0);return n.forEach((s0)=>u0.delete(s0)),u0})},5000)},[Y]);let m0=(n)=>{return S.find((u0)=>u0.id===n)?.name||n},F0=(n)=>{if(n>=1e6)return(n/1e6).toFixed(1)+"M";if(n>=1000)return(n/1000).toFixed(1)+"K";return n.toString()},B1={debug:"text-[#555]",info:"text-blue-400",warn:"text-yellow-400",error:"text-red-400"},s1={LLM:"bg-purple-500/20 text-purple-400 border-purple-500/30",TOOL:"bg-blue-500/20 text-blue-400 border-blue-500/30",CHAT:"bg-green-500/20 text-green-400 border-green-500/30",ERROR:"bg-red-500/20 text-red-400 border-red-500/30",SYSTEM:"bg-gray-500/20 text-gray-400 border-gray-500/30",TASK:"bg-yellow-500/20 text-yellow-400 border-yellow-500/30",MEMORY:"bg-cyan-500/20 text-cyan-400 border-cyan-500/30",MCP:"bg-orange-500/20 text-orange-400 border-orange-500/30",DATABASE:"bg-pink-500/20 text-pink-400 border-pink-500/30"},E1=["LLM","TOOL","CHAT","TASK","MEMORY","MCP","SYSTEM","DATABASE","ERROR"],p1=(n)=>{k((S0)=>{let u0=new Set(S0);if(u0.has(n))u0.delete(n);else u0.add(n);return u0})},x0=[{value:"",label:"All Agents"},...Y0.map((n)=>({value:n.id,label:n.name}))],U1=[{value:"",label:"All Levels"},{value:"debug",label:"Debug"},{value:"info",label:"Info"},{value:"warn",label:"Warn"},{value:"error",label:"Error"}];return C0.jsxDEV("div",{className:"flex-1 overflow-auto p-6",children:C0.jsxDEV("div",{children:[C0.jsxDEV("div",{className:"mb-6",children:[C0.jsxDEV("div",{className:"flex items-center gap-3 mb-1",children:[q&&C0.jsxDEV("span",{className:"w-3 h-3 rounded-full",style:{backgroundColor:q.color}},void 0,!1,void 0,this),C0.jsxDEV("h1",{className:"text-2xl font-semibold",children:G===null?"Telemetry":G==="unassigned"?"Telemetry - Unassigned":`Telemetry - ${q?.name||""}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("p",{className:"text-[#666]",children:"Monitor agent activity, token usage, and errors."},void 0,!1,void 0,this)]},void 0,!0,void 0,this),B0&&C0.jsxDEV("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-4 mb-6",children:[C0.jsxDEV(k2,{label:"Events",value:F0(B0.total_events)},void 0,!1,void 0,this),C0.jsxDEV(k2,{label:"LLM Calls",value:F0(B0.total_llm_calls)},void 0,!1,void 0,this),C0.jsxDEV(k2,{label:"Tool Calls",value:F0(B0.total_tool_calls)},void 0,!1,void 0,this),C0.jsxDEV(k2,{label:"Errors",value:F0(B0.total_errors),color:"red"},void 0,!1,void 0,this),C0.jsxDEV(k2,{label:"Input Tokens",value:F0(B0.total_input_tokens)},void 0,!1,void 0,this),C0.jsxDEV(k2,{label:"Output Tokens",value:F0(B0.total_output_tokens)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),J0.length>0&&C0.jsxDEV("div",{className:"mb-6",children:[C0.jsxDEV("h2",{className:"text-lg font-medium mb-3",children:"Usage by Agent"},void 0,!1,void 0,this),C0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg overflow-hidden",children:C0.jsxDEV("table",{className:"w-full text-sm",children:[C0.jsxDEV("thead",{children:C0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] text-[#666]",children:[C0.jsxDEV("th",{className:"text-left p-3",children:"Agent"},void 0,!1,void 0,this),C0.jsxDEV("th",{className:"text-right p-3",children:"LLM Calls"},void 0,!1,void 0,this),C0.jsxDEV("th",{className:"text-right p-3",children:"Tool Calls"},void 0,!1,void 0,this),C0.jsxDEV("th",{className:"text-right p-3",children:"Input Tokens"},void 0,!1,void 0,this),C0.jsxDEV("th",{className:"text-right p-3",children:"Output Tokens"},void 0,!1,void 0,this),C0.jsxDEV("th",{className:"text-right p-3",children:"Errors"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this),C0.jsxDEV("tbody",{children:J0.map((n)=>C0.jsxDEV("tr",{className:"border-b border-[#1a1a1a] last:border-0",children:[C0.jsxDEV("td",{className:"p-3 font-medium",children:m0(n.agent_id)},void 0,!1,void 0,this),C0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(n.llm_calls)},void 0,!1,void 0,this),C0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(n.tool_calls)},void 0,!1,void 0,this),C0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(n.input_tokens)},void 0,!1,void 0,this),C0.jsxDEV("td",{className:"p-3 text-right text-[#888]",children:F0(n.output_tokens)},void 0,!1,void 0,this),C0.jsxDEV("td",{className:"p-3 text-right",children:n.errors>0?C0.jsxDEV("span",{className:"text-red-400",children:n.errors},void 0,!1,void 0,this):C0.jsxDEV("span",{className:"text-[#444]",children:"0"},void 0,!1,void 0,this)},void 0,!1,void 0,this)]},n.agent_id,!0,void 0,this))},void 0,!1,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("div",{className:"flex flex-wrap items-center gap-3 mb-4",children:[C0.jsxDEV("div",{className:"w-44",children:C0.jsxDEV(R5,{value:W.agent_id,options:x0,onChange:(n)=>f({...W,agent_id:n}),placeholder:"All Agents"},void 0,!1,void 0,this)},void 0,!1,void 0,this),C0.jsxDEV("div",{className:"flex flex-wrap items-center gap-1.5 flex-1",children:E1.map((n)=>{let S0=h.has(n),u0=s1[n]||"bg-[#222] text-[#888] border-[#333]";return C0.jsxDEV("button",{onClick:()=>p1(n),className:`px-2 py-0.5 rounded text-xs border transition-all ${S0?"bg-[#1a1a1a] text-[#555] border-[#333] opacity-50":u0}`,children:n},n,!1,void 0,this)})},void 0,!1,void 0,this),C0.jsxDEV("div",{className:"flex items-center gap-2",children:[C0.jsxDEV("div",{className:"w-36",children:C0.jsxDEV(R5,{value:W.level,options:U1,onChange:(n)=>f({...W,level:n}),placeholder:"All Levels"},void 0,!1,void 0,this)},void 0,!1,void 0,this),C0.jsxDEV("button",{onClick:q0,className:"px-3 py-2 bg-[#1a1a1a] hover:bg-[#222] border border-[#333] rounded text-sm transition",children:"Refresh"},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg",children:[C0.jsxDEV("div",{className:"p-3 border-b border-[#1a1a1a] flex items-center justify-between",children:[C0.jsxDEV("h2",{className:"font-medium",children:"Recent Events"},void 0,!1,void 0,this),Y.length>0&&C0.jsxDEV("span",{className:"text-xs text-[#666]",children:[Y.length," new"]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),v&&v0.length===0?C0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"Loading..."},void 0,!1,void 0,this):v0.length===0?C0.jsxDEV("div",{className:"p-8 text-center text-[#666]",children:"No telemetry events yet. Events will appear here in real-time once agents start sending data."},void 0,!1,void 0,this):C0.jsxDEV("div",{className:"divide-y divide-[#1a1a1a]",children:v0.map((n)=>{let S0=z0.has(n.id);return C0.jsxDEV("div",{className:`p-3 hover:bg-[#0a0a0a] cursor-pointer transition-all duration-500 ${S0?"bg-green-500/5":""}`,style:{animation:S0?"slideIn 0.3s ease-out":void 0},onClick:()=>j(i===n.id?null:n.id),children:C0.jsxDEV("div",{className:"flex items-start gap-3",children:[C0.jsxDEV("span",{className:`px-2 py-0.5 rounded text-xs border transition-colors duration-300 ${s1[n.category]||"bg-[#222] text-[#888] border-[#333]"}`,children:n.category},void 0,!1,void 0,this),C0.jsxDEV("div",{className:"flex-1 min-w-0",children:[C0.jsxDEV("div",{className:"flex items-center gap-2",children:[C0.jsxDEV("span",{className:"font-medium text-sm",children:n.type},void 0,!1,void 0,this),C0.jsxDEV("span",{className:`text-xs ${B1[n.level]||"text-[#666]"}`,children:n.level},void 0,!1,void 0,this),n.duration_ms&&C0.jsxDEV("span",{className:"text-xs text-[#555]",children:[n.duration_ms,"ms"]},void 0,!0,void 0,this),C0.jsxDEV("span",{className:`w-1.5 h-1.5 rounded-full bg-green-400 transition-opacity duration-1000 ${S0?"opacity-100":"opacity-0"}`},void 0,!1,void 0,this)]},void 0,!0,void 0,this),C0.jsxDEV("div",{className:"text-xs text-[#555] mt-1",children:[m0(n.agent_id)," · ",new Date(n.timestamp).toLocaleString()]},void 0,!0,void 0,this),n.error&&C0.jsxDEV("div",{className:"text-xs text-red-400 mt-1 font-mono",children:n.error},void 0,!1,void 0,this),i===n.id&&n.data&&Object.keys(n.data).length>0&&C0.jsxDEV("pre",{className:"text-xs text-[#666] mt-2 p-2 bg-[#0a0a0a] rounded overflow-x-auto",children:JSON.stringify(n.data,null,2)},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},n.id,!1,void 0,this)})},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this)},void 0,!1,void 0,this)}function k2({label:Y,value:G,color:q}){return C0.jsxDEV("div",{className:"bg-[#111] border border-[#1a1a1a] rounded-lg p-4",children:[C0.jsxDEV("div",{className:"text-[#666] text-xs mb-1",children:Y},void 0,!1,void 0,this),C0.jsxDEV("div",{className:`text-2xl font-semibold ${q==="red"?"text-red-400":""}`,children:G},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}var T6=X0(Y1(),1);function PA(){let{isAuthenticated:Y,isLoading:G,hasUsers:q,accessToken:O,checkAuth:H}=d1(),{refreshProjects:w}=B4(),{isComplete:L,setIsComplete:M}=A$(),T=()=>{return O?{Authorization:`Bearer ${O}`}:{}},F=Y&&L===!0,{agents:v,loading:_,runningCount:W,fetchAgents:f,createAgent:h,updateAgent:k,deleteAgent:S,toggleAgent:C}=v$(F),{providers:i,configuredProviders:j,fetchProviders:o}=F$(F),[z0,V]=k5.useState(!1),[H0,Y0]=k5.useState(null),[K0,q0]=k5.useState("dashboard"),[B0,J0]=k5.useState(null),[v0,m0]=k5.useState(0),[F0,B1]=k5.useState(!1);k5.useEffect(()=>{if(!F)return;let R0=async()=>{try{let $1=await fetch("/api/tasks?status=pending",{headers:T()});if($1.ok){let O1=await $1.json();m0(O1.count||0)}}catch{}};R0();let t0=setInterval(R0,15000);return()=>clearInterval(t0)},[F,O]);let[s1,E1]=k5.useState({name:"",model:"",provider:"",systemPrompt:"You are a helpful assistant.",features:{...W$}});k5.useEffect(()=>{if(j.length>0&&!s1.provider){let R0=j[0],t0=R0.models.find(($1)=>$1.recommended)?.value||R0.models[0]?.value||"";E1(($1)=>({...$1,provider:R0.id,model:t0}))}},[j,s1.provider]),k5.useEffect(()=>{if(H0){let R0=v.find((t0)=>t0.id===H0.id);if(R0)Y0(R0);else Y0(null)}},[v,H0]);let p1=(R0)=>{let t0=i.find((O1)=>O1.id===R0),$1=t0?.models.find((O1)=>O1.recommended)?.value||t0?.models[0]?.value||"";E1((O1)=>({...O1,provider:R0,model:$1}))},x0=async()=>{if(!s1.name)return;await h(s1),await w();let R0=j[0],t0=R0?.models.find(($1)=>$1.recommended)?.value||R0?.models[0]?.value||"";E1({name:"",model:t0,provider:R0?.id||"",systemPrompt:"You are a helpful assistant.",features:{...W$}}),V(!1)},U1=async(R0,t0)=>{t0?.stopPropagation(),J0(null);let $1=await C(R0);if($1.error)J0($1.error)},n=async(R0,t0)=>{if(t0?.stopPropagation(),H0?.id===R0)Y0(null);await S(R0),await w()},S0=(R0)=>{Y0(R0),J0(null),q0("agents")},u0=(R0)=>{q0(R0),Y0(null)},s0=()=>{M(!0),o(),H()};if(G||q===null)return T6.jsxDEV(Z3,{fullScreen:!0},void 0,!1,void 0,this);if(!q)return T6.jsxDEV(R9,{onComplete:s0,needsAccount:!0},void 0,!1,void 0,this);if(!Y)return T6.jsxDEV(nQ,{},void 0,!1,void 0,this);if(L===null)return T6.jsxDEV(Z3,{fullScreen:!0},void 0,!1,void 0,this);if(!L)return T6.jsxDEV(R9,{onComplete:s0,needsAccount:!1},void 0,!1,void 0,this);return T6.jsxDEV("div",{className:"h-screen bg-[#0a0a0a] text-[#e0e0e0] font-mono flex flex-col overflow-hidden",children:[T6.jsxDEV(oQ,{onMenuClick:()=>B1(!0)},void 0,!1,void 0,this),B0&&T6.jsxDEV(rQ,{message:B0,onDismiss:()=>J0(null)},void 0,!1,void 0,this),T6.jsxDEV("div",{className:"flex flex-1 overflow-hidden",children:[T6.jsxDEV(aQ,{route:K0,agentCount:v.length,taskCount:v0,onNavigate:u0,isOpen:F0,onClose:()=>B1(!1)},void 0,!1,void 0,this),T6.jsxDEV("main",{className:"flex-1 overflow-hidden flex",children:[K0==="settings"&&T6.jsxDEV(eQ,{},void 0,!1,void 0,this),K0==="agents"&&T6.jsxDEV(JX,{agents:v,loading:_,selectedAgent:H0,providers:i,onSelectAgent:S0,onCloseAgent:()=>Y0(null),onToggleAgent:U1,onDeleteAgent:n,onUpdateAgent:k,onNewAgent:()=>V(!0),canCreateAgent:j.length>0},void 0,!1,void 0,this),K0==="dashboard"&&T6.jsxDEV($X,{agents:v,loading:_,runningCount:W,configuredProviders:j,onNavigate:u0,onSelectAgent:S0},void 0,!1,void 0,this),K0==="tasks"&&T6.jsxDEV(HX,{},void 0,!1,void 0,this),K0==="mcp"&&T6.jsxDEV(GX,{},void 0,!1,void 0,this),K0==="telemetry"&&T6.jsxDEV(l$,{},void 0,!1,void 0,this)]},void 0,!0,void 0,this)]},void 0,!0,void 0,this),z0&&T6.jsxDEV(zX,{form:s1,providers:i,configuredProviders:j,onFormChange:E1,onProviderChange:p1,onCreate:x0,onClose:()=>V(!1),onGoToSettings:()=>{V(!1),q0("settings")}},void 0,!1,void 0,this)]},void 0,!0,void 0,this)}function vA(){return T6.jsxDEV(w$,{children:T6.jsxDEV(P$,{children:T6.jsxDEV(M$,{children:T6.jsxDEV(PA,{},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)},void 0,!1,void 0,this)}var FA=xB.createRoot(document.getElementById("root"));FA.render(T6.jsxDEV(vA,{},void 0,!1,void 0,this));
216
+
217
+ //# debugId=784858A31FE5ECCD64756E2164756E21