@must-b/must-b 1.6.0 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,445 +0,0 @@
1
- function xx(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function Dp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Op={exports:{}},Xo={},zp={exports:{}},G={};/**
2
- * @license React
3
- * react.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var mi=Symbol.for("react.element"),vx=Symbol.for("react.portal"),wx=Symbol.for("react.fragment"),bx=Symbol.for("react.strict_mode"),kx=Symbol.for("react.profiler"),Sx=Symbol.for("react.provider"),jx=Symbol.for("react.context"),Nx=Symbol.for("react.forward_ref"),Cx=Symbol.for("react.suspense"),Ex=Symbol.for("react.memo"),Tx=Symbol.for("react.lazy"),Bd=Symbol.iterator;function Px(e){return e===null||typeof e!="object"?null:(e=Bd&&e[Bd]||e["@@iterator"],typeof e=="function"?e:null)}var Vp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Bp=Object.assign,Ip={};function Yr(e,t,n){this.props=e,this.context=t,this.refs=Ip,this.updater=n||Vp}Yr.prototype.isReactComponent={};Yr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Yr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Fp(){}Fp.prototype=Yr.prototype;function Ic(e,t,n){this.props=e,this.context=t,this.refs=Ip,this.updater=n||Vp}var Fc=Ic.prototype=new Fp;Fc.constructor=Ic;Bp(Fc,Yr.prototype);Fc.isPureReactComponent=!0;var Id=Array.isArray,Up=Object.prototype.hasOwnProperty,Uc={current:null},$p={key:!0,ref:!0,__self:!0,__source:!0};function Wp(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Up.call(t,r)&&!$p.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];s.children=c}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:mi,type:e,key:i,ref:o,props:s,_owner:Uc.current}}function _x(e,t){return{$$typeof:mi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function $c(e){return typeof e=="object"&&e!==null&&e.$$typeof===mi}function Rx(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Fd=/\/+/g;function Ca(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Rx(""+e.key):t.toString(36)}function Ji(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case mi:case vx:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+Ca(o,0):r,Id(s)?(n="",e!=null&&(n=e.replace(Fd,"$&/")+"/"),Ji(s,t,n,"",function(u){return u})):s!=null&&($c(s)&&(s=_x(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(Fd,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",Id(e))for(var l=0;l<e.length;l++){i=e[l];var c=r+Ca(i,l);o+=Ji(i,t,n,c,s)}else if(c=Px(e),typeof c=="function")for(e=c.call(e),l=0;!(i=e.next()).done;)i=i.value,c=r+Ca(i,l++),o+=Ji(i,t,n,c,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Ci(e,t,n){if(e==null)return e;var r=[],s=0;return Ji(e,r,"","",function(i){return t.call(n,i,s++)}),r}function Mx(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ue={current:null},Zi={transition:null},Ax={ReactCurrentDispatcher:Ue,ReactCurrentBatchConfig:Zi,ReactCurrentOwner:Uc};function Hp(){throw Error("act(...) is not supported in production builds of React.")}G.Children={map:Ci,forEach:function(e,t,n){Ci(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ci(e,function(){t++}),t},toArray:function(e){return Ci(e,function(t){return t})||[]},only:function(e){if(!$c(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};G.Component=Yr;G.Fragment=wx;G.Profiler=kx;G.PureComponent=Ic;G.StrictMode=bx;G.Suspense=Cx;G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ax;G.act=Hp;G.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Bp({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Uc.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)Up.call(t,c)&&!$p.hasOwnProperty(c)&&(r[c]=t[c]===void 0&&l!==void 0?l[c]:t[c])}var c=arguments.length-2;if(c===1)r.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];r.children=l}return{$$typeof:mi,type:e.type,key:s,ref:i,props:r,_owner:o}};G.createContext=function(e){return e={$$typeof:jx,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Sx,_context:e},e.Consumer=e};G.createElement=Wp;G.createFactory=function(e){var t=Wp.bind(null,e);return t.type=e,t};G.createRef=function(){return{current:null}};G.forwardRef=function(e){return{$$typeof:Nx,render:e}};G.isValidElement=$c;G.lazy=function(e){return{$$typeof:Tx,_payload:{_status:-1,_result:e},_init:Mx}};G.memo=function(e,t){return{$$typeof:Ex,type:e,compare:t===void 0?null:t}};G.startTransition=function(e){var t=Zi.transition;Zi.transition={};try{e()}finally{Zi.transition=t}};G.unstable_act=Hp;G.useCallback=function(e,t){return Ue.current.useCallback(e,t)};G.useContext=function(e){return Ue.current.useContext(e)};G.useDebugValue=function(){};G.useDeferredValue=function(e){return Ue.current.useDeferredValue(e)};G.useEffect=function(e,t){return Ue.current.useEffect(e,t)};G.useId=function(){return Ue.current.useId()};G.useImperativeHandle=function(e,t,n){return Ue.current.useImperativeHandle(e,t,n)};G.useInsertionEffect=function(e,t){return Ue.current.useInsertionEffect(e,t)};G.useLayoutEffect=function(e,t){return Ue.current.useLayoutEffect(e,t)};G.useMemo=function(e,t){return Ue.current.useMemo(e,t)};G.useReducer=function(e,t,n){return Ue.current.useReducer(e,t,n)};G.useRef=function(e){return Ue.current.useRef(e)};G.useState=function(e){return Ue.current.useState(e)};G.useSyncExternalStore=function(e,t,n){return Ue.current.useSyncExternalStore(e,t,n)};G.useTransition=function(){return Ue.current.useTransition()};G.version="18.3.1";zp.exports=G;var y=zp.exports;const L=Dp(y),Lx=xx({__proto__:null,default:L},[y]);/**
10
- * @license React
11
- * react-jsx-runtime.production.min.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Dx=y,Ox=Symbol.for("react.element"),zx=Symbol.for("react.fragment"),Vx=Object.prototype.hasOwnProperty,Bx=Dx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Ix={key:!0,ref:!0,__self:!0,__source:!0};function Kp(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Vx.call(t,r)&&!Ix.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:Ox,type:e,key:i,ref:o,props:s,_owner:Bx.current}}Xo.Fragment=zx;Xo.jsx=Kp;Xo.jsxs=Kp;Op.exports=Xo;var a=Op.exports,Gp={exports:{}},rt={},qp={exports:{}},Yp={};/**
18
- * @license React
19
- * scheduler.production.min.js
20
- *
21
- * Copyright (c) Facebook, Inc. and its affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(E,T){var A=E.length;E.push(T);e:for(;0<A;){var K=A-1>>>1,F=E[K];if(0<s(F,T))E[K]=T,E[A]=F,A=K;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var T=E[0],A=E.pop();if(A!==T){E[0]=A;e:for(var K=0,F=E.length,q=F>>>1;K<q;){var $=2*(K+1)-1,fe=E[$],Me=$+1,Z=E[Me];if(0>s(fe,A))Me<F&&0>s(Z,fe)?(E[K]=Z,E[Me]=A,K=Me):(E[K]=fe,E[$]=A,K=$);else if(Me<F&&0>s(Z,A))E[K]=Z,E[Me]=A,K=Me;else break e}}return T}function s(E,T){var A=E.sortIndex-T.sortIndex;return A!==0?A:E.id-T.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,f=null,h=3,p=!1,w=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,g=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(E){for(var T=n(u);T!==null;){if(T.callback===null)r(u);else if(T.startTime<=E)r(u),T.sortIndex=T.expirationTime,t(c,T);else break;T=n(u)}}function j(E){if(v=!1,x(E),!w)if(n(c)!==null)w=!0,B(k);else{var T=n(u);T!==null&&z(j,T.startTime-E)}}function k(E,T){w=!1,v&&(v=!1,m(S),S=-1),p=!0;var A=h;try{for(x(T),f=n(c);f!==null&&(!(f.expirationTime>T)||E&&!V());){var K=f.callback;if(typeof K=="function"){f.callback=null,h=f.priorityLevel;var F=K(f.expirationTime<=T);T=e.unstable_now(),typeof F=="function"?f.callback=F:f===n(c)&&r(c),x(T)}else r(c);f=n(c)}if(f!==null)var q=!0;else{var $=n(u);$!==null&&z(j,$.startTime-T),q=!1}return q}finally{f=null,h=A,p=!1}}var N=!1,C=null,S=-1,M=5,R=-1;function V(){return!(e.unstable_now()-R<M)}function U(){if(C!==null){var E=e.unstable_now();R=E;var T=!0;try{T=C(!0,E)}finally{T?ve():(N=!1,C=null)}}else N=!1}var ve;if(typeof g=="function")ve=function(){g(U)};else if(typeof MessageChannel<"u"){var Ee=new MessageChannel,mt=Ee.port2;Ee.port1.onmessage=U,ve=function(){mt.postMessage(null)}}else ve=function(){b(U,0)};function B(E){C=E,N||(N=!0,ve())}function z(E,T){S=b(function(){E(e.unstable_now())},T)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(E){E.callback=null},e.unstable_continueExecution=function(){w||p||(w=!0,B(k))},e.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<E?Math.floor(1e3/E):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(E){switch(h){case 1:case 2:case 3:var T=3;break;default:T=h}var A=h;h=T;try{return E()}finally{h=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(E,T){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var A=h;h=E;try{return T()}finally{h=A}},e.unstable_scheduleCallback=function(E,T,A){var K=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?K+A:K):A=K,E){case 1:var F=-1;break;case 2:F=250;break;case 5:F=1073741823;break;case 4:F=1e4;break;default:F=5e3}return F=A+F,E={id:d++,callback:T,priorityLevel:E,startTime:A,expirationTime:F,sortIndex:-1},A>K?(E.sortIndex=A,t(u,E),n(c)===null&&E===n(u)&&(v?(m(S),S=-1):v=!0,z(j,A-K))):(E.sortIndex=F,t(c,E),w||p||(w=!0,B(k))),E},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(E){var T=h;return function(){var A=h;h=T;try{return E.apply(this,arguments)}finally{h=A}}}})(Yp);qp.exports=Yp;var Fx=qp.exports;/**
26
- * @license React
27
- * react-dom.production.min.js
28
- *
29
- * Copyright (c) Facebook, Inc. and its affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Ux=y,tt=Fx;function _(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var Qp=new Set,Ws={};function sr(e,t){Vr(e,t),Vr(e+"Capture",t)}function Vr(e,t){for(Ws[e]=t,e=0;e<t.length;e++)Qp.add(t[e])}var qt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),yl=Object.prototype.hasOwnProperty,$x=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Ud={},$d={};function Wx(e){return yl.call($d,e)?!0:yl.call(Ud,e)?!1:$x.test(e)?$d[e]=!0:(Ud[e]=!0,!1)}function Hx(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Kx(e,t,n,r){if(t===null||typeof t>"u"||Hx(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function $e(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var Re={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Re[e]=new $e(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Re[t]=new $e(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Re[e]=new $e(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Re[e]=new $e(e,2,!1,e,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".split(" ").forEach(function(e){Re[e]=new $e(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Re[e]=new $e(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Re[e]=new $e(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Re[e]=new $e(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Re[e]=new $e(e,5,!1,e.toLowerCase(),null,!1,!1)});var Wc=/[\-:]([a-z])/g;function Hc(e){return e[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".split(" ").forEach(function(e){var t=e.replace(Wc,Hc);Re[t]=new $e(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Wc,Hc);Re[t]=new $e(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Wc,Hc);Re[t]=new $e(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Re[e]=new $e(e,1,!1,e.toLowerCase(),null,!1,!1)});Re.xlinkHref=new $e("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Re[e]=new $e(e,1,!1,e.toLowerCase(),null,!0,!0)});function Kc(e,t,n,r){var s=Re.hasOwnProperty(t)?Re[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Kx(t,n,s,r)&&(n=null),r||s===null?Wx(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var en=Ux.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ei=Symbol.for("react.element"),pr=Symbol.for("react.portal"),mr=Symbol.for("react.fragment"),Gc=Symbol.for("react.strict_mode"),xl=Symbol.for("react.profiler"),Xp=Symbol.for("react.provider"),Jp=Symbol.for("react.context"),qc=Symbol.for("react.forward_ref"),vl=Symbol.for("react.suspense"),wl=Symbol.for("react.suspense_list"),Yc=Symbol.for("react.memo"),cn=Symbol.for("react.lazy"),Zp=Symbol.for("react.offscreen"),Wd=Symbol.iterator;function us(e){return e===null||typeof e!="object"?null:(e=Wd&&e[Wd]||e["@@iterator"],typeof e=="function"?e:null)}var de=Object.assign,Ea;function ws(e){if(Ea===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ea=t&&t[1]||""}return`
34
- `+Ea+e}var Ta=!1;function Pa(e,t){if(!e||Ta)return"";Ta=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&typeof u.stack=="string"){for(var s=u.stack.split(`
35
- `),i=r.stack.split(`
36
- `),o=s.length-1,l=i.length-1;1<=o&&0<=l&&s[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==i[l]){var c=`
37
- `+s[o].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=o&&0<=l);break}}}finally{Ta=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?ws(e):""}function Gx(e){switch(e.tag){case 5:return ws(e.type);case 16:return ws("Lazy");case 13:return ws("Suspense");case 19:return ws("SuspenseList");case 0:case 2:case 15:return e=Pa(e.type,!1),e;case 11:return e=Pa(e.type.render,!1),e;case 1:return e=Pa(e.type,!0),e;default:return""}}function bl(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case mr:return"Fragment";case pr:return"Portal";case xl:return"Profiler";case Gc:return"StrictMode";case vl:return"Suspense";case wl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jp:return(e.displayName||"Context")+".Consumer";case Xp:return(e._context.displayName||"Context")+".Provider";case qc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Yc:return t=e.displayName||null,t!==null?t:bl(e.type)||"Memo";case cn:t=e._payload,e=e._init;try{return bl(e(t))}catch{}}return null}function qx(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return bl(t);case 8:return t===Gc?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Cn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function em(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Yx(e){var t=em(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ti(e){e._valueTracker||(e._valueTracker=Yx(e))}function tm(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=em(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function xo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function kl(e,t){var n=t.checked;return de({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Hd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Cn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nm(e,t){t=t.checked,t!=null&&Kc(e,"checked",t,!1)}function Sl(e,t){nm(e,t);var n=Cn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?jl(e,t.type,n):t.hasOwnProperty("defaultValue")&&jl(e,t.type,Cn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Kd(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function jl(e,t,n){(t!=="number"||xo(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var bs=Array.isArray;function Mr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Cn(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Nl(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(_(91));return de({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Gd(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(_(92));if(bs(n)){if(1<n.length)throw Error(_(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Cn(n)}}function rm(e,t){var n=Cn(t.value),r=Cn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function qd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function sm(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Cl(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?sm(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Pi,im=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Pi=Pi||document.createElement("div"),Pi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Pi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Hs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ps={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},Qx=["Webkit","ms","Moz","O"];Object.keys(Ps).forEach(function(e){Qx.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ps[t]=Ps[e]})});function om(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ps.hasOwnProperty(e)&&Ps[e]?(""+t).trim():t+"px"}function am(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=om(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Xx=de({menuitem:!0},{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});function El(e,t){if(t){if(Xx[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(_(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(_(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(_(61))}if(t.style!=null&&typeof t.style!="object")throw Error(_(62))}}function Tl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Pl=null;function Qc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _l=null,Ar=null,Lr=null;function Yd(e){if(e=xi(e)){if(typeof _l!="function")throw Error(_(280));var t=e.stateNode;t&&(t=na(t),_l(e.stateNode,e.type,t))}}function lm(e){Ar?Lr?Lr.push(e):Lr=[e]:Ar=e}function cm(){if(Ar){var e=Ar,t=Lr;if(Lr=Ar=null,Yd(e),t)for(e=0;e<t.length;e++)Yd(t[e])}}function um(e,t){return e(t)}function dm(){}var _a=!1;function fm(e,t,n){if(_a)return e(t,n);_a=!0;try{return um(e,t,n)}finally{_a=!1,(Ar!==null||Lr!==null)&&(dm(),cm())}}function Ks(e,t){var n=e.stateNode;if(n===null)return null;var r=na(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(_(231,t,typeof n));return n}var Rl=!1;if(qt)try{var ds={};Object.defineProperty(ds,"passive",{get:function(){Rl=!0}}),window.addEventListener("test",ds,ds),window.removeEventListener("test",ds,ds)}catch{Rl=!1}function Jx(e,t,n,r,s,i,o,l,c){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(d){this.onError(d)}}var _s=!1,vo=null,wo=!1,Ml=null,Zx={onError:function(e){_s=!0,vo=e}};function ev(e,t,n,r,s,i,o,l,c){_s=!1,vo=null,Jx.apply(Zx,arguments)}function tv(e,t,n,r,s,i,o,l,c){if(ev.apply(this,arguments),_s){if(_s){var u=vo;_s=!1,vo=null}else throw Error(_(198));wo||(wo=!0,Ml=u)}}function ir(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function hm(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Qd(e){if(ir(e)!==e)throw Error(_(188))}function nv(e){var t=e.alternate;if(!t){if(t=ir(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return Qd(s),e;if(i===r)return Qd(s),t;i=i.sibling}throw Error(_(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o)throw Error(_(189))}}if(n.alternate!==r)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function pm(e){return e=nv(e),e!==null?mm(e):null}function mm(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=mm(e);if(t!==null)return t;e=e.sibling}return null}var gm=tt.unstable_scheduleCallback,Xd=tt.unstable_cancelCallback,rv=tt.unstable_shouldYield,sv=tt.unstable_requestPaint,ye=tt.unstable_now,iv=tt.unstable_getCurrentPriorityLevel,Xc=tt.unstable_ImmediatePriority,ym=tt.unstable_UserBlockingPriority,bo=tt.unstable_NormalPriority,ov=tt.unstable_LowPriority,xm=tt.unstable_IdlePriority,Jo=null,Lt=null;function av(e){if(Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(Jo,e,void 0,(e.current.flags&128)===128)}catch{}}var Ct=Math.clz32?Math.clz32:uv,lv=Math.log,cv=Math.LN2;function uv(e){return e>>>=0,e===0?32:31-(lv(e)/cv|0)|0}var _i=64,Ri=4194304;function ks(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ko(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=ks(l):(i&=o,i!==0&&(r=ks(i)))}else o=n&~s,o!==0?r=ks(o):i!==0&&(r=ks(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Ct(t),s=1<<n,r|=e[n],t&=~s;return r}function dv(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function fv(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-Ct(i),l=1<<o,c=s[o];c===-1?(!(l&n)||l&r)&&(s[o]=dv(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}}function Al(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function vm(){var e=_i;return _i<<=1,!(_i&4194240)&&(_i=64),e}function Ra(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ct(t),e[t]=n}function hv(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-Ct(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Jc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ct(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ee=0;function wm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var bm,Zc,km,Sm,jm,Ll=!1,Mi=[],gn=null,yn=null,xn=null,Gs=new Map,qs=new Map,dn=[],pv="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".split(" ");function Jd(e,t){switch(e){case"focusin":case"focusout":gn=null;break;case"dragenter":case"dragleave":yn=null;break;case"mouseover":case"mouseout":xn=null;break;case"pointerover":case"pointerout":Gs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qs.delete(t.pointerId)}}function fs(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=xi(t),t!==null&&Zc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function mv(e,t,n,r,s){switch(t){case"focusin":return gn=fs(gn,e,t,n,r,s),!0;case"dragenter":return yn=fs(yn,e,t,n,r,s),!0;case"mouseover":return xn=fs(xn,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Gs.set(i,fs(Gs.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,qs.set(i,fs(qs.get(i)||null,e,t,n,r,s)),!0}return!1}function Nm(e){var t=Hn(e.target);if(t!==null){var n=ir(t);if(n!==null){if(t=n.tag,t===13){if(t=hm(n),t!==null){e.blockedOn=t,jm(e.priority,function(){km(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function eo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Dl(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Pl=r,n.target.dispatchEvent(r),Pl=null}else return t=xi(n),t!==null&&Zc(t),e.blockedOn=n,!1;t.shift()}return!0}function Zd(e,t,n){eo(e)&&n.delete(t)}function gv(){Ll=!1,gn!==null&&eo(gn)&&(gn=null),yn!==null&&eo(yn)&&(yn=null),xn!==null&&eo(xn)&&(xn=null),Gs.forEach(Zd),qs.forEach(Zd)}function hs(e,t){e.blockedOn===t&&(e.blockedOn=null,Ll||(Ll=!0,tt.unstable_scheduleCallback(tt.unstable_NormalPriority,gv)))}function Ys(e){function t(s){return hs(s,e)}if(0<Mi.length){hs(Mi[0],e);for(var n=1;n<Mi.length;n++){var r=Mi[n];r.blockedOn===e&&(r.blockedOn=null)}}for(gn!==null&&hs(gn,e),yn!==null&&hs(yn,e),xn!==null&&hs(xn,e),Gs.forEach(t),qs.forEach(t),n=0;n<dn.length;n++)r=dn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<dn.length&&(n=dn[0],n.blockedOn===null);)Nm(n),n.blockedOn===null&&dn.shift()}var Dr=en.ReactCurrentBatchConfig,So=!0;function yv(e,t,n,r){var s=ee,i=Dr.transition;Dr.transition=null;try{ee=1,eu(e,t,n,r)}finally{ee=s,Dr.transition=i}}function xv(e,t,n,r){var s=ee,i=Dr.transition;Dr.transition=null;try{ee=4,eu(e,t,n,r)}finally{ee=s,Dr.transition=i}}function eu(e,t,n,r){if(So){var s=Dl(e,t,n,r);if(s===null)Fa(e,t,r,jo,n),Jd(e,r);else if(mv(s,e,t,n,r))r.stopPropagation();else if(Jd(e,r),t&4&&-1<pv.indexOf(e)){for(;s!==null;){var i=xi(s);if(i!==null&&bm(i),i=Dl(e,t,n,r),i===null&&Fa(e,t,r,jo,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Fa(e,t,r,null,n)}}var jo=null;function Dl(e,t,n,r){if(jo=null,e=Qc(r),e=Hn(e),e!==null)if(t=ir(e),t===null)e=null;else if(n=t.tag,n===13){if(e=hm(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return jo=e,null}function Cm(e){switch(e){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 1;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 4;case"message":switch(iv()){case Xc:return 1;case ym:return 4;case bo:case ov:return 16;case xm:return 536870912;default:return 16}default:return 16}}var hn=null,tu=null,to=null;function Em(){if(to)return to;var e,t=tu,n=t.length,r,s="value"in hn?hn.value:hn.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return to=s.slice(e,1<r?1-r:void 0)}function no(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ai(){return!0}function ef(){return!1}function st(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ai:ef,this.isPropagationStopped=ef,this}return de(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ai)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ai)},persist:function(){},isPersistent:Ai}),t}var Qr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nu=st(Qr),yi=de({},Qr,{view:0,detail:0}),vv=st(yi),Ma,Aa,ps,Zo=de({},yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ru,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ps&&(ps&&e.type==="mousemove"?(Ma=e.screenX-ps.screenX,Aa=e.screenY-ps.screenY):Aa=Ma=0,ps=e),Ma)},movementY:function(e){return"movementY"in e?e.movementY:Aa}}),tf=st(Zo),wv=de({},Zo,{dataTransfer:0}),bv=st(wv),kv=de({},yi,{relatedTarget:0}),La=st(kv),Sv=de({},Qr,{animationName:0,elapsedTime:0,pseudoElement:0}),jv=st(Sv),Nv=de({},Qr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Cv=st(Nv),Ev=de({},Qr,{data:0}),nf=st(Ev),Tv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pv={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"},_v={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Rv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_v[e])?!!t[e]:!1}function ru(){return Rv}var Mv=de({},yi,{key:function(e){if(e.key){var t=Tv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=no(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Pv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ru,charCode:function(e){return e.type==="keypress"?no(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?no(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Av=st(Mv),Lv=de({},Zo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),rf=st(Lv),Dv=de({},yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ru}),Ov=st(Dv),zv=de({},Qr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vv=st(zv),Bv=de({},Zo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Iv=st(Bv),Fv=[9,13,27,32],su=qt&&"CompositionEvent"in window,Rs=null;qt&&"documentMode"in document&&(Rs=document.documentMode);var Uv=qt&&"TextEvent"in window&&!Rs,Tm=qt&&(!su||Rs&&8<Rs&&11>=Rs),sf=" ",of=!1;function Pm(e,t){switch(e){case"keyup":return Fv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _m(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gr=!1;function $v(e,t){switch(e){case"compositionend":return _m(t);case"keypress":return t.which!==32?null:(of=!0,sf);case"textInput":return e=t.data,e===sf&&of?null:e;default:return null}}function Wv(e,t){if(gr)return e==="compositionend"||!su&&Pm(e,t)?(e=Em(),to=tu=hn=null,gr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tm&&t.locale!=="ko"?null:t.data;default:return null}}var Hv={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function af(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hv[e.type]:t==="textarea"}function Rm(e,t,n,r){lm(r),t=No(t,"onChange"),0<t.length&&(n=new nu("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Ms=null,Qs=null;function Kv(e){Um(e,0)}function ea(e){var t=vr(e);if(tm(t))return e}function Gv(e,t){if(e==="change")return t}var Mm=!1;if(qt){var Da;if(qt){var Oa="oninput"in document;if(!Oa){var lf=document.createElement("div");lf.setAttribute("oninput","return;"),Oa=typeof lf.oninput=="function"}Da=Oa}else Da=!1;Mm=Da&&(!document.documentMode||9<document.documentMode)}function cf(){Ms&&(Ms.detachEvent("onpropertychange",Am),Qs=Ms=null)}function Am(e){if(e.propertyName==="value"&&ea(Qs)){var t=[];Rm(t,Qs,e,Qc(e)),fm(Kv,t)}}function qv(e,t,n){e==="focusin"?(cf(),Ms=t,Qs=n,Ms.attachEvent("onpropertychange",Am)):e==="focusout"&&cf()}function Yv(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ea(Qs)}function Qv(e,t){if(e==="click")return ea(t)}function Xv(e,t){if(e==="input"||e==="change")return ea(t)}function Jv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tt=typeof Object.is=="function"?Object.is:Jv;function Xs(e,t){if(Tt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!yl.call(t,s)||!Tt(e[s],t[s]))return!1}return!0}function uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function df(e,t){var n=uf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=uf(n)}}function Lm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Lm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Dm(){for(var e=window,t=xo();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=xo(e.document)}return t}function iu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Zv(e){var t=Dm(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Lm(n.ownerDocument.documentElement,n)){if(r!==null&&iu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=df(n,i);var o=df(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var e1=qt&&"documentMode"in document&&11>=document.documentMode,yr=null,Ol=null,As=null,zl=!1;function ff(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;zl||yr==null||yr!==xo(r)||(r=yr,"selectionStart"in r&&iu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),As&&Xs(As,r)||(As=r,r=No(Ol,"onSelect"),0<r.length&&(t=new nu("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=yr)))}function Li(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xr={animationend:Li("Animation","AnimationEnd"),animationiteration:Li("Animation","AnimationIteration"),animationstart:Li("Animation","AnimationStart"),transitionend:Li("Transition","TransitionEnd")},za={},Om={};qt&&(Om=document.createElement("div").style,"AnimationEvent"in window||(delete xr.animationend.animation,delete xr.animationiteration.animation,delete xr.animationstart.animation),"TransitionEvent"in window||delete xr.transitionend.transition);function ta(e){if(za[e])return za[e];if(!xr[e])return e;var t=xr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Om)return za[e]=t[n];return e}var zm=ta("animationend"),Vm=ta("animationiteration"),Bm=ta("animationstart"),Im=ta("transitionend"),Fm=new Map,hf="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".split(" ");function _n(e,t){Fm.set(e,t),sr(t,[e])}for(var Va=0;Va<hf.length;Va++){var Ba=hf[Va],t1=Ba.toLowerCase(),n1=Ba[0].toUpperCase()+Ba.slice(1);_n(t1,"on"+n1)}_n(zm,"onAnimationEnd");_n(Vm,"onAnimationIteration");_n(Bm,"onAnimationStart");_n("dblclick","onDoubleClick");_n("focusin","onFocus");_n("focusout","onBlur");_n(Im,"onTransitionEnd");Vr("onMouseEnter",["mouseout","mouseover"]);Vr("onMouseLeave",["mouseout","mouseover"]);Vr("onPointerEnter",["pointerout","pointerover"]);Vr("onPointerLeave",["pointerout","pointerover"]);sr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));sr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));sr("onBeforeInput",["compositionend","keypress","textInput","paste"]);sr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));sr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));sr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ss="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),r1=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ss));function pf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,tv(r,t,void 0,e),e.currentTarget=null}function Um(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&s.isPropagationStopped())break e;pf(s,l,u),i=c}else for(o=0;o<r.length;o++){if(l=r[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&s.isPropagationStopped())break e;pf(s,l,u),i=c}}}if(wo)throw e=Ml,wo=!1,Ml=null,e}function re(e,t){var n=t[Ul];n===void 0&&(n=t[Ul]=new Set);var r=e+"__bubble";n.has(r)||($m(t,e,2,!1),n.add(r))}function Ia(e,t,n){var r=0;t&&(r|=4),$m(n,e,r,t)}var Di="_reactListening"+Math.random().toString(36).slice(2);function Js(e){if(!e[Di]){e[Di]=!0,Qp.forEach(function(n){n!=="selectionchange"&&(r1.has(n)||Ia(n,!1,e),Ia(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Di]||(t[Di]=!0,Ia("selectionchange",!1,t))}}function $m(e,t,n,r){switch(Cm(t)){case 1:var s=yv;break;case 4:s=xv;break;default:s=eu}n=s.bind(null,t,n,e),s=void 0,!Rl||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Fa(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===s||c.nodeType===8&&c.parentNode===s))return;o=o.return}for(;l!==null;){if(o=Hn(l),o===null)return;if(c=o.tag,c===5||c===6){r=i=o;continue e}l=l.parentNode}}r=r.return}fm(function(){var u=i,d=Qc(n),f=[];e:{var h=Fm.get(e);if(h!==void 0){var p=nu,w=e;switch(e){case"keypress":if(no(n)===0)break e;case"keydown":case"keyup":p=Av;break;case"focusin":w="focus",p=La;break;case"focusout":w="blur",p=La;break;case"beforeblur":case"afterblur":p=La;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=tf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=bv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Ov;break;case zm:case Vm:case Bm:p=jv;break;case Im:p=Vv;break;case"scroll":p=vv;break;case"wheel":p=Iv;break;case"copy":case"cut":case"paste":p=Cv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=rf}var v=(t&4)!==0,b=!v&&e==="scroll",m=v?h!==null?h+"Capture":null:h;v=[];for(var g=u,x;g!==null;){x=g;var j=x.stateNode;if(x.tag===5&&j!==null&&(x=j,m!==null&&(j=Ks(g,m),j!=null&&v.push(Zs(g,j,x)))),b)break;g=g.return}0<v.length&&(h=new p(h,w,null,n,d),f.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==Pl&&(w=n.relatedTarget||n.fromElement)&&(Hn(w)||w[Yt]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(w=n.relatedTarget||n.toElement,p=u,w=w?Hn(w):null,w!==null&&(b=ir(w),w!==b||w.tag!==5&&w.tag!==6)&&(w=null)):(p=null,w=u),p!==w)){if(v=tf,j="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(v=rf,j="onPointerLeave",m="onPointerEnter",g="pointer"),b=p==null?h:vr(p),x=w==null?h:vr(w),h=new v(j,g+"leave",p,n,d),h.target=b,h.relatedTarget=x,j=null,Hn(d)===u&&(v=new v(m,g+"enter",w,n,d),v.target=x,v.relatedTarget=b,j=v),b=j,p&&w)t:{for(v=p,m=w,g=0,x=v;x;x=ur(x))g++;for(x=0,j=m;j;j=ur(j))x++;for(;0<g-x;)v=ur(v),g--;for(;0<x-g;)m=ur(m),x--;for(;g--;){if(v===m||m!==null&&v===m.alternate)break t;v=ur(v),m=ur(m)}v=null}else v=null;p!==null&&mf(f,h,p,v,!1),w!==null&&b!==null&&mf(f,b,w,v,!0)}}e:{if(h=u?vr(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var k=Gv;else if(af(h))if(Mm)k=Xv;else{k=Yv;var N=qv}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(k=Qv);if(k&&(k=k(e,u))){Rm(f,k,n,d);break e}N&&N(e,h,u),e==="focusout"&&(N=h._wrapperState)&&N.controlled&&h.type==="number"&&jl(h,"number",h.value)}switch(N=u?vr(u):window,e){case"focusin":(af(N)||N.contentEditable==="true")&&(yr=N,Ol=u,As=null);break;case"focusout":As=Ol=yr=null;break;case"mousedown":zl=!0;break;case"contextmenu":case"mouseup":case"dragend":zl=!1,ff(f,n,d);break;case"selectionchange":if(e1)break;case"keydown":case"keyup":ff(f,n,d)}var C;if(su)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else gr?Pm(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(Tm&&n.locale!=="ko"&&(gr||S!=="onCompositionStart"?S==="onCompositionEnd"&&gr&&(C=Em()):(hn=d,tu="value"in hn?hn.value:hn.textContent,gr=!0)),N=No(u,S),0<N.length&&(S=new nf(S,e,null,n,d),f.push({event:S,listeners:N}),C?S.data=C:(C=_m(n),C!==null&&(S.data=C)))),(C=Uv?$v(e,n):Wv(e,n))&&(u=No(u,"onBeforeInput"),0<u.length&&(d=new nf("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:u}),d.data=C))}Um(f,t)})}function Zs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function No(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ks(e,n),i!=null&&r.unshift(Zs(e,i,s)),i=Ks(e,t),i!=null&&r.push(Zs(e,i,s))),e=e.return}return r}function ur(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function mf(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(c!==null&&c===r)break;l.tag===5&&u!==null&&(l=u,s?(c=Ks(n,i),c!=null&&o.unshift(Zs(n,c,l))):s||(c=Ks(n,i),c!=null&&o.push(Zs(n,c,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var s1=/\r\n?/g,i1=/\u0000|\uFFFD/g;function gf(e){return(typeof e=="string"?e:""+e).replace(s1,`
38
- `).replace(i1,"")}function Oi(e,t,n){if(t=gf(t),gf(e)!==t&&n)throw Error(_(425))}function Co(){}var Vl=null,Bl=null;function Il(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Fl=typeof setTimeout=="function"?setTimeout:void 0,o1=typeof clearTimeout=="function"?clearTimeout:void 0,yf=typeof Promise=="function"?Promise:void 0,a1=typeof queueMicrotask=="function"?queueMicrotask:typeof yf<"u"?function(e){return yf.resolve(null).then(e).catch(l1)}:Fl;function l1(e){setTimeout(function(){throw e})}function Ua(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Ys(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Ys(t)}function vn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function xf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Xr=Math.random().toString(36).slice(2),At="__reactFiber$"+Xr,ei="__reactProps$"+Xr,Yt="__reactContainer$"+Xr,Ul="__reactEvents$"+Xr,c1="__reactListeners$"+Xr,u1="__reactHandles$"+Xr;function Hn(e){var t=e[At];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yt]||n[At]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=xf(e);e!==null;){if(n=e[At])return n;e=xf(e)}return t}e=n,n=e.parentNode}return null}function xi(e){return e=e[At]||e[Yt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function vr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(_(33))}function na(e){return e[ei]||null}var $l=[],wr=-1;function Rn(e){return{current:e}}function se(e){0>wr||(e.current=$l[wr],$l[wr]=null,wr--)}function ne(e,t){wr++,$l[wr]=e.current,e.current=t}var En={},Be=Rn(En),Ge=Rn(!1),Jn=En;function Br(e,t){var n=e.type.contextTypes;if(!n)return En;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function qe(e){return e=e.childContextTypes,e!=null}function Eo(){se(Ge),se(Be)}function vf(e,t,n){if(Be.current!==En)throw Error(_(168));ne(Be,t),ne(Ge,n)}function Wm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(_(108,qx(e)||"Unknown",s));return de({},n,r)}function To(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||En,Jn=Be.current,ne(Be,e),ne(Ge,Ge.current),!0}function wf(e,t,n){var r=e.stateNode;if(!r)throw Error(_(169));n?(e=Wm(e,t,Jn),r.__reactInternalMemoizedMergedChildContext=e,se(Ge),se(Be),ne(Be,e)):se(Ge),ne(Ge,n)}var Ut=null,ra=!1,$a=!1;function Hm(e){Ut===null?Ut=[e]:Ut.push(e)}function d1(e){ra=!0,Hm(e)}function Mn(){if(!$a&&Ut!==null){$a=!0;var e=0,t=ee;try{var n=Ut;for(ee=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Ut=null,ra=!1}catch(s){throw Ut!==null&&(Ut=Ut.slice(e+1)),gm(Xc,Mn),s}finally{ee=t,$a=!1}}return null}var br=[],kr=0,Po=null,_o=0,lt=[],ct=0,Zn=null,$t=1,Wt="";function In(e,t){br[kr++]=_o,br[kr++]=Po,Po=e,_o=t}function Km(e,t,n){lt[ct++]=$t,lt[ct++]=Wt,lt[ct++]=Zn,Zn=e;var r=$t;e=Wt;var s=32-Ct(r)-1;r&=~(1<<s),n+=1;var i=32-Ct(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,$t=1<<32-Ct(t)+s|n<<s|r,Wt=i+e}else $t=1<<i|n<<s|r,Wt=e}function ou(e){e.return!==null&&(In(e,1),Km(e,1,0))}function au(e){for(;e===Po;)Po=br[--kr],br[kr]=null,_o=br[--kr],br[kr]=null;for(;e===Zn;)Zn=lt[--ct],lt[ct]=null,Wt=lt[--ct],lt[ct]=null,$t=lt[--ct],lt[ct]=null}var Ze=null,Je=null,ae=!1,Nt=null;function Gm(e,t){var n=dt(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function bf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ze=e,Je=vn(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ze=e,Je=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Zn!==null?{id:$t,overflow:Wt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=dt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ze=e,Je=null,!0):!1;default:return!1}}function Wl(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Hl(e){if(ae){var t=Je;if(t){var n=t;if(!bf(e,t)){if(Wl(e))throw Error(_(418));t=vn(n.nextSibling);var r=Ze;t&&bf(e,t)?Gm(r,n):(e.flags=e.flags&-4097|2,ae=!1,Ze=e)}}else{if(Wl(e))throw Error(_(418));e.flags=e.flags&-4097|2,ae=!1,Ze=e}}}function kf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ze=e}function zi(e){if(e!==Ze)return!1;if(!ae)return kf(e),ae=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Il(e.type,e.memoizedProps)),t&&(t=Je)){if(Wl(e))throw qm(),Error(_(418));for(;t;)Gm(e,t),t=vn(t.nextSibling)}if(kf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Je=vn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Je=null}}else Je=Ze?vn(e.stateNode.nextSibling):null;return!0}function qm(){for(var e=Je;e;)e=vn(e.nextSibling)}function Ir(){Je=Ze=null,ae=!1}function lu(e){Nt===null?Nt=[e]:Nt.push(e)}var f1=en.ReactCurrentBatchConfig;function ms(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(_(309));var r=n.stateNode}if(!r)throw Error(_(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var l=s.refs;o===null?delete l[i]:l[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(_(284));if(!n._owner)throw Error(_(290,e))}return e}function Vi(e,t){throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Sf(e){var t=e._init;return t(e._payload)}function Ym(e){function t(m,g){if(e){var x=m.deletions;x===null?(m.deletions=[g],m.flags|=16):x.push(g)}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function r(m,g){for(m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function s(m,g){return m=Sn(m,g),m.index=0,m.sibling=null,m}function i(m,g,x){return m.index=x,e?(x=m.alternate,x!==null?(x=x.index,x<g?(m.flags|=2,g):x):(m.flags|=2,g)):(m.flags|=1048576,g)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,g,x,j){return g===null||g.tag!==6?(g=Qa(x,m.mode,j),g.return=m,g):(g=s(g,x),g.return=m,g)}function c(m,g,x,j){var k=x.type;return k===mr?d(m,g,x.props.children,j,x.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===cn&&Sf(k)===g.type)?(j=s(g,x.props),j.ref=ms(m,g,x),j.return=m,j):(j=co(x.type,x.key,x.props,null,m.mode,j),j.ref=ms(m,g,x),j.return=m,j)}function u(m,g,x,j){return g===null||g.tag!==4||g.stateNode.containerInfo!==x.containerInfo||g.stateNode.implementation!==x.implementation?(g=Xa(x,m.mode,j),g.return=m,g):(g=s(g,x.children||[]),g.return=m,g)}function d(m,g,x,j,k){return g===null||g.tag!==7?(g=Qn(x,m.mode,j,k),g.return=m,g):(g=s(g,x),g.return=m,g)}function f(m,g,x){if(typeof g=="string"&&g!==""||typeof g=="number")return g=Qa(""+g,m.mode,x),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ei:return x=co(g.type,g.key,g.props,null,m.mode,x),x.ref=ms(m,null,g),x.return=m,x;case pr:return g=Xa(g,m.mode,x),g.return=m,g;case cn:var j=g._init;return f(m,j(g._payload),x)}if(bs(g)||us(g))return g=Qn(g,m.mode,x,null),g.return=m,g;Vi(m,g)}return null}function h(m,g,x,j){var k=g!==null?g.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return k!==null?null:l(m,g,""+x,j);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Ei:return x.key===k?c(m,g,x,j):null;case pr:return x.key===k?u(m,g,x,j):null;case cn:return k=x._init,h(m,g,k(x._payload),j)}if(bs(x)||us(x))return k!==null?null:d(m,g,x,j,null);Vi(m,x)}return null}function p(m,g,x,j,k){if(typeof j=="string"&&j!==""||typeof j=="number")return m=m.get(x)||null,l(g,m,""+j,k);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Ei:return m=m.get(j.key===null?x:j.key)||null,c(g,m,j,k);case pr:return m=m.get(j.key===null?x:j.key)||null,u(g,m,j,k);case cn:var N=j._init;return p(m,g,x,N(j._payload),k)}if(bs(j)||us(j))return m=m.get(x)||null,d(g,m,j,k,null);Vi(g,j)}return null}function w(m,g,x,j){for(var k=null,N=null,C=g,S=g=0,M=null;C!==null&&S<x.length;S++){C.index>S?(M=C,C=null):M=C.sibling;var R=h(m,C,x[S],j);if(R===null){C===null&&(C=M);break}e&&C&&R.alternate===null&&t(m,C),g=i(R,g,S),N===null?k=R:N.sibling=R,N=R,C=M}if(S===x.length)return n(m,C),ae&&In(m,S),k;if(C===null){for(;S<x.length;S++)C=f(m,x[S],j),C!==null&&(g=i(C,g,S),N===null?k=C:N.sibling=C,N=C);return ae&&In(m,S),k}for(C=r(m,C);S<x.length;S++)M=p(C,m,S,x[S],j),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?S:M.key),g=i(M,g,S),N===null?k=M:N.sibling=M,N=M);return e&&C.forEach(function(V){return t(m,V)}),ae&&In(m,S),k}function v(m,g,x,j){var k=us(x);if(typeof k!="function")throw Error(_(150));if(x=k.call(x),x==null)throw Error(_(151));for(var N=k=null,C=g,S=g=0,M=null,R=x.next();C!==null&&!R.done;S++,R=x.next()){C.index>S?(M=C,C=null):M=C.sibling;var V=h(m,C,R.value,j);if(V===null){C===null&&(C=M);break}e&&C&&V.alternate===null&&t(m,C),g=i(V,g,S),N===null?k=V:N.sibling=V,N=V,C=M}if(R.done)return n(m,C),ae&&In(m,S),k;if(C===null){for(;!R.done;S++,R=x.next())R=f(m,R.value,j),R!==null&&(g=i(R,g,S),N===null?k=R:N.sibling=R,N=R);return ae&&In(m,S),k}for(C=r(m,C);!R.done;S++,R=x.next())R=p(C,m,S,R.value,j),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?S:R.key),g=i(R,g,S),N===null?k=R:N.sibling=R,N=R);return e&&C.forEach(function(U){return t(m,U)}),ae&&In(m,S),k}function b(m,g,x,j){if(typeof x=="object"&&x!==null&&x.type===mr&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Ei:e:{for(var k=x.key,N=g;N!==null;){if(N.key===k){if(k=x.type,k===mr){if(N.tag===7){n(m,N.sibling),g=s(N,x.props.children),g.return=m,m=g;break e}}else if(N.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===cn&&Sf(k)===N.type){n(m,N.sibling),g=s(N,x.props),g.ref=ms(m,N,x),g.return=m,m=g;break e}n(m,N);break}else t(m,N);N=N.sibling}x.type===mr?(g=Qn(x.props.children,m.mode,j,x.key),g.return=m,m=g):(j=co(x.type,x.key,x.props,null,m.mode,j),j.ref=ms(m,g,x),j.return=m,m=j)}return o(m);case pr:e:{for(N=x.key;g!==null;){if(g.key===N)if(g.tag===4&&g.stateNode.containerInfo===x.containerInfo&&g.stateNode.implementation===x.implementation){n(m,g.sibling),g=s(g,x.children||[]),g.return=m,m=g;break e}else{n(m,g);break}else t(m,g);g=g.sibling}g=Xa(x,m.mode,j),g.return=m,m=g}return o(m);case cn:return N=x._init,b(m,g,N(x._payload),j)}if(bs(x))return w(m,g,x,j);if(us(x))return v(m,g,x,j);Vi(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,g!==null&&g.tag===6?(n(m,g.sibling),g=s(g,x),g.return=m,m=g):(n(m,g),g=Qa(x,m.mode,j),g.return=m,m=g),o(m)):n(m,g)}return b}var Fr=Ym(!0),Qm=Ym(!1),Ro=Rn(null),Mo=null,Sr=null,cu=null;function uu(){cu=Sr=Mo=null}function du(e){var t=Ro.current;se(Ro),e._currentValue=t}function Kl(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Or(e,t){Mo=e,cu=Sr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ke=!0),e.firstContext=null)}function ht(e){var t=e._currentValue;if(cu!==e)if(e={context:e,memoizedValue:t,next:null},Sr===null){if(Mo===null)throw Error(_(308));Sr=e,Mo.dependencies={lanes:0,firstContext:e}}else Sr=Sr.next=e;return t}var Kn=null;function fu(e){Kn===null?Kn=[e]:Kn.push(e)}function Xm(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,fu(t)):(n.next=s.next,s.next=n),t.interleaved=n,Qt(e,r)}function Qt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var un=!1;function hu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Jm(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ht(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function wn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Q&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Qt(e,n)}return s=r.interleaved,s===null?(t.next=t,fu(r)):(t.next=s.next,s.next=t),r.interleaved=t,Qt(e,n)}function ro(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jc(e,n)}}function jf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ao(e,t,n,r){var s=e.updateQueue;un=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var f=s.baseState;o=0,d=u=c=null,l=i;do{var h=l.lane,p=l.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var w=e,v=l;switch(h=t,p=n,v.tag){case 1:if(w=v.payload,typeof w=="function"){f=w.call(p,f,h);break e}f=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,h=typeof w=="function"?w.call(p,f,h):w,h==null)break e;f=de({},f,h);break e;case 2:un=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[l]:h.push(l))}else p={eventTime:p,lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,o|=h;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;h=l,l=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(d===null&&(c=f),s.baseState=c,s.firstBaseUpdate=u,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);tr|=o,e.lanes=o,e.memoizedState=f}}function Nf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(_(191,s));s.call(r)}}}var vi={},Dt=Rn(vi),ti=Rn(vi),ni=Rn(vi);function Gn(e){if(e===vi)throw Error(_(174));return e}function pu(e,t){switch(ne(ni,t),ne(ti,e),ne(Dt,vi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Cl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Cl(t,e)}se(Dt),ne(Dt,t)}function Ur(){se(Dt),se(ti),se(ni)}function Zm(e){Gn(ni.current);var t=Gn(Dt.current),n=Cl(t,e.type);t!==n&&(ne(ti,e),ne(Dt,n))}function mu(e){ti.current===e&&(se(Dt),se(ti))}var le=Rn(0);function Lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wa=[];function gu(){for(var e=0;e<Wa.length;e++)Wa[e]._workInProgressVersionPrimary=null;Wa.length=0}var so=en.ReactCurrentDispatcher,Ha=en.ReactCurrentBatchConfig,er=0,ue=null,ke=null,je=null,Do=!1,Ls=!1,ri=0,h1=0;function Ae(){throw Error(_(321))}function yu(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tt(e[n],t[n]))return!1;return!0}function xu(e,t,n,r,s,i){if(er=i,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,so.current=e===null||e.memoizedState===null?y1:x1,e=n(r,s),Ls){i=0;do{if(Ls=!1,ri=0,25<=i)throw Error(_(301));i+=1,je=ke=null,t.updateQueue=null,so.current=v1,e=n(r,s)}while(Ls)}if(so.current=Oo,t=ke!==null&&ke.next!==null,er=0,je=ke=ue=null,Do=!1,t)throw Error(_(300));return e}function vu(){var e=ri!==0;return ri=0,e}function Mt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return je===null?ue.memoizedState=je=e:je=je.next=e,je}function pt(){if(ke===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=ke.next;var t=je===null?ue.memoizedState:je.next;if(t!==null)je=t,ke=e;else{if(e===null)throw Error(_(310));ke=e,e={memoizedState:ke.memoizedState,baseState:ke.baseState,baseQueue:ke.baseQueue,queue:ke.queue,next:null},je===null?ue.memoizedState=je=e:je=je.next=e}return je}function si(e,t){return typeof t=="function"?t(e):t}function Ka(e){var t=pt(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=ke,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var l=o=null,c=null,u=i;do{var d=u.lane;if((er&d)===d)c!==null&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};c===null?(l=c=f,o=r):c=c.next=f,ue.lanes|=d,tr|=d}u=u.next}while(u!==null&&u!==i);c===null?o=r:c.next=l,Tt(r,t.memoizedState)||(Ke=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,ue.lanes|=i,tr|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ga(e){var t=pt(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Tt(i,t.memoizedState)||(Ke=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function e0(){}function t0(e,t){var n=ue,r=pt(),s=t(),i=!Tt(r.memoizedState,s);if(i&&(r.memoizedState=s,Ke=!0),r=r.queue,wu(s0.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||je!==null&&je.memoizedState.tag&1){if(n.flags|=2048,ii(9,r0.bind(null,n,r,s,t),void 0,null),Ce===null)throw Error(_(349));er&30||n0(n,t,s)}return s}function n0(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ue.updateQueue,t===null?(t={lastEffect:null,stores:null},ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function r0(e,t,n,r){t.value=n,t.getSnapshot=r,i0(t)&&o0(e)}function s0(e,t,n){return n(function(){i0(t)&&o0(e)})}function i0(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tt(e,n)}catch{return!0}}function o0(e){var t=Qt(e,1);t!==null&&Et(t,e,1,-1)}function Cf(e){var t=Mt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:e},t.queue=e,e=e.dispatch=g1.bind(null,ue,e),[t.memoizedState,e]}function ii(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ue.updateQueue,t===null?(t={lastEffect:null,stores:null},ue.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function a0(){return pt().memoizedState}function io(e,t,n,r){var s=Mt();ue.flags|=e,s.memoizedState=ii(1|t,n,void 0,r===void 0?null:r)}function sa(e,t,n,r){var s=pt();r=r===void 0?null:r;var i=void 0;if(ke!==null){var o=ke.memoizedState;if(i=o.destroy,r!==null&&yu(r,o.deps)){s.memoizedState=ii(t,n,i,r);return}}ue.flags|=e,s.memoizedState=ii(1|t,n,i,r)}function Ef(e,t){return io(8390656,8,e,t)}function wu(e,t){return sa(2048,8,e,t)}function l0(e,t){return sa(4,2,e,t)}function c0(e,t){return sa(4,4,e,t)}function u0(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function d0(e,t,n){return n=n!=null?n.concat([e]):null,sa(4,4,u0.bind(null,t,e),n)}function bu(){}function f0(e,t){var n=pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&yu(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function h0(e,t){var n=pt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&yu(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function p0(e,t,n){return er&21?(Tt(n,t)||(n=vm(),ue.lanes|=n,tr|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ke=!0),e.memoizedState=n)}function p1(e,t){var n=ee;ee=n!==0&&4>n?n:4,e(!0);var r=Ha.transition;Ha.transition={};try{e(!1),t()}finally{ee=n,Ha.transition=r}}function m0(){return pt().memoizedState}function m1(e,t,n){var r=kn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},g0(e))y0(t,n);else if(n=Xm(e,t,n,r),n!==null){var s=Fe();Et(n,e,r,s),x0(n,t,r)}}function g1(e,t,n){var r=kn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(g0(e))y0(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,Tt(l,o)){var c=t.interleaved;c===null?(s.next=s,fu(t)):(s.next=c.next,c.next=s),t.interleaved=s;return}}catch{}finally{}n=Xm(e,t,s,r),n!==null&&(s=Fe(),Et(n,e,r,s),x0(n,t,r))}}function g0(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function y0(e,t){Ls=Do=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function x0(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jc(e,n)}}var Oo={readContext:ht,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useInsertionEffect:Ae,useLayoutEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useMutableSource:Ae,useSyncExternalStore:Ae,useId:Ae,unstable_isNewReconciler:!1},y1={readContext:ht,useCallback:function(e,t){return Mt().memoizedState=[e,t===void 0?null:t],e},useContext:ht,useEffect:Ef,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,io(4194308,4,u0.bind(null,t,e),n)},useLayoutEffect:function(e,t){return io(4194308,4,e,t)},useInsertionEffect:function(e,t){return io(4,2,e,t)},useMemo:function(e,t){var n=Mt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Mt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=m1.bind(null,ue,e),[r.memoizedState,e]},useRef:function(e){var t=Mt();return e={current:e},t.memoizedState=e},useState:Cf,useDebugValue:bu,useDeferredValue:function(e){return Mt().memoizedState=e},useTransition:function(){var e=Cf(!1),t=e[0];return e=p1.bind(null,e[1]),Mt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ue,s=Mt();if(ae){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),Ce===null)throw Error(_(349));er&30||n0(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Ef(s0.bind(null,r,i,e),[e]),r.flags|=2048,ii(9,r0.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Mt(),t=Ce.identifierPrefix;if(ae){var n=Wt,r=$t;n=(r&~(1<<32-Ct(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ri++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=h1++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},x1={readContext:ht,useCallback:f0,useContext:ht,useEffect:wu,useImperativeHandle:d0,useInsertionEffect:l0,useLayoutEffect:c0,useMemo:h0,useReducer:Ka,useRef:a0,useState:function(){return Ka(si)},useDebugValue:bu,useDeferredValue:function(e){var t=pt();return p0(t,ke.memoizedState,e)},useTransition:function(){var e=Ka(si)[0],t=pt().memoizedState;return[e,t]},useMutableSource:e0,useSyncExternalStore:t0,useId:m0,unstable_isNewReconciler:!1},v1={readContext:ht,useCallback:f0,useContext:ht,useEffect:wu,useImperativeHandle:d0,useInsertionEffect:l0,useLayoutEffect:c0,useMemo:h0,useReducer:Ga,useRef:a0,useState:function(){return Ga(si)},useDebugValue:bu,useDeferredValue:function(e){var t=pt();return ke===null?t.memoizedState=e:p0(t,ke.memoizedState,e)},useTransition:function(){var e=Ga(si)[0],t=pt().memoizedState;return[e,t]},useMutableSource:e0,useSyncExternalStore:t0,useId:m0,unstable_isNewReconciler:!1};function kt(e,t){if(e&&e.defaultProps){t=de({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Gl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:de({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ia={isMounted:function(e){return(e=e._reactInternals)?ir(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=kn(e),i=Ht(r,s);i.payload=t,n!=null&&(i.callback=n),t=wn(e,i,s),t!==null&&(Et(t,e,s,r),ro(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Fe(),s=kn(e),i=Ht(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=wn(e,i,s),t!==null&&(Et(t,e,s,r),ro(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Fe(),r=kn(e),s=Ht(n,r);s.tag=2,t!=null&&(s.callback=t),t=wn(e,s,r),t!==null&&(Et(t,e,r,n),ro(t,e,r))}};function Tf(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Xs(n,r)||!Xs(s,i):!0}function v0(e,t,n){var r=!1,s=En,i=t.contextType;return typeof i=="object"&&i!==null?i=ht(i):(s=qe(t)?Jn:Be.current,r=t.contextTypes,i=(r=r!=null)?Br(e,s):En),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ia,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Pf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ia.enqueueReplaceState(t,t.state,null)}function ql(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},hu(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=ht(i):(i=qe(t)?Jn:Be.current,s.context=Br(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Gl(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&ia.enqueueReplaceState(s,s.state,null),Ao(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function $r(e,t){try{var n="",r=t;do n+=Gx(r),r=r.return;while(r);var s=n}catch(i){s=`
39
- Error generating stack: `+i.message+`
40
- `+i.stack}return{value:e,source:t,stack:s,digest:null}}function qa(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Yl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var w1=typeof WeakMap=="function"?WeakMap:Map;function w0(e,t,n){n=Ht(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Vo||(Vo=!0,ic=r),Yl(e,t)},n}function b0(e,t,n){n=Ht(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){Yl(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){Yl(e,t),typeof r!="function"&&(bn===null?bn=new Set([this]):bn.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function _f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new w1;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=L1.bind(null,e,t,n),t.then(e,e))}function Rf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Mf(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ht(-1,1),t.tag=2,wn(n,t,1))),n.lanes|=1),e)}var b1=en.ReactCurrentOwner,Ke=!1;function Ie(e,t,n,r){t.child=e===null?Qm(t,null,n,r):Fr(t,e.child,n,r)}function Af(e,t,n,r,s){n=n.render;var i=t.ref;return Or(t,s),r=xu(e,t,n,r,i,s),n=vu(),e!==null&&!Ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Xt(e,t,s)):(ae&&n&&ou(t),t.flags|=1,Ie(e,t,r,s),t.child)}function Lf(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Pu(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,k0(e,t,i,r,s)):(e=co(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Xs,n(o,r)&&e.ref===t.ref)return Xt(e,t,s)}return t.flags|=1,e=Sn(i,r),e.ref=t.ref,e.return=t,t.child=e}function k0(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Xs(i,r)&&e.ref===t.ref)if(Ke=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ke=!0);else return t.lanes=e.lanes,Xt(e,t,s)}return Ql(e,t,n,r,s)}function S0(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ne(Nr,Xe),Xe|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ne(Nr,Xe),Xe|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ne(Nr,Xe),Xe|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ne(Nr,Xe),Xe|=r;return Ie(e,t,s,n),t.child}function j0(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ql(e,t,n,r,s){var i=qe(n)?Jn:Be.current;return i=Br(t,i),Or(t,s),n=xu(e,t,n,r,i,s),r=vu(),e!==null&&!Ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Xt(e,t,s)):(ae&&r&&ou(t),t.flags|=1,Ie(e,t,n,s),t.child)}function Df(e,t,n,r,s){if(qe(n)){var i=!0;To(t)}else i=!1;if(Or(t,s),t.stateNode===null)oo(e,t),v0(t,n,r),ql(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var c=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=ht(u):(u=qe(n)?Jn:Be.current,u=Br(t,u));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||c!==u)&&Pf(t,o,r,u),un=!1;var h=t.memoizedState;o.state=h,Ao(t,r,o,s),c=t.memoizedState,l!==r||h!==c||Ge.current||un?(typeof d=="function"&&(Gl(t,n,d,r),c=t.memoizedState),(l=un||Tf(t,n,l,r,h,c,u))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=u,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Jm(e,t),l=t.memoizedProps,u=t.type===t.elementType?l:kt(t.type,l),o.props=u,f=t.pendingProps,h=o.context,c=n.contextType,typeof c=="object"&&c!==null?c=ht(c):(c=qe(n)?Jn:Be.current,c=Br(t,c));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||h!==c)&&Pf(t,o,r,c),un=!1,h=t.memoizedState,o.state=h,Ao(t,r,o,s);var w=t.memoizedState;l!==f||h!==w||Ge.current||un?(typeof p=="function"&&(Gl(t,n,p,r),w=t.memoizedState),(u=un||Tf(t,n,u,r,h,w,c)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=c,r=u):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Xl(e,t,n,r,i,s)}function Xl(e,t,n,r,s,i){j0(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&wf(t,n,!1),Xt(e,t,i);r=t.stateNode,b1.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Fr(t,e.child,null,i),t.child=Fr(t,null,l,i)):Ie(e,t,l,i),t.memoizedState=r.state,s&&wf(t,n,!0),t.child}function N0(e){var t=e.stateNode;t.pendingContext?vf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&vf(e,t.context,!1),pu(e,t.containerInfo)}function Of(e,t,n,r,s){return Ir(),lu(s),t.flags|=256,Ie(e,t,n,r),t.child}var Jl={dehydrated:null,treeContext:null,retryLane:0};function Zl(e){return{baseLanes:e,cachePool:null,transitions:null}}function C0(e,t,n){var r=t.pendingProps,s=le.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ne(le,s&1),e===null)return Hl(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=la(o,r,0,null),e=Qn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Zl(n),t.memoizedState=Jl,e):ku(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return k1(e,t,o,r,l,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,l=s.sibling;var c={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Sn(s,c),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=Sn(l,i):(i=Qn(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Zl(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Jl,r}return i=e.child,e=i.sibling,r=Sn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ku(e,t){return t=la({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Bi(e,t,n,r){return r!==null&&lu(r),Fr(t,e.child,null,n),e=ku(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function k1(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=qa(Error(_(422))),Bi(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=la({mode:"visible",children:r.children},s,0,null),i=Qn(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Fr(t,e.child,null,o),t.child.memoizedState=Zl(o),t.memoizedState=Jl,i);if(!(t.mode&1))return Bi(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(_(419)),r=qa(i,r,void 0),Bi(e,t,o,r)}if(l=(o&e.childLanes)!==0,Ke||l){if(r=Ce,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Qt(e,s),Et(r,e,s,-1))}return Tu(),r=qa(Error(_(421))),Bi(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=D1.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Je=vn(s.nextSibling),Ze=t,ae=!0,Nt=null,e!==null&&(lt[ct++]=$t,lt[ct++]=Wt,lt[ct++]=Zn,$t=e.id,Wt=e.overflow,Zn=t),t=ku(t,r.children),t.flags|=4096,t)}function zf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Kl(e.return,t,n)}function Ya(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function E0(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ie(e,t,r.children,n),r=le.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zf(e,n,t);else if(e.tag===19)zf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ne(le,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Lo(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ya(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Lo(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ya(t,!0,n,null,i);break;case"together":Ya(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function oo(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Xt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),tr|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){for(e=t.child,n=Sn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Sn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function S1(e,t,n){switch(t.tag){case 3:N0(t),Ir();break;case 5:Zm(t);break;case 1:qe(t.type)&&To(t);break;case 4:pu(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ne(Ro,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ne(le,le.current&1),t.flags|=128,null):n&t.child.childLanes?C0(e,t,n):(ne(le,le.current&1),e=Xt(e,t,n),e!==null?e.sibling:null);ne(le,le.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return E0(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ne(le,le.current),r)break;return null;case 22:case 23:return t.lanes=0,S0(e,t,n)}return Xt(e,t,n)}var T0,ec,P0,_0;T0=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ec=function(){};P0=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Gn(Dt.current);var i=null;switch(n){case"input":s=kl(e,s),r=kl(e,r),i=[];break;case"select":s=de({},s,{value:void 0}),r=de({},r,{value:void 0}),i=[];break;case"textarea":s=Nl(e,s),r=Nl(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Co)}El(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var l=s[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(Ws.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var c=r[u];if(l=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(c!=null||l!=null))if(u==="style")if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(i||(i=[]),i.push(u,n)),n=c;else u==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,l=l?l.__html:void 0,c!=null&&l!==c&&(i=i||[]).push(u,c)):u==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(u,""+c):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(Ws.hasOwnProperty(u)?(c!=null&&u==="onScroll"&&re("scroll",e),i||l===c||(i=[])):(i=i||[]).push(u,c))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};_0=function(e,t,n,r){n!==r&&(t.flags|=4)};function gs(e,t){if(!ae)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Le(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function j1(e,t,n){var r=t.pendingProps;switch(au(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return qe(t.type)&&Eo(),Le(t),null;case 3:return r=t.stateNode,Ur(),se(Ge),se(Be),gu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(zi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Nt!==null&&(lc(Nt),Nt=null))),ec(e,t),Le(t),null;case 5:mu(t);var s=Gn(ni.current);if(n=t.type,e!==null&&t.stateNode!=null)P0(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(_(166));return Le(t),null}if(e=Gn(Dt.current),zi(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[At]=t,r[ei]=i,e=(t.mode&1)!==0,n){case"dialog":re("cancel",r),re("close",r);break;case"iframe":case"object":case"embed":re("load",r);break;case"video":case"audio":for(s=0;s<Ss.length;s++)re(Ss[s],r);break;case"source":re("error",r);break;case"img":case"image":case"link":re("error",r),re("load",r);break;case"details":re("toggle",r);break;case"input":Hd(r,i),re("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},re("invalid",r);break;case"textarea":Gd(r,i),re("invalid",r)}El(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Oi(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Oi(r.textContent,l,e),s=["children",""+l]):Ws.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&re("scroll",r)}switch(n){case"input":Ti(r),Kd(r,i,!0);break;case"textarea":Ti(r),qd(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Co)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=sm(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[At]=t,e[ei]=r,T0(e,t,!1,!1),t.stateNode=e;e:{switch(o=Tl(n,r),n){case"dialog":re("cancel",e),re("close",e),s=r;break;case"iframe":case"object":case"embed":re("load",e),s=r;break;case"video":case"audio":for(s=0;s<Ss.length;s++)re(Ss[s],e);s=r;break;case"source":re("error",e),s=r;break;case"img":case"image":case"link":re("error",e),re("load",e),s=r;break;case"details":re("toggle",e),s=r;break;case"input":Hd(e,r),s=kl(e,r),re("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=de({},r,{value:void 0}),re("invalid",e);break;case"textarea":Gd(e,r),s=Nl(e,r),re("invalid",e);break;default:s=r}El(n,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var c=l[i];i==="style"?am(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&im(e,c)):i==="children"?typeof c=="string"?(n!=="textarea"||c!=="")&&Hs(e,c):typeof c=="number"&&Hs(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ws.hasOwnProperty(i)?c!=null&&i==="onScroll"&&re("scroll",e):c!=null&&Kc(e,i,c,o))}switch(n){case"input":Ti(e),Kd(e,r,!1);break;case"textarea":Ti(e),qd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Cn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Mr(e,!!r.multiple,i,!1):r.defaultValue!=null&&Mr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Co)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Le(t),null;case 6:if(e&&t.stateNode!=null)_0(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(_(166));if(n=Gn(ni.current),Gn(Dt.current),zi(t)){if(r=t.stateNode,n=t.memoizedProps,r[At]=t,(i=r.nodeValue!==n)&&(e=Ze,e!==null))switch(e.tag){case 3:Oi(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Oi(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[At]=t,t.stateNode=r}return Le(t),null;case 13:if(se(le),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ae&&Je!==null&&t.mode&1&&!(t.flags&128))qm(),Ir(),t.flags|=98560,i=!1;else if(i=zi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(_(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(_(317));i[At]=t}else Ir(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Le(t),i=!1}else Nt!==null&&(lc(Nt),Nt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||le.current&1?Se===0&&(Se=3):Tu())),t.updateQueue!==null&&(t.flags|=4),Le(t),null);case 4:return Ur(),ec(e,t),e===null&&Js(t.stateNode.containerInfo),Le(t),null;case 10:return du(t.type._context),Le(t),null;case 17:return qe(t.type)&&Eo(),Le(t),null;case 19:if(se(le),i=t.memoizedState,i===null)return Le(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)gs(i,!1);else{if(Se!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Lo(e),o!==null){for(t.flags|=128,gs(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ne(le,le.current&1|2),t.child}e=e.sibling}i.tail!==null&&ye()>Wr&&(t.flags|=128,r=!0,gs(i,!1),t.lanes=4194304)}else{if(!r)if(e=Lo(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),gs(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ae)return Le(t),null}else 2*ye()-i.renderingStartTime>Wr&&n!==1073741824&&(t.flags|=128,r=!0,gs(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ye(),t.sibling=null,n=le.current,ne(le,r?n&1|2:n&1),t):(Le(t),null);case 22:case 23:return Eu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Xe&1073741824&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),null;case 24:return null;case 25:return null}throw Error(_(156,t.tag))}function N1(e,t){switch(au(t),t.tag){case 1:return qe(t.type)&&Eo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ur(),se(Ge),se(Be),gu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return mu(t),null;case 13:if(se(le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));Ir()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(le),null;case 4:return Ur(),null;case 10:return du(t.type._context),null;case 22:case 23:return Eu(),null;case 24:return null;default:return null}}var Ii=!1,Oe=!1,C1=typeof WeakSet=="function"?WeakSet:Set,O=null;function jr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){pe(e,t,r)}else n.current=null}function tc(e,t,n){try{n()}catch(r){pe(e,t,r)}}var Vf=!1;function E1(e,t){if(Vl=So,e=Dm(),iu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||s!==0&&f.nodeType!==3||(l=o+s),f!==i||r!==0&&f.nodeType!==3||(c=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++u===s&&(l=o),h===i&&++d===r&&(c=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Bl={focusedElem:e,selectionRange:n},So=!1,O=t;O!==null;)if(t=O,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,O=e;else for(;O!==null;){t=O;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,b=w.memoizedState,m=t.stateNode,g=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:kt(t.type,v),b);m.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(_(163))}}catch(j){pe(t,t.return,j)}if(e=t.sibling,e!==null){e.return=t.return,O=e;break}O=t.return}return w=Vf,Vf=!1,w}function Ds(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&tc(t,n,i)}s=s.next}while(s!==r)}}function oa(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function nc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function R0(e){var t=e.alternate;t!==null&&(e.alternate=null,R0(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[At],delete t[ei],delete t[Ul],delete t[c1],delete t[u1])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function M0(e){return e.tag===5||e.tag===3||e.tag===4}function Bf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||M0(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Co));else if(r!==4&&(e=e.child,e!==null))for(rc(e,t,n),e=e.sibling;e!==null;)rc(e,t,n),e=e.sibling}function sc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(sc(e,t,n),e=e.sibling;e!==null;)sc(e,t,n),e=e.sibling}var Te=null,St=!1;function an(e,t,n){for(n=n.child;n!==null;)A0(e,t,n),n=n.sibling}function A0(e,t,n){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(Jo,n)}catch{}switch(n.tag){case 5:Oe||jr(n,t);case 6:var r=Te,s=St;Te=null,an(e,t,n),Te=r,St=s,Te!==null&&(St?(e=Te,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Te.removeChild(n.stateNode));break;case 18:Te!==null&&(St?(e=Te,n=n.stateNode,e.nodeType===8?Ua(e.parentNode,n):e.nodeType===1&&Ua(e,n),Ys(e)):Ua(Te,n.stateNode));break;case 4:r=Te,s=St,Te=n.stateNode.containerInfo,St=!0,an(e,t,n),Te=r,St=s;break;case 0:case 11:case 14:case 15:if(!Oe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&tc(n,t,o),s=s.next}while(s!==r)}an(e,t,n);break;case 1:if(!Oe&&(jr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){pe(n,t,l)}an(e,t,n);break;case 21:an(e,t,n);break;case 22:n.mode&1?(Oe=(r=Oe)||n.memoizedState!==null,an(e,t,n),Oe=r):an(e,t,n);break;default:an(e,t,n)}}function If(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new C1),t.forEach(function(r){var s=O1.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:Te=l.stateNode,St=!1;break e;case 3:Te=l.stateNode.containerInfo,St=!0;break e;case 4:Te=l.stateNode.containerInfo,St=!0;break e}l=l.return}if(Te===null)throw Error(_(160));A0(i,o,s),Te=null,St=!1;var c=s.alternate;c!==null&&(c.return=null),s.return=null}catch(u){pe(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)L0(t,e),t=t.sibling}function L0(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(vt(t,e),_t(e),r&4){try{Ds(3,e,e.return),oa(3,e)}catch(v){pe(e,e.return,v)}try{Ds(5,e,e.return)}catch(v){pe(e,e.return,v)}}break;case 1:vt(t,e),_t(e),r&512&&n!==null&&jr(n,n.return);break;case 5:if(vt(t,e),_t(e),r&512&&n!==null&&jr(n,n.return),e.flags&32){var s=e.stateNode;try{Hs(s,"")}catch(v){pe(e,e.return,v)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,l=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&nm(s,i),Tl(l,o);var u=Tl(l,i);for(o=0;o<c.length;o+=2){var d=c[o],f=c[o+1];d==="style"?am(s,f):d==="dangerouslySetInnerHTML"?im(s,f):d==="children"?Hs(s,f):Kc(s,d,f,u)}switch(l){case"input":Sl(s,i);break;case"textarea":rm(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Mr(s,!!i.multiple,p,!1):h!==!!i.multiple&&(i.defaultValue!=null?Mr(s,!!i.multiple,i.defaultValue,!0):Mr(s,!!i.multiple,i.multiple?[]:"",!1))}s[ei]=i}catch(v){pe(e,e.return,v)}}break;case 6:if(vt(t,e),_t(e),r&4){if(e.stateNode===null)throw Error(_(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(v){pe(e,e.return,v)}}break;case 3:if(vt(t,e),_t(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Ys(t.containerInfo)}catch(v){pe(e,e.return,v)}break;case 4:vt(t,e),_t(e);break;case 13:vt(t,e),_t(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Nu=ye())),r&4&&If(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Oe=(u=Oe)||d,vt(t,e),Oe=u):vt(t,e),_t(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(O=e,d=e.child;d!==null;){for(f=O=d;O!==null;){switch(h=O,p=h.child,h.tag){case 0:case 11:case 14:case 15:Ds(4,h,h.return);break;case 1:jr(h,h.return);var w=h.stateNode;if(typeof w.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(v){pe(r,n,v)}}break;case 5:jr(h,h.return);break;case 22:if(h.memoizedState!==null){Uf(f);continue}}p!==null?(p.return=h,O=p):Uf(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,c=f.memoizedProps.style,o=c!=null&&c.hasOwnProperty("display")?c.display:null,l.style.display=om("display",o))}catch(v){pe(e,e.return,v)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?"":f.memoizedProps}catch(v){pe(e,e.return,v)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:vt(t,e),_t(e),r&4&&If(e);break;case 21:break;default:vt(t,e),_t(e)}}function _t(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(M0(n)){var r=n;break e}n=n.return}throw Error(_(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Hs(s,""),r.flags&=-33);var i=Bf(e);sc(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,l=Bf(e);rc(e,l,o);break;default:throw Error(_(161))}}catch(c){pe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function T1(e,t,n){O=e,D0(e)}function D0(e,t,n){for(var r=(e.mode&1)!==0;O!==null;){var s=O,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Ii;if(!o){var l=s.alternate,c=l!==null&&l.memoizedState!==null||Oe;l=Ii;var u=Oe;if(Ii=o,(Oe=c)&&!u)for(O=s;O!==null;)o=O,c=o.child,o.tag===22&&o.memoizedState!==null?$f(s):c!==null?(c.return=o,O=c):$f(s);for(;i!==null;)O=i,D0(i),i=i.sibling;O=s,Ii=l,Oe=u}Ff(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,O=i):Ff(e)}}function Ff(e){for(;O!==null;){var t=O;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Oe||oa(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Oe)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:kt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Nf(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Nf(t,o,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Ys(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(_(163))}Oe||t.flags&512&&nc(t)}catch(h){pe(t,t.return,h)}}if(t===e){O=null;break}if(n=t.sibling,n!==null){n.return=t.return,O=n;break}O=t.return}}function Uf(e){for(;O!==null;){var t=O;if(t===e){O=null;break}var n=t.sibling;if(n!==null){n.return=t.return,O=n;break}O=t.return}}function $f(e){for(;O!==null;){var t=O;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{oa(4,t)}catch(c){pe(t,n,c)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(c){pe(t,s,c)}}var i=t.return;try{nc(t)}catch(c){pe(t,i,c)}break;case 5:var o=t.return;try{nc(t)}catch(c){pe(t,o,c)}}}catch(c){pe(t,t.return,c)}if(t===e){O=null;break}var l=t.sibling;if(l!==null){l.return=t.return,O=l;break}O=t.return}}var P1=Math.ceil,zo=en.ReactCurrentDispatcher,Su=en.ReactCurrentOwner,ft=en.ReactCurrentBatchConfig,Q=0,Ce=null,we=null,_e=0,Xe=0,Nr=Rn(0),Se=0,oi=null,tr=0,aa=0,ju=0,Os=null,He=null,Nu=0,Wr=1/0,Ft=null,Vo=!1,ic=null,bn=null,Fi=!1,pn=null,Bo=0,zs=0,oc=null,ao=-1,lo=0;function Fe(){return Q&6?ye():ao!==-1?ao:ao=ye()}function kn(e){return e.mode&1?Q&2&&_e!==0?_e&-_e:f1.transition!==null?(lo===0&&(lo=vm()),lo):(e=ee,e!==0||(e=window.event,e=e===void 0?16:Cm(e.type)),e):1}function Et(e,t,n,r){if(50<zs)throw zs=0,oc=null,Error(_(185));gi(e,n,r),(!(Q&2)||e!==Ce)&&(e===Ce&&(!(Q&2)&&(aa|=n),Se===4&&fn(e,_e)),Ye(e,r),n===1&&Q===0&&!(t.mode&1)&&(Wr=ye()+500,ra&&Mn()))}function Ye(e,t){var n=e.callbackNode;fv(e,t);var r=ko(e,e===Ce?_e:0);if(r===0)n!==null&&Xd(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Xd(n),t===1)e.tag===0?d1(Wf.bind(null,e)):Hm(Wf.bind(null,e)),a1(function(){!(Q&6)&&Mn()}),n=null;else{switch(wm(r)){case 1:n=Xc;break;case 4:n=ym;break;case 16:n=bo;break;case 536870912:n=xm;break;default:n=bo}n=$0(n,O0.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function O0(e,t){if(ao=-1,lo=0,Q&6)throw Error(_(327));var n=e.callbackNode;if(zr()&&e.callbackNode!==n)return null;var r=ko(e,e===Ce?_e:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Io(e,r);else{t=r;var s=Q;Q|=2;var i=V0();(Ce!==e||_e!==t)&&(Ft=null,Wr=ye()+500,Yn(e,t));do try{M1();break}catch(l){z0(e,l)}while(!0);uu(),zo.current=i,Q=s,we!==null?t=0:(Ce=null,_e=0,t=Se)}if(t!==0){if(t===2&&(s=Al(e),s!==0&&(r=s,t=ac(e,s))),t===1)throw n=oi,Yn(e,0),fn(e,r),Ye(e,ye()),n;if(t===6)fn(e,r);else{if(s=e.current.alternate,!(r&30)&&!_1(s)&&(t=Io(e,r),t===2&&(i=Al(e),i!==0&&(r=i,t=ac(e,i))),t===1))throw n=oi,Yn(e,0),fn(e,r),Ye(e,ye()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(_(345));case 2:Fn(e,He,Ft);break;case 3:if(fn(e,r),(r&130023424)===r&&(t=Nu+500-ye(),10<t)){if(ko(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Fe(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Fl(Fn.bind(null,e,He,Ft),t);break}Fn(e,He,Ft);break;case 4:if(fn(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-Ct(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=ye()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*P1(r/1960))-r,10<r){e.timeoutHandle=Fl(Fn.bind(null,e,He,Ft),r);break}Fn(e,He,Ft);break;case 5:Fn(e,He,Ft);break;default:throw Error(_(329))}}}return Ye(e,ye()),e.callbackNode===n?O0.bind(null,e):null}function ac(e,t){var n=Os;return e.current.memoizedState.isDehydrated&&(Yn(e,t).flags|=256),e=Io(e,t),e!==2&&(t=He,He=n,t!==null&&lc(t)),e}function lc(e){He===null?He=e:He.push.apply(He,e)}function _1(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!Tt(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function fn(e,t){for(t&=~ju,t&=~aa,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Ct(t),r=1<<n;e[n]=-1,t&=~r}}function Wf(e){if(Q&6)throw Error(_(327));zr();var t=ko(e,0);if(!(t&1))return Ye(e,ye()),null;var n=Io(e,t);if(e.tag!==0&&n===2){var r=Al(e);r!==0&&(t=r,n=ac(e,r))}if(n===1)throw n=oi,Yn(e,0),fn(e,t),Ye(e,ye()),n;if(n===6)throw Error(_(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Fn(e,He,Ft),Ye(e,ye()),null}function Cu(e,t){var n=Q;Q|=1;try{return e(t)}finally{Q=n,Q===0&&(Wr=ye()+500,ra&&Mn())}}function nr(e){pn!==null&&pn.tag===0&&!(Q&6)&&zr();var t=Q;Q|=1;var n=ft.transition,r=ee;try{if(ft.transition=null,ee=1,e)return e()}finally{ee=r,ft.transition=n,Q=t,!(Q&6)&&Mn()}}function Eu(){Xe=Nr.current,se(Nr)}function Yn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,o1(n)),we!==null)for(n=we.return;n!==null;){var r=n;switch(au(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Eo();break;case 3:Ur(),se(Ge),se(Be),gu();break;case 5:mu(r);break;case 4:Ur();break;case 13:se(le);break;case 19:se(le);break;case 10:du(r.type._context);break;case 22:case 23:Eu()}n=n.return}if(Ce=e,we=e=Sn(e.current,null),_e=Xe=t,Se=0,oi=null,ju=aa=tr=0,He=Os=null,Kn!==null){for(t=0;t<Kn.length;t++)if(n=Kn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Kn=null}return e}function z0(e,t){do{var n=we;try{if(uu(),so.current=Oo,Do){for(var r=ue.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Do=!1}if(er=0,je=ke=ue=null,Ls=!1,ri=0,Su.current=null,n===null||n.return===null){Se=1,oi=t,we=null;break}e:{var i=e,o=n.return,l=n,c=t;if(t=_e,l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var u=c,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Rf(o);if(p!==null){p.flags&=-257,Mf(p,o,l,i,t),p.mode&1&&_f(i,u,t),t=p,c=u;var w=t.updateQueue;if(w===null){var v=new Set;v.add(c),t.updateQueue=v}else w.add(c);break e}else{if(!(t&1)){_f(i,u,t),Tu();break e}c=Error(_(426))}}else if(ae&&l.mode&1){var b=Rf(o);if(b!==null){!(b.flags&65536)&&(b.flags|=256),Mf(b,o,l,i,t),lu($r(c,l));break e}}i=c=$r(c,l),Se!==4&&(Se=2),Os===null?Os=[i]:Os.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=w0(i,c,t);jf(i,m);break e;case 1:l=c;var g=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof g.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(bn===null||!bn.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var j=b0(i,l,t);jf(i,j);break e}}i=i.return}while(i!==null)}I0(n)}catch(k){t=k,we===n&&n!==null&&(we=n=n.return);continue}break}while(!0)}function V0(){var e=zo.current;return zo.current=Oo,e===null?Oo:e}function Tu(){(Se===0||Se===3||Se===2)&&(Se=4),Ce===null||!(tr&268435455)&&!(aa&268435455)||fn(Ce,_e)}function Io(e,t){var n=Q;Q|=2;var r=V0();(Ce!==e||_e!==t)&&(Ft=null,Yn(e,t));do try{R1();break}catch(s){z0(e,s)}while(!0);if(uu(),Q=n,zo.current=r,we!==null)throw Error(_(261));return Ce=null,_e=0,Se}function R1(){for(;we!==null;)B0(we)}function M1(){for(;we!==null&&!rv();)B0(we)}function B0(e){var t=U0(e.alternate,e,Xe);e.memoizedProps=e.pendingProps,t===null?I0(e):we=t,Su.current=null}function I0(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=N1(n,t),n!==null){n.flags&=32767,we=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Se=6,we=null;return}}else if(n=j1(n,t,Xe),n!==null){we=n;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);Se===0&&(Se=5)}function Fn(e,t,n){var r=ee,s=ft.transition;try{ft.transition=null,ee=1,A1(e,t,n,r)}finally{ft.transition=s,ee=r}return null}function A1(e,t,n,r){do zr();while(pn!==null);if(Q&6)throw Error(_(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(_(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(hv(e,i),e===Ce&&(we=Ce=null,_e=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Fi||(Fi=!0,$0(bo,function(){return zr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=ft.transition,ft.transition=null;var o=ee;ee=1;var l=Q;Q|=4,Su.current=null,E1(e,n),L0(n,e),Zv(Bl),So=!!Vl,Bl=Vl=null,e.current=n,T1(n),sv(),Q=l,ee=o,ft.transition=i}else e.current=n;if(Fi&&(Fi=!1,pn=e,Bo=s),i=e.pendingLanes,i===0&&(bn=null),av(n.stateNode),Ye(e,ye()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Vo)throw Vo=!1,e=ic,ic=null,e;return Bo&1&&e.tag!==0&&zr(),i=e.pendingLanes,i&1?e===oc?zs++:(zs=0,oc=e):zs=0,Mn(),null}function zr(){if(pn!==null){var e=wm(Bo),t=ft.transition,n=ee;try{if(ft.transition=null,ee=16>e?16:e,pn===null)var r=!1;else{if(e=pn,pn=null,Bo=0,Q&6)throw Error(_(331));var s=Q;for(Q|=4,O=e.current;O!==null;){var i=O,o=i.child;if(O.flags&16){var l=i.deletions;if(l!==null){for(var c=0;c<l.length;c++){var u=l[c];for(O=u;O!==null;){var d=O;switch(d.tag){case 0:case 11:case 15:Ds(8,d,i)}var f=d.child;if(f!==null)f.return=d,O=f;else for(;O!==null;){d=O;var h=d.sibling,p=d.return;if(R0(d),d===u){O=null;break}if(h!==null){h.return=p,O=h;break}O=p}}}var w=i.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var b=v.sibling;v.sibling=null,v=b}while(v!==null)}}O=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,O=o;else e:for(;O!==null;){if(i=O,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Ds(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,O=m;break e}O=i.return}}var g=e.current;for(O=g;O!==null;){o=O;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,O=x;else e:for(o=g;O!==null;){if(l=O,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:oa(9,l)}}catch(k){pe(l,l.return,k)}if(l===o){O=null;break e}var j=l.sibling;if(j!==null){j.return=l.return,O=j;break e}O=l.return}}if(Q=s,Mn(),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(Jo,e)}catch{}r=!0}return r}finally{ee=n,ft.transition=t}}return!1}function Hf(e,t,n){t=$r(n,t),t=w0(e,t,1),e=wn(e,t,1),t=Fe(),e!==null&&(gi(e,1,t),Ye(e,t))}function pe(e,t,n){if(e.tag===3)Hf(e,e,n);else for(;t!==null;){if(t.tag===3){Hf(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(bn===null||!bn.has(r))){e=$r(n,e),e=b0(t,e,1),t=wn(t,e,1),e=Fe(),t!==null&&(gi(t,1,e),Ye(t,e));break}}t=t.return}}function L1(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Fe(),e.pingedLanes|=e.suspendedLanes&n,Ce===e&&(_e&n)===n&&(Se===4||Se===3&&(_e&130023424)===_e&&500>ye()-Nu?Yn(e,0):ju|=n),Ye(e,t)}function F0(e,t){t===0&&(e.mode&1?(t=Ri,Ri<<=1,!(Ri&130023424)&&(Ri=4194304)):t=1);var n=Fe();e=Qt(e,t),e!==null&&(gi(e,t,n),Ye(e,n))}function D1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),F0(e,n)}function O1(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(_(314))}r!==null&&r.delete(t),F0(e,n)}var U0;U0=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ge.current)Ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ke=!1,S1(e,t,n);Ke=!!(e.flags&131072)}else Ke=!1,ae&&t.flags&1048576&&Km(t,_o,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;oo(e,t),e=t.pendingProps;var s=Br(t,Be.current);Or(t,n),s=xu(null,t,r,e,s,n);var i=vu();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,qe(r)?(i=!0,To(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,hu(t),s.updater=ia,t.stateNode=s,s._reactInternals=t,ql(t,r,e,n),t=Xl(null,t,r,!0,i,n)):(t.tag=0,ae&&i&&ou(t),Ie(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(oo(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=V1(r),e=kt(r,e),s){case 0:t=Ql(null,t,r,e,n);break e;case 1:t=Df(null,t,r,e,n);break e;case 11:t=Af(null,t,r,e,n);break e;case 14:t=Lf(null,t,r,kt(r.type,e),n);break e}throw Error(_(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:kt(r,s),Ql(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:kt(r,s),Df(e,t,r,s,n);case 3:e:{if(N0(t),e===null)throw Error(_(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Jm(e,t),Ao(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=$r(Error(_(423)),t),t=Of(e,t,r,n,s);break e}else if(r!==s){s=$r(Error(_(424)),t),t=Of(e,t,r,n,s);break e}else for(Je=vn(t.stateNode.containerInfo.firstChild),Ze=t,ae=!0,Nt=null,n=Qm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ir(),r===s){t=Xt(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return Zm(t),e===null&&Hl(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Il(r,s)?o=null:i!==null&&Il(r,i)&&(t.flags|=32),j0(e,t),Ie(e,t,o,n),t.child;case 6:return e===null&&Hl(t),null;case 13:return C0(e,t,n);case 4:return pu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Fr(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:kt(r,s),Af(e,t,r,s,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,ne(Ro,r._currentValue),r._currentValue=o,i!==null)if(Tt(i.value,o)){if(i.children===s.children&&!Ge.current){t=Xt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){o=i.child;for(var c=l.firstContext;c!==null;){if(c.context===r){if(i.tag===1){c=Ht(-1,n&-n),c.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),Kl(i.return,n,t),l.lanes|=n;break}c=c.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(_(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Kl(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ie(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Or(t,n),s=ht(s),r=r(s),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,s=kt(r,t.pendingProps),s=kt(r.type,s),Lf(e,t,r,s,n);case 15:return k0(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:kt(r,s),oo(e,t),t.tag=1,qe(r)?(e=!0,To(t)):e=!1,Or(t,n),v0(t,r,s),ql(t,r,s,n),Xl(null,t,r,!0,e,n);case 19:return E0(e,t,n);case 22:return S0(e,t,n)}throw Error(_(156,t.tag))};function $0(e,t){return gm(e,t)}function z1(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dt(e,t,n,r){return new z1(e,t,n,r)}function Pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function V1(e){if(typeof e=="function")return Pu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===qc)return 11;if(e===Yc)return 14}return 2}function Sn(e,t){var n=e.alternate;return n===null?(n=dt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function co(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Pu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case mr:return Qn(n.children,s,i,t);case Gc:o=8,s|=8;break;case xl:return e=dt(12,n,t,s|2),e.elementType=xl,e.lanes=i,e;case vl:return e=dt(13,n,t,s),e.elementType=vl,e.lanes=i,e;case wl:return e=dt(19,n,t,s),e.elementType=wl,e.lanes=i,e;case Zp:return la(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Xp:o=10;break e;case Jp:o=9;break e;case qc:o=11;break e;case Yc:o=14;break e;case cn:o=16,r=null;break e}throw Error(_(130,e==null?e:typeof e,""))}return t=dt(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Qn(e,t,n,r){return e=dt(7,e,r,t),e.lanes=n,e}function la(e,t,n,r){return e=dt(22,e,r,t),e.elementType=Zp,e.lanes=n,e.stateNode={isHidden:!1},e}function Qa(e,t,n){return e=dt(6,e,null,t),e.lanes=n,e}function Xa(e,t,n){return t=dt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function B1(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ra(0),this.expirationTimes=Ra(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ra(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function _u(e,t,n,r,s,i,o,l,c){return e=new B1(e,t,n,l,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=dt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hu(i),e}function I1(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:pr,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function W0(e){if(!e)return En;e=e._reactInternals;e:{if(ir(e)!==e||e.tag!==1)throw Error(_(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(qe(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(_(171))}if(e.tag===1){var n=e.type;if(qe(n))return Wm(e,n,t)}return t}function H0(e,t,n,r,s,i,o,l,c){return e=_u(n,r,!0,e,s,i,o,l,c),e.context=W0(null),n=e.current,r=Fe(),s=kn(n),i=Ht(r,s),i.callback=t??null,wn(n,i,s),e.current.lanes=s,gi(e,s,r),Ye(e,r),e}function ca(e,t,n,r){var s=t.current,i=Fe(),o=kn(s);return n=W0(n),t.context===null?t.context=n:t.pendingContext=n,t=Ht(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=wn(s,t,o),e!==null&&(Et(e,s,o,i),ro(e,s,o)),o}function Fo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Kf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ru(e,t){Kf(e,t),(e=e.alternate)&&Kf(e,t)}function F1(){return null}var K0=typeof reportError=="function"?reportError:function(e){console.error(e)};function Mu(e){this._internalRoot=e}ua.prototype.render=Mu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));ca(e,t,null,null)};ua.prototype.unmount=Mu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;nr(function(){ca(null,e,null,null)}),t[Yt]=null}};function ua(e){this._internalRoot=e}ua.prototype.unstable_scheduleHydration=function(e){if(e){var t=Sm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<dn.length&&t!==0&&t<dn[n].priority;n++);dn.splice(n,0,e),n===0&&Nm(e)}};function Au(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function da(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Gf(){}function U1(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=Fo(o);i.call(u)}}var o=H0(t,r,e,0,null,!1,!1,"",Gf);return e._reactRootContainer=o,e[Yt]=o.current,Js(e.nodeType===8?e.parentNode:e),nr(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var u=Fo(c);l.call(u)}}var c=_u(e,0,!1,null,null,!1,!1,"",Gf);return e._reactRootContainer=c,e[Yt]=c.current,Js(e.nodeType===8?e.parentNode:e),nr(function(){ca(t,c,n,r)}),c}function fa(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var l=s;s=function(){var c=Fo(o);l.call(c)}}ca(t,o,e,s)}else o=U1(n,t,e,s,r);return Fo(o)}bm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ks(t.pendingLanes);n!==0&&(Jc(t,n|1),Ye(t,ye()),!(Q&6)&&(Wr=ye()+500,Mn()))}break;case 13:nr(function(){var r=Qt(e,1);if(r!==null){var s=Fe();Et(r,e,1,s)}}),Ru(e,1)}};Zc=function(e){if(e.tag===13){var t=Qt(e,134217728);if(t!==null){var n=Fe();Et(t,e,134217728,n)}Ru(e,134217728)}};km=function(e){if(e.tag===13){var t=kn(e),n=Qt(e,t);if(n!==null){var r=Fe();Et(n,e,t,r)}Ru(e,t)}};Sm=function(){return ee};jm=function(e,t){var n=ee;try{return ee=e,t()}finally{ee=n}};_l=function(e,t,n){switch(t){case"input":if(Sl(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=na(r);if(!s)throw Error(_(90));tm(r),Sl(r,s)}}}break;case"textarea":rm(e,n);break;case"select":t=n.value,t!=null&&Mr(e,!!n.multiple,t,!1)}};um=Cu;dm=nr;var $1={usingClientEntryPoint:!1,Events:[xi,vr,na,lm,cm,Cu]},ys={findFiberByHostInstance:Hn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},W1={bundleType:ys.bundleType,version:ys.version,rendererPackageName:ys.rendererPackageName,rendererConfig:ys.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:en.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=pm(e),e===null?null:e.stateNode},findFiberByHostInstance:ys.findFiberByHostInstance||F1,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ui=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ui.isDisabled&&Ui.supportsFiber)try{Jo=Ui.inject(W1),Lt=Ui}catch{}}rt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$1;rt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Au(t))throw Error(_(200));return I1(e,t,null,n)};rt.createRoot=function(e,t){if(!Au(e))throw Error(_(299));var n=!1,r="",s=K0;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=_u(e,1,!1,null,null,n,!1,r,s),e[Yt]=t.current,Js(e.nodeType===8?e.parentNode:e),new Mu(t)};rt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(_(188)):(e=Object.keys(e).join(","),Error(_(268,e)));return e=pm(t),e=e===null?null:e.stateNode,e};rt.flushSync=function(e){return nr(e)};rt.hydrate=function(e,t,n){if(!da(t))throw Error(_(200));return fa(null,e,t,!0,n)};rt.hydrateRoot=function(e,t,n){if(!Au(e))throw Error(_(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=K0;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=H0(t,null,e,1,n??null,s,!1,i,o),e[Yt]=t.current,Js(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new ua(t)};rt.render=function(e,t,n){if(!da(t))throw Error(_(200));return fa(null,e,t,!1,n)};rt.unmountComponentAtNode=function(e){if(!da(e))throw Error(_(40));return e._reactRootContainer?(nr(function(){fa(null,null,e,!1,function(){e._reactRootContainer=null,e[Yt]=null})}),!0):!1};rt.unstable_batchedUpdates=Cu;rt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!da(n))throw Error(_(200));if(e==null||e._reactInternals===void 0)throw Error(_(38));return fa(e,t,n,!1,r)};rt.version="18.3.1-next-f1338f8080-20240426";function G0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(G0)}catch(e){console.error(e)}}G0(),Gp.exports=rt;var q0=Gp.exports;const H1=Dp(q0);var Y0,qf=q0;Y0=qf.createRoot,qf.hydrateRoot;/**
41
- * @remix-run/router v1.23.2
42
- *
43
- * Copyright (c) Remix Software Inc.
44
- *
45
- * This source code is licensed under the MIT license found in the
46
- * LICENSE.md file in the root directory of this source tree.
47
- *
48
- * @license MIT
49
- */function ai(){return ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ai.apply(this,arguments)}var mn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(mn||(mn={}));const Yf="popstate";function K1(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:l}=r.location;return cc("",{pathname:i,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Uo(s)}return q1(t,n,null,e)}function xe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Lu(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function G1(){return Math.random().toString(36).substr(2,8)}function Qf(e,t){return{usr:e.state,key:e.key,idx:t}}function cc(e,t,n,r){return n===void 0&&(n=null),ai({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Jr(t):t,{state:n,key:t&&t.key||r||G1()})}function Uo(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Jr(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function q1(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,l=mn.Pop,c=null,u=d();u==null&&(u=0,o.replaceState(ai({},o.state,{idx:u}),""));function d(){return(o.state||{idx:null}).idx}function f(){l=mn.Pop;let b=d(),m=b==null?null:b-u;u=b,c&&c({action:l,location:v.location,delta:m})}function h(b,m){l=mn.Push;let g=cc(v.location,b,m);u=d()+1;let x=Qf(g,u),j=v.createHref(g);try{o.pushState(x,"",j)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;s.location.assign(j)}i&&c&&c({action:l,location:v.location,delta:1})}function p(b,m){l=mn.Replace;let g=cc(v.location,b,m);u=d();let x=Qf(g,u),j=v.createHref(g);o.replaceState(x,"",j),i&&c&&c({action:l,location:v.location,delta:0})}function w(b){let m=s.location.origin!=="null"?s.location.origin:s.location.href,g=typeof b=="string"?b:Uo(b);return g=g.replace(/ $/,"%20"),xe(m,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,m)}let v={get action(){return l},get location(){return e(s,o)},listen(b){if(c)throw new Error("A history only accepts one active listener");return s.addEventListener(Yf,f),c=b,()=>{s.removeEventListener(Yf,f),c=null}},createHref(b){return t(s,b)},createURL:w,encodeLocation(b){let m=w(b);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:p,go(b){return o.go(b)}};return v}var Xf;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Xf||(Xf={}));function Y1(e,t,n){return n===void 0&&(n="/"),Q1(e,t,n)}function Q1(e,t,n,r){let s=typeof t=="string"?Jr(t):t,i=Du(s.pathname||"/",n);if(i==null)return null;let o=Q0(e);X1(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let u=cw(i);l=ow(o[c],u)}return l}function Q0(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,l)=>{let c={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};c.relativePath.startsWith("/")&&(xe(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let u=jn([r,c.relativePath]),d=n.concat(c);i.children&&i.children.length>0&&(xe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),Q0(i.children,t,d,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:sw(u,i.index),routesMeta:d})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))s(i,o);else for(let c of X0(i.path))s(i,o,c)}),t}function X0(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=X0(r.join("/")),l=[];return l.push(...o.map(c=>c===""?i:[i,c].join("/"))),s&&l.push(...o),l.map(c=>e.startsWith("/")&&c===""?"/":c)}function X1(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:iw(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const J1=/^:[\w-]+$/,Z1=3,ew=2,tw=1,nw=10,rw=-2,Jf=e=>e==="*";function sw(e,t){let n=e.split("/"),r=n.length;return n.some(Jf)&&(r+=rw),t&&(r+=ew),n.filter(s=>!Jf(s)).reduce((s,i)=>s+(J1.test(i)?Z1:i===""?tw:nw),r)}function iw(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function ow(e,t,n){let{routesMeta:r}=e,s={},i="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],u=l===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=aw({path:c.relativePath,caseSensitive:c.caseSensitive,end:u},d),h=c.route;if(!f)return null;Object.assign(s,f.params),o.push({params:s,pathname:jn([i,f.pathname]),pathnameBase:pw(jn([i,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(i=jn([i,f.pathnameBase]))}return o}function aw(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=lw(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((u,d,f)=>{let{paramName:h,isOptional:p}=d;if(h==="*"){let v=l[f]||"";o=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const w=l[f];return p&&!w?u[h]=void 0:u[h]=(w||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:o,pattern:e}}function lw(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Lu(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function cw(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Lu(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function Du(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const uw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,dw=e=>uw.test(e);function fw(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Jr(e):e,i;if(n)if(dw(n))i=n;else{if(n.includes("//")){let o=n;n=n.replace(/\/\/+/g,"/"),Lu(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=Zf(n.substring(1),"/"):i=Zf(n,t)}else i=t;return{pathname:i,search:mw(r),hash:gw(s)}}function Zf(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Ja(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function hw(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ou(e,t){let n=hw(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function zu(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Jr(e):(s=ai({},e),xe(!s.pathname||!s.pathname.includes("?"),Ja("?","pathname","search",s)),xe(!s.pathname||!s.pathname.includes("#"),Ja("#","pathname","hash",s)),xe(!s.search||!s.search.includes("#"),Ja("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,l;if(o==null)l=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}l=f>=0?t[f]:"/"}let c=fw(s,l),u=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!c.pathname.endsWith("/")&&(u||d)&&(c.pathname+="/"),c}const jn=e=>e.join("/").replace(/\/\/+/g,"/"),pw=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),mw=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,gw=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function yw(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const J0=["post","put","patch","delete"];new Set(J0);const xw=["get",...J0];new Set(xw);/**
50
- * React Router v6.30.3
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */function li(){return li=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},li.apply(this,arguments)}const Vu=y.createContext(null),vw=y.createContext(null),An=y.createContext(null),ha=y.createContext(null),tn=y.createContext({outlet:null,matches:[],isDataRoute:!1}),Z0=y.createContext(null);function ww(e,t){let{relative:n}=t===void 0?{}:t;Zr()||xe(!1);let{basename:r,navigator:s}=y.useContext(An),{hash:i,pathname:o,search:l}=tg(e,{relative:n}),c=o;return r!=="/"&&(c=o==="/"?r:jn([r,o])),s.createHref({pathname:c,search:l,hash:i})}function Zr(){return y.useContext(ha)!=null}function es(){return Zr()||xe(!1),y.useContext(ha).location}function eg(e){y.useContext(An).static||y.useLayoutEffect(e)}function ts(){let{isDataRoute:e}=y.useContext(tn);return e?Dw():bw()}function bw(){Zr()||xe(!1);let e=y.useContext(Vu),{basename:t,future:n,navigator:r}=y.useContext(An),{matches:s}=y.useContext(tn),{pathname:i}=es(),o=JSON.stringify(Ou(s,n.v7_relativeSplatPath)),l=y.useRef(!1);return eg(()=>{l.current=!0}),y.useCallback(function(u,d){if(d===void 0&&(d={}),!l.current)return;if(typeof u=="number"){r.go(u);return}let f=zu(u,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:jn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,i,e])}const kw=y.createContext(null);function Sw(e){let t=y.useContext(tn).outlet;return t&&y.createElement(kw.Provider,{value:e},t)}function tg(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=y.useContext(An),{matches:s}=y.useContext(tn),{pathname:i}=es(),o=JSON.stringify(Ou(s,r.v7_relativeSplatPath));return y.useMemo(()=>zu(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function jw(e,t){return Nw(e,t)}function Nw(e,t,n,r){Zr()||xe(!1);let{navigator:s}=y.useContext(An),{matches:i}=y.useContext(tn),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let u=es(),d;if(t){var f;let b=typeof t=="string"?Jr(t):t;c==="/"||(f=b.pathname)!=null&&f.startsWith(c)||xe(!1),d=b}else d=u;let h=d.pathname||"/",p=h;if(c!=="/"){let b=c.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let w=Y1(e,{pathname:p}),v=_w(w&&w.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:jn([c,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?c:jn([c,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&v?y.createElement(ha.Provider,{value:{location:li({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:mn.Pop}},v):v}function Cw(){let e=Lw(),t=yw(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return y.createElement(y.Fragment,null,y.createElement("h2",null,"Unexpected Application Error!"),y.createElement("h3",{style:{fontStyle:"italic"}},t),n?y.createElement("pre",{style:s},n):null,null)}const Ew=y.createElement(Cw,null);class Tw extends y.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?y.createElement(tn.Provider,{value:this.props.routeContext},y.createElement(Z0.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Pw(e){let{routeContext:t,match:n,children:r}=e,s=y.useContext(Vu);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),y.createElement(tn.Provider,{value:t},r)}function _w(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=o.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||xe(!1),o=o.slice(0,Math.min(o.length,d+1))}let c=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=d),f.route.id){let{loaderData:h,errors:p}=n,w=f.route.loader&&h[f.route.id]===void 0&&(!p||p[f.route.id]===void 0);if(f.route.lazy||w){c=!0,u>=0?o=o.slice(0,u+1):o=[o[0]];break}}}return o.reduceRight((d,f,h)=>{let p,w=!1,v=null,b=null;n&&(p=l&&f.route.id?l[f.route.id]:void 0,v=f.route.errorElement||Ew,c&&(u<0&&h===0?(Ow("route-fallback"),w=!0,b=null):u===h&&(w=!0,b=f.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,h+1)),g=()=>{let x;return p?x=v:w?x=b:f.route.Component?x=y.createElement(f.route.Component,null):f.route.element?x=f.route.element:x=d,y.createElement(Pw,{match:f,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:x})};return n&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?y.createElement(Tw,{location:n.location,revalidation:n.revalidation,component:v,error:p,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):g()},null)}var ng=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(ng||{}),rg=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(rg||{});function Rw(e){let t=y.useContext(Vu);return t||xe(!1),t}function Mw(e){let t=y.useContext(vw);return t||xe(!1),t}function Aw(e){let t=y.useContext(tn);return t||xe(!1),t}function sg(e){let t=Aw(),n=t.matches[t.matches.length-1];return n.route.id||xe(!1),n.route.id}function Lw(){var e;let t=y.useContext(Z0),n=Mw(),r=sg();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Dw(){let{router:e}=Rw(ng.UseNavigateStable),t=sg(rg.UseNavigateStable),n=y.useRef(!1);return eg(()=>{n.current=!0}),y.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,li({fromRouteId:t},i)))},[e,t])}const eh={};function Ow(e,t,n){eh[e]||(eh[e]=!0)}function zw(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function th(e){let{to:t,replace:n,state:r,relative:s}=e;Zr()||xe(!1);let{future:i,static:o}=y.useContext(An),{matches:l}=y.useContext(tn),{pathname:c}=es(),u=ts(),d=zu(t,Ou(l,i.v7_relativeSplatPath),c,s==="path"),f=JSON.stringify(d);return y.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:s}),[u,f,s,n,r]),null}function Vw(e){return Sw(e.context)}function Rt(e){xe(!1)}function Bw(e){let{basename:t="/",children:n=null,location:r,navigationType:s=mn.Pop,navigator:i,static:o=!1,future:l}=e;Zr()&&xe(!1);let c=t.replace(/^\/*/,"/"),u=y.useMemo(()=>({basename:c,navigator:i,static:o,future:li({v7_relativeSplatPath:!1},l)}),[c,l,i,o]);typeof r=="string"&&(r=Jr(r));let{pathname:d="/",search:f="",hash:h="",state:p=null,key:w="default"}=r,v=y.useMemo(()=>{let b=Du(d,c);return b==null?null:{location:{pathname:b,search:f,hash:h,state:p,key:w},navigationType:s}},[c,d,f,h,p,w,s]);return v==null?null:y.createElement(An.Provider,{value:u},y.createElement(ha.Provider,{children:n,value:v}))}function Iw(e){let{children:t,location:n}=e;return jw(uc(t),n)}new Promise(()=>{});function uc(e,t){t===void 0&&(t=[]);let n=[];return y.Children.forEach(e,(r,s)=>{if(!y.isValidElement(r))return;let i=[...t,s];if(r.type===y.Fragment){n.push.apply(n,uc(r.props.children,i));return}r.type!==Rt&&xe(!1),!r.props.index||!r.props.children||xe(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=uc(r.props.children,i)),n.push(o)}),n}/**
59
- * React Router DOM v6.30.3
60
- *
61
- * Copyright (c) Remix Software Inc.
62
- *
63
- * This source code is licensed under the MIT license found in the
64
- * LICENSE.md file in the root directory of this source tree.
65
- *
66
- * @license MIT
67
- */function dc(){return dc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},dc.apply(this,arguments)}function Fw(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function Uw(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function $w(e,t){return e.button===0&&(!t||t==="_self")&&!Uw(e)}const Ww=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Hw="6";try{window.__reactRouterVersion=Hw}catch{}const Kw="startTransition",nh=Lx[Kw];function Gw(e){let{basename:t,children:n,future:r,window:s}=e,i=y.useRef();i.current==null&&(i.current=K1({window:s,v5Compat:!0}));let o=i.current,[l,c]=y.useState({action:o.action,location:o.location}),{v7_startTransition:u}=r||{},d=y.useCallback(f=>{u&&nh?nh(()=>c(f)):c(f)},[c,u]);return y.useLayoutEffect(()=>o.listen(d),[o,d]),y.useEffect(()=>zw(r),[r]),y.createElement(Bw,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const qw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Yw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,fc=y.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:l,target:c,to:u,preventScrollReset:d,viewTransition:f}=t,h=Fw(t,Ww),{basename:p}=y.useContext(An),w,v=!1;if(typeof u=="string"&&Yw.test(u)&&(w=u,qw))try{let x=new URL(window.location.href),j=u.startsWith("//")?new URL(x.protocol+u):new URL(u),k=Du(j.pathname,p);j.origin===x.origin&&k!=null?u=k+j.search+j.hash:v=!0}catch{}let b=ww(u,{relative:s}),m=Qw(u,{replace:o,state:l,target:c,preventScrollReset:d,relative:s,viewTransition:f});function g(x){r&&r(x),x.defaultPrevented||m(x)}return y.createElement("a",dc({},h,{href:w||b,onClick:v||i?r:g,ref:n,target:c}))});var rh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(rh||(rh={}));var sh;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(sh||(sh={}));function Qw(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,c=ts(),u=es(),d=tg(e,{relative:o});return y.useCallback(f=>{if($w(f,n)){f.preventDefault();let h=r!==void 0?r:Uo(u)===Uo(d);c(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:l})}},[u,c,d,r,s,n,e,i,o,l])}var Xw=e=>{switch(e){case"success":return e2;case"info":return n2;case"warning":return t2;case"error":return r2;default:return null}},Jw=Array(12).fill(0),Zw=({visible:e,className:t})=>L.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},L.createElement("div",{className:"sonner-spinner"},Jw.map((n,r)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),e2=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),t2=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),n2=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),r2=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),s2=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),i2=()=>{let[e,t]=L.useState(document.hidden);return L.useEffect(()=>{let n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e},hc=1,o2=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;let{message:n,...r}=e,s=typeof(e==null?void 0:e.id)=="number"||((t=e.id)==null?void 0:t.length)>0?e.id:hc++,i=this.toasts.find(l=>l.id===s),o=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:n}),{...l,...e,id:s,dismissible:o,title:n}):l):this.addToast({title:n,...r,dismissible:o,id:s}),s},this.dismiss=e=>(this.dismissedToasts.add(e),e||this.toasts.forEach(t=>{this.subscribers.forEach(n=>n({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:e,dismiss:!0})),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));let r=e instanceof Promise?e:e(),s=n!==void 0,i,o=r.then(async c=>{if(i=["resolve",c],L.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(l2(c)&&!c.ok){s=!1;let u=typeof t.error=="function"?await t.error(`HTTP error! status: ${c.status}`):t.error,d=typeof t.description=="function"?await t.description(`HTTP error! status: ${c.status}`):t.description;this.create({id:n,type:"error",message:u,description:d})}else if(t.success!==void 0){s=!1;let u=typeof t.success=="function"?await t.success(c):t.success,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"success",message:u,description:d})}}).catch(async c=>{if(i=["reject",c],t.error!==void 0){s=!1;let u=typeof t.error=="function"?await t.error(c):t.error,d=typeof t.description=="function"?await t.description(c):t.description;this.create({id:n,type:"error",message:u,description:d})}}).finally(()=>{var c;s&&(this.dismiss(n),n=void 0),(c=t.finally)==null||c.call(t)}),l=()=>new Promise((c,u)=>o.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||hc++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},We=new o2,a2=(e,t)=>{let n=(t==null?void 0:t.id)||hc++;return We.addToast({title:e,...t,id:n}),n},l2=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",c2=a2,u2=()=>We.toasts,d2=()=>We.getActiveToasts(),dr=Object.assign(c2,{success:We.success,info:We.info,warning:We.warning,error:We.error,custom:We.custom,message:We.message,promise:We.promise,dismiss:We.dismiss,loading:We.loading},{getHistory:u2,getToasts:d2});function f2(e,{insertAt:t}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}f2(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}
68
- `);function $i(e){return e.label!==void 0}var h2=3,p2="32px",m2="16px",ih=4e3,g2=356,y2=14,x2=20,v2=200;function wt(...e){return e.filter(Boolean).join(" ")}function w2(e){let[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}var b2=e=>{var t,n,r,s,i,o,l,c,u,d,f;let{invert:h,toast:p,unstyled:w,interacting:v,setHeights:b,visibleToasts:m,heights:g,index:x,toasts:j,expanded:k,removeToast:N,defaultRichColors:C,closeButton:S,style:M,cancelButtonStyle:R,actionButtonStyle:V,className:U="",descriptionClassName:ve="",duration:Ee,position:mt,gap:B,loadingIcon:z,expandByDefault:E,classNames:T,icons:A,closeButtonAriaLabel:K="Close toast",pauseWhenPageIsHidden:F}=e,[q,$]=L.useState(null),[fe,Me]=L.useState(null),[Z,ls]=L.useState(!1),[Dn,On]=L.useState(!1),[nn,P]=L.useState(!1),[J,Qe]=L.useState(!1),[ji,Md]=L.useState(!1),[ax,Sa]=L.useState(0),[lx,Ad]=L.useState(0),cs=L.useRef(p.duration||Ee||ih),Ld=L.useRef(null),zn=L.useRef(null),cx=x===0,ux=x+1<=m,it=p.type,ar=p.dismissible!==!1,dx=p.className||"",fx=p.descriptionClassName||"",Ni=L.useMemo(()=>g.findIndex(W=>W.toastId===p.id)||0,[g,p.id]),hx=L.useMemo(()=>{var W;return(W=p.closeButton)!=null?W:S},[p.closeButton,S]),Dd=L.useMemo(()=>p.duration||Ee||ih,[p.duration,Ee]),ja=L.useRef(0),lr=L.useRef(0),Od=L.useRef(0),cr=L.useRef(null),[px,mx]=mt.split("-"),zd=L.useMemo(()=>g.reduce((W,te,oe)=>oe>=Ni?W:W+te.height,0),[g,Ni]),Vd=i2(),gx=p.invert||h,Na=it==="loading";lr.current=L.useMemo(()=>Ni*B+zd,[Ni,zd]),L.useEffect(()=>{cs.current=Dd},[Dd]),L.useEffect(()=>{ls(!0)},[]),L.useEffect(()=>{let W=zn.current;if(W){let te=W.getBoundingClientRect().height;return Ad(te),b(oe=>[{toastId:p.id,height:te,position:p.position},...oe]),()=>b(oe=>oe.filter(gt=>gt.toastId!==p.id))}},[b,p.id]),L.useLayoutEffect(()=>{if(!Z)return;let W=zn.current,te=W.style.height;W.style.height="auto";let oe=W.getBoundingClientRect().height;W.style.height=te,Ad(oe),b(gt=>gt.find(yt=>yt.toastId===p.id)?gt.map(yt=>yt.toastId===p.id?{...yt,height:oe}:yt):[{toastId:p.id,height:oe,position:p.position},...gt])},[Z,p.title,p.description,b,p.id]);let rn=L.useCallback(()=>{On(!0),Sa(lr.current),b(W=>W.filter(te=>te.toastId!==p.id)),setTimeout(()=>{N(p)},v2)},[p,N,b,lr]);L.useEffect(()=>{if(p.promise&&it==="loading"||p.duration===1/0||p.type==="loading")return;let W;return k||v||F&&Vd?(()=>{if(Od.current<ja.current){let te=new Date().getTime()-ja.current;cs.current=cs.current-te}Od.current=new Date().getTime()})():cs.current!==1/0&&(ja.current=new Date().getTime(),W=setTimeout(()=>{var te;(te=p.onAutoClose)==null||te.call(p,p),rn()},cs.current)),()=>clearTimeout(W)},[k,v,p,it,F,Vd,rn]),L.useEffect(()=>{p.delete&&rn()},[rn,p.delete]);function yx(){var W,te,oe;return A!=null&&A.loading?L.createElement("div",{className:wt(T==null?void 0:T.loader,(W=p==null?void 0:p.classNames)==null?void 0:W.loader,"sonner-loader"),"data-visible":it==="loading"},A.loading):z?L.createElement("div",{className:wt(T==null?void 0:T.loader,(te=p==null?void 0:p.classNames)==null?void 0:te.loader,"sonner-loader"),"data-visible":it==="loading"},z):L.createElement(Zw,{className:wt(T==null?void 0:T.loader,(oe=p==null?void 0:p.classNames)==null?void 0:oe.loader),visible:it==="loading"})}return L.createElement("li",{tabIndex:0,ref:zn,className:wt(U,dx,T==null?void 0:T.toast,(t=p==null?void 0:p.classNames)==null?void 0:t.toast,T==null?void 0:T.default,T==null?void 0:T[it],(n=p==null?void 0:p.classNames)==null?void 0:n[it]),"data-sonner-toast":"","data-rich-colors":(r=p.richColors)!=null?r:C,"data-styled":!(p.jsx||p.unstyled||w),"data-mounted":Z,"data-promise":!!p.promise,"data-swiped":ji,"data-removed":Dn,"data-visible":ux,"data-y-position":px,"data-x-position":mx,"data-index":x,"data-front":cx,"data-swiping":nn,"data-dismissible":ar,"data-type":it,"data-invert":gx,"data-swipe-out":J,"data-swipe-direction":fe,"data-expanded":!!(k||E&&Z),style:{"--index":x,"--toasts-before":x,"--z-index":j.length-x,"--offset":`${Dn?ax:lr.current}px`,"--initial-height":E?"auto":`${lx}px`,...M,...p.style},onDragEnd:()=>{P(!1),$(null),cr.current=null},onPointerDown:W=>{Na||!ar||(Ld.current=new Date,Sa(lr.current),W.target.setPointerCapture(W.pointerId),W.target.tagName!=="BUTTON"&&(P(!0),cr.current={x:W.clientX,y:W.clientY}))},onPointerUp:()=>{var W,te,oe,gt;if(J||!ar)return;cr.current=null;let yt=Number(((W=zn.current)==null?void 0:W.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),sn=Number(((te=zn.current)==null?void 0:te.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Vn=new Date().getTime()-((oe=Ld.current)==null?void 0:oe.getTime()),xt=q==="x"?yt:sn,on=Math.abs(xt)/Vn;if(Math.abs(xt)>=x2||on>.11){Sa(lr.current),(gt=p.onDismiss)==null||gt.call(p,p),Me(q==="x"?yt>0?"right":"left":sn>0?"down":"up"),rn(),Qe(!0),Md(!1);return}P(!1),$(null)},onPointerMove:W=>{var te,oe,gt,yt;if(!cr.current||!ar||((te=window.getSelection())==null?void 0:te.toString().length)>0)return;let sn=W.clientY-cr.current.y,Vn=W.clientX-cr.current.x,xt=(oe=e.swipeDirections)!=null?oe:w2(mt);!q&&(Math.abs(Vn)>1||Math.abs(sn)>1)&&$(Math.abs(Vn)>Math.abs(sn)?"x":"y");let on={x:0,y:0};q==="y"?(xt.includes("top")||xt.includes("bottom"))&&(xt.includes("top")&&sn<0||xt.includes("bottom")&&sn>0)&&(on.y=sn):q==="x"&&(xt.includes("left")||xt.includes("right"))&&(xt.includes("left")&&Vn<0||xt.includes("right")&&Vn>0)&&(on.x=Vn),(Math.abs(on.x)>0||Math.abs(on.y)>0)&&Md(!0),(gt=zn.current)==null||gt.style.setProperty("--swipe-amount-x",`${on.x}px`),(yt=zn.current)==null||yt.style.setProperty("--swipe-amount-y",`${on.y}px`)}},hx&&!p.jsx?L.createElement("button",{"aria-label":K,"data-disabled":Na,"data-close-button":!0,onClick:Na||!ar?()=>{}:()=>{var W;rn(),(W=p.onDismiss)==null||W.call(p,p)},className:wt(T==null?void 0:T.closeButton,(s=p==null?void 0:p.classNames)==null?void 0:s.closeButton)},(i=A==null?void 0:A.close)!=null?i:s2):null,p.jsx||y.isValidElement(p.title)?p.jsx?p.jsx:typeof p.title=="function"?p.title():p.title:L.createElement(L.Fragment,null,it||p.icon||p.promise?L.createElement("div",{"data-icon":"",className:wt(T==null?void 0:T.icon,(o=p==null?void 0:p.classNames)==null?void 0:o.icon)},p.promise||p.type==="loading"&&!p.icon?p.icon||yx():null,p.type!=="loading"?p.icon||(A==null?void 0:A[it])||Xw(it):null):null,L.createElement("div",{"data-content":"",className:wt(T==null?void 0:T.content,(l=p==null?void 0:p.classNames)==null?void 0:l.content)},L.createElement("div",{"data-title":"",className:wt(T==null?void 0:T.title,(c=p==null?void 0:p.classNames)==null?void 0:c.title)},typeof p.title=="function"?p.title():p.title),p.description?L.createElement("div",{"data-description":"",className:wt(ve,fx,T==null?void 0:T.description,(u=p==null?void 0:p.classNames)==null?void 0:u.description)},typeof p.description=="function"?p.description():p.description):null),y.isValidElement(p.cancel)?p.cancel:p.cancel&&$i(p.cancel)?L.createElement("button",{"data-button":!0,"data-cancel":!0,style:p.cancelButtonStyle||R,onClick:W=>{var te,oe;$i(p.cancel)&&ar&&((oe=(te=p.cancel).onClick)==null||oe.call(te,W),rn())},className:wt(T==null?void 0:T.cancelButton,(d=p==null?void 0:p.classNames)==null?void 0:d.cancelButton)},p.cancel.label):null,y.isValidElement(p.action)?p.action:p.action&&$i(p.action)?L.createElement("button",{"data-button":!0,"data-action":!0,style:p.actionButtonStyle||V,onClick:W=>{var te,oe;$i(p.action)&&((oe=(te=p.action).onClick)==null||oe.call(te,W),!W.defaultPrevented&&rn())},className:wt(T==null?void 0:T.actionButton,(f=p==null?void 0:p.classNames)==null?void 0:f.actionButton)},p.action.label):null))};function oh(){if(typeof window>"u"||typeof document>"u")return"ltr";let e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function k2(e,t){let n={};return[e,t].forEach((r,s)=>{let i=s===1,o=i?"--mobile-offset":"--offset",l=i?m2:p2;function c(u){["top","right","bottom","left"].forEach(d=>{n[`${o}-${d}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${o}-${u}`]=l:n[`${o}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(l)}),n}var S2=y.forwardRef(function(e,t){let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:f,duration:h,style:p,visibleToasts:w=h2,toastOptions:v,dir:b=oh(),gap:m=y2,loadingIcon:g,icons:x,containerAriaLabel:j="Notifications",pauseWhenPageIsHidden:k}=e,[N,C]=L.useState([]),S=L.useMemo(()=>Array.from(new Set([r].concat(N.filter(F=>F.position).map(F=>F.position)))),[N,r]),[M,R]=L.useState([]),[V,U]=L.useState(!1),[ve,Ee]=L.useState(!1),[mt,B]=L.useState(d!=="system"?d:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),z=L.useRef(null),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),T=L.useRef(null),A=L.useRef(!1),K=L.useCallback(F=>{C(q=>{var $;return($=q.find(fe=>fe.id===F.id))!=null&&$.delete||We.dismiss(F.id),q.filter(({id:fe})=>fe!==F.id)})},[]);return L.useEffect(()=>We.subscribe(F=>{if(F.dismiss){C(q=>q.map($=>$.id===F.id?{...$,delete:!0}:$));return}setTimeout(()=>{H1.flushSync(()=>{C(q=>{let $=q.findIndex(fe=>fe.id===F.id);return $!==-1?[...q.slice(0,$),{...q[$],...F},...q.slice($+1)]:[F,...q]})})})}),[]),L.useEffect(()=>{if(d!=="system"){B(d);return}if(d==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?B("dark"):B("light")),typeof window>"u")return;let F=window.matchMedia("(prefers-color-scheme: dark)");try{F.addEventListener("change",({matches:q})=>{B(q?"dark":"light")})}catch{F.addListener(({matches:$})=>{try{B($?"dark":"light")}catch(fe){console.error(fe)}})}},[d]),L.useEffect(()=>{N.length<=1&&U(!1)},[N]),L.useEffect(()=>{let F=q=>{var $,fe;s.every(Me=>q[Me]||q.code===Me)&&(U(!0),($=z.current)==null||$.focus()),q.code==="Escape"&&(document.activeElement===z.current||(fe=z.current)!=null&&fe.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",F),()=>document.removeEventListener("keydown",F)},[s]),L.useEffect(()=>{if(z.current)return()=>{T.current&&(T.current.focus({preventScroll:!0}),T.current=null,A.current=!1)}},[z.current]),L.createElement("section",{ref:t,"aria-label":`${j} ${E}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((F,q)=>{var $;let[fe,Me]=F.split("-");return N.length?L.createElement("ol",{key:F,dir:b==="auto"?oh():b,tabIndex:-1,ref:z,className:l,"data-sonner-toaster":!0,"data-theme":mt,"data-y-position":fe,"data-lifted":V&&N.length>1&&!i,"data-x-position":Me,style:{"--front-toast-height":`${(($=M[0])==null?void 0:$.height)||0}px`,"--width":`${g2}px`,"--gap":`${m}px`,...p,...k2(c,u)},onBlur:Z=>{A.current&&!Z.currentTarget.contains(Z.relatedTarget)&&(A.current=!1,T.current&&(T.current.focus({preventScroll:!0}),T.current=null))},onFocus:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||A.current||(A.current=!0,T.current=Z.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{ve||U(!1)},onDragEnd:()=>U(!1),onPointerDown:Z=>{Z.target instanceof HTMLElement&&Z.target.dataset.dismissible==="false"||Ee(!0)},onPointerUp:()=>Ee(!1)},N.filter(Z=>!Z.position&&q===0||Z.position===F).map((Z,ls)=>{var Dn,On;return L.createElement(b2,{key:Z.id,icons:x,index:ls,toast:Z,defaultRichColors:f,duration:(Dn=v==null?void 0:v.duration)!=null?Dn:h,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:w,closeButton:(On=v==null?void 0:v.closeButton)!=null?On:o,interacting:ve,position:F,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,removeToast:K,toasts:N.filter(nn=>nn.position==Z.position),heights:M.filter(nn=>nn.position==Z.position),setHeights:R,expandByDefault:i,gap:m,loadingIcon:g,expanded:V,pauseWhenPageIsHidden:k,swipeDirections:e.swipeDirections})})):null}))});const Bu=y.createContext({});function Iu(e){const t=y.useRef(null);return t.current===null&&(t.current=e()),t.current}const pa=y.createContext(null),Fu=y.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class j2 extends y.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function N2({children:e,isPresent:t}){const n=y.useId(),r=y.useRef(null),s=y.useRef({width:0,height:0,top:0,left:0}),{nonce:i}=y.useContext(Fu);return y.useInsertionEffect(()=>{const{width:o,height:l,top:c,left:u}=s.current;if(t||!r.current||!o||!l)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return i&&(d.nonce=i),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
69
- [data-motion-pop-id="${n}"] {
70
- position: absolute !important;
71
- width: ${o}px !important;
72
- height: ${l}px !important;
73
- top: ${c}px !important;
74
- left: ${u}px !important;
75
- }
76
- `),()=>{document.head.removeChild(d)}},[t]),a.jsx(j2,{isPresent:t,childRef:r,sizeRef:s,children:y.cloneElement(e,{ref:r})})}const C2=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o})=>{const l=Iu(E2),c=y.useId(),u=y.useCallback(f=>{l.set(f,!0);for(const h of l.values())if(!h)return;r&&r()},[l,r]),d=y.useMemo(()=>({id:c,initial:t,isPresent:n,custom:s,onExitComplete:u,register:f=>(l.set(f,!1),()=>l.delete(f))}),i?[Math.random(),u]:[n,u]);return y.useMemo(()=>{l.forEach((f,h)=>l.set(h,!1))},[n]),y.useEffect(()=>{!n&&!l.size&&r&&r()},[n]),o==="popLayout"&&(e=a.jsx(N2,{isPresent:n,children:e})),a.jsx(pa.Provider,{value:d,children:e})};function E2(){return new Map}function ig(e=!0){const t=y.useContext(pa);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:s}=t,i=y.useId();y.useEffect(()=>{e&&s(i)},[e]);const o=y.useCallback(()=>e&&r&&r(i),[i,r,e]);return!n&&r?[!1,o]:[!0]}const Wi=e=>e.key||"";function ah(e){const t=[];return y.Children.forEach(e,n=>{y.isValidElement(n)&&t.push(n)}),t}const Uu=typeof window<"u",og=Uu?y.useLayoutEffect:y.useEffect,me=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:s=!0,mode:i="sync",propagate:o=!1})=>{const[l,c]=ig(o),u=y.useMemo(()=>ah(e),[e]),d=o&&!l?[]:u.map(Wi),f=y.useRef(!0),h=y.useRef(u),p=Iu(()=>new Map),[w,v]=y.useState(u),[b,m]=y.useState(u);og(()=>{f.current=!1,h.current=u;for(let j=0;j<b.length;j++){const k=Wi(b[j]);d.includes(k)?p.delete(k):p.get(k)!==!0&&p.set(k,!1)}},[b,d.length,d.join("-")]);const g=[];if(u!==w){let j=[...u];for(let k=0;k<b.length;k++){const N=b[k],C=Wi(N);d.includes(C)||(j.splice(k,0,N),g.push(N))}i==="wait"&&g.length&&(j=g),m(ah(j)),v(u);return}const{forceRender:x}=y.useContext(Bu);return a.jsx(a.Fragment,{children:b.map(j=>{const k=Wi(j),N=o&&!l?!1:u===b||d.includes(k),C=()=>{if(p.has(k))p.set(k,!0);else return;let S=!0;p.forEach(M=>{M||(S=!1)}),S&&(x==null||x(),m(h.current),o&&(c==null||c()),r&&r())};return a.jsx(C2,{isPresent:N,initial:!f.current||n?void 0:!1,custom:N?void 0:t,presenceAffectsLayout:s,mode:i,onExitComplete:N?void 0:C,children:j},k)})})},et=e=>e;let ag=et;function $u(e){let t;return()=>(t===void 0&&(t=e()),t)}const Hr=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Kt=e=>e*1e3,Gt=e=>e/1e3,T2={useManualTiming:!1};function P2(e){let t=new Set,n=new Set,r=!1,s=!1;const i=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function l(u){i.has(u)&&(c.schedule(u),e()),u(o)}const c={schedule:(u,d=!1,f=!1)=>{const p=f&&r?t:n;return d&&i.add(u),p.has(u)||p.add(u),u},cancel:u=>{n.delete(u),i.delete(u)},process:u=>{if(o=u,r){s=!0;return}r=!0,[t,n]=[n,t],t.forEach(l),t.clear(),r=!1,s&&(s=!1,c.process(u))}};return c}const Hi=["read","resolveKeyframes","update","preRender","render","postRender"],_2=40;function lg(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,o=Hi.reduce((m,g)=>(m[g]=P2(i),m),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:f,postRender:h}=o,p=()=>{const m=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(m-s.timestamp,_2),1),s.timestamp=m,s.isProcessing=!0,l.process(s),c.process(s),u.process(s),d.process(s),f.process(s),h.process(s),s.isProcessing=!1,n&&t&&(r=!1,e(p))},w=()=>{n=!0,r=!0,s.isProcessing||e(p)};return{schedule:Hi.reduce((m,g)=>{const x=o[g];return m[g]=(j,k=!1,N=!1)=>(n||w(),x.schedule(j,k,N)),m},{}),cancel:m=>{for(let g=0;g<Hi.length;g++)o[Hi[g]].cancel(m)},state:s,steps:o}}const{schedule:ie,cancel:Tn,state:Pe,steps:Za}=lg(typeof requestAnimationFrame<"u"?requestAnimationFrame:et,!0),cg=y.createContext({strict:!1}),lh={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Kr={};for(const e in lh)Kr[e]={isEnabled:t=>lh[e].some(n=>!!t[n])};function R2(e){for(const t in e)Kr[t]={...Kr[t],...e[t]}}const M2=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function $o(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||M2.has(e)}let ug=e=>!$o(e);function A2(e){e&&(ug=t=>t.startsWith("on")?!$o(t):e(t))}try{A2(require("@emotion/is-prop-valid").default)}catch{}function L2(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(ug(s)||n===!0&&$o(s)||!t&&!$o(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function D2(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>e(...r);return new Proxy(n,{get:(r,s)=>s==="create"?e:(t.has(s)||t.set(s,e(s)),t.get(s))})}const ma=y.createContext({});function ci(e){return typeof e=="string"||Array.isArray(e)}function ga(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Wu=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Hu=["initial",...Wu];function ya(e){return ga(e.animate)||Hu.some(t=>ci(e[t]))}function dg(e){return!!(ya(e)||e.variants)}function O2(e,t){if(ya(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ci(n)?n:void 0,animate:ci(r)?r:void 0}}return e.inherit!==!1?t:{}}function z2(e){const{initial:t,animate:n}=O2(e,y.useContext(ma));return y.useMemo(()=>({initial:t,animate:n}),[ch(t),ch(n)])}function ch(e){return Array.isArray(e)?e.join(" "):e}const V2=Symbol.for("motionComponentSymbol");function Cr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function B2(e,t,n){return y.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):Cr(n)&&(n.current=r))},[t])}const Ku=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),I2="framerAppearId",fg="data-"+Ku(I2),{schedule:Gu}=lg(queueMicrotask,!1),hg=y.createContext({});function F2(e,t,n,r,s){var i,o;const{visualElement:l}=y.useContext(ma),c=y.useContext(cg),u=y.useContext(pa),d=y.useContext(Fu).reducedMotion,f=y.useRef(null);r=r||c.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,p=y.useContext(hg);h&&!h.projection&&s&&(h.type==="html"||h.type==="svg")&&U2(f.current,n,s,p);const w=y.useRef(!1);y.useInsertionEffect(()=>{h&&w.current&&h.update(n,u)});const v=n[fg],b=y.useRef(!!v&&!(!((i=window.MotionHandoffIsComplete)===null||i===void 0)&&i.call(window,v))&&((o=window.MotionHasOptimisedAnimation)===null||o===void 0?void 0:o.call(window,v)));return og(()=>{h&&(w.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Gu.render(h.render),b.current&&h.animationState&&h.animationState.animateChanges())}),y.useEffect(()=>{h&&(!b.current&&h.animationState&&h.animationState.animateChanges(),b.current&&(queueMicrotask(()=>{var m;(m=window.MotionHandoffMarkAsComplete)===null||m===void 0||m.call(window,v)}),b.current=!1))}),h}function U2(e,t,n,r){const{layoutId:s,layout:i,drag:o,dragConstraints:l,layoutScroll:c,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:pg(e.parent)),e.projection.setOptions({layoutId:s,layout:i,alwaysMeasureLayout:!!o||l&&Cr(l),visualElement:e,animationType:typeof i=="string"?i:"both",initialPromotionConfig:r,layoutScroll:c,layoutRoot:u})}function pg(e){if(e)return e.options.allowProjection!==!1?e.projection:pg(e.parent)}function $2({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){var i,o;e&&R2(e);function l(u,d){let f;const h={...y.useContext(Fu),...u,layoutId:W2(u)},{isStatic:p}=h,w=z2(u),v=r(u,p);if(!p&&Uu){H2();const b=K2(h);f=b.MeasureLayout,w.visualElement=F2(s,v,h,t,b.ProjectionNode)}return a.jsxs(ma.Provider,{value:w,children:[f&&w.visualElement?a.jsx(f,{visualElement:w.visualElement,...h}):null,n(s,u,B2(v,w.visualElement,d),v,p,w.visualElement)]})}l.displayName=`motion.${typeof s=="string"?s:`create(${(o=(i=s.displayName)!==null&&i!==void 0?i:s.name)!==null&&o!==void 0?o:""})`}`;const c=y.forwardRef(l);return c[V2]=s,c}function W2({layoutId:e}){const t=y.useContext(Bu).id;return t&&e!==void 0?t+"-"+e:e}function H2(e,t){y.useContext(cg).strict}function K2(e){const{drag:t,layout:n}=Kr;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const G2=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function qu(e){return typeof e!="string"||e.includes("-")?!1:!!(G2.indexOf(e)>-1||/[A-Z]/u.test(e))}function uh(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Yu(e,t,n,r){if(typeof t=="function"){const[s,i]=uh(r);t=t(n!==void 0?n:e.custom,s,i)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[s,i]=uh(r);t=t(n!==void 0?n:e.custom,s,i)}return t}const pc=e=>Array.isArray(e),q2=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),Y2=e=>pc(e)?e[e.length-1]||0:e,Ve=e=>!!(e&&e.getVelocity);function uo(e){const t=Ve(e)?e.get():e;return q2(t)?t.toValue():t}function Q2({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,s,i){const o={latestValues:X2(r,s,i,e),renderState:t()};return n&&(o.onMount=l=>n({props:r,current:l,...o}),o.onUpdate=l=>n(l)),o}const mg=e=>(t,n)=>{const r=y.useContext(ma),s=y.useContext(pa),i=()=>Q2(e,t,r,s);return n?i():Iu(i)};function X2(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=uo(i[h]);let{initial:o,animate:l}=e;const c=ya(e),u=dg(e);t&&u&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?l:o;if(f&&typeof f!="boolean"&&!ga(f)){const h=Array.isArray(f)?f:[f];for(let p=0;p<h.length;p++){const w=Yu(e,h[p]);if(w){const{transitionEnd:v,transition:b,...m}=w;for(const g in m){let x=m[g];if(Array.isArray(x)){const j=d?x.length-1:0;x=x[j]}x!==null&&(s[g]=x)}for(const g in v)s[g]=v[g]}}}return s}const ns=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],or=new Set(ns),gg=e=>t=>typeof t=="string"&&t.startsWith(e),yg=gg("--"),J2=gg("var(--"),Qu=e=>J2(e)?Z2.test(e.split("/*")[0].trim()):!1,Z2=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,xg=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Jt=(e,t,n)=>n>t?t:n<e?e:n,rs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ui={...rs,transform:e=>Jt(0,1,e)},Ki={...rs,default:1},wi=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ln=wi("deg"),Ot=wi("%"),I=wi("px"),eb=wi("vh"),tb=wi("vw"),dh={...Ot,parse:e=>Ot.parse(e)/100,transform:e=>Ot.transform(e*100)},nb={borderWidth:I,borderTopWidth:I,borderRightWidth:I,borderBottomWidth:I,borderLeftWidth:I,borderRadius:I,radius:I,borderTopLeftRadius:I,borderTopRightRadius:I,borderBottomRightRadius:I,borderBottomLeftRadius:I,width:I,maxWidth:I,height:I,maxHeight:I,top:I,right:I,bottom:I,left:I,padding:I,paddingTop:I,paddingRight:I,paddingBottom:I,paddingLeft:I,margin:I,marginTop:I,marginRight:I,marginBottom:I,marginLeft:I,backgroundPositionX:I,backgroundPositionY:I},rb={rotate:ln,rotateX:ln,rotateY:ln,rotateZ:ln,scale:Ki,scaleX:Ki,scaleY:Ki,scaleZ:Ki,skew:ln,skewX:ln,skewY:ln,distance:I,translateX:I,translateY:I,translateZ:I,x:I,y:I,z:I,perspective:I,transformPerspective:I,opacity:ui,originX:dh,originY:dh,originZ:I},fh={...rs,transform:Math.round},Xu={...nb,...rb,zIndex:fh,size:I,fillOpacity:ui,strokeOpacity:ui,numOctaves:fh},sb={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ib=ns.length;function ob(e,t,n){let r="",s=!0;for(let i=0;i<ib;i++){const o=ns[i],l=e[o];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(o.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=xg(l,Xu[o]);if(!c){s=!1;const d=sb[o]||o;r+=`${d}(${u}) `}n&&(t[o]=u)}}return r=r.trim(),n?r=n(t,s?"":r):s&&(r="none"),r}function Ju(e,t,n){const{style:r,vars:s,transformOrigin:i}=e;let o=!1,l=!1;for(const c in t){const u=t[c];if(or.has(c)){o=!0;continue}else if(yg(c)){s[c]=u;continue}else{const d=xg(u,Xu[c]);c.startsWith("origin")?(l=!0,i[c]=d):r[c]=d}}if(t.transform||(o||n?r.transform=ob(t,e.transform,n):r.transform&&(r.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=i;r.transformOrigin=`${c} ${u} ${d}`}}const ab={offset:"stroke-dashoffset",array:"stroke-dasharray"},lb={offset:"strokeDashoffset",array:"strokeDasharray"};function cb(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?ab:lb;e[i.offset]=I.transform(-r);const o=I.transform(t),l=I.transform(n);e[i.array]=`${o} ${l}`}function hh(e,t,n){return typeof e=="string"?e:I.transform(t+n*e)}function ub(e,t,n){const r=hh(t,e.x,e.width),s=hh(n,e.y,e.height);return`${r} ${s}`}function Zu(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:l=1,pathOffset:c=0,...u},d,f){if(Ju(e,u,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:w}=e;h.transform&&(w&&(p.transform=h.transform),delete h.transform),w&&(s!==void 0||i!==void 0||p.transform)&&(p.transformOrigin=ub(w,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),o!==void 0&&cb(h,o,l,c,!1)}const ed=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),vg=()=>({...ed(),attrs:{}}),td=e=>typeof e=="string"&&e.toLowerCase()==="svg";function wg(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const bg=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function kg(e,t,n,r){wg(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(bg.has(s)?s:Ku(s),t.attrs[s])}const Wo={};function db(e){Object.assign(Wo,e)}function Sg(e,{layout:t,layoutId:n}){return or.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Wo[e]||e==="opacity")}function nd(e,t,n){var r;const{style:s}=e,i={};for(const o in s)(Ve(s[o])||t.style&&Ve(t.style[o])||Sg(o,e)||((r=n==null?void 0:n.getValue(o))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(i[o]=s[o]);return i}function jg(e,t,n){const r=nd(e,t,n);for(const s in e)if(Ve(e[s])||Ve(t[s])){const i=ns.indexOf(s)!==-1?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s;r[i]=e[s]}return r}function fb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const ph=["x","y","width","height","cx","cy","r"],hb={useVisualState:mg({scrapeMotionValuesFromProps:jg,createRenderState:vg,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:s})=>{if(!n)return;let i=!!e.drag;if(!i){for(const l in s)if(or.has(l)){i=!0;break}}if(!i)return;let o=!t;if(t)for(let l=0;l<ph.length;l++){const c=ph[l];e[c]!==t[c]&&(o=!0)}o&&ie.read(()=>{fb(n,r),ie.render(()=>{Zu(r,s,td(n.tagName),e.transformTemplate),kg(n,r)})})}})},pb={useVisualState:mg({scrapeMotionValuesFromProps:nd,createRenderState:ed})};function Ng(e,t,n){for(const r in t)!Ve(t[r])&&!Sg(r,n)&&(e[r]=t[r])}function mb({transformTemplate:e},t){return y.useMemo(()=>{const n=ed();return Ju(n,t,e),Object.assign({},n.vars,n.style)},[t])}function gb(e,t){const n=e.style||{},r={};return Ng(r,n,e),Object.assign(r,mb(e,t)),r}function yb(e,t){const n={},r=gb(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function xb(e,t,n,r){const s=y.useMemo(()=>{const i=vg();return Zu(i,t,td(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};Ng(i,e.style,e),s.style={...i,...s.style}}return s}function vb(e=!1){return(n,r,s,{latestValues:i},o)=>{const c=(qu(n)?xb:yb)(r,i,o,n),u=L2(r,typeof n=="string",e),d=n!==y.Fragment?{...u,...c,ref:s}:{},{children:f}=r,h=y.useMemo(()=>Ve(f)?f.get():f,[f]);return y.createElement(n,{...d,children:h})}}function wb(e,t){return function(r,{forwardMotionProps:s}={forwardMotionProps:!1}){const o={...qu(r)?hb:pb,preloadedFeatures:e,useRender:vb(s),createVisualElement:t,Component:r};return $2(o)}}function Cg(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function xa(e,t,n){const r=e.getProps();return Yu(r,t,n!==void 0?n:r.custom,e)}const bb=$u(()=>window.ScrollTimeline!==void 0);class kb{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(s=>{if(bb()&&s.attachTimeline)return s.attachTimeline(t);if(typeof n=="function")return n(s)});return()=>{r.forEach((s,i)=>{s&&s(),this.animations[i].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Sb extends kb{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function rd(e,t){return e?e[t]||e.default||e:void 0}const mc=2e4;function Eg(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<mc;)t+=n,r=e.next(t);return t>=mc?1/0:t}function sd(e){return typeof e=="function"}function mh(e,t){e.timeline=t,e.onfinish=null}const id=e=>Array.isArray(e)&&typeof e[0]=="number",jb={linearEasing:void 0};function Nb(e,t){const n=$u(e);return()=>{var r;return(r=jb[t])!==null&&r!==void 0?r:n()}}const Ho=Nb(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Tg=(e,t,n=10)=>{let r="";const s=Math.max(Math.round(t/n),2);for(let i=0;i<s;i++)r+=e(Hr(0,s-1,i))+", ";return`linear(${r.substring(0,r.length-2)})`};function Pg(e){return!!(typeof e=="function"&&Ho()||!e||typeof e=="string"&&(e in gc||Ho())||id(e)||Array.isArray(e)&&e.every(Pg))}const js=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gc={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:js([0,.65,.55,1]),circOut:js([.55,0,1,.45]),backIn:js([.31,.01,.66,-.59]),backOut:js([.33,1.53,.69,.99])};function _g(e,t){if(e)return typeof e=="function"&&Ho()?Tg(e,t):id(e)?js(e):Array.isArray(e)?e.map(n=>_g(n,t)||gc.easeOut):gc[e]}const bt={x:!1,y:!1};function Rg(){return bt.x||bt.y}function Cb(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let s=document;const i=(r=void 0)!==null&&r!==void 0?r:s.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function Mg(e,t){const n=Cb(e),r=new AbortController,s={passive:!0,...t,signal:r.signal};return[n,s,()=>r.abort()]}function gh(e){return t=>{t.pointerType==="touch"||Rg()||e(t)}}function Eb(e,t,n={}){const[r,s,i]=Mg(e,n),o=gh(l=>{const{target:c}=l,u=t(l);if(typeof u!="function"||!c)return;const d=gh(f=>{u(f),c.removeEventListener("pointerleave",d)});c.addEventListener("pointerleave",d,s)});return r.forEach(l=>{l.addEventListener("pointerenter",o,s)}),i}const Ag=(e,t)=>t?e===t?!0:Ag(e,t.parentElement):!1,od=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,Tb=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function Pb(e){return Tb.has(e.tagName)||e.tabIndex!==-1}const Ns=new WeakSet;function yh(e){return t=>{t.key==="Enter"&&e(t)}}function el(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const _b=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=yh(()=>{if(Ns.has(n))return;el(n,"down");const s=yh(()=>{el(n,"up")}),i=()=>el(n,"cancel");n.addEventListener("keyup",s,t),n.addEventListener("blur",i,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function xh(e){return od(e)&&!Rg()}function Rb(e,t,n={}){const[r,s,i]=Mg(e,n),o=l=>{const c=l.currentTarget;if(!xh(l)||Ns.has(c))return;Ns.add(c);const u=t(l),d=(p,w)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!xh(p)||!Ns.has(c))&&(Ns.delete(c),typeof u=="function"&&u(p,{success:w}))},f=p=>{d(p,n.useGlobalTarget||Ag(c,p.target))},h=p=>{d(p,!1)};window.addEventListener("pointerup",f,s),window.addEventListener("pointercancel",h,s)};return r.forEach(l=>{!Pb(l)&&l.getAttribute("tabindex")===null&&(l.tabIndex=0),(n.useGlobalTarget?window:l).addEventListener("pointerdown",o,s),l.addEventListener("focus",u=>_b(u,s),s)}),i}function Mb(e){return e==="x"||e==="y"?bt[e]?null:(bt[e]=!0,()=>{bt[e]=!1}):bt.x||bt.y?null:(bt.x=bt.y=!0,()=>{bt.x=bt.y=!1})}const Lg=new Set(["width","height","top","left","right","bottom",...ns]);let fo;function Ab(){fo=void 0}const zt={now:()=>(fo===void 0&&zt.set(Pe.isProcessing||T2.useManualTiming?Pe.timestamp:performance.now()),fo),set:e=>{fo=e,queueMicrotask(Ab)}};function ad(e,t){e.indexOf(t)===-1&&e.push(t)}function ld(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class cd{constructor(){this.subscriptions=[]}add(t){return ad(this.subscriptions,t),()=>ld(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Dg(e,t){return t?e*(1e3/t):0}const vh=30,Lb=e=>!isNaN(parseFloat(e));class Db{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,s=!0)=>{const i=zt.now();this.updatedAt!==i&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=zt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=Lb(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new cd);const r=this.events[t].add(n);return t==="change"?()=>{r(),ie.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=zt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>vh)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,vh);return Dg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function di(e,t){return new Db(e,t)}function Ob(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,di(n))}function zb(e,t){const n=xa(e,t);let{transitionEnd:r={},transition:s={},...i}=n||{};i={...i,...r};for(const o in i){const l=Y2(i[o]);Ob(e,o,l)}}function Vb(e){return!!(Ve(e)&&e.add)}function yc(e,t){const n=e.getValue("willChange");if(Vb(n))return n.add(t)}function Og(e){return e.props[fg]}const zg=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Bb=1e-7,Ib=12;function Fb(e,t,n,r,s){let i,o,l=0;do o=t+(n-t)/2,i=zg(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>Bb&&++l<Ib);return o}function bi(e,t,n,r){if(e===t&&n===r)return et;const s=i=>Fb(i,0,1,e,n);return i=>i===0||i===1?i:zg(s(i),t,r)}const Vg=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bg=e=>t=>1-e(1-t),Ig=bi(.33,1.53,.69,.99),ud=Bg(Ig),Fg=Vg(ud),Ug=e=>(e*=2)<1?.5*ud(e):.5*(2-Math.pow(2,-10*(e-1))),dd=e=>1-Math.sin(Math.acos(e)),$g=Bg(dd),Wg=Vg(dd),Hg=e=>/^0[^.\s]+$/u.test(e);function Ub(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Hg(e):!0}const Vs=e=>Math.round(e*1e5)/1e5,fd=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function $b(e){return e==null}const Wb=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,hd=(e,t)=>n=>!!(typeof n=="string"&&Wb.test(n)&&n.startsWith(e)||t&&!$b(n)&&Object.prototype.hasOwnProperty.call(n,t)),Kg=(e,t,n)=>r=>{if(typeof r!="string")return r;const[s,i,o,l]=r.match(fd);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:l!==void 0?parseFloat(l):1}},Hb=e=>Jt(0,255,e),tl={...rs,transform:e=>Math.round(Hb(e))},qn={test:hd("rgb","red"),parse:Kg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+tl.transform(e)+", "+tl.transform(t)+", "+tl.transform(n)+", "+Vs(ui.transform(r))+")"};function Kb(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const xc={test:hd("#"),parse:Kb,transform:qn.transform},Er={test:hd("hsl","hue"),parse:Kg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Ot.transform(Vs(t))+", "+Ot.transform(Vs(n))+", "+Vs(ui.transform(r))+")"},De={test:e=>qn.test(e)||xc.test(e)||Er.test(e),parse:e=>qn.test(e)?qn.parse(e):Er.test(e)?Er.parse(e):xc.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?qn.transform(e):Er.transform(e)},Gb=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qb(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(fd))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Gb))===null||n===void 0?void 0:n.length)||0)>0}const Gg="number",qg="color",Yb="var",Qb="var(",wh="${}",Xb=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function fi(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},s=[];let i=0;const l=t.replace(Xb,c=>(De.test(c)?(r.color.push(i),s.push(qg),n.push(De.parse(c))):c.startsWith(Qb)?(r.var.push(i),s.push(Yb),n.push(c)):(r.number.push(i),s.push(Gg),n.push(parseFloat(c))),++i,wh)).split(wh);return{values:n,split:l,indexes:r,types:s}}function Yg(e){return fi(e).values}function Qg(e){const{split:t,types:n}=fi(e),r=t.length;return s=>{let i="";for(let o=0;o<r;o++)if(i+=t[o],s[o]!==void 0){const l=n[o];l===Gg?i+=Vs(s[o]):l===qg?i+=De.transform(s[o]):i+=s[o]}return i}}const Jb=e=>typeof e=="number"?0:e;function Zb(e){const t=Yg(e);return Qg(e)(t.map(Jb))}const Pn={test:qb,parse:Yg,createTransformer:Qg,getAnimatableNone:Zb},ek=new Set(["brightness","contrast","saturate","opacity"]);function tk(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(fd)||[];if(!r)return e;const s=n.replace(r,"");let i=ek.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const nk=/\b([a-z-]*)\(.*?\)/gu,vc={...Pn,getAnimatableNone:e=>{const t=e.match(nk);return t?t.map(tk).join(" "):e}},rk={...Xu,color:De,backgroundColor:De,outlineColor:De,fill:De,stroke:De,borderColor:De,borderTopColor:De,borderRightColor:De,borderBottomColor:De,borderLeftColor:De,filter:vc,WebkitFilter:vc},pd=e=>rk[e];function Xg(e,t){let n=pd(e);return n!==vc&&(n=Pn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const sk=new Set(["auto","none","0"]);function ik(e,t,n){let r=0,s;for(;r<e.length&&!s;){const i=e[r];typeof i=="string"&&!sk.has(i)&&fi(i).values.length&&(s=e[r]),r++}if(s&&n)for(const i of t)e[i]=Xg(n,s)}const bh=e=>e===rs||e===I,kh=(e,t)=>parseFloat(e.split(", ")[t]),Sh=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/u);if(s)return kh(s[1],t);{const i=r.match(/^matrix\((.+)\)$/u);return i?kh(i[1],e):0}},ok=new Set(["x","y","z"]),ak=ns.filter(e=>!ok.has(e));function lk(e){const t=[];return ak.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const Gr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Sh(4,13),y:Sh(5,14)};Gr.translateX=Gr.x;Gr.translateY=Gr.y;const Xn=new Set;let wc=!1,bc=!1;function Jg(){if(bc){const e=Array.from(Xn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const s=lk(r);s.length&&(n.set(r,s),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const s=n.get(r);s&&s.forEach(([i,o])=>{var l;(l=r.getValue(i))===null||l===void 0||l.set(o)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}bc=!1,wc=!1,Xn.forEach(e=>e.complete()),Xn.clear()}function Zg(){Xn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(bc=!0)})}function ck(){Zg(),Jg()}class md{constructor(t,n,r,s,i,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=s,this.element=i,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Xn.add(this),wc||(wc=!0,ie.read(Zg),ie.resolveKeyframes(Jg))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:s}=this;for(let i=0;i<t.length;i++)if(t[i]===null)if(i===0){const o=s==null?void 0:s.get(),l=t[t.length-1];if(o!==void 0)t[0]=o;else if(r&&n){const c=r.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),s&&o===void 0&&s.set(t[0])}else t[i]=t[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Xn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Xn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ey=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),uk=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function dk(e){const t=uk.exec(e);if(!t)return[,];const[,n,r,s]=t;return[`--${n??r}`,s]}function ty(e,t,n=1){const[r,s]=dk(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return ey(o)?parseFloat(o):o}return Qu(s)?ty(s,t,n+1):s}const ny=e=>t=>t.test(e),fk={test:e=>e==="auto",parse:e=>e},ry=[rs,I,Ot,ln,tb,eb,fk],jh=e=>ry.find(ny(e));class sy extends md{constructor(t,n,r,s,i){super(t,n,r,s,i,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),Qu(u))){const d=ty(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Lg.has(r)||t.length!==2)return;const[s,i]=t,o=jh(s),l=jh(i);if(o!==l)if(bh(o)&&bh(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let s=0;s<t.length;s++)Ub(t[s])&&r.push(s);r.length&&ik(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Gr[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const s=n[n.length-1];s!==void 0&&t.getValue(r,s).jump(s,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:s}=this;if(!n||!n.current)return;const i=n.getValue(r);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,l=s[o];s[o]=Gr[r](n.measureViewportBox(),window.getComputedStyle(n.current)),l!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=l),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([c,u])=>{n.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const Nh=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Pn.test(e)||e==="0")&&!e.startsWith("url("));function hk(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function pk(e,t,n,r){const s=e[0];if(s===null)return!1;if(t==="display"||t==="visibility")return!0;const i=e[e.length-1],o=Nh(s,t),l=Nh(i,t);return!o||!l?!1:hk(e)||(n==="spring"||sd(n))&&r}const mk=e=>e!==null;function va(e,{repeat:t,repeatType:n="loop"},r){const s=e.filter(mk),i=t&&n!=="loop"&&t%2===1?0:s.length-1;return!i||r===void 0?s[i]:r}const gk=40;class iy{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:s=0,repeatDelay:i=0,repeatType:o="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=zt.now(),this.options={autoplay:t,delay:n,type:r,repeat:s,repeatDelay:i,repeatType:o,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>gk?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&ck(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=zt.now(),this.hasAttemptedResolve=!0;const{name:r,type:s,velocity:i,delay:o,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!pk(t,r,s,i))if(o)this.options.duration=0;else{c&&c(va(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ce=(e,t,n)=>e+(t-e)*n;function nl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function yk({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;s=nl(c,l,e+1/3),i=nl(c,l,e),o=nl(c,l,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}function Ko(e,t){return n=>n>0?t:e}const rl=(e,t,n)=>{const r=e*e,s=n*(t*t-r)+r;return s<0?0:Math.sqrt(s)},xk=[xc,qn,Er],vk=e=>xk.find(t=>t.test(e));function Ch(e){const t=vk(e);if(!t)return!1;let n=t.parse(e);return t===Er&&(n=yk(n)),n}const Eh=(e,t)=>{const n=Ch(e),r=Ch(t);if(!n||!r)return Ko(e,t);const s={...n};return i=>(s.red=rl(n.red,r.red,i),s.green=rl(n.green,r.green,i),s.blue=rl(n.blue,r.blue,i),s.alpha=ce(n.alpha,r.alpha,i),qn.transform(s))},wk=(e,t)=>n=>t(e(n)),ki=(...e)=>e.reduce(wk),kc=new Set(["none","hidden"]);function bk(e,t){return kc.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function kk(e,t){return n=>ce(e,t,n)}function gd(e){return typeof e=="number"?kk:typeof e=="string"?Qu(e)?Ko:De.test(e)?Eh:Nk:Array.isArray(e)?oy:typeof e=="object"?De.test(e)?Eh:Sk:Ko}function oy(e,t){const n=[...e],r=n.length,s=e.map((i,o)=>gd(i)(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}}function Sk(e,t){const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=gd(e[s])(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}}function jk(e,t){var n;const r=[],s={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const o=t.types[i],l=e.indexes[o][s[o]],c=(n=e.values[l])!==null&&n!==void 0?n:0;r[i]=c,s[o]++}return r}const Nk=(e,t)=>{const n=Pn.createTransformer(t),r=fi(e),s=fi(t);return r.indexes.var.length===s.indexes.var.length&&r.indexes.color.length===s.indexes.color.length&&r.indexes.number.length>=s.indexes.number.length?kc.has(e)&&!s.values.length||kc.has(t)&&!r.values.length?bk(e,t):ki(oy(jk(r,s),s.values),n):Ko(e,t)};function ay(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ce(e,t,n):gd(e)(e,t)}const Ck=5;function ly(e,t,n){const r=Math.max(t-Ck,0);return Dg(n-e(r),t-r)}const he={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},sl=.001;function Ek({duration:e=he.duration,bounce:t=he.bounce,velocity:n=he.velocity,mass:r=he.mass}){let s,i,o=1-t;o=Jt(he.minDamping,he.maxDamping,o),e=Jt(he.minDuration,he.maxDuration,Gt(e)),o<1?(s=u=>{const d=u*o,f=d*e,h=d-n,p=Sc(u,o),w=Math.exp(-f);return sl-h/p*w},i=u=>{const f=u*o*e,h=f*n+n,p=Math.pow(o,2)*Math.pow(u,2)*e,w=Math.exp(-f),v=Sc(Math.pow(u,2),o);return(-s(u)+sl>0?-1:1)*((h-p)*w)/v}):(s=u=>{const d=Math.exp(-u*e),f=(u-n)*e+1;return-sl+d*f},i=u=>{const d=Math.exp(-u*e),f=(n-u)*(e*e);return d*f});const l=5/e,c=Pk(s,i,l);if(e=Kt(e),isNaN(c))return{stiffness:he.stiffness,damping:he.damping,duration:e};{const u=Math.pow(c,2)*r;return{stiffness:u,damping:o*2*Math.sqrt(r*u),duration:e}}}const Tk=12;function Pk(e,t,n){let r=n;for(let s=1;s<Tk;s++)r=r-e(r)/t(r);return r}function Sc(e,t){return e*Math.sqrt(1-t*t)}const _k=["duration","bounce"],Rk=["stiffness","damping","mass"];function Th(e,t){return t.some(n=>e[n]!==void 0)}function Mk(e){let t={velocity:he.velocity,stiffness:he.stiffness,damping:he.damping,mass:he.mass,isResolvedFromDuration:!1,...e};if(!Th(e,Rk)&&Th(e,_k))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),s=r*r,i=2*Jt(.05,1,1-(e.bounce||0))*Math.sqrt(s);t={...t,mass:he.mass,stiffness:s,damping:i}}else{const n=Ek(e);t={...t,...n,mass:he.mass},t.isResolvedFromDuration=!0}return t}function cy(e=he.visualDuration,t=he.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:s}=n;const i=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:f,velocity:h,isResolvedFromDuration:p}=Mk({...n,velocity:-Gt(n.velocity||0)}),w=h||0,v=u/(2*Math.sqrt(c*d)),b=o-i,m=Gt(Math.sqrt(c/d)),g=Math.abs(b)<5;r||(r=g?he.restSpeed.granular:he.restSpeed.default),s||(s=g?he.restDelta.granular:he.restDelta.default);let x;if(v<1){const k=Sc(m,v);x=N=>{const C=Math.exp(-v*m*N);return o-C*((w+v*m*b)/k*Math.sin(k*N)+b*Math.cos(k*N))}}else if(v===1)x=k=>o-Math.exp(-m*k)*(b+(w+m*b)*k);else{const k=m*Math.sqrt(v*v-1);x=N=>{const C=Math.exp(-v*m*N),S=Math.min(k*N,300);return o-C*((w+v*m*b)*Math.sinh(S)+k*b*Math.cosh(S))/k}}const j={calculatedDuration:p&&f||null,next:k=>{const N=x(k);if(p)l.done=k>=f;else{let C=0;v<1&&(C=k===0?Kt(w):ly(x,k,N));const S=Math.abs(C)<=r,M=Math.abs(o-N)<=s;l.done=S&&M}return l.value=l.done?o:N,l},toString:()=>{const k=Math.min(Eg(j),mc),N=Tg(C=>j.next(k*C).value,k,30);return k+"ms "+N}};return j}function Ph({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=S=>l!==void 0&&S<l||c!==void 0&&S>c,w=S=>l===void 0?c:c===void 0||Math.abs(l-S)<Math.abs(c-S)?l:c;let v=n*t;const b=f+v,m=o===void 0?b:o(b);m!==b&&(v=m-f);const g=S=>-v*Math.exp(-S/r),x=S=>m+g(S),j=S=>{const M=g(S),R=x(S);h.done=Math.abs(M)<=u,h.value=h.done?m:R};let k,N;const C=S=>{p(h.value)&&(k=S,N=cy({keyframes:[h.value,w(h.value)],velocity:ly(x,S,h.value),damping:s,stiffness:i,restDelta:u,restSpeed:d}))};return C(0),{calculatedDuration:null,next:S=>{let M=!1;return!N&&k===void 0&&(M=!0,j(S),C(S)),k!==void 0&&S>=k?N.next(S-k):(!M&&j(S),h)}}}const Ak=bi(.42,0,1,1),Lk=bi(0,0,.58,1),uy=bi(.42,0,.58,1),Dk=e=>Array.isArray(e)&&typeof e[0]!="number",Ok={linear:et,easeIn:Ak,easeInOut:uy,easeOut:Lk,circIn:dd,circInOut:Wg,circOut:$g,backIn:ud,backInOut:Fg,backOut:Ig,anticipate:Ug},_h=e=>{if(id(e)){ag(e.length===4);const[t,n,r,s]=e;return bi(t,n,r,s)}else if(typeof e=="string")return Ok[e];return e};function zk(e,t,n){const r=[],s=n||ay,i=e.length-1;for(let o=0;o<i;o++){let l=s(e[o],e[o+1]);if(t){const c=Array.isArray(t)?t[o]||et:t;l=ki(c,l)}r.push(l)}return r}function Vk(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(ag(i===t.length),i===1)return()=>t[0];if(i===2&&t[0]===t[1])return()=>t[1];const o=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=zk(t,r,s),c=l.length,u=d=>{if(o&&d<e[0])return t[0];let f=0;if(c>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=Hr(e[f],e[f+1],d);return l[f](h)};return n?d=>u(Jt(e[0],e[i-1],d)):u}function Bk(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Hr(0,t,r);e.push(ce(n,1,s))}}function Ik(e){const t=[0];return Bk(t,e.length-1),t}function Fk(e,t){return e.map(n=>n*t)}function Uk(e,t){return e.map(()=>t||uy).splice(0,e.length-1)}function Go({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=Dk(r)?r.map(_h):_h(r),i={done:!1,value:t[0]},o=Fk(n&&n.length===t.length?n:Ik(t),e),l=Vk(o,t,{ease:Array.isArray(s)?s:Uk(t,s)});return{calculatedDuration:e,next:c=>(i.value=l(c),i.done=c>=e,i)}}const $k=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ie.update(t,!0),stop:()=>Tn(t),now:()=>Pe.isProcessing?Pe.timestamp:zt.now()}},Wk={decay:Ph,inertia:Ph,tween:Go,keyframes:Go,spring:cy},Hk=e=>e/100;class yd extends iy{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:r,element:s,keyframes:i}=this.options,o=(s==null?void 0:s.KeyframeResolver)||md,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new o(i,l,n,r,s),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:i,velocity:o=0}=this.options,l=sd(n)?n:Wk[n]||Go;let c,u;l!==Go&&typeof t[0]!="number"&&(c=ki(Hk,ay(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});i==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-o})),d.calculatedDuration===null&&(d.calculatedDuration=Eg(d));const{calculatedDuration:f}=d,h=f+s,p=h*(r+1)-s;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:f,resolvedDuration:h,totalDuration:p}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:S}=this.options;return{done:!0,value:S[S.length-1]}}const{finalKeyframe:s,generator:i,mirroredGenerator:o,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return i.next(0);const{delay:h,repeat:p,repeatType:w,repeatDelay:v,onUpdate:b}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const m=this.currentTime-h*(this.speed>=0?1:-1),g=this.speed>=0?m<0:m>d;this.currentTime=Math.max(m,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let x=this.currentTime,j=i;if(p){const S=Math.min(this.currentTime,d)/f;let M=Math.floor(S),R=S%1;!R&&S>=1&&(R=1),R===1&&M--,M=Math.min(M,p+1),!!(M%2)&&(w==="reverse"?(R=1-R,v&&(R-=v/f)):w==="mirror"&&(j=o)),x=Jt(0,1,R)*f}const k=g?{done:!1,value:c[0]}:j.next(x);l&&(k.value=l(k.value));let{done:N}=k;!g&&u!==null&&(N=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const C=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&N);return C&&s!==void 0&&(k.value=va(c,this.options,s)),b&&b(k.value),C&&this.finish(),k}get duration(){const{resolved:t}=this;return t?Gt(t.calculatedDuration):0}get time(){return Gt(this.currentTime)}set time(t){t=Kt(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Gt(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=$k,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(i=>this.tick(i))),n&&n();const s=this.driver.now();this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=s):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const Kk=new Set(["opacity","clipPath","filter","transform"]);function Gk(e,t,n,{delay:r=0,duration:s=300,repeat:i=0,repeatType:o="loop",ease:l="easeInOut",times:c}={}){const u={[t]:n};c&&(u.offset=c);const d=_g(l,s);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}const qk=$u(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),qo=10,Yk=2e4;function Qk(e){return sd(e.type)||e.type==="spring"||!Pg(e.ease)}function Xk(e,t){const n=new yd({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const s=[];let i=0;for(;!r.done&&i<Yk;)r=n.sample(i),s.push(r.value),i+=qo;return{times:void 0,keyframes:s,duration:i-qo,ease:"linear"}}const dy={anticipate:Ug,backInOut:Fg,circInOut:Wg};function Jk(e){return e in dy}class Rh extends iy{constructor(t){super(t);const{name:n,motionValue:r,element:s,keyframes:i}=this.options;this.resolver=new sy(i,(o,l)=>this.onKeyframesResolved(o,l),n,r,s),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:s,ease:i,type:o,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof i=="string"&&Ho()&&Jk(i)&&(i=dy[i]),Qk(this.options)){const{onComplete:f,onUpdate:h,motionValue:p,element:w,...v}=this.options,b=Xk(t,v);t=b.keyframes,t.length===1&&(t[1]=t[0]),r=b.duration,s=b.times,i=b.ease,o="keyframes"}const d=Gk(l.owner.current,c,t,{...this.options,duration:r,times:s,ease:i});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(mh(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;l.set(va(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:s,type:o,ease:i,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Gt(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Gt(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Kt(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return et;const{animation:r}=n;mh(r,t)}return et}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:s,type:i,ease:o,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:f,element:h,...p}=this.options,w=new yd({...p,keyframes:r,duration:s,type:i,ease:o,times:l,isGenerator:!0}),v=Kt(this.time);u.setWithVelocity(w.sample(v-qo).value,w.sample(v).value,qo)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:s,repeatType:i,damping:o,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return qk()&&r&&Kk.has(r)&&!c&&!u&&!s&&i!=="mirror"&&o!==0&&l!=="inertia"}}const Zk={type:"spring",stiffness:500,damping:25,restSpeed:10},eS=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),tS={type:"keyframes",duration:.8},nS={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rS=(e,{keyframes:t})=>t.length>2?tS:or.has(e)?e.startsWith("scale")?eS(t[1]):Zk:nS;function sS({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const xd=(e,t,n,r={},s,i)=>o=>{const l=rd(r,e)||{},c=l.delay||r.delay||0;let{elapsed:u=0}=r;u=u-Kt(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:h=>{t.set(h),l.onUpdate&&l.onUpdate(h)},onComplete:()=>{o(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:i?void 0:s};sS(l)||(d={...d,...rS(e,d)}),d.duration&&(d.duration=Kt(d.duration)),d.repeatDelay&&(d.repeatDelay=Kt(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!i&&t.get()!==void 0){const h=va(d.keyframes,l);if(h!==void 0)return ie.update(()=>{d.onUpdate(h),d.onComplete()}),new Sb([])}return!i&&Rh.supports(d)?new Rh(d):new yd(d)};function iS({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function fy(e,t,{delay:n=0,transitionOverride:r,type:s}={}){var i;let{transition:o=e.getDefaultTransition(),transitionEnd:l,...c}=t;r&&(o=r);const u=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const f in c){const h=e.getValue(f,(i=e.latestValues[f])!==null&&i!==void 0?i:null),p=c[f];if(p===void 0||d&&iS(d,f))continue;const w={delay:n,...rd(o||{},f)};let v=!1;if(window.MotionHandoffAnimation){const m=Og(e);if(m){const g=window.MotionHandoffAnimation(m,f,ie);g!==null&&(w.startTime=g,v=!0)}}yc(e,f),h.start(xd(f,h,p,e.shouldReduceMotion&&Lg.has(f)?{type:!1}:w,e,v));const b=h.animation;b&&u.push(b)}return l&&Promise.all(u).then(()=>{ie.update(()=>{l&&zb(e,l)})}),u}function jc(e,t,n={}){var r;const s=xa(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(fy(e,s,n)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=i;return oS(e,t,d+u,f,h,n)}:()=>Promise.resolve(),{when:c}=i;if(c){const[u,d]=c==="beforeChildren"?[o,l]:[l,o];return u().then(()=>d())}else return Promise.all([o(),l(n.delay)])}function oS(e,t,n=0,r=0,s=1,i){const o=[],l=(e.variantChildren.size-1)*r,c=s===1?(u=0)=>u*r:(u=0)=>l-u*r;return Array.from(e.variantChildren).sort(aS).forEach((u,d)=>{u.notify("AnimationStart",t),o.push(jc(u,t,{...i,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(o)}function aS(e,t){return e.sortNodePosition(t)}function lS(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>jc(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=jc(e,t,n);else{const s=typeof t=="function"?xa(e,t,n.custom):t;r=Promise.all(fy(e,s,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const cS=Hu.length;function hy(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?hy(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<cS;n++){const r=Hu[n],s=e.props[r];(ci(s)||s===!1)&&(t[r]=s)}return t}const uS=[...Wu].reverse(),dS=Wu.length;function fS(e){return t=>Promise.all(t.map(({animation:n,options:r})=>lS(e,n,r)))}function hS(e){let t=fS(e),n=Mh(),r=!0;const s=c=>(u,d)=>{var f;const h=xa(e,d,c==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:p,transitionEnd:w,...v}=h;u={...u,...v,...w}}return u};function i(c){t=c(e)}function o(c){const{props:u}=e,d=hy(e.parent)||{},f=[],h=new Set;let p={},w=1/0;for(let b=0;b<dS;b++){const m=uS[b],g=n[m],x=u[m]!==void 0?u[m]:d[m],j=ci(x),k=m===c?g.isActive:null;k===!1&&(w=b);let N=x===d[m]&&x!==u[m]&&j;if(N&&r&&e.manuallyAnimateOnMount&&(N=!1),g.protectedKeys={...p},!g.isActive&&k===null||!x&&!g.prevProp||ga(x)||typeof x=="boolean")continue;const C=pS(g.prevProp,x);let S=C||m===c&&g.isActive&&!N&&j||b>w&&j,M=!1;const R=Array.isArray(x)?x:[x];let V=R.reduce(s(m),{});k===!1&&(V={});const{prevResolvedValues:U={}}=g,ve={...U,...V},Ee=z=>{S=!0,h.has(z)&&(M=!0,h.delete(z)),g.needsAnimating[z]=!0;const E=e.getValue(z);E&&(E.liveStyle=!1)};for(const z in ve){const E=V[z],T=U[z];if(p.hasOwnProperty(z))continue;let A=!1;pc(E)&&pc(T)?A=!Cg(E,T):A=E!==T,A?E!=null?Ee(z):h.add(z):E!==void 0&&h.has(z)?Ee(z):g.protectedKeys[z]=!0}g.prevProp=x,g.prevResolvedValues=V,g.isActive&&(p={...p,...V}),r&&e.blockInitialAnimation&&(S=!1),S&&(!(N&&C)||M)&&f.push(...R.map(z=>({animation:z,options:{type:m}})))}if(h.size){const b={};h.forEach(m=>{const g=e.getBaseTarget(m),x=e.getValue(m);x&&(x.liveStyle=!0),b[m]=g??null}),f.push({animation:b})}let v=!!f.length;return r&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(v=!1),r=!1,v?t(f):Promise.resolve()}function l(c,u){var d;if(n[c].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var p;return(p=h.animationState)===null||p===void 0?void 0:p.setActive(c,u)}),n[c].isActive=u;const f=o(c);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:o,setActive:l,setAnimateFunction:i,getState:()=>n,reset:()=>{n=Mh(),r=!0}}}function pS(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Cg(t,e):!1}function Bn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Mh(){return{animate:Bn(!0),whileInView:Bn(),whileHover:Bn(),whileTap:Bn(),whileDrag:Bn(),whileFocus:Bn(),exit:Bn()}}class Ln{constructor(t){this.isMounted=!1,this.node=t}update(){}}class mS extends Ln{constructor(t){super(t),t.animationState||(t.animationState=hS(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ga(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let gS=0;class yS extends Ln{constructor(){super(...arguments),this.id=gS++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const s=this.node.animationState.setActive("exit",!t);n&&!t&&s.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const xS={animation:{Feature:mS},exit:{Feature:yS}};function hi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Si(e){return{point:{x:e.pageX,y:e.pageY}}}const vS=e=>t=>od(t)&&e(t,Si(t));function Bs(e,t,n,r){return hi(e,t,vS(n),r)}const Ah=(e,t)=>Math.abs(e-t);function wS(e,t){const n=Ah(e.x,t.x),r=Ah(e.y,t.y);return Math.sqrt(n**2+r**2)}class py{constructor(t,n,{transformPagePoint:r,contextWindow:s,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=ol(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,p=wS(f.offset,{x:0,y:0})>=3;if(!h&&!p)return;const{point:w}=f,{timestamp:v}=Pe;this.history.push({...w,timestamp:v});const{onStart:b,onMove:m}=this.handlers;h||(b&&b(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),m&&m(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=il(h,this.transformPagePoint),ie.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:p,onSessionEnd:w,resumeAnimation:v}=this.handlers;if(this.dragSnapToOrigin&&v&&v(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const b=ol(f.type==="pointercancel"?this.lastMoveEventInfo:il(h,this.transformPagePoint),this.history);this.startEvent&&p&&p(f,b),w&&w(f,b)},!od(t))return;this.dragSnapToOrigin=i,this.handlers=n,this.transformPagePoint=r,this.contextWindow=s||window;const o=Si(t),l=il(o,this.transformPagePoint),{point:c}=l,{timestamp:u}=Pe;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,ol(l,this.history)),this.removeListeners=ki(Bs(this.contextWindow,"pointermove",this.handlePointerMove),Bs(this.contextWindow,"pointerup",this.handlePointerUp),Bs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Tn(this.updatePoint)}}function il(e,t){return t?{point:t(e.point)}:e}function Lh(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ol({point:e},t){return{point:e,delta:Lh(e,my(t)),offset:Lh(e,bS(t)),velocity:kS(t,.1)}}function bS(e){return e[0]}function my(e){return e[e.length-1]}function kS(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const s=my(e);for(;n>=0&&(r=e[n],!(s.timestamp-r.timestamp>Kt(t)));)n--;if(!r)return{x:0,y:0};const i=Gt(s.timestamp-r.timestamp);if(i===0)return{x:0,y:0};const o={x:(s.x-r.x)/i,y:(s.y-r.y)/i};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}const gy=1e-4,SS=1-gy,jS=1+gy,yy=.01,NS=0-yy,CS=0+yy;function nt(e){return e.max-e.min}function ES(e,t,n){return Math.abs(e-t)<=n}function Dh(e,t,n,r=.5){e.origin=r,e.originPoint=ce(t.min,t.max,e.origin),e.scale=nt(n)/nt(t),e.translate=ce(n.min,n.max,e.origin)-e.originPoint,(e.scale>=SS&&e.scale<=jS||isNaN(e.scale))&&(e.scale=1),(e.translate>=NS&&e.translate<=CS||isNaN(e.translate))&&(e.translate=0)}function Is(e,t,n,r){Dh(e.x,t.x,n.x,r?r.originX:void 0),Dh(e.y,t.y,n.y,r?r.originY:void 0)}function Oh(e,t,n){e.min=n.min+t.min,e.max=e.min+nt(t)}function TS(e,t,n){Oh(e.x,t.x,n.x),Oh(e.y,t.y,n.y)}function zh(e,t,n){e.min=t.min-n.min,e.max=e.min+nt(t)}function Fs(e,t,n){zh(e.x,t.x,n.x),zh(e.y,t.y,n.y)}function PS(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ce(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ce(n,e,r.max):Math.min(e,n)),e}function Vh(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function _S(e,{top:t,left:n,bottom:r,right:s}){return{x:Vh(e.x,n,s),y:Vh(e.y,t,r)}}function Bh(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function RS(e,t){return{x:Bh(e.x,t.x),y:Bh(e.y,t.y)}}function MS(e,t){let n=.5;const r=nt(e),s=nt(t);return s>r?n=Hr(t.min,t.max-r,e.min):r>s&&(n=Hr(e.min,e.max-s,t.min)),Jt(0,1,n)}function AS(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Nc=.35;function LS(e=Nc){return e===!1?e=0:e===!0&&(e=Nc),{x:Ih(e,"left","right"),y:Ih(e,"top","bottom")}}function Ih(e,t,n){return{min:Fh(e,t),max:Fh(e,n)}}function Fh(e,t){return typeof e=="number"?e:e[t]||0}const Uh=()=>({translate:0,scale:1,origin:0,originPoint:0}),Tr=()=>({x:Uh(),y:Uh()}),$h=()=>({min:0,max:0}),ge=()=>({x:$h(),y:$h()});function at(e){return[e("x"),e("y")]}function xy({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function DS({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function OS(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function al(e){return e===void 0||e===1}function Cc({scale:e,scaleX:t,scaleY:n}){return!al(e)||!al(t)||!al(n)}function Un(e){return Cc(e)||vy(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function vy(e){return Wh(e.x)||Wh(e.y)}function Wh(e){return e&&e!=="0%"}function Yo(e,t,n){const r=e-n,s=t*r;return n+s}function Hh(e,t,n,r,s){return s!==void 0&&(e=Yo(e,s,r)),Yo(e,n,r)+t}function Ec(e,t=0,n=1,r,s){e.min=Hh(e.min,t,n,r,s),e.max=Hh(e.max,t,n,r,s)}function wy(e,{x:t,y:n}){Ec(e.x,t.translate,t.scale,t.originPoint),Ec(e.y,n.translate,n.scale,n.originPoint)}const Kh=.999999999999,Gh=1.0000000000001;function zS(e,t,n,r=!1){const s=n.length;if(!s)return;t.x=t.y=1;let i,o;for(let l=0;l<s;l++){i=n[l],o=i.projectionDelta;const{visualElement:c}=i.options;c&&c.props.style&&c.props.style.display==="contents"||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&_r(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,wy(e,o)),r&&Un(i.latestValues)&&_r(e,i.latestValues))}t.x<Gh&&t.x>Kh&&(t.x=1),t.y<Gh&&t.y>Kh&&(t.y=1)}function Pr(e,t){e.min=e.min+t,e.max=e.max+t}function qh(e,t,n,r,s=.5){const i=ce(e.min,e.max,s);Ec(e,t,n,i,r)}function _r(e,t){qh(e.x,t.x,t.scaleX,t.scale,t.originX),qh(e.y,t.y,t.scaleY,t.scale,t.originY)}function by(e,t){return xy(OS(e.getBoundingClientRect(),t))}function VS(e,t,n){const r=by(e,n),{scroll:s}=t;return s&&(Pr(r.x,s.offset.x),Pr(r.y,s.offset.y)),r}const ky=({current:e})=>e?e.ownerDocument.defaultView:null,BS=new WeakMap;class IS{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ge(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const s=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Si(d).point)},i=(d,f)=>{const{drag:h,dragPropagation:p,onDragStart:w}=this.getProps();if(h&&!p&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Mb(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),at(b=>{let m=this.getAxisMotionValue(b).get()||0;if(Ot.test(m)){const{projection:g}=this.visualElement;if(g&&g.layout){const x=g.layout.layoutBox[b];x&&(m=nt(x)*(parseFloat(m)/100))}}this.originPoint[b]=m}),w&&ie.postRender(()=>w(d,f)),yc(this.visualElement,"transform");const{animationState:v}=this.visualElement;v&&v.setActive("whileDrag",!0)},o=(d,f)=>{const{dragPropagation:h,dragDirectionLock:p,onDirectionLock:w,onDrag:v}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:b}=f;if(p&&this.currentDirection===null){this.currentDirection=FS(b),this.currentDirection!==null&&w&&w(this.currentDirection);return}this.updateAxis("x",f.point,b),this.updateAxis("y",f.point,b),this.visualElement.render(),v&&v(d,f)},l=(d,f)=>this.stop(d,f),c=()=>at(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new py(t,{onSessionStart:s,onStart:i,onMove:o,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:ky(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:s}=n;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&ie.postRender(()=>i(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:s}=this.getProps();if(!r||!Gi(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(o=PS(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,i=this.constraints;n&&Cr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&s?this.constraints=_S(s.layoutBox,n):this.constraints=!1,this.elastic=LS(r),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&at(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=AS(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!Cr(t))return!1;const r=t.current,{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=VS(r,s.root,this.visualElement.getTransformPagePoint());let o=RS(s.layout.layoutBox,i);if(n){const l=n(DS(o));this.hasMutatedConstraints=!!l,l&&(o=xy(l))}return o}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=at(d=>{if(!Gi(d,n,this.currentDirection))return;let f=c&&c[d]||{};o&&(f={min:0,max:0});const h=s?200:1e6,p=s?40:1e7,w={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...i,...f};return this.startAxisValueAnimation(d,w)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return yc(this.visualElement,t),r.start(xd(t,r,0,n,this.visualElement,!1))}stopAnimation(){at(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){at(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),s=r[n];return s||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){at(n=>{const{drag:r}=this.getProps();if(!Gi(n,r,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(n);if(s&&s.layout){const{min:o,max:l}=s.layout.layoutBox[n];i.set(t[n]-ce(o,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!Cr(n)||!r||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};at(o=>{const l=this.getAxisMotionValue(o);if(l&&this.constraints!==!1){const c=l.get();s[o]=MS({min:c,max:c},this.constraints[o])}});const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),at(o=>{if(!Gi(o,t,null))return;const l=this.getAxisMotionValue(o),{min:c,max:u}=this.constraints[o];l.set(ce(c,u,s[o]))})}addListeners(){if(!this.visualElement.current)return;BS.set(this.visualElement,this);const t=this.visualElement.current,n=Bs(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),r=()=>{const{dragConstraints:c}=this.getProps();Cr(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:s}=this.visualElement,i=s.addEventListener("measure",r);s&&!s.layout&&(s.root&&s.root.updateScroll(),s.updateLayout()),ie.read(r);const o=hi(window,"resize",()=>this.scalePositionWithinConstraints()),l=s.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(at(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=c[d].translate,f.set(f.get()+c[d].translate))}),this.visualElement.render())});return()=>{o(),n(),i(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=Nc,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:l}}}function Gi(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function FS(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class US extends Ln{constructor(t){super(t),this.removeGroupControls=et,this.removeListeners=et,this.controls=new IS(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||et}unmount(){this.removeGroupControls(),this.removeListeners()}}const Yh=e=>(t,n)=>{e&&ie.postRender(()=>e(t,n))};class $S extends Ln{constructor(){super(...arguments),this.removePointerDownListener=et}onPointerDown(t){this.session=new py(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ky(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:s}=this.node.getProps();return{onSessionStart:Yh(t),onStart:Yh(n),onMove:r,onEnd:(i,o)=>{delete this.session,s&&ie.postRender(()=>s(i,o))}}}mount(){this.removePointerDownListener=Bs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ho={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Qh(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const xs={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(I.test(e))e=parseFloat(e);else return e;const n=Qh(e,t.target.x),r=Qh(e,t.target.y);return`${n}% ${r}%`}},WS={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,s=Pn.parse(e);if(s.length>5)return r;const i=Pn.createTransformer(e),o=typeof s[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;s[0+o]/=l,s[1+o]/=c;const u=ce(l,c,.5);return typeof s[2+o]=="number"&&(s[2+o]/=u),typeof s[3+o]=="number"&&(s[3+o]/=u),i(s)}};class HS extends y.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:s}=this.props,{projection:i}=t;db(KS),i&&(n.group&&n.group.add(i),r&&r.register&&s&&r.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),ho.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:s,isPresent:i}=this.props,o=r.projection;return o&&(o.isPresent=i,s||t.layoutDependency!==n||n===void 0?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||ie.postRender(()=>{const l=o.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Gu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(s),r&&r.deregister&&r.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Sy(e){const[t,n]=ig(),r=y.useContext(Bu);return a.jsx(HS,{...e,layoutGroup:r,switchLayoutGroup:y.useContext(hg),isPresent:t,safeToRemove:n})}const KS={borderRadius:{...xs,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:xs,borderTopRightRadius:xs,borderBottomLeftRadius:xs,borderBottomRightRadius:xs,boxShadow:WS};function GS(e,t,n){const r=Ve(e)?e:di(e);return r.start(xd("",r,t,n)),r.animation}function qS(e){return e instanceof SVGElement&&e.tagName!=="svg"}const YS=(e,t)=>e.depth-t.depth;class QS{constructor(){this.children=[],this.isDirty=!1}add(t){ad(this.children,t),this.isDirty=!0}remove(t){ld(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(YS),this.isDirty=!1,this.children.forEach(t)}}function XS(e,t){const n=zt.now(),r=({timestamp:s})=>{const i=s-n;i>=t&&(Tn(r),e(i-t))};return ie.read(r,!0),()=>Tn(r)}const jy=["TopLeft","TopRight","BottomLeft","BottomRight"],JS=jy.length,Xh=e=>typeof e=="string"?parseFloat(e):e,Jh=e=>typeof e=="number"||I.test(e);function ZS(e,t,n,r,s,i){s?(e.opacity=ce(0,n.opacity!==void 0?n.opacity:1,e5(r)),e.opacityExit=ce(t.opacity!==void 0?t.opacity:1,0,t5(r))):i&&(e.opacity=ce(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let o=0;o<JS;o++){const l=`border${jy[o]}Radius`;let c=Zh(t,l),u=Zh(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||Jh(c)===Jh(u)?(e[l]=Math.max(ce(Xh(c),Xh(u),r),0),(Ot.test(u)||Ot.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=ce(t.rotate||0,n.rotate||0,r))}function Zh(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const e5=Ny(0,.5,$g),t5=Ny(.5,.95,et);function Ny(e,t,n){return r=>r<e?0:r>t?1:n(Hr(e,t,r))}function ep(e,t){e.min=t.min,e.max=t.max}function ot(e,t){ep(e.x,t.x),ep(e.y,t.y)}function tp(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function np(e,t,n,r,s){return e-=t,e=Yo(e,1/n,r),s!==void 0&&(e=Yo(e,1/s,r)),e}function n5(e,t=0,n=1,r=.5,s,i=e,o=e){if(Ot.test(t)&&(t=parseFloat(t),t=ce(o.min,o.max,t/100)-o.min),typeof t!="number")return;let l=ce(i.min,i.max,r);e===i&&(l-=t),e.min=np(e.min,t,n,l,s),e.max=np(e.max,t,n,l,s)}function rp(e,t,[n,r,s],i,o){n5(e,t[n],t[r],t[s],t.scale,i,o)}const r5=["x","scaleX","originX"],s5=["y","scaleY","originY"];function sp(e,t,n,r){rp(e.x,t,r5,n?n.x:void 0,r?r.x:void 0),rp(e.y,t,s5,n?n.y:void 0,r?r.y:void 0)}function ip(e){return e.translate===0&&e.scale===1}function Cy(e){return ip(e.x)&&ip(e.y)}function op(e,t){return e.min===t.min&&e.max===t.max}function i5(e,t){return op(e.x,t.x)&&op(e.y,t.y)}function ap(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ey(e,t){return ap(e.x,t.x)&&ap(e.y,t.y)}function lp(e){return nt(e.x)/nt(e.y)}function cp(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class o5{constructor(){this.members=[]}add(t){ad(this.members,t),t.scheduleRender()}remove(t){if(ld(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(s=>t===s);if(n===0)return!1;let r;for(let s=n;s>=0;s--){const i=this.members[s];if(i.isPresent!==!1){r=i;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:s}=t.options;s===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function a5(e,t,n){let r="";const s=e.x.translate/t.x,i=e.y.translate/t.y,o=(n==null?void 0:n.z)||0;if((s||i||o)&&(r=`translate3d(${s}px, ${i}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:f,rotateY:h,skewX:p,skewY:w}=n;u&&(r=`perspective(${u}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),p&&(r+=`skewX(${p}deg) `),w&&(r+=`skewY(${w}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(r+=`scale(${l}, ${c})`),r||"none"}const $n={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Cs=typeof window<"u"&&window.MotionDebug!==void 0,ll=["","X","Y","Z"],l5={visibility:"hidden"},up=1e3;let c5=0;function cl(e,t,n,r){const{latestValues:s}=t;s[e]&&(n[e]=s[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Ty(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Og(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:s,layoutId:i}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ie,!(s||i))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Ty(r)}function Py({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:s}){return class{constructor(o={},l=t==null?void 0:t()){this.id=c5++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Cs&&($n.totalNodes=$n.resolvedTargetDeltas=$n.recalculatedProjection=0),this.nodes.forEach(f5),this.nodes.forEach(y5),this.nodes.forEach(x5),this.nodes.forEach(h5),Cs&&window.MotionDebug.record($n)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new QS)}addEventListener(o,l){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new cd),this.eventHandlers.get(o).add(l)}notifyListeners(o,...l){const c=this.eventHandlers.get(o);c&&c.notify(...l)}hasListeners(o){return this.eventHandlers.has(o)}mount(o,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=qS(o),this.instance=o;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(o,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=XS(h,250),ho.hasAnimatedSinceResize&&(ho.hasAnimatedSinceResize=!1,this.nodes.forEach(fp))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:p,layout:w})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const v=this.options.transition||d.getDefaultTransition()||S5,{onLayoutAnimationStart:b,onLayoutAnimationComplete:m}=d.getProps(),g=!this.targetLayout||!Ey(this.targetLayout,w)||p,x=!h&&p;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,x);const j={...rd(v,"layout"),onPlay:b,onComplete:m};(d.shouldReduceMotion||this.options.layoutRoot)&&(j.delay=0,j.type=!1),this.startAnimation(j)}else h||fp(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=w})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Tn(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(v5),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ty(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(dp);return}this.isUpdating||this.nodes.forEach(m5),this.isUpdating=!1,this.nodes.forEach(g5),this.nodes.forEach(u5),this.nodes.forEach(d5),this.clearAllSnapshots();const l=zt.now();Pe.delta=Jt(0,1e3/60,l-Pe.timestamp),Pe.timestamp=l,Pe.isProcessing=!0,Za.update.process(Pe),Za.preRender.process(Pe),Za.render.process(Pe),Pe.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Gu.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(p5),this.sharedNodes.forEach(w5)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ie.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ie.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ge(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,o?o.layoutBox:void 0)}updateScroll(o="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(l=!1),l){const c=r(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!s)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Cy(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;o&&(l||Un(this.latestValues)||d)&&(s(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return o&&(c=this.removeTransform(c)),j5(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var o;const{visualElement:l}=this.options;if(!l)return ge();const c=l.measureViewportBox();if(!(((o=this.scroll)===null||o===void 0?void 0:o.wasRoot)||this.path.some(N5))){const{scroll:d}=this.root;d&&(Pr(c.x,d.offset.x),Pr(c.y,d.offset.y))}return c}removeElementScroll(o){var l;const c=ge();if(ot(c,o),!((l=this.scroll)===null||l===void 0)&&l.wasRoot)return c;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&ot(c,o),Pr(c.x,f.offset.x),Pr(c.y,f.offset.y))}return c}applyTransform(o,l=!1){const c=ge();ot(c,o);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&_r(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Un(d.latestValues)&&_r(c,d.latestValues)}return Un(this.latestValues)&&_r(c,this.latestValues),c}removeTransform(o){const l=ge();ot(l,o);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!Un(u.latestValues))continue;Cc(u.latestValues)&&u.updateSnapshot();const d=ge(),f=u.measurePageBox();ot(d,f),sp(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Un(this.latestValues)&&sp(l,this.latestValues),l}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Pe.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){var l;const c=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=c.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=c.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=c.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==c;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((l=this.parent)===null||l===void 0)&&l.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=Pe.timestamp,!this.targetDelta&&!this.relativeTarget){const p=this.getClosestProjectingParent();p&&p.layout&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ge(),this.relativeTargetOrigin=ge(),Fs(this.relativeTargetOrigin,this.layout.layoutBox,p.layout.layoutBox),ot(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ge(),this.targetWithTransforms=ge()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),TS(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):ot(this.target,this.layout.layoutBox),wy(this.target,this.targetDelta)):ot(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const p=this.getClosestProjectingParent();p&&!!p.resumingFrom==!!this.resumingFrom&&!p.options.layoutScroll&&p.target&&this.animationProgress!==1?(this.relativeParent=p,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ge(),this.relativeTargetOrigin=ge(),Fs(this.relativeTargetOrigin,this.target,p.target),ot(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Cs&&$n.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Cc(this.parent.latestValues)||vy(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var o;const l=this.getLead(),c=!!this.resumingFrom||this!==l;let u=!0;if((this.isProjectionDirty||!((o=this.parent)===null||o===void 0)&&o.isProjectionDirty)&&(u=!1),c&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Pe.timestamp&&(u=!1),u)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;ot(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,p=this.treeScale.y;zS(this.layoutCorrected,this.treeScale,this.path,c),l.layout&&!l.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(l.target=l.layout.layoutBox,l.targetWithTransforms=ge());const{target:w}=l;if(!w){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(tp(this.prevProjectionDelta.x,this.projectionDelta.x),tp(this.prevProjectionDelta.y,this.projectionDelta.y)),Is(this.projectionDelta,this.layoutCorrected,w,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==p||!cp(this.projectionDelta.x,this.prevProjectionDelta.x)||!cp(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",w)),Cs&&$n.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){var l;if((l=this.options.visualElement)===null||l===void 0||l.scheduleRender(),o){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Tr(),this.projectionDelta=Tr(),this.projectionDeltaWithTransform=Tr()}setAnimationOrigin(o,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},f=Tr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const h=ge(),p=c?c.source:void 0,w=this.layout?this.layout.source:void 0,v=p!==w,b=this.getStack(),m=!b||b.members.length<=1,g=!!(v&&!m&&this.options.crossfade===!0&&!this.path.some(k5));this.animationProgress=0;let x;this.mixTargetDelta=j=>{const k=j/1e3;hp(f.x,o.x,k),hp(f.y,o.y,k),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Fs(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),b5(this.relativeTarget,this.relativeTargetOrigin,h,k),x&&i5(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=ge()),ot(x,this.relativeTarget)),v&&(this.animationValues=d,ZS(d,u,this.latestValues,k,g,m)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=k},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Tn(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ie.update(()=>{ho.hasAnimatedSinceResize=!0,this.currentAnimation=GS(0,up,{...o,onUpdate:l=>{this.mixTargetDelta(l),o.onUpdate&&o.onUpdate(l)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(up),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=o;if(!(!l||!c||!u)){if(this!==o&&this.layout&&u&&_y(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||ge();const f=nt(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+f;const h=nt(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+h}ot(l,c),_r(l,d),Is(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(o,l){this.sharedNodes.has(o)||this.sharedNodes.set(o,new o5),this.sharedNodes.get(o).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:l}=this.options;return l?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:l}=this.options;return l?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let l=!1;const{latestValues:c}=o;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&cl("z",o,u,this.animationValues);for(let d=0;d<ll.length;d++)cl(`rotate${ll[d]}`,o,u,this.animationValues),cl(`skew${ll[d]}`,o,u,this.animationValues);o.render();for(const d in u)o.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);o.scheduleRender()}getProjectionStyles(o){var l,c;if(!this.instance||this.isSVG)return;if(!this.isVisible)return l5;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=uo(o==null?void 0:o.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const v={};return this.options.layoutId&&(v.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,v.pointerEvents=uo(o==null?void 0:o.pointerEvents)||""),this.hasProjected&&!Un(this.latestValues)&&(v.transform=d?d({},""):"none",this.hasProjected=!1),v}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),u.transform=a5(this.projectionDeltaWithTransform,this.treeScale,h),d&&(u.transform=d(h,u.transform));const{x:p,y:w}=this.projectionDelta;u.transformOrigin=`${p.origin*100}% ${w.origin*100}% 0`,f.animationValues?u.opacity=f===this?(c=(l=h.opacity)!==null&&l!==void 0?l:this.latestValues.opacity)!==null&&c!==void 0?c:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:u.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const v in Wo){if(h[v]===void 0)continue;const{correct:b,applyTo:m}=Wo[v],g=u.transform==="none"?h[v]:b(h[v],f);if(m){const x=m.length;for(let j=0;j<x;j++)u[m[j]]=g}else u[v]=g}return this.options.layoutId&&(u.pointerEvents=f===this?uo(o==null?void 0:o.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>{var l;return(l=o.currentAnimation)===null||l===void 0?void 0:l.stop()}),this.root.nodes.forEach(dp),this.root.sharedNodes.clear()}}}function u5(e){e.updateLayout()}function d5(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:s}=e.layout,{animationType:i}=e.options,o=n.source!==e.layout.source;i==="size"?at(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],p=nt(h);h.min=r[f].min,h.max=h.min+p}):_y(i,n.layoutBox,r)&&at(f=>{const h=o?n.measuredBox[f]:n.layoutBox[f],p=nt(r[f]);h.max=h.min+p,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+p)});const l=Tr();Is(l,r,n.layoutBox);const c=Tr();o?Is(c,e.applyTransform(s,!0),n.measuredBox):Is(c,r,n.layoutBox);const u=!Cy(l);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:p}=f;if(h&&p){const w=ge();Fs(w,n.layoutBox,h.layoutBox);const v=ge();Fs(v,r,p.layoutBox),Ey(w,v)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=w,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function f5(e){Cs&&$n.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function h5(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function p5(e){e.clearSnapshot()}function dp(e){e.clearMeasurements()}function m5(e){e.isLayoutDirty=!1}function g5(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function fp(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function y5(e){e.resolveTargetDelta()}function x5(e){e.calcProjection()}function v5(e){e.resetSkewAndRotation()}function w5(e){e.removeLeadSnapshot()}function hp(e,t,n){e.translate=ce(t.translate,0,n),e.scale=ce(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function pp(e,t,n,r){e.min=ce(t.min,n.min,r),e.max=ce(t.max,n.max,r)}function b5(e,t,n,r){pp(e.x,t.x,n.x,r),pp(e.y,t.y,n.y,r)}function k5(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const S5={duration:.45,ease:[.4,0,.1,1]},mp=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),gp=mp("applewebkit/")&&!mp("chrome/")?Math.round:et;function yp(e){e.min=gp(e.min),e.max=gp(e.max)}function j5(e){yp(e.x),yp(e.y)}function _y(e,t,n){return e==="position"||e==="preserve-aspect"&&!ES(lp(t),lp(n),.2)}function N5(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const C5=Py({attachResizeListener:(e,t)=>hi(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ul={current:void 0},Ry=Py({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ul.current){const e=new C5({});e.mount(window),e.setOptions({layoutScroll:!0}),ul.current=e}return ul.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),E5={pan:{Feature:$S},drag:{Feature:US,ProjectionNode:Ry,MeasureLayout:Sy}};function xp(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const s="onHover"+n,i=r[s];i&&ie.postRender(()=>i(t,Si(t)))}class T5 extends Ln{mount(){const{current:t}=this.node;t&&(this.unmount=Eb(t,n=>(xp(this.node,n,"Start"),r=>xp(this.node,r,"End"))))}unmount(){}}class P5 extends Ln{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ki(hi(this.node.current,"focus",()=>this.onFocus()),hi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function vp(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const s="onTap"+(n==="End"?"":n),i=r[s];i&&ie.postRender(()=>i(t,Si(t)))}class _5 extends Ln{mount(){const{current:t}=this.node;t&&(this.unmount=Rb(t,n=>(vp(this.node,n,"Start"),(r,{success:s})=>vp(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Tc=new WeakMap,dl=new WeakMap,R5=e=>{const t=Tc.get(e.target);t&&t(e)},M5=e=>{e.forEach(R5)};function A5({root:e,...t}){const n=e||document;dl.has(n)||dl.set(n,{});const r=dl.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(M5,{root:e,...t})),r[s]}function L5(e,t,n){const r=A5(t);return Tc.set(e,n),r.observe(e),()=>{Tc.delete(e),r.unobserve(e)}}const D5={some:0,all:1};class O5 extends Ln{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:D5[s]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,i&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=u?d:f;h&&h(c)};return L5(this.node.current,o,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(z5(t,n))&&this.startObserver()}unmount(){}}function z5({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const V5={inView:{Feature:O5},tap:{Feature:_5},focus:{Feature:P5},hover:{Feature:T5}},B5={layout:{ProjectionNode:Ry,MeasureLayout:Sy}},Pc={current:null},My={current:!1};function I5(){if(My.current=!0,!!Uu)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Pc.current=e.matches;e.addListener(t),t()}else Pc.current=!1}const F5=[...ry,De,Pn],U5=e=>F5.find(ny(e)),wp=new WeakMap;function $5(e,t,n){for(const r in t){const s=t[r],i=n[r];if(Ve(s))e.addValue(r,s);else if(Ve(i))e.addValue(r,di(s,{owner:e}));else if(i!==s)if(e.hasValue(r)){const o=e.getValue(r);o.liveStyle===!0?o.jump(s):o.hasAnimated||o.set(s)}else{const o=e.getStaticValue(r);e.addValue(r,di(o!==void 0?o:s,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const bp=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class W5{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,blockInitialAnimation:i,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=md,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const p=zt.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ie.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=o;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=ya(n),this.isVariantNode=dg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in h){const w=h[p];c[p]!==void 0&&Ve(w)&&w.set(c[p],!1)}}mount(t){this.current=t,wp.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),My.current||I5(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Pc.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){wp.delete(this.current),this.projection&&this.projection.unmount(),Tn(this.notifyUpdate),Tn(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=or.has(t),s=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ie.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{s(),i(),o&&o(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Kr){const n=Kr[t];if(!n)continue;const{isEnabled:r,Feature:s}=n;if(!this.features[t]&&s&&r(this.props)&&(this.features[t]=new s(this)),this.features[t]){const i=this.features[t];i.isMounted?i.update():(i.mount(),i.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ge()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<bp.length;r++){const s=bp[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i="on"+s,o=t[i];o&&(this.propEventSubscriptions[s]=this.on(s,o))}this.prevMotionValues=$5(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=di(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let s=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return s!=null&&(typeof s=="string"&&(ey(s)||Hg(s))?s=parseFloat(s):!U5(s)&&Pn.test(n)&&(s=Xg(t,n)),this.setBaseTarget(t,Ve(s)?s.get():s)),Ve(s)?s.get():s}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let s;if(typeof r=="string"||typeof r=="object"){const o=Yu(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);o&&(s=o[t])}if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Ve(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new cd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Ay extends W5{constructor(){super(...arguments),this.KeyframeResolver=sy}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ve(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function H5(e){return window.getComputedStyle(e)}class K5 extends Ay{constructor(){super(...arguments),this.type="html",this.renderInstance=wg}readValueFromInstance(t,n){if(or.has(n)){const r=pd(n);return r&&r.default||0}else{const r=H5(t),s=(yg(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return by(t,n)}build(t,n,r){Ju(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return nd(t,n,r)}}class G5 extends Ay{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ge}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(or.has(n)){const r=pd(n);return r&&r.default||0}return n=bg.has(n)?n:Ku(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return jg(t,n,r)}build(t,n,r){Zu(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,s){kg(t,n,r,s)}mount(t){this.isSVGTag=td(t.tagName),super.mount(t)}}const q5=(e,t)=>qu(e)?new G5(t):new K5(t,{allowProjection:e!==y.Fragment}),Y5=wb({...xS,...V5,...E5,...B5},q5),H=D2(Y5);/**
77
- * @license lucide-react v0.462.0 - ISC
78
- *
79
- * This source code is licensed under the ISC license.
80
- * See the LICENSE file in the root directory of this source tree.
81
- */const Q5=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ly=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
82
- * @license lucide-react v0.462.0 - ISC
83
- *
84
- * This source code is licensed under the ISC license.
85
- * See the LICENSE file in the root directory of this source tree.
86
- */var X5={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
87
- * @license lucide-react v0.462.0 - ISC
88
- *
89
- * This source code is licensed under the ISC license.
90
- * See the LICENSE file in the root directory of this source tree.
91
- */const J5=y.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:s="",children:i,iconNode:o,...l},c)=>y.createElement("svg",{ref:c,...X5,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Ly("lucide",s),...l},[...o.map(([u,d])=>y.createElement(u,d)),...Array.isArray(i)?i:[i]]));/**
92
- * @license lucide-react v0.462.0 - ISC
93
- *
94
- * This source code is licensed under the ISC license.
95
- * See the LICENSE file in the root directory of this source tree.
96
- */const D=(e,t)=>{const n=y.forwardRef(({className:r,...s},i)=>y.createElement(J5,{ref:i,iconNode:t,className:Ly(`lucide-${Q5(e)}`,r),...s}));return n.displayName=`${e}`,n};/**
97
- * @license lucide-react v0.462.0 - ISC
98
- *
99
- * This source code is licensed under the ISC license.
100
- * See the LICENSE file in the root directory of this source tree.
101
- */const Z5=D("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
102
- * @license lucide-react v0.462.0 - ISC
103
- *
104
- * This source code is licensed under the ISC license.
105
- * See the LICENSE file in the root directory of this source tree.
106
- */const ej=D("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
107
- * @license lucide-react v0.462.0 - ISC
108
- *
109
- * This source code is licensed under the ISC license.
110
- * See the LICENSE file in the root directory of this source tree.
111
- */const tj=D("BookmarkPlus",[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}],["line",{x1:"12",x2:"12",y1:"7",y2:"13",key:"1cppfj"}],["line",{x1:"15",x2:"9",y1:"10",y2:"10",key:"1gty7f"}]]);/**
112
- * @license lucide-react v0.462.0 - ISC
113
- *
114
- * This source code is licensed under the ISC license.
115
- * See the LICENSE file in the root directory of this source tree.
116
- */const qr=D("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]);/**
117
- * @license lucide-react v0.462.0 - ISC
118
- *
119
- * This source code is licensed under the ISC license.
120
- * See the LICENSE file in the root directory of this source tree.
121
- */const Dy=D("ChartNoAxesColumn",[["line",{x1:"18",x2:"18",y1:"20",y2:"10",key:"1xfpm4"}],["line",{x1:"12",x2:"12",y1:"20",y2:"4",key:"be30l9"}],["line",{x1:"6",x2:"6",y1:"20",y2:"14",key:"1r4le6"}]]);/**
122
- * @license lucide-react v0.462.0 - ISC
123
- *
124
- * This source code is licensed under the ISC license.
125
- * See the LICENSE file in the root directory of this source tree.
126
- */const ss=D("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
127
- * @license lucide-react v0.462.0 - ISC
128
- *
129
- * This source code is licensed under the ISC license.
130
- * See the LICENSE file in the root directory of this source tree.
131
- */const nj=D("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
132
- * @license lucide-react v0.462.0 - ISC
133
- *
134
- * This source code is licensed under the ISC license.
135
- * See the LICENSE file in the root directory of this source tree.
136
- */const _c=D("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
137
- * @license lucide-react v0.462.0 - ISC
138
- *
139
- * This source code is licensed under the ISC license.
140
- * See the LICENSE file in the root directory of this source tree.
141
- */const pi=D("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
142
- * @license lucide-react v0.462.0 - ISC
143
- *
144
- * This source code is licensed under the ISC license.
145
- * See the LICENSE file in the root directory of this source tree.
146
- */const rj=D("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
147
- * @license lucide-react v0.462.0 - ISC
148
- *
149
- * This source code is licensed under the ISC license.
150
- * See the LICENSE file in the root directory of this source tree.
151
- */const rr=D("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
152
- * @license lucide-react v0.462.0 - ISC
153
- *
154
- * This source code is licensed under the ISC license.
155
- * See the LICENSE file in the root directory of this source tree.
156
- */const Bt=D("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
157
- * @license lucide-react v0.462.0 - ISC
158
- *
159
- * This source code is licensed under the ISC license.
160
- * See the LICENSE file in the root directory of this source tree.
161
- */const sj=D("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
162
- * @license lucide-react v0.462.0 - ISC
163
- *
164
- * This source code is licensed under the ISC license.
165
- * See the LICENSE file in the root directory of this source tree.
166
- */const ij=D("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]);/**
167
- * @license lucide-react v0.462.0 - ISC
168
- *
169
- * This source code is licensed under the ISC license.
170
- * See the LICENSE file in the root directory of this source tree.
171
- */const Oy=D("CodeXml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
172
- * @license lucide-react v0.462.0 - ISC
173
- *
174
- * This source code is licensed under the ISC license.
175
- * See the LICENSE file in the root directory of this source tree.
176
- */const oj=D("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
177
- * @license lucide-react v0.462.0 - ISC
178
- *
179
- * This source code is licensed under the ISC license.
180
- * See the LICENSE file in the root directory of this source tree.
181
- */const Rc=D("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
182
- * @license lucide-react v0.462.0 - ISC
183
- *
184
- * This source code is licensed under the ISC license.
185
- * See the LICENSE file in the root directory of this source tree.
186
- */const aj=D("Crown",[["path",{d:"M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",key:"1vdc57"}],["path",{d:"M5 21h14",key:"11awu3"}]]);/**
187
- * @license lucide-react v0.462.0 - ISC
188
- *
189
- * This source code is licensed under the ISC license.
190
- * See the LICENSE file in the root directory of this source tree.
191
- */const lj=D("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
192
- * @license lucide-react v0.462.0 - ISC
193
- *
194
- * This source code is licensed under the ISC license.
195
- * See the LICENSE file in the root directory of this source tree.
196
- */const cj=D("EarOff",[["path",{d:"M6 18.5a3.5 3.5 0 1 0 7 0c0-1.57.92-2.52 2.04-3.46",key:"1qngmn"}],["path",{d:"M6 8.5c0-.75.13-1.47.36-2.14",key:"b06bma"}],["path",{d:"M8.8 3.15A6.5 6.5 0 0 1 19 8.5c0 1.63-.44 2.81-1.09 3.76",key:"g10hsz"}],["path",{d:"M12.5 6A2.5 2.5 0 0 1 15 8.5M10 13a2 2 0 0 0 1.82-1.18",key:"ygzou7"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
197
- * @license lucide-react v0.462.0 - ISC
198
- *
199
- * This source code is licensed under the ISC license.
200
- * See the LICENSE file in the root directory of this source tree.
201
- */const uj=D("Ear",[["path",{d:"M6 8.5a6.5 6.5 0 1 1 13 0c0 6-6 6-6 10a3.5 3.5 0 1 1-7 0",key:"1dfaln"}],["path",{d:"M15 8.5a2.5 2.5 0 0 0-5 0v1a2 2 0 1 1 0 4",key:"1qnva7"}]]);/**
202
- * @license lucide-react v0.462.0 - ISC
203
- *
204
- * This source code is licensed under the ISC license.
205
- * See the LICENSE file in the root directory of this source tree.
206
- */const kp=D("Earth",[["path",{d:"M21.54 15H17a2 2 0 0 0-2 2v4.54",key:"1djwo0"}],["path",{d:"M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17",key:"1tzkfa"}],["path",{d:"M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05",key:"14pb5j"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
207
- * @license lucide-react v0.462.0 - ISC
208
- *
209
- * This source code is licensed under the ISC license.
210
- * See the LICENSE file in the root directory of this source tree.
211
- */const dj=D("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
212
- * @license lucide-react v0.462.0 - ISC
213
- *
214
- * This source code is licensed under the ISC license.
215
- * See the LICENSE file in the root directory of this source tree.
216
- */const zy=D("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
217
- * @license lucide-react v0.462.0 - ISC
218
- *
219
- * This source code is licensed under the ISC license.
220
- * See the LICENSE file in the root directory of this source tree.
221
- */const vd=D("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
222
- * @license lucide-react v0.462.0 - ISC
223
- *
224
- * This source code is licensed under the ISC license.
225
- * See the LICENSE file in the root directory of this source tree.
226
- */const hr=D("FileCode2",[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4",key:"1pf5j1"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m5 12-3 3 3 3",key:"oke12k"}],["path",{d:"m9 18 3-3-3-3",key:"112psh"}]]);/**
227
- * @license lucide-react v0.462.0 - ISC
228
- *
229
- * This source code is licensed under the ISC license.
230
- * See the LICENSE file in the root directory of this source tree.
231
- */const wd=D("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
232
- * @license lucide-react v0.462.0 - ISC
233
- *
234
- * This source code is licensed under the ISC license.
235
- * See the LICENSE file in the root directory of this source tree.
236
- */const wa=D("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
237
- * @license lucide-react v0.462.0 - ISC
238
- *
239
- * This source code is licensed under the ISC license.
240
- * See the LICENSE file in the root directory of this source tree.
241
- */const fj=D("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
242
- * @license lucide-react v0.462.0 - ISC
243
- *
244
- * This source code is licensed under the ISC license.
245
- * See the LICENSE file in the root directory of this source tree.
246
- */const Rr=D("Ghost",[["path",{d:"M9 10h.01",key:"qbtxuw"}],["path",{d:"M15 10h.01",key:"1qmjsl"}],["path",{d:"M12 2a8 8 0 0 0-8 8v12l3-3 2.5 2.5L12 19l2.5 2.5L17 19l3 3V10a8 8 0 0 0-8-8z",key:"uwwb07"}]]);/**
247
- * @license lucide-react v0.462.0 - ISC
248
- *
249
- * This source code is licensed under the ISC license.
250
- * See the LICENSE file in the root directory of this source tree.
251
- */const hj=D("GitMerge",[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]);/**
252
- * @license lucide-react v0.462.0 - ISC
253
- *
254
- * This source code is licensed under the ISC license.
255
- * See the LICENSE file in the root directory of this source tree.
256
- */const Vy=D("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
257
- * @license lucide-react v0.462.0 - ISC
258
- *
259
- * This source code is licensed under the ISC license.
260
- * See the LICENSE file in the root directory of this source tree.
261
- */const pj=D("Key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]]);/**
262
- * @license lucide-react v0.462.0 - ISC
263
- *
264
- * This source code is licensed under the ISC license.
265
- * See the LICENSE file in the root directory of this source tree.
266
- */const mj=D("Keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]);/**
267
- * @license lucide-react v0.462.0 - ISC
268
- *
269
- * This source code is licensed under the ISC license.
270
- * See the LICENSE file in the root directory of this source tree.
271
- */const gj=D("Languages",[["path",{d:"m5 8 6 6",key:"1wu5hv"}],["path",{d:"m4 14 6-6 2-3",key:"1k1g8d"}],["path",{d:"M2 5h12",key:"or177f"}],["path",{d:"M7 2h1",key:"1t2jsx"}],["path",{d:"m22 22-5-10-5 10",key:"don7ne"}],["path",{d:"M14 18h6",key:"1m8k6r"}]]);/**
272
- * @license lucide-react v0.462.0 - ISC
273
- *
274
- * This source code is licensed under the ISC license.
275
- * See the LICENSE file in the root directory of this source tree.
276
- */const yj=D("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
277
- * @license lucide-react v0.462.0 - ISC
278
- *
279
- * This source code is licensed under the ISC license.
280
- * See the LICENSE file in the root directory of this source tree.
281
- */const Ne=D("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
282
- * @license lucide-react v0.462.0 - ISC
283
- *
284
- * This source code is licensed under the ISC license.
285
- * See the LICENSE file in the root directory of this source tree.
286
- */const xj=D("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/**
287
- * @license lucide-react v0.462.0 - ISC
288
- *
289
- * This source code is licensed under the ISC license.
290
- * See the LICENSE file in the root directory of this source tree.
291
- */const vj=D("MemoryStick",[["path",{d:"M6 19v-3",key:"1nvgqn"}],["path",{d:"M10 19v-3",key:"iu8nkm"}],["path",{d:"M14 19v-3",key:"kcehxu"}],["path",{d:"M18 19v-3",key:"1vh91z"}],["path",{d:"M8 11V9",key:"63erz4"}],["path",{d:"M16 11V9",key:"fru6f3"}],["path",{d:"M12 11V9",key:"ha00sb"}],["path",{d:"M2 15h20",key:"16ne18"}],["path",{d:"M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z",key:"lhddv3"}]]);/**
292
- * @license lucide-react v0.462.0 - ISC
293
- *
294
- * This source code is licensed under the ISC license.
295
- * See the LICENSE file in the root directory of this source tree.
296
- */const bd=D("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
297
- * @license lucide-react v0.462.0 - ISC
298
- *
299
- * This source code is licensed under the ISC license.
300
- * See the LICENSE file in the root directory of this source tree.
301
- */const kd=D("MicOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M18.89 13.23A7.12 7.12 0 0 0 19 12v-2",key:"80xlxr"}],["path",{d:"M5 10v2a7 7 0 0 0 12 5",key:"p2k8kg"}],["path",{d:"M15 9.34V5a3 3 0 0 0-5.68-1.33",key:"1gzdoj"}],["path",{d:"M9 9v3a3 3 0 0 0 5.12 2.12",key:"r2i35w"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
302
- * @license lucide-react v0.462.0 - ISC
303
- *
304
- * This source code is licensed under the ISC license.
305
- * See the LICENSE file in the root directory of this source tree.
306
- */const Sd=D("Mic",[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z",key:"131961"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["line",{x1:"12",x2:"12",y1:"19",y2:"22",key:"x3vr5v"}]]);/**
307
- * @license lucide-react v0.462.0 - ISC
308
- *
309
- * This source code is licensed under the ISC license.
310
- * See the LICENSE file in the root directory of this source tree.
311
- */const wj=D("MousePointer2",[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]);/**
312
- * @license lucide-react v0.462.0 - ISC
313
- *
314
- * This source code is licensed under the ISC license.
315
- * See the LICENSE file in the root directory of this source tree.
316
- */const By=D("MousePointerClick",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]);/**
317
- * @license lucide-react v0.462.0 - ISC
318
- *
319
- * This source code is licensed under the ISC license.
320
- * See the LICENSE file in the root directory of this source tree.
321
- */const bj=D("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
322
- * @license lucide-react v0.462.0 - ISC
323
- *
324
- * This source code is licensed under the ISC license.
325
- * See the LICENSE file in the root directory of this source tree.
326
- */const kj=D("PanelRightOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]]);/**
327
- * @license lucide-react v0.462.0 - ISC
328
- *
329
- * This source code is licensed under the ISC license.
330
- * See the LICENSE file in the root directory of this source tree.
331
- */const Sj=D("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.376 3.622a1 1 0 0 1 3.002 3.002L7.368 18.635a2 2 0 0 1-.855.506l-2.872.838a.5.5 0 0 1-.62-.62l.838-2.872a2 2 0 0 1 .506-.854z",key:"1ykcvy"}]]);/**
332
- * @license lucide-react v0.462.0 - ISC
333
- *
334
- * This source code is licensed under the ISC license.
335
- * See the LICENSE file in the root directory of this source tree.
336
- */const jd=D("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
337
- * @license lucide-react v0.462.0 - ISC
338
- *
339
- * This source code is licensed under the ISC license.
340
- * See the LICENSE file in the root directory of this source tree.
341
- */const Iy=D("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
342
- * @license lucide-react v0.462.0 - ISC
343
- *
344
- * This source code is licensed under the ISC license.
345
- * See the LICENSE file in the root directory of this source tree.
346
- */const Mc=D("Puzzle",[["path",{d:"M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",key:"w46dr5"}]]);/**
347
- * @license lucide-react v0.462.0 - ISC
348
- *
349
- * This source code is licensed under the ISC license.
350
- * See the LICENSE file in the root directory of this source tree.
351
- */const Zt=D("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
352
- * @license lucide-react v0.462.0 - ISC
353
- *
354
- * This source code is licensed under the ISC license.
355
- * See the LICENSE file in the root directory of this source tree.
356
- */const jj=D("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
357
- * @license lucide-react v0.462.0 - ISC
358
- *
359
- * This source code is licensed under the ISC license.
360
- * See the LICENSE file in the root directory of this source tree.
361
- */const Ac=D("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]);/**
362
- * @license lucide-react v0.462.0 - ISC
363
- *
364
- * This source code is licensed under the ISC license.
365
- * See the LICENSE file in the root directory of this source tree.
366
- */const Fy=D("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
367
- * @license lucide-react v0.462.0 - ISC
368
- *
369
- * This source code is licensed under the ISC license.
370
- * See the LICENSE file in the root directory of this source tree.
371
- */const Nj=D("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
372
- * @license lucide-react v0.462.0 - ISC
373
- *
374
- * This source code is licensed under the ISC license.
375
- * See the LICENSE file in the root directory of this source tree.
376
- */const Qo=D("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
377
- * @license lucide-react v0.462.0 - ISC
378
- *
379
- * This source code is licensed under the ISC license.
380
- * See the LICENSE file in the root directory of this source tree.
381
- */const Cj=D("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
382
- * @license lucide-react v0.462.0 - ISC
383
- *
384
- * This source code is licensed under the ISC license.
385
- * See the LICENSE file in the root directory of this source tree.
386
- */const Ej=D("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]);/**
387
- * @license lucide-react v0.462.0 - ISC
388
- *
389
- * This source code is licensed under the ISC license.
390
- * See the LICENSE file in the root directory of this source tree.
391
- */const Tj=D("SlidersHorizontal",[["line",{x1:"21",x2:"14",y1:"4",y2:"4",key:"obuewd"}],["line",{x1:"10",x2:"3",y1:"4",y2:"4",key:"1q6298"}],["line",{x1:"21",x2:"12",y1:"12",y2:"12",key:"1iu8h1"}],["line",{x1:"8",x2:"3",y1:"12",y2:"12",key:"ntss68"}],["line",{x1:"21",x2:"16",y1:"20",y2:"20",key:"14d8ph"}],["line",{x1:"12",x2:"3",y1:"20",y2:"20",key:"m0wm8r"}],["line",{x1:"14",x2:"14",y1:"2",y2:"6",key:"14e1ph"}],["line",{x1:"8",x2:"8",y1:"10",y2:"14",key:"1i6ji0"}],["line",{x1:"16",x2:"16",y1:"18",y2:"22",key:"1lctlv"}]]);/**
392
- * @license lucide-react v0.462.0 - ISC
393
- *
394
- * This source code is licensed under the ISC license.
395
- * See the LICENSE file in the root directory of this source tree.
396
- */const Uy=D("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
397
- * @license lucide-react v0.462.0 - ISC
398
- *
399
- * This source code is licensed under the ISC license.
400
- * See the LICENSE file in the root directory of this source tree.
401
- */const Pj=D("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
402
- * @license lucide-react v0.462.0 - ISC
403
- *
404
- * This source code is licensed under the ISC license.
405
- * See the LICENSE file in the root directory of this source tree.
406
- */const _j=D("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
407
- * @license lucide-react v0.462.0 - ISC
408
- *
409
- * This source code is licensed under the ISC license.
410
- * See the LICENSE file in the root directory of this source tree.
411
- */const Nd=D("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
412
- * @license lucide-react v0.462.0 - ISC
413
- *
414
- * This source code is licensed under the ISC license.
415
- * See the LICENSE file in the root directory of this source tree.
416
- */const Us=D("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
417
- * @license lucide-react v0.462.0 - ISC
418
- *
419
- * This source code is licensed under the ISC license.
420
- * See the LICENSE file in the root directory of this source tree.
421
- */const Rj=D("WifiOff",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
422
- * @license lucide-react v0.462.0 - ISC
423
- *
424
- * This source code is licensed under the ISC license.
425
- * See the LICENSE file in the root directory of this source tree.
426
- */const Mj=D("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/**
427
- * @license lucide-react v0.462.0 - ISC
428
- *
429
- * This source code is licensed under the ISC license.
430
- * See the LICENSE file in the root directory of this source tree.
431
- */const $y=D("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
432
- * @license lucide-react v0.462.0 - ISC
433
- *
434
- * This source code is licensed under the ISC license.
435
- * See the LICENSE file in the root directory of this source tree.
436
- */const Cd=D("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
437
- * @license lucide-react v0.462.0 - ISC
438
- *
439
- * This source code is licensed under the ISC license.
440
- * See the LICENSE file in the root directory of this source tree.
441
- */const Pt=D("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Wy={welcome:{tagline:"Your AI Brain",title:"Must-b",sleeping:"Sleeping...",waking:"Waking up...",awake:"Awakening...",wakeBtn:"Wake Must-b",reconfigure:"Reconfigure",footer:"© 2026 Must-b — Auto Step Platform"},sidebar:{newChat:"New Chat",recentChats:"Recent Chats",platform:"Platform",system:"System",automations:"My Automations",activeWorkflows:"Active Workflows",products:"Products & Services",clients:"Client Management",integrations:"Integrations",logs:"Logs & Activity",settings:"Settings",logout:"Logout",poweredBy:"Powered by",deleteChat:"Delete Chat?",deleteConfirm:"This action cannot be undone.",cancel:"Cancel",delete:"Delete"},rightPanel:{agentRole:"Agent Role",hardware:"Hardware Score",model:"Active Model",connected:"Gateway Connected",rank:{master:"Master",planner:"Planner",worker:"Worker"}},workflow:{title:"Active Workflow",idle:"Idle — awaiting task",goal:"Goal",steps:{browse:"Opening browser",write:"Writing file",think:"Thinking",exec:"Executing command"}},dashboard:{placeholder:"Send a message to Must-b...",thinking:"Must-b is thinking..."},layout:{chats:"Chats",system:"System",openChats:"Open chat history",openSystem:"Open system panel",closePanel:"Close panel"},chat:{inputPlaceholder:"Ask Must-b anything…",listening:"Listening…",thoughtProcess:"Thought Process",saveAsSkill:"Save as Skill",skillSaved:"Skill saved to your library!",saving:"Saving…",retry:"Retry",save:"Save",guidance:"Guidance",errorBoundary:"Chat rendering error — reloading…"}},Aj={welcome:{tagline:"Yapay Zeka Beyniniz",title:"Must-b",sleeping:"Uyuyor...",waking:"Uyandırılıyor...",awake:"Uyanıyor...",wakeBtn:"Must-b'yi Uyandır",reconfigure:"Yeniden Yapılandır",footer:"© 2026 Must-b — Auto Step Platform"},sidebar:{newChat:"Yeni Sohbet",recentChats:"Son Sohbetler",platform:"Platform",system:"Sistem",automations:"Otomasyonlarım",activeWorkflows:"Aktif İş Akışları",products:"Ürünler & Hizmetler",clients:"Müşteri Yönetimi",integrations:"Entegrasyonlar",logs:"Kayıtlar & Aktivite",settings:"Ayarlar",logout:"Çıkış",poweredBy:"Altyapısı:",deleteChat:"Sohbet Silinsin mi?",deleteConfirm:"Bu işlem geri alınamaz.",cancel:"İptal",delete:"Sil"},rightPanel:{agentRole:"Ajan Rolü",hardware:"Donanım Puanı",model:"Aktif Model",connected:"Gateway Bağlı",rank:{master:"Usta",planner:"Planlayıcı",worker:"İşçi"}},workflow:{title:"Aktif İş Akışı",idle:"Boşta — görev bekleniyor",goal:"Hedef",steps:{browse:"Tarayıcı açılıyor",write:"Dosya yazılıyor",think:"Düşünülüyor",exec:"Komut çalıştırılıyor"}},dashboard:{placeholder:"Must-b'ye bir mesaj gönderin...",thinking:"Must-b düşünüyor..."},layout:{chats:"Sohbetler",system:"Sistem",openChats:"Sohbet geçmişini aç",openSystem:"Sistem panelini aç",closePanel:"Paneli kapat"},chat:{inputPlaceholder:"Must-b'ye her şeyi sorun…",listening:"Dinleniyor…",thoughtProcess:"Düşünce Süreci",saveAsSkill:"Beceri Olarak Kaydet",skillSaved:"Beceri kütüphanenize kaydedildi!",saving:"Kaydediliyor…",retry:"Tekrar Dene",save:"Kaydet",guidance:"Rehberlik",errorBoundary:"Sohbet render hatası — yeniden yükleniyor…"}},Lj={welcome:{tagline:"Ihr KI-Gehirn",title:"Must-b",sleeping:"Schläft...",waking:"Wird geweckt...",awake:"Erwacht...",wakeBtn:"Must-b wecken",reconfigure:"Neu konfigurieren",footer:"© 2026 Must-b — Auto Step Platform"},sidebar:{newChat:"Neuer Chat",recentChats:"Letzte Chats",platform:"Plattform",system:"System",automations:"Meine Automatisierungen",activeWorkflows:"Aktive Workflows",products:"Produkte & Dienste",clients:"Kundenverwaltung",integrations:"Integrationen",logs:"Protokolle & Aktivität",settings:"Einstellungen",logout:"Abmelden",poweredBy:"Betrieben von",deleteChat:"Chat löschen?",deleteConfirm:"Diese Aktion kann nicht rückgängig gemacht werden.",cancel:"Abbrechen",delete:"Löschen"},rightPanel:{agentRole:"Agentenrolle",hardware:"Hardware-Score",model:"Aktives Modell",connected:"Gateway verbunden",rank:{master:"Meister",planner:"Planer",worker:"Arbeiter"}},workflow:{title:"Aktiver Workflow",idle:"Leerlauf — wartet auf Aufgabe",goal:"Ziel",steps:{browse:"Browser wird geöffnet",write:"Datei wird geschrieben",think:"Wird nachgedacht",exec:"Befehl wird ausgeführt"}},dashboard:{placeholder:"Nachricht an Must-b senden...",thinking:"Must-b denkt nach..."},layout:{chats:"Chats",system:"System",openChats:"Chatverlauf öffnen",openSystem:"Systembereich öffnen",closePanel:"Bereich schließen"},chat:{inputPlaceholder:"Fragen Sie Must-b alles…",listening:"Höre zu…",thoughtProcess:"Denkprozess",saveAsSkill:"Als Fähigkeit speichern",skillSaved:"Fähigkeit in Ihrer Bibliothek gespeichert!",saving:"Speichere…",retry:"Erneut versuchen",save:"Speichern",guidance:"Hinweis",errorBoundary:"Chat-Fehler — wird neu geladen…"}},Sp={en:Wy,tr:Aj,de:Lj},Hy=y.createContext({locale:"en",t:Wy,setLocale:()=>{}});function Dj({children:e}){const t=typeof localStorage<"u"?localStorage.getItem("mustb-lang"):null,[n,r]=y.useState(t&&t in Sp?t:"en"),s=i=>{r(i);try{localStorage.setItem("mustb-lang",i)}catch{}};return a.jsx(Hy.Provider,{value:{locale:n,t:Sp[n],setLocale:s},children:e})}const is=()=>y.useContext(Hy),Oj=[{w:1.8,top:"8%",left:"12%",op:.25},{w:1.2,top:"22%",left:"85%",op:.18},{w:2.1,top:"35%",left:"5%",op:.3},{w:1.5,top:"60%",left:"92%",op:.2},{w:1,top:"75%",left:"18%",op:.15},{w:2,top:"88%",left:"72%",op:.28},{w:1.3,top:"14%",left:"55%",op:.22},{w:1.7,top:"45%",left:"78%",op:.19},{w:1.1,top:"92%",left:"40%",op:.16},{w:2.2,top:"5%",left:"38%",op:.24}];function jp(){const e=ts(),{t}=is(),[n,r]=y.useState(!1),[s,i]=y.useState(!1),[o,l]=y.useState(!1);y.useEffect(()=>{let u=!1;const f=setTimeout(async()=>{try{const h=await fetch("/api/setup/status");if(!h.ok||u)return;const p=await h.json();!u&&!p.configured&&e("/setup")}catch{}},800);return()=>{u=!0,clearTimeout(f)}},[e]);const c=async()=>{if(!n){r(!0);try{const u=await fetch("/api/setup/status");if(u.ok&&!(await u.json()).configured){e("/setup");return}await fetch("/api/auth/local")}catch{}setTimeout(()=>i(!0),600),setTimeout(()=>{l(!0),setTimeout(()=>e("/app"),550)},1500)}};return a.jsxs("div",{className:"relative min-h-screen overflow-hidden bg-[#02040a]",children:[a.jsx(H.img,{src:"/avatar/sleep.png",alt:"","aria-hidden":!0,className:"absolute inset-0 w-full h-full object-cover pointer-events-none",style:{objectPosition:"center 25%"},animate:{opacity:n?0:.16,scale:n?1.05:1},transition:{duration:1.4,ease:"easeInOut"}}),a.jsx(H.img,{src:"/avatar/awake.png",alt:"","aria-hidden":!0,className:"absolute inset-0 w-full h-full object-cover pointer-events-none",style:{objectPosition:"center 25%"},initial:{opacity:0},animate:{opacity:s?.2:0,scale:s?1.04:1},transition:{duration:.9,ease:"easeOut"}}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-black/75 via-[#02040a]/40 to-[#02040a] pointer-events-none"}),a.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-[#02040a]/55 via-transparent to-[#02040a]/55 pointer-events-none"}),a.jsx("div",{className:"absolute inset-0 pointer-events-none",children:a.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-orange-900/15 rounded-full blur-[120px]"})}),a.jsx("div",{className:"absolute inset-0 pointer-events-none overflow-hidden z-10",children:Oj.map((u,d)=>a.jsx("div",{className:"absolute rounded-full bg-white",style:{width:u.w+"px",height:u.w+"px",top:u.top,left:u.left,opacity:u.op}},d))}),a.jsx(me,{children:o&&a.jsx(H.div,{className:"absolute inset-0 bg-[#02040a] z-50 pointer-events-none",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5}})}),a.jsx(H.div,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1.6},className:"absolute top-5 right-5 z-20",children:a.jsxs(fc,{to:"/setup",className:"flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-gray-600 hover:text-gray-300 hover:bg-white/5 transition-all text-xs font-medium",children:[a.jsx(Qo,{size:13}),t.welcome.reconfigure]})}),a.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col items-center justify-center gap-8",children:[a.jsxs(H.div,{initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.8},className:"text-center",children:[a.jsx("p",{className:"text-xs font-bold text-orange-500/60 tracking-[0.4em] uppercase mb-2",children:t.welcome.tagline}),a.jsx("h1",{className:"text-5xl font-extrabold tracking-tight text-white",children:t.welcome.title})]}),a.jsx(H.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:.8},className:"text-gray-500 text-sm font-medium tracking-wide",children:s?t.welcome.awake:n?t.welcome.waking:t.welcome.sleeping}),a.jsx(H.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{delay:1,duration:.7},children:a.jsxs("button",{onClick:c,disabled:n,className:`relative group px-10 py-4 rounded-2xl font-bold text-base tracking-wide transition-all duration-300 overflow-hidden ${n?"bg-orange-700/50 text-orange-300/60 cursor-not-allowed":"bg-gradient-to-r from-orange-600 to-amber-600 text-white hover:from-orange-500 hover:to-amber-500 shadow-[0_0_30px_rgba(234,88,12,0.35)] hover:shadow-[0_0_45px_rgba(234,88,12,0.55)] active:scale-[0.97]"}`,children:[!n&&a.jsx("span",{className:"absolute inset-0 w-1/3 h-full bg-white/10 skew-x-12 -translate-x-full group-hover:translate-x-[350%] transition-transform duration-700"}),a.jsx("span",{className:"relative z-10 flex items-center gap-3",children:n?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"w-4 h-4 border-2 border-orange-300/60 border-t-orange-300 rounded-full animate-spin"}),t.welcome.waking]}):a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-xl",children:"🦊"}),t.welcome.wakeBtn]})})]})}),a.jsx(H.p,{initial:{opacity:0},animate:{opacity:1},transition:{delay:1.4},className:"text-[11px] text-gray-700 font-medium tracking-widest uppercase",children:t.welcome.footer})]})]})}function Ky(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=Ky(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ze(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Ky(e))&&(r&&(r+=" "),r+=t);return r}const zj={frontier:"⚡ Frontier",gateway:"🌐 Gateway",fast:"🚀 Fast Inference",local:"💻 Local / Offline",open:"🔓 Open Source Cloud",specialist:"🎯 Specialist",regional:"🌏 Regional",enterprise:"🏢 Enterprise",custom:"⚙️ Custom"},Vj=["frontier","gateway","fast","local","open","specialist","regional","enterprise","custom"],Np=[{value:"en-US",label:"English (US)"},{value:"tr-TR",label:"Türkçe"},{value:"de-DE",label:"Deutsch"},{value:"es-ES",label:"Español"},{value:"fr-FR",label:"Français"},{value:"zh-CN",label:"中文 (简体)"},{value:"ja-JP",label:"日本語"},{value:"ar-SA",label:"العربية"}],po=["Identity","AI Engine","Workspace","Voice","Finalize"];function Bj({index:e,current:t}){const n=e<t,r=e===t;return a.jsxs("div",{className:"flex items-center",children:[a.jsx("div",{className:ze("w-8 h-8 rounded-full flex items-center justify-center text-xs font-bold transition-all duration-300",n?"bg-orange-500 text-white":r?"bg-orange-500/20 border-2 border-orange-500 text-orange-400":"bg-white/5 border border-white/10 text-gray-600"),children:n?a.jsx(ss,{size:13}):e+1}),e<po.length-1&&a.jsx("div",{className:ze("w-8 h-px transition-colors duration-300",n?"bg-orange-500/50":"bg-white/10")})]})}function Ij({label:e}){return a.jsx("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-bold bg-white/5 text-gray-500 border border-white/8",children:e})}function Fj({fit:e}){return e==="recommended"?a.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold text-green-400 bg-green-500/10 border border-green-500/20 px-1.5 py-0.5 rounded",children:[a.jsx(ss,{size:9})," Recommended"]}):e==="marginal"?a.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold text-orange-400 bg-orange-500/10 border border-orange-500/20 px-1.5 py-0.5 rounded",children:[a.jsx(Pt,{size:9})," Marginal"]}):a.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold text-red-400 bg-red-500/10 border border-red-500/20 px-1.5 py-0.5 rounded",children:[a.jsx(Us,{size:9})," Heavy"]})}function Cp({checked:e,onChange:t,label:n,description:r}){return a.jsxs("button",{type:"button",onClick:()=>t(!e),className:ze("w-full flex items-center gap-4 px-4 py-4 rounded-xl border transition-all text-left",e?"bg-orange-500/10 border-orange-500/30 text-white":"bg-white/3 border-white/8 text-gray-400 hover:border-white/20 hover:text-white"),children:[a.jsx("div",{className:ze("relative flex-shrink-0 w-11 h-6 rounded-full transition-colors duration-200",e?"bg-orange-500":"bg-white/15"),children:a.jsx("div",{className:ze("absolute top-1 w-4 h-4 rounded-full bg-white shadow transition-all duration-200",e?"left-6":"left-1")})}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-sm",children:n}),r&&a.jsx("p",{className:"text-xs text-gray-500 mt-0.5",children:r})]})]})}function Uj(){var On,nn;const e=ts(),[t,n]=y.useState([]),[r,s]=y.useState([]),[i,o]=y.useState(null),[l,c]=y.useState(!0),[u,d]=y.useState("~/Mustb-Projects"),[f,h]=y.useState(0),[p,w]=y.useState(""),[v,b]=y.useState("en-US"),[m,g]=y.useState("openrouter"),[x,j]=y.useState(""),[k,N]=y.useState(""),[C,S]=y.useState("http://localhost:11434"),[M,R]=y.useState(""),[V,U]=y.useState(""),[ve,Ee]=y.useState(!1),[mt,B]=y.useState(!1),[z,E]=y.useState("idle"),[T,A]=y.useState(!1),[K,F]=y.useState(null);y.useEffect(()=>{fetch("/api/setup/providers").then(P=>P.ok?P.json():{providers:[]}).then(P=>{var J;(J=P.providers)!=null&&J.length&&n(P.providers)}).catch(()=>{}).finally(()=>c(!1)),fetch("/api/setup/workspace-default").then(P=>P.ok?P.json():null).then(P=>{P!=null&&P.suggested&&(d(P.suggested),U(P.suggested))}).catch(()=>{})},[]),y.useEffect(()=>{m==="ollama"&&fetch("/api/setup/ollama-models").then(P=>P.ok?P.json():null).then(P=>{P!=null&&P.models&&s(P.models),P!=null&&P.hardware&&o(P.hardware)}).catch(()=>{})},[m]);const q=m==="ollama",$=t.find(P=>P.id===m),fe=y.useMemo(()=>{const P=x.toLowerCase().trim();return P?t.filter(J=>J.label.toLowerCase().includes(P)||J.description.toLowerCase().includes(P)||J.tags.some(Qe=>Qe.toLowerCase().includes(P))):t},[t,x]),Me=y.useMemo(()=>{const P={};for(const J of fe)P[J.category]||(P[J.category]=[]),P[J.category].push(J);return P},[fe]),Z=()=>{switch(f){case 0:return p.trim().length>0;case 1:return q?C.trim().length>0:$!=null&&$.envKeyIsUrl?!0:k.trim().length>0;case 2:return V.trim().length>0;default:return!0}},ls=async()=>{E("testing");try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(J=>J.stop()),E("granted")}catch{E("denied")}},Dn=async()=>{A(!0),F(null);try{const P={name:p.trim()||"User",language:v,provider:m,apiKey:q?C:k,model:q?M:$==null?void 0:$.defaultModel,skills:["browser","terminal","memory","web_search","filesystem","git","vision","input","telegram","analyzer"],mode:"local",workspacePath:V.trim()||u,wakeWord:ve,telemetry:mt};let J=await fetch("/api/setup/save",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(P)});if(!J.ok&&J.status===404&&(J=await fetch("/api/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(P)})),!J.ok){const Qe=await J.json().catch(()=>({}));throw new Error(Qe.error??"Setup failed")}e("/app")}catch(P){F(P instanceof Error?P.message:"Unknown error"),A(!1)}};return a.jsxs("div",{className:"min-h-screen bg-[#02040a] flex flex-col items-center justify-center px-4 py-12 relative overflow-hidden",children:[a.jsx("div",{className:"absolute inset-0 pointer-events-none",children:a.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-orange-900/12 rounded-full blur-[120px]"})}),a.jsxs("div",{className:"relative z-10 w-full max-w-xl",children:[a.jsxs("div",{className:"text-center mb-8",children:[a.jsx("div",{className:"flex justify-center mb-4",children:a.jsxs("div",{className:"relative w-14 h-14",children:[a.jsx("div",{className:"absolute inset-0 bg-orange-500 rounded-full blur-lg opacity-40 animate-pulse"}),a.jsx("img",{src:"/logo.png",alt:"Must-b",className:"w-full h-full object-contain relative z-10"})]})}),a.jsx("h1",{className:"text-3xl font-extrabold text-white tracking-tight",children:"Setup Must-b"}),a.jsx("p",{className:"text-gray-500 mt-1.5 text-sm",children:"First-time configuration · 5 steps"})]}),a.jsx("div",{className:"flex justify-center items-center mb-6",children:po.map((P,J)=>a.jsxs("div",{className:"flex flex-col items-center gap-1",children:[a.jsx(Bj,{index:J,current:f}),a.jsx("span",{className:ze("text-[9px] font-bold uppercase tracking-widest transition-colors",J===f?"text-orange-400":J<f?"text-orange-500/50":"text-gray-700"),children:P})]},J))}),a.jsx(me,{mode:"wait",children:a.jsxs(H.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.18},className:"glass rounded-2xl p-6 border border-white/8",children:[a.jsxs("p",{className:"text-[10px] font-bold text-orange-500/60 uppercase tracking-widest mb-1",children:["Step ",f+1," of ",po.length]}),a.jsx("h2",{className:"text-xl font-bold text-white mb-5",children:po[f]}),f===0&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-xs text-gray-400 uppercase tracking-widest font-bold",children:"Your name"}),a.jsx("input",{autoFocus:!0,type:"text",value:p,onChange:P=>w(P.target.value),onKeyDown:P=>P.key==="Enter"&&Z()&&h(1),placeholder:"e.g. Burak",className:"w-full bg-white/5 border border-white/10 rounded-xl px-4 py-3 text-white placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-orange-500/50 transition-all text-base"}),a.jsx("p",{className:"text-gray-600 text-xs",children:"Used in greetings and memory. Editable anytime in Settings."})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-xs text-gray-400 uppercase tracking-widest font-bold",children:"Language"}),a.jsxs("div",{className:"relative",children:[a.jsx(Vy,{size:14,className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none"}),a.jsx("select",{value:v,onChange:P=>b(P.target.value),className:"w-full bg-white/5 border border-white/10 rounded-xl pl-9 pr-4 py-3 text-white focus:outline-none focus:ring-1 focus:ring-orange-500/50 transition-all text-sm appearance-none cursor-pointer",children:Np.map(P=>a.jsx("option",{value:P.value,className:"bg-[#0d1117] text-white",children:P.label},P.value))}),a.jsx(pi,{size:13,className:"absolute right-3.5 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none rotate-90"})]})]})]}),f===1&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"relative",children:[a.jsx(Fy,{size:13,className:"absolute left-3 top-1/2 -translate-y-1/2 text-gray-500"}),a.jsx("input",{type:"text",value:x,onChange:P=>j(P.target.value),placeholder:"Search providers…",className:"w-full bg-white/5 border border-white/10 rounded-xl pl-9 pr-4 py-2.5 text-white placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-orange-500/50 text-sm"})]}),a.jsxs("div",{className:"max-h-[260px] overflow-y-auto space-y-4 pr-1 scrollbar-thin scrollbar-thumb-white/10 scrollbar-track-transparent",children:[l?a.jsx("p",{className:"text-center py-6 text-gray-600 text-sm",children:"Loading providers…"}):Vj.map(P=>{const J=Me[P];return J!=null&&J.length?a.jsxs("div",{children:[a.jsx("p",{className:"text-[10px] font-bold text-gray-600 uppercase tracking-widest mb-1.5 px-1",children:zj[P]}),a.jsx("div",{className:"space-y-1",children:J.map(Qe=>a.jsxs("button",{onClick:()=>{g(Qe.id),N("")},className:ze("w-full flex items-center gap-3 px-3 py-2.5 rounded-xl border transition-all text-left",m===Qe.id?"bg-orange-500/10 border-orange-500/40 text-white":"bg-white/3 border-white/8 text-gray-400 hover:border-white/20 hover:text-white"),children:[a.jsx("div",{className:ze("w-3 h-3 rounded-full border-2 flex-shrink-0 transition-all",m===Qe.id?"border-orange-500 bg-orange-500":"border-gray-600")}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-semibold text-sm leading-tight",children:Qe.label}),a.jsx("p",{className:"text-xs text-gray-500 truncate",children:Qe.description})]}),a.jsx("div",{className:"flex flex-wrap gap-1 justify-end flex-shrink-0 max-w-[120px]",children:Qe.tags.slice(0,2).map(ji=>a.jsx(Ij,{label:ji},ji))})]},Qe.id))})]},P):null}),!l&&fe.length===0&&a.jsxs("p",{className:"text-center py-6 text-gray-600 text-sm",children:['No providers match "',x,'"']})]}),q?a.jsxs("div",{className:"space-y-3 pt-1 border-t border-white/6",children:[a.jsxs("div",{className:"space-y-1.5",children:[a.jsx("label",{className:"text-xs text-gray-400 uppercase tracking-widest font-bold",children:"Ollama Base URL"}),a.jsx("input",{type:"url",value:C,onChange:P=>S(P.target.value),placeholder:"http://localhost:11434",className:"w-full bg-white/5 border border-white/10 rounded-xl px-4 py-2.5 text-white placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-orange-500/50 font-mono text-sm"})]}),i&&a.jsxs("div",{className:"flex items-center gap-4 rounded-xl bg-white/3 border border-white/8 px-3 py-2 text-xs text-gray-500",children:[a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(vj,{size:11,className:"text-orange-400"}),i.ramGb.toFixed(1)," GB RAM"]}),a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Rc,{size:11,className:"text-orange-400"}),i.cpuCount," CPUs"]}),a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx(Pt,{size:11,className:"text-orange-400"}),"Score ",i.score," · ",i.tier]})]}),r.length>0&&a.jsx("div",{className:"max-h-[180px] overflow-y-auto space-y-1.5 pr-1",children:r.map(P=>a.jsxs("button",{onClick:()=>R(P.modelId),className:ze("w-full flex items-center gap-3 px-3 py-2.5 rounded-xl border transition-all text-left",M===P.modelId?"bg-orange-500/10 border-orange-500/40 text-white":"bg-white/3 border-white/8 text-gray-400 hover:border-white/20 hover:text-white"),children:[a.jsx("div",{className:ze("w-3 h-3 rounded-full border-2 flex-shrink-0",M===P.modelId?"border-orange-500 bg-orange-500":"border-gray-600")}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("p",{className:"font-semibold text-sm",children:P.name}),a.jsx("span",{className:"text-[10px] text-gray-600 font-mono",children:P.params})]}),a.jsx("p",{className:"text-xs text-gray-500 truncate",children:P.description})]}),a.jsxs("div",{className:"flex flex-col items-end gap-1 flex-shrink-0",children:[a.jsx(Fj,{fit:P.fit}),a.jsxs("span",{className:"text-[10px] text-gray-600",children:[P.ramGb," GB"]})]})]},P.id))})]}):$?a.jsxs("div",{className:"space-y-2 pt-1 border-t border-white/6",children:[a.jsx("label",{className:"text-xs text-gray-400 uppercase tracking-widest font-bold",children:$.envKeyIsUrl?"Base URL":`${$.label} API Key`}),a.jsx("input",{type:$.envKeyIsUrl?"url":"password",value:k,onChange:P=>N(P.target.value),placeholder:$.placeholder,className:"w-full bg-white/5 border border-white/10 rounded-xl px-4 py-2.5 text-white placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-orange-500/50 font-mono text-sm"}),$.latestModels.length>0&&a.jsx("div",{className:"flex flex-wrap gap-1.5 pt-1",children:$.latestModels.slice(0,4).map(P=>a.jsx("span",{className:"text-[11px] font-mono text-orange-400/60 bg-orange-500/5 border border-orange-500/10 px-2 py-0.5 rounded-lg",children:P},P))}),a.jsxs("p",{className:"text-gray-600 text-xs",children:["Stored locally in ",a.jsx("code",{className:"text-orange-500/60",children:".env"})," — never sent to external servers."]})]}):null]}),f===2&&a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx("label",{className:"text-xs text-gray-400 uppercase tracking-widest font-bold",children:"Workspace Directory"}),a.jsxs("div",{className:"relative",children:[a.jsx(fj,{size:13,className:"absolute left-3.5 top-1/2 -translate-y-1/2 text-gray-500 pointer-events-none"}),a.jsx("input",{autoFocus:!0,type:"text",value:V,onChange:P=>U(P.target.value),placeholder:u,className:"w-full bg-white/5 border border-white/10 rounded-xl pl-9 pr-4 py-3 text-white placeholder-gray-600 focus:outline-none focus:ring-1 focus:ring-orange-500/50 font-mono text-sm"})]}),a.jsxs("p",{className:"text-gray-600 text-xs",children:["Must-b will read and write files ",a.jsx("span",{className:"text-orange-500/70 font-medium",children:"only within this directory"}),". The folder will be created if it doesn't exist."]})]}),a.jsxs("div",{className:"flex items-start gap-3 rounded-xl bg-white/3 border border-white/8 px-4 py-3",children:[a.jsx(Cj,{size:15,className:"text-green-400 flex-shrink-0 mt-0.5"}),a.jsx("p",{className:"text-xs text-gray-500 leading-relaxed",children:"Must-b operates in a sandboxed workspace. It cannot access files outside this directory unless you explicitly provide a path in a prompt."})]})]}),f===3&&a.jsxs("div",{className:"space-y-4",children:[a.jsx(Cp,{checked:ve,onChange:Ee,label:'Enable "Hey Must-b" Wake Word',description:"Always-on voice activation — must-b-ui listens passively via your microphone."}),a.jsx("div",{className:"rounded-xl bg-white/3 border border-white/8 px-4 py-4",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-semibold text-white",children:"Test Microphone Permission"}),a.jsxs("p",{className:"text-xs text-gray-500 mt-0.5",children:[z==="idle"&&"Click to verify your browser can access the microphone.",z==="testing"&&"Requesting permission…",z==="granted"&&"Microphone access granted ✓",z==="denied"&&"Permission denied — check browser settings."]})]}),a.jsx("button",{onClick:ls,disabled:z==="testing",className:ze("flex items-center gap-2 px-4 py-2 rounded-xl text-xs font-bold transition-all shrink-0",z==="granted"?"bg-green-500/10 border border-green-500/20 text-green-400 cursor-default":z==="denied"?"bg-red-500/10 border border-red-500/20 text-red-400":"bg-white/5 border border-white/10 text-gray-300 hover:border-white/25 hover:text-white"),children:z==="granted"?a.jsxs(a.Fragment,{children:[a.jsx(ss,{size:12})," Granted"]}):z==="denied"?a.jsxs(a.Fragment,{children:[a.jsx(kd,{size:12})," Denied"]}):a.jsxs(a.Fragment,{children:[a.jsx(Sd,{size:12})," Test"]})})]})}),a.jsx("p",{className:"text-gray-700 text-xs px-1",children:"Wake word and microphone can be reconfigured at any time in Settings → Voice."})]}),f===4&&a.jsxs("div",{className:"space-y-5",children:[a.jsx(Cp,{checked:mt,onChange:B,label:"Send anonymous crash reports",description:"Helps improve Must-b. No personal data, no conversation content — only error traces."}),a.jsxs("div",{className:"rounded-xl bg-white/3 border border-white/6 px-4 py-4 space-y-2",children:[a.jsx("p",{className:"text-[11px] font-bold text-gray-500 uppercase tracking-widest mb-2",children:"Configuration Summary"}),[{label:"Name",value:p||"—"},{label:"Language",value:((On=Np.find(P=>P.value===v))==null?void 0:On.label)??v},{label:"Provider",value:((nn=t.find(P=>P.id===m))==null?void 0:nn.label)??m},{label:"Workspace",value:(V||u).replace(/^.*\/([^/]+\/[^/]+)$/,"…/$1")},{label:"Wake Word",value:ve?"Enabled":"Disabled"}].map(P=>a.jsxs("div",{className:"flex items-center justify-between text-xs",children:[a.jsx("span",{className:"text-gray-600",children:P.label}),a.jsx("span",{className:"text-gray-300 font-mono truncate max-w-[200px]",children:P.value})]},P.label))]}),K&&a.jsx("div",{className:"rounded-xl bg-red-500/10 border border-red-500/20 px-4 py-3 text-red-400 text-sm",children:K}),a.jsx("button",{onClick:Dn,disabled:T,className:"w-full flex items-center justify-center gap-3 px-8 py-4 rounded-2xl bg-gradient-to-r from-orange-600 to-amber-600 hover:from-orange-500 hover:to-amber-500 text-white font-bold text-base transition-all shadow-lg shadow-orange-500/25 active:scale-[0.98] disabled:opacity-50 disabled:cursor-not-allowed",children:T?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"w-5 h-5 border-2 border-white/40 border-t-white rounded-full animate-spin"})," Initializing…"]}):a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"text-lg",children:"🚀"})," Initialize Must-b"]})})]})]},f)}),f<4&&a.jsxs("div",{className:"flex items-center justify-between mt-5",children:[a.jsxs("button",{onClick:()=>h(P=>P-1),disabled:f===0,className:"flex items-center gap-2 px-5 py-2.5 rounded-xl text-gray-400 hover:text-white hover:bg-white/5 transition-all disabled:opacity-25 disabled:cursor-not-allowed text-sm font-medium",children:[a.jsx(_c,{size:16})," Back"]}),a.jsxs("button",{onClick:()=>h(P=>P+1),disabled:!Z(),className:"flex items-center gap-2 px-6 py-2.5 rounded-xl bg-orange-600 hover:bg-orange-500 text-white font-semibold text-sm transition-all shadow-lg shadow-orange-500/20 active:scale-[0.97] disabled:opacity-40 disabled:cursor-not-allowed",children:["Continue ",a.jsx(pi,{size:16})]})]}),f===4&&a.jsx("div",{className:"flex justify-start mt-5",children:a.jsxs("button",{onClick:()=>h(3),className:"flex items-center gap-2 px-5 py-2.5 rounded-xl text-gray-400 hover:text-white hover:bg-white/5 transition-all text-sm font-medium",children:[a.jsx(_c,{size:16})," Back"]})}),a.jsxs("p",{className:"text-center text-xs text-gray-700 mt-5",children:["All settings saved locally · Run ",a.jsx("code",{className:"text-orange-500/60",children:"must-b doctor"})," to verify"]})]})]})}let Es=null;async function $j(){if(Es)return Es;try{const e=await fetch("/api/auth/local");if(e.ok)return Es=(await e.json()).token??null,Es}catch{}return null}async function X(e,t={}){const n=await $j(),r={"Content-Type":"application/json",...t.headers};n&&(r.Authorization=`Bearer ${n}`);const s=await fetch(e,{...t,headers:r});return s.status===401&&(Es=null,window.dispatchEvent(new CustomEvent("mustb:401",{detail:{url:e}}))),s}function Wj({onSend:e,disabled:t}){const[n,r]=y.useState(""),[s,i]=y.useState(!1),[o,l]=y.useState(!1),c=y.useRef(null),u=y.useRef(null);y.useEffect(()=>{var g;(g=c.current)==null||g.focus();const m=window.SpeechRecognition||window.webkitSpeechRecognition;l(!!m)},[]);const d=y.useRef(!1),f=y.useCallback(async()=>{if(!d.current)try{const m=await X("/api/system/vision-guidance");if(!m.ok)return;const g=await m.json();g.warn&&g.message&&(d.current=!0,e("__GUIDANCE__"+g.message))}catch{}},[e]),h=y.useCallback(()=>{const m=window.SpeechRecognition||window.webkitSpeechRecognition;if(!m)return;f();const g=new m;g.continuous=!1,g.interimResults=!0,g.lang="en-US",g.onresult=x=>{let j="";for(let k=x.resultIndex;k<x.results.length;k++)j+=x.results[k][0].transcript;r(j)},g.onend=()=>{i(!1),u.current=null},g.onerror=()=>{i(!1),u.current=null},u.current=g,g.start(),i(!0)},[]),p=y.useCallback(()=>{var m;(m=u.current)==null||m.stop(),i(!1)},[]),w=m=>{m.preventDefault(),s?p():h()};y.useEffect(()=>()=>{var m;(m=u.current)==null||m.stop()},[]);const v=()=>{const m=n.trim();!m||t||(s&&p(),r(""),e(m))},b=m=>{m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),v())};return y.useEffect(()=>{c.current&&(c.current.style.height="auto",c.current.style.height=`${Math.min(c.current.scrollHeight,200)}px`)},[n]),a.jsxs("div",{className:"w-full relative max-w-4xl mx-auto px-4",children:[a.jsxs("div",{className:"relative flex items-center w-full bg-[#111318]/80 backdrop-blur-xl border border-white/5 rounded-[28px] shadow-2xl transition-all duration-300 focus-within:border-orange-500/30 ring-1 ring-white/5 pr-4 pl-2 overflow-hidden group",children:[a.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-1/2 h-[1px] bg-gradient-to-r from-transparent via-orange-500/20 to-transparent"}),a.jsx("textarea",{ref:c,value:n,onChange:m=>r(m.target.value),onKeyDown:b,placeholder:s?"Listening…":"Ask Must-b anything…",className:"flex-1 bg-transparent border-none focus:ring-0 text-white placeholder-gray-500 py-4 px-6 resize-none min-h-[60px] max-h-[200px] overflow-y-auto scrollbar-hide text-[16px] leading-relaxed outline-none",disabled:t,rows:1}),a.jsxs("div",{className:"flex items-center gap-2",children:[o&&a.jsx("button",{type:"button",onMouseDown:w,title:s?"Stop listening":"Push to talk",className:ze("p-3 rounded-full transition-all duration-200",s?"text-orange-400 bg-orange-500/15 shadow-[0_0_12px_rgba(234,88,12,0.4)] animate-pulse":"text-gray-500 hover:text-orange-400 hover:bg-white/5"),children:s?a.jsx(kd,{size:20}):a.jsx(Sd,{size:20})}),a.jsx("button",{onClick:v,disabled:!n.trim()||t,className:ze("flex items-center justify-center w-11 h-11 rounded-full transition-all duration-300",n.trim()&&!t?"bg-orange-600 text-white hover:bg-orange-500 shadow-[0_0_15px_rgba(234,88,12,0.4)] active:scale-95":"text-gray-600 cursor-not-allowed"),children:t?a.jsx("div",{className:"w-4 h-4 border-2 border-white/30 border-t-white rounded-full animate-spin"}):a.jsx(Nj,{size:20,strokeWidth:2.5,className:ze(n.trim()?"translate-x-0.5":"text-orange-500/30")})})]})]}),s&&a.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 flex items-center gap-1 pointer-events-none",children:[0,1,2,3,4].map(m=>a.jsx("div",{className:"w-0.5 bg-orange-400 rounded-full animate-bounce",style:{height:`${6+m%3*4}px`,animationDelay:`${m*.1}s`,animationDuration:"0.6s"}},m))})]})}const It=Object.create(null);It.open="0";It.close="1";It.ping="2";It.pong="3";It.message="4";It.upgrade="5";It.noop="6";const mo=Object.create(null);Object.keys(It).forEach(e=>{mo[It[e]]=e});const Lc={type:"error",data:"parser error"},Gy=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",qy=typeof ArrayBuffer=="function",Yy=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Ed=({type:e,data:t},n,r)=>Gy&&t instanceof Blob?n?r(t):Ep(t,r):qy&&(t instanceof ArrayBuffer||Yy(t))?n?r(t):Ep(new Blob([t]),r):r(It[e]+(t||"")),Ep=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Tp(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let fl;function Hj(e,t){if(Gy&&e.data instanceof Blob)return e.data.arrayBuffer().then(Tp).then(t);if(qy&&(e.data instanceof ArrayBuffer||Yy(e.data)))return t(Tp(e.data));Ed(e,!1,n=>{fl||(fl=new TextEncoder),t(fl.encode(n))})}const Pp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ts=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Pp.length;e++)Ts[Pp.charCodeAt(e)]=e;const Kj=e=>{let t=e.length*.75,n=e.length,r,s=0,i,o,l,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),d=new Uint8Array(u);for(r=0;r<n;r+=4)i=Ts[e.charCodeAt(r)],o=Ts[e.charCodeAt(r+1)],l=Ts[e.charCodeAt(r+2)],c=Ts[e.charCodeAt(r+3)],d[s++]=i<<2|o>>4,d[s++]=(o&15)<<4|l>>2,d[s++]=(l&3)<<6|c&63;return u},Gj=typeof ArrayBuffer=="function",Td=(e,t)=>{if(typeof e!="string")return{type:"message",data:Qy(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:qj(e.substring(1),t)}:mo[n]?e.length>1?{type:mo[n],data:e.substring(1)}:{type:mo[n]}:Lc},qj=(e,t)=>{if(Gj){const n=Kj(e);return Qy(n,t)}else return{base64:!0,data:e}},Qy=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Xy="",Yj=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{Ed(i,!1,l=>{r[o]=l,++s===n&&t(r.join(Xy))})})},Qj=(e,t)=>{const n=e.split(Xy),r=[];for(let s=0;s<n.length;s++){const i=Td(n[s],t);if(r.push(i),i.type==="error")break}return r};function Xj(){return new TransformStream({transform(e,t){Hj(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const i=new DataView(s.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{s=new Uint8Array(9);const i=new DataView(s.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let hl;function qi(e){return e.reduce((t,n)=>t+n.length,0)}function Yi(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Jj(e,t){hl||(hl=new TextDecoder);const n=[];let r=0,s=-1,i=!1;return new TransformStream({transform(o,l){for(n.push(o);;){if(r===0){if(qi(n)<1)break;const c=Yi(n,1);i=(c[0]&128)===128,s=c[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(qi(n)<2)break;const c=Yi(n,2);s=new DataView(c.buffer,c.byteOffset,c.length).getUint16(0),r=3}else if(r===2){if(qi(n)<8)break;const c=Yi(n,8),u=new DataView(c.buffer,c.byteOffset,c.length),d=u.getUint32(0);if(d>Math.pow(2,21)-1){l.enqueue(Lc);break}s=d*Math.pow(2,32)+u.getUint32(4),r=3}else{if(qi(n)<s)break;const c=Yi(n,s);l.enqueue(Td(i?c:hl.decode(c),t)),r=0}if(s===0||s>e){l.enqueue(Lc);break}}}})}const Jy=4;function be(e){if(e)return Zj(e)}function Zj(e){for(var t in be.prototype)e[t]=be.prototype[t];return e}be.prototype.on=be.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};be.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};be.prototype.off=be.prototype.removeListener=be.prototype.removeAllListeners=be.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};be.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this};be.prototype.emitReserved=be.prototype.emit;be.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};be.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ba=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),ut=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),eN="arraybuffer";function Zy(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const tN=ut.setTimeout,nN=ut.clearTimeout;function ka(e,t){t.useNativeTimers?(e.setTimeoutFn=tN.bind(ut),e.clearTimeoutFn=nN.bind(ut)):(e.setTimeoutFn=ut.setTimeout.bind(ut),e.clearTimeoutFn=ut.clearTimeout.bind(ut))}const rN=1.33;function sN(e){return typeof e=="string"?iN(e):Math.ceil((e.byteLength||e.size)*rN)}function iN(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function ex(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function oN(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function aN(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class lN extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Pd extends be{constructor(t){super(),this.writable=!1,ka(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new lN(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Td(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=oN(t);return n.length?"?"+n:""}}class cN extends Pd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};Qj(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,Yj(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=ex()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let tx=!1;try{tx=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const uN=tx;function dN(){}class fN extends cN{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,i)=>{this.onError("xhr post error",s,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Vt extends be{constructor(t,n,r){super(),this.createRequest=t,ka(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=Zy(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=Vt.requestsCount++,Vt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=dN,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete Vt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}Vt.requestsCount=0;Vt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",_p);else if(typeof addEventListener=="function"){const e="onpagehide"in ut?"pagehide":"unload";addEventListener(e,_p,!1)}}function _p(){for(let e in Vt.requests)Vt.requests.hasOwnProperty(e)&&Vt.requests[e].abort()}const hN=function(){const e=nx({xdomain:!1});return e&&e.responseType!==null}();class pN extends fN{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=hN&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Vt(nx,this.uri(),t)}}function nx(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||uN))return new XMLHttpRequest}catch{}if(!t)try{return new ut[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const rx=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class mN extends Pd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=rx?{}:Zy(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;Ed(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&ba(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=ex()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const pl=ut.WebSocket||ut.MozWebSocket;class gN extends mN{createSocket(t,n,r){return rx?new pl(t,n,r):n?new pl(t,n):new pl(t)}doWrite(t,n){this.ws.send(n)}}class yN extends Pd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=Jj(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=Xj();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const i=()=>{r.read().then(({done:l,value:c})=>{l||(this.onPacket(c),i())}).catch(l=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&ba(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const xN={websocket:gN,webtransport:yN,polling:pN},vN=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,wN=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Dc(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=vN.exec(e||""),i={},o=14;for(;o--;)i[wN[o]]=s[o]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=bN(i,i.path),i.queryKey=kN(i,i.query),i}function bN(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function kN(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const Oc=typeof addEventListener=="function"&&typeof removeEventListener=="function",go=[];Oc&&addEventListener("offline",()=>{go.forEach(e=>e())},!1);class Nn extends be{constructor(t,n){if(super(),this.binaryType=eN,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Dc(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Dc(n.host).host);ka(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=aN(this.opts.query)),Oc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},go.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Jy,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Nn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Nn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=sN(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,ba(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Nn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Oc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=go.indexOf(this._offlineEventListener);r!==-1&&go.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Nn.protocol=Jy;class SN extends Nn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Nn.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Nn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function i(){r||(r=!0,d(),n.close(),n=null)}const o=f=>{const h=new Error("probe error: "+f);h.transport=n.name,i(),this.emitReserved("upgradeError",h)};function l(){o("transport closed")}function c(){o("socket closed")}function u(f){n&&f.name!==n.name&&i()}const d=()=>{n.removeListener("open",s),n.removeListener("error",o),n.removeListener("close",l),this.off("close",c),this.off("upgrading",u)};n.once("open",s),n.once("error",o),n.once("close",l),this.once("close",c),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let jN=class extends SN{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(s=>xN[s]).filter(s=>!!s)),super(t,r)}};function NN(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Dc(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const CN=typeof ArrayBuffer=="function",EN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,sx=Object.prototype.toString,TN=typeof Blob=="function"||typeof Blob<"u"&&sx.call(Blob)==="[object BlobConstructor]",PN=typeof File=="function"||typeof File<"u"&&sx.call(File)==="[object FileConstructor]";function _d(e){return CN&&(e instanceof ArrayBuffer||EN(e))||TN&&e instanceof Blob||PN&&e instanceof File}function yo(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(yo(e[n]))return!0;return!1}if(_d(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return yo(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&yo(e[n]))return!0;return!1}function _N(e){const t=[],n=e.data,r=e;return r.data=zc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function zc(e,t){if(!e)return e;if(_d(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=zc(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=zc(e[r],t));return n}return e}function RN(e,t){return e.data=Vc(e.data,t),delete e.attachments,e}function Vc(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Vc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Vc(e[n],t));return e}const MN=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Y;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Y||(Y={}));class AN{constructor(t){this.replacer=t}encode(t){return(t.type===Y.EVENT||t.type===Y.ACK)&&yo(t)?this.encodeAsBinary({type:t.type===Y.EVENT?Y.BINARY_EVENT:Y.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Y.BINARY_EVENT||t.type===Y.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=_N(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Rd extends be{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Y.BINARY_EVENT;r||n.type===Y.BINARY_ACK?(n.type=r?Y.EVENT:Y.ACK,this.reconstructor=new LN(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(_d(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Y[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Y.BINARY_EVENT||r.type===Y.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(i,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const i=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(Rd.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case Y.CONNECT:return Rp(n);case Y.DISCONNECT:return n===void 0;case Y.CONNECT_ERROR:return typeof n=="string"||Rp(n);case Y.EVENT:case Y.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&MN.indexOf(n[0])===-1);case Y.ACK:case Y.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class LN{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=RN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Rp(e){return Object.prototype.toString.call(e)==="[object Object]"}const DN=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Rd,Encoder:AN,get PacketType(){return Y}},Symbol.toStringTag,{value:"Module"}));function jt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const ON=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ix extends be{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[jt(t,"open",this.onopen.bind(this)),jt(t,"packet",this.onpacket.bind(this)),jt(t,"error",this.onerror.bind(this)),jt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,i;if(ON.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:Y.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,f=n.pop();this._registerAckCallback(d,f),o.id=d}const l=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,c=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!l||(c?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},s),o=(...l)=>{this.io.clearTimeoutFn(i),n.apply(this,l)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(o,l)=>o?s(o):r(l);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Y.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Y.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Y.EVENT:case Y.BINARY_EVENT:this.onevent(t);break;case Y.ACK:case Y.BINARY_ACK:this.onack(t);break;case Y.DISCONNECT:this.ondisconnect();break;case Y.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:Y.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Y.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function os(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}os.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};os.prototype.reset=function(){this.attempts=0};os.prototype.setMin=function(e){this.ms=e};os.prototype.setMax=function(e){this.max=e};os.prototype.setJitter=function(e){this.jitter=e};class Bc extends be{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ka(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new os({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||DN;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new jN(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=jt(n,"open",function(){r.onopen(),t&&t()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},o=jt(n,"error",i);if(this._timeout!==!1){const l=this._timeout,c=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),n.close()},l);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(jt(t,"ping",this.onping.bind(this)),jt(t,"data",this.ondata.bind(this)),jt(t,"error",this.onerror.bind(this)),jt(t,"close",this.onclose.bind(this)),jt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){ba(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new ix(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const vs={};function $s(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=NN(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=vs[s]&&i in vs[s].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let c;return l?c=new Bc(r,t):(vs[s]||(vs[s]=new Bc(r,t)),c=vs[s]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign($s,{Manager:Bc,Socket:ix,io:$s,connect:$s});let Qi=null;function as(){return Qi||(Qi=$s(window.location.origin,{transports:["websocket","polling"]}),Qi.on("agentUpdate",e=>{try{e!=null&&window.dispatchEvent(new CustomEvent("mustb:agentUpdate",{detail:e}))}catch{}})),Qi}function Wn(e){if(typeof e=="string")return e;if(e==null)return"";if(typeof e=="object"){const t=e,n=t.message??t.error??t.text??t.content??t.result;return n!==void 0?Wn(n):JSON.stringify(e)}return String(e)}function zN(e,t){switch(e){case"planGenerated":{const n=t.steps;return`Plan ready — ${(n==null?void 0:n.length)??0} step(s)`}case"stepStart":{const n=t.step;return`▶ ${(n==null?void 0:n.description)??Wn(t.step)}`}case"stepFinish":{if(t.status==="error")return`✗ ${Wn(t.error)}`;const n=t.step,r=t.result!==void 0?Wn(t.result):void 0,s=(n==null?void 0:n.description)??"Step complete";return r&&r.length<180?`✓ ${s} → ${r}`:`✓ ${s}`}case"agentRepair":{const n=Wn(t.action),r=t.reason?` — ${Wn(t.reason).slice(0,120)}`:"";return`⟳ Repair: ${n}${r}`}default:return null}}function VN({lang:e,code:t}){const[n,r]=y.useState(!1),s=()=>{navigator.clipboard.writeText(t).catch(()=>{}),r(!0),setTimeout(()=>r(!1),2e3)};return a.jsxs("div",{className:"my-4 rounded-xl overflow-hidden border border-white/8 bg-[#0d1117]",children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-white/6 select-none",children:[a.jsx("span",{className:"text-[11px] font-mono text-gray-600",children:e||"code"}),a.jsx("button",{onClick:s,className:"flex items-center gap-1.5 text-[11px] text-gray-600 hover:text-orange-400 transition-colors",children:n?a.jsxs(a.Fragment,{children:[a.jsx(ss,{size:10,className:"text-green-400"}),a.jsx("span",{className:"text-green-400",children:"Copied"})]}):a.jsxs(a.Fragment,{children:[a.jsx(oj,{size:10}),"Copy"]})})]}),a.jsx("pre",{className:"overflow-x-auto px-4 py-3.5 text-[13px] text-gray-300 font-mono leading-relaxed whitespace-pre",children:a.jsx("code",{children:t})})]})}function fr(e,t){return e.split(/(`[^`\n]+`)/).map((r,s)=>{if(r.startsWith("`")&&r.endsWith("`")&&r.length>2)return a.jsx("code",{className:"px-1.5 py-0.5 rounded bg-white/8 text-orange-300/90 font-mono text-[13px]",children:r.slice(1,-1)},`${t}-ic${s}`);const i=r.split(/(\*\*[^*\n]+\*\*|\*[^*\n]+\*)/);return a.jsx(y.Fragment,{children:i.map((o,l)=>o.startsWith("**")&&o.endsWith("**")&&o.length>4?a.jsx("strong",{className:"font-semibold text-white",children:o.slice(2,-2)},`${t}-b${s}-${l}`):o.startsWith("*")&&o.endsWith("*")&&o.length>2?a.jsx("em",{className:"italic text-gray-300",children:o.slice(1,-1)},`${t}-em${s}-${l}`):a.jsx("span",{children:o},`${t}-s${s}-${l}`))},`${t}-bi${s}`)})}function BN({text:e}){const t=[],n=e.split(`
442
- `);let r=0,s=0;const i=()=>`md-${s++}`;for(;r<n.length;){const o=n[r],l=o.match(/^```(\w*)/);if(l){const h=l[1]??"",p=[];for(r++;r<n.length&&!n[r].startsWith("```");)p.push(n[r]),r++;r<n.length&&r++,t.push(a.jsx(VN,{lang:h,code:p.join(`
443
- `)},i()));continue}const c=o.match(/^### (.+)/);if(c){t.push(a.jsx("h3",{className:"text-base font-bold text-white mt-5 mb-1.5",children:fr(c[1],i())},i())),r++;continue}const u=o.match(/^## (.+)/);if(u){t.push(a.jsx("h2",{className:"text-lg font-bold text-white mt-6 mb-2",children:fr(u[1],i())},i())),r++;continue}const d=o.match(/^# (.+)/);if(d){t.push(a.jsx("h1",{className:"text-xl font-bold text-white mt-7 mb-2",children:fr(d[1],i())},i())),r++;continue}if(o.match(/^[-*]{3,}$/)){t.push(a.jsx("hr",{className:"border-white/8 my-5"},i())),r++;continue}if(o.match(/^[-*•] /)){const h=[];for(;r<n.length&&n[r].match(/^[-*•] /);)h.push(n[r].replace(/^[-*•] /,"")),r++;t.push(a.jsx("ul",{className:"my-3 space-y-1.5 pl-1",children:h.map((p,w)=>a.jsxs("li",{className:"flex items-start gap-2.5 text-gray-200 text-[15px] leading-relaxed",children:[a.jsx("span",{className:"mt-[8px] w-1.5 h-1.5 rounded-full bg-orange-500/60 flex-shrink-0"}),a.jsx("span",{children:fr(p,`ul-${w}`)})]},w))},i()));continue}if(o.match(/^\d+\. /)){const h=[];for(;r<n.length&&n[r].match(/^\d+\. /);)h.push(n[r].replace(/^\d+\. /,"")),r++;t.push(a.jsx("ol",{className:"my-3 space-y-1.5 pl-1",children:h.map((p,w)=>a.jsxs("li",{className:"flex items-start gap-2.5 text-gray-200 text-[15px] leading-relaxed",children:[a.jsxs("span",{className:"flex-shrink-0 mt-px text-orange-500/60 font-mono text-[13px] w-5 text-right",children:[w+1,"."]}),a.jsx("span",{children:fr(p,`ol-${w}`)})]},w))},i()));continue}if(o.trim()===""){r++;continue}const f=[];for(;r<n.length&&n[r].trim()!==""&&!n[r].match(/^(```|#{1,3} |[-*•] |\d+\. |[-*]{3,}$)/);)f.push(n[r]),r++;f.length&&t.push(a.jsx("p",{className:"text-gray-200 text-[15px] leading-[1.75] my-2",children:fr(f.join(" "),`p-${s}`)},i()))}return a.jsx("div",{children:t})}function IN({workflow:e,onDismiss:t}){const[n,r]=y.useState("idle"),[s,i]=y.useState(e.goal.slice(0,52)+(e.goal.length>52?"…":"")),o=async()=>{r("saving");try{const l=await X("/api/skills/save",{method:"POST",body:JSON.stringify({goal:e.goal,answer:e.answer,steps:e.steps,name:s.trim()||void 0})});if(!l.ok)throw new Error(`HTTP ${l.status}`);r("saved"),setTimeout(t,1800)}catch{r("error"),setTimeout(()=>r("idle"),3e3)}};return a.jsx(H.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2},className:"mt-4",children:a.jsx("div",{className:"flex items-center gap-3 px-4 py-2.5 rounded-xl bg-orange-500/6 border border-orange-500/20",children:n==="saved"?a.jsxs(a.Fragment,{children:[a.jsx(Bt,{size:13,className:"text-green-400 shrink-0"}),a.jsx("span",{className:"text-xs font-medium text-green-400",children:"Skill saved to your library!"})]}):a.jsxs(a.Fragment,{children:[a.jsx(tj,{size:13,className:"text-orange-400 shrink-0"}),a.jsx("span",{className:"text-[11px] text-gray-500 shrink-0 font-medium",children:"Save as Skill:"}),a.jsx("input",{value:s,onChange:l=>i(l.target.value),onKeyDown:l=>l.key==="Enter"&&n==="idle"&&o(),placeholder:"Skill name…",className:"flex-1 bg-transparent text-[12px] text-gray-200 outline-none placeholder-gray-600 min-w-0"}),a.jsx("button",{onClick:o,disabled:n!=="idle",className:"flex items-center gap-1 px-3 py-1 rounded-lg bg-orange-500/12 hover:bg-orange-500/22 border border-orange-500/22 text-orange-400 text-[11px] font-semibold transition-all shrink-0 disabled:opacity-50",children:n==="saving"?a.jsxs(a.Fragment,{children:[a.jsx(Ne,{size:10,className:"animate-spin"})," Saving…"]}):n==="error"?"Retry":"Save"}),a.jsx("button",{onClick:t,className:"text-gray-700 hover:text-gray-400 transition-colors text-[11px] shrink-0",children:"✕"})]})})})}class FN extends y.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t.message??"Unknown render error"}}componentDidCatch(t,n){console.error("[ChatErrorBoundary]",t,n.componentStack)}render(){return this.state.error?a.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center gap-3 p-8 text-center",children:[a.jsx("span",{className:"text-2xl",children:"⚠️"}),a.jsx("p",{className:"text-orange-400 font-bold text-sm",children:"Chat render error"}),a.jsx("p",{className:"text-gray-600 text-xs font-mono max-w-sm break-all",children:this.state.error}),a.jsx("button",{onClick:()=>this.setState({error:null}),className:"mt-1 px-4 py-2 rounded-xl bg-orange-500/10 border border-orange-500/20 text-orange-400 text-xs font-bold hover:bg-orange-500/20 transition-all",children:"Retry"})]}):this.props.children}}function UN(){const[e,t]=y.useState([]),n=y.useRef(null),r=y.useRef(null),s=e.some(l=>l.kind==="assistant"&&l.status==="pending");y.useEffect(()=>{const l=as();return l.on("agentUpdate",c=>{const{type:u,...d}=c;if(u==="planStart"){const p=`asst-${Date.now()}-${Math.random().toString(36).slice(2)}`;n.current=p,t(w=>[...w,{id:p,kind:"assistant",content:"",thoughts:[],status:"pending"}]);return}if(u==="finalAnswer"){const p=n.current;if(!p)return;const w=Wn(d.answer??"Done.");t(v=>v.map(b=>b.id===p?{...b,content:w}:b));return}if(u==="planFinish"){const p=n.current;if(!p)return;const w=d.status==="failed"?"error":"done",v=d.status==="completed"?{goal:String(d.goal??""),answer:String(d.answer??""),steps:d.steps??[]}:void 0;t(b=>b.map(m=>m.id===p?{...m,status:w,...v?{workflow:v}:{}}:m)),n.current=null;return}const f=zN(u,d);if(!f)return;const h=n.current;h&&t(p=>p.map(w=>w.id===h?{...w,thoughts:[...w.thoughts,f]}:w))}),()=>{l.off("agentUpdate")}},[]),y.useEffect(()=>{var l;(l=r.current)==null||l.scrollIntoView({behavior:"smooth"})},[e]);const i=async l=>{if(l.startsWith("__GUIDANCE__")){const u=l.slice(12);t(d=>[...d,{id:`guidance-${Date.now()}`,kind:"assistant",content:`ℹ ${u}`,thoughts:[],status:"done"}]);return}t(u=>u.map(d=>({...d,workflow:void 0})));const c=`user-${Date.now()}`;t(u=>[...u,{id:c,kind:"user",content:l,thoughts:[],status:"done"}]);try{await X("/api/goal",{method:"POST",body:JSON.stringify({goal:l})})}catch{}},o=e.length>0;return a.jsx(FN,{children:a.jsxs("div",{className:"flex-1 relative flex flex-col h-full overflow-hidden bg-[#02040a]",children:[a.jsx("div",{className:"absolute inset-0 pointer-events-none",children:a.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-[700px] h-[280px] bg-orange-900/8 rounded-full blur-[120px]"})}),a.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-hide relative z-10",children:a.jsxs("div",{className:"max-w-3xl mx-auto w-full px-6 pt-16 pb-8",children:[!o&&a.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[70vh] text-center select-none",children:[a.jsxs("div",{className:"relative w-36 h-36 mb-8 cursor-pointer group",children:[a.jsx("div",{className:"absolute inset-0 bg-orange-500 rounded-full blur-[55px] opacity-35 group-hover:opacity-55 transition-opacity duration-700 animate-pulse"}),a.jsx("div",{className:"absolute inset-4 bg-amber-400 rounded-full blur-[28px] opacity-12 group-hover:opacity-30 transition-opacity duration-700"}),a.jsx("img",{src:"/logo.png",alt:"Must-b",className:"w-full h-full object-contain relative z-10 drop-shadow-[0_0_28px_rgba(234,88,12,0.55)]"})]}),a.jsxs("h1",{className:"text-4xl font-extrabold text-white tracking-tight mb-3",children:["Must-b —"," ",a.jsx("span",{className:"text-transparent bg-clip-text bg-gradient-to-r from-orange-400 to-amber-400",children:"Your AI Brain"})]}),a.jsx("p",{className:"text-gray-500 text-base font-medium max-w-md leading-relaxed",children:"Ask questions, automate tasks, browse the web, manage files — all in one place."})]}),o&&a.jsxs("div",{children:[e.map(l=>{if(l.kind==="user")return a.jsx("div",{className:"flex justify-end mb-6",children:a.jsx("div",{className:"max-w-[78%]",children:a.jsx("div",{className:"bg-orange-600/10 border border-orange-500/20 rounded-2xl rounded-br-sm px-5 py-3.5 text-white text-[15px] leading-relaxed whitespace-pre-wrap",children:l.content})})},l.id);const c=l.thoughts.length>0,u=l.content.length>0,d=l.status==="pending",f=l.status==="error"&&!u;return a.jsxs("div",{className:"mb-10",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[a.jsxs("div",{className:"relative w-5 h-5 flex-shrink-0",children:[a.jsx("div",{className:"absolute inset-0 bg-orange-500/25 rounded-full blur-sm"}),a.jsx("img",{src:"/logo.png",alt:"Must-b",className:"w-full h-full object-contain relative z-10"})]}),a.jsx("span",{className:"text-[12px] font-semibold text-orange-400/80 tracking-wide",children:"Must-b"}),c&&a.jsxs("span",{className:"text-[10px] text-gray-700 font-mono",children:[l.thoughts.length," step",l.thoughts.length!==1?"s":""]})]}),c&&a.jsxs("details",{className:"mb-4 group",...u?{}:{open:!0},children:[a.jsxs("summary",{className:"flex items-center gap-1.5 cursor-pointer list-none select-none w-fit",children:[a.jsx(pi,{size:11,className:"text-gray-600 group-open:rotate-90 transition-transform duration-150 flex-shrink-0"}),a.jsx("span",{className:"text-[11px] font-medium text-gray-600 hover:text-gray-400 transition-colors",children:"Thought Process"})]}),a.jsx("div",{className:"mt-2.5 ml-3.5 pl-3.5 border-l border-white/6 space-y-1.5",children:l.thoughts.map((h,p)=>a.jsx("p",{className:"text-[12px] font-mono text-gray-600 leading-relaxed break-all",children:h},p))})]}),u?a.jsx(BN,{text:l.content}):d?a.jsx("div",{className:"flex items-center gap-1.5 py-1",children:[0,150,300].map(h=>a.jsx("div",{className:"w-1.5 h-1.5 bg-orange-400/70 rounded-full animate-bounce",style:{animationDelay:`-${h}ms`}},h))}):f?a.jsx("p",{className:"text-sm text-red-400/80",children:"Something went wrong. Please try again."}):null,a.jsx(me,{children:l.workflow&&!d&&a.jsx(IN,{workflow:l.workflow,onDismiss:()=>t(h=>h.map(p=>p.id===l.id?{...p,workflow:void 0}:p))})})]},l.id)}),a.jsx("div",{ref:r,className:"h-4"})]})]})}),a.jsx("div",{className:"relative z-10 border-t border-white/5 bg-[#02040a]/95 backdrop-blur-sm px-6 py-5",children:a.jsxs("div",{className:"max-w-3xl mx-auto",children:[a.jsx(Wj,{onSend:i,disabled:s}),a.jsx("p",{className:"text-center mt-3 text-[11px] text-gray-700 font-medium tracking-wide",children:"Must-b can make mistakes — verify critical information."})]})})]})})}const Xi={button:"rgba(234,88,12,0.7)",input:"rgba(59,130,246,0.7)",image:"rgba(168,85,247,0.6)",unknown:"rgba(255,255,255,0.3)"},$N={browse:Vy,write:wd,think:qr,exec:_j},WN={running:"bg-orange-500/8 border border-orange-500/20 text-orange-300",done:"bg-green-500/5 border border-green-500/10 text-gray-500",queued:"bg-white/2 border border-white/5 text-gray-600"},HN={mouseMove:wj,mouseClick:By,typeText:mj,visionClick:vd},KN={mouseMove:"text-gray-500",mouseClick:"text-orange-400",typeText:"text-blue-400",visionClick:"text-purple-400"};function GN(){const{t:e}=is(),[t,n]=y.useState(!1),[r,s]=y.useState(null),[i,o]=y.useState(null),[l,c]=y.useState(!1),u=y.useRef(null),[d,f]=y.useState(null),[h,p]=y.useState(!1),[w,v]=y.useState(()=>new Array(3).fill(null)),[b,m]=y.useState(0),[g,x]=y.useState([]),[j,k]=y.useState(null),[N,C]=y.useState([]),S=y.useRef(null),[M,R]=y.useState(!1),[V,U]=y.useState(!1);y.useEffect(()=>{if(!r||!u.current)return;const B=u.current,z=B.getContext("2d");if(!z)return;const E=new Image;E.onload=()=>{var T;if(B.width=E.width,B.height=E.height,z.drawImage(E,0,0),(T=r.elements)!=null&&T.length)for(const A of r.elements)z.strokeStyle=Xi[A.type]??Xi.unknown,z.lineWidth=Math.max(2,Math.round(E.width/400)),z.strokeRect(A.x,A.y,A.width,A.height),z.fillStyle=Xi[A.type]??Xi.unknown,z.font=`${Math.max(10,Math.round(E.width/120))}px monospace`,z.fillText(A.type,A.x+4,A.y+14)},E.src=`data:image/png;base64,${r.base64}`},[r]),y.useEffect(()=>{const B=as(),z=E=>{if(E.type==="SCREEN_CAPTURE_START"&&n(!0),E.type==="SCREEN_CAPTURED"&&(n(!1),s({base64:E.base64,width:E.width,height:E.height,source:E.source,elements:E.elements}),R(!1),U(!1)),E.type==="workflowStart"&&(k(E.goal??null),x(E.steps??[]),R(!1),U(!1)),E.type==="workflowStep"&&E.step){const T=E.step;x(A=>A.map(K=>K.id===T.id?T:K))}if(E.type==="workflowDone"&&setTimeout(()=>{x([]),k(null)},2500),E.type==="shadowFrame"&&typeof E.slot!="number"&&(f(E.base64),p(!0),R(!1)),E.type==="shadowToggle"&&typeof E.slot!="number"&&(p(E.enabled),E.enabled||f(null)),E.type==="ghostFrame"){const T=typeof E.slot=="number"?E.slot:-1;T>=0&&T<=2&&typeof E.base64=="string"&&(v(A=>{const K=[...A];return K[T]=E.base64,K}),R(!1))}if(E.type==="ghostSlot"){const T=typeof E.slot=="number"?E.slot:-1;T>=0&&T<=2&&m(T)}if(E.type==="shadowToggle"&&typeof E.slot=="number"){const T=E.slot;T>=0&&T<=2&&!E.enabled&&v(A=>{const K=[...A];return K[T]=null,K})}if(E.type==="inputAction"){const T={id:`${Date.now()}-${Math.random()}`,action:E.action??"mouseClick",label:E.label??"",timestamp:E.timestamp??Date.now()};C(A=>[...A.slice(-11),T]),R(!1),U(!1)}};return B.on("agentUpdate",z),()=>{B.off("agentUpdate",z)}},[]),y.useEffect(()=>{var B;(B=S.current)==null||B.scrollIntoView({behavior:"smooth"})},[N]);const ve=async()=>{if(!t){try{const B=await X("/api/system/vision-guidance");if(B.ok){const z=await B.json();z.warn&&z.message&&o(z.message)}}catch{}await X("/api/system/screenshot",{method:"POST",body:JSON.stringify({detect:!0})}).catch(()=>{})}},Ee=w.some(B=>B!==null);return!(r||g.length>0||N.length>0||t||h||Ee)||V?null:a.jsx(me,{children:a.jsxs(H.div,{initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.22},className:"mx-4 mb-3 bg-[#0a0d16] border border-orange-500/12 rounded-2xl overflow-hidden shadow-xl shadow-orange-500/4 shrink-0",children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-white/5",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"w-2 h-2 rounded-full bg-orange-500 animate-pulse"}),a.jsx("span",{className:"text-[10px] font-bold text-orange-400 uppercase tracking-widest",children:"War Room"}),r&&a.jsxs("span",{className:"text-[10px] text-gray-600 font-mono",children:[r.width,"×",r.height]}),h&&a.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-bold text-purple-400 bg-purple-500/10 border border-purple-500/25 px-2 py-0.5 rounded-full",children:[a.jsx(Rr,{size:9,className:"animate-pulse"}),"Shadow Active"]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("button",{onClick:ve,disabled:t,className:`flex items-center gap-1 px-2.5 py-1 rounded-lg text-[11px] font-medium transition-all ${t?"text-orange-400 bg-orange-500/10 animate-pulse cursor-not-allowed":"text-gray-600 hover:text-orange-400 hover:bg-orange-500/8 border border-white/5"}`,children:[a.jsx(Ac,{size:10}),t?"Scanning…":"Capture"]}),r&&a.jsx("button",{onClick:()=>c(B=>!B),className:"text-gray-700 hover:text-gray-400 transition-colors",title:l?"Collapse preview":"Expand preview",children:l?a.jsx(zy,{size:12}):a.jsx(vd,{size:12})}),a.jsx("button",{onClick:()=>R(B=>!B),className:"text-gray-700 hover:text-gray-400 transition-colors",title:M?"Expand war room":"Collapse war room",children:M?a.jsx(nj,{size:12}):a.jsx(rj,{size:12})}),a.jsx("button",{onClick:()=>U(!0),className:"text-gray-700 hover:text-red-400 transition-colors",title:"Dismiss war room",children:a.jsx(Cd,{size:12})})]})]}),a.jsx(me,{children:!M&&a.jsxs(H.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:[i&&a.jsxs("div",{className:"px-4 py-2 bg-amber-500/8 border-b border-amber-500/15 flex items-start justify-between gap-2",children:[a.jsx("p",{className:"text-[11px] text-amber-400 leading-relaxed flex-1",children:i}),a.jsx("button",{onClick:()=>o(null),className:"text-[10px] text-amber-600 hover:text-amber-400 shrink-0",children:"Dismiss"})]}),a.jsxs("div",{className:"flex gap-0 divide-x divide-white/5",children:[a.jsx("div",{className:"w-1/2 shrink-0",children:Ee&&w[b]?a.jsxs("div",{className:"flex flex-col",children:[a.jsx("div",{className:"flex border-b border-white/5",children:[0,1,2].map(B=>w[B]!==null&&a.jsxs("button",{onClick:()=>m(B),className:`flex items-center gap-0.5 px-2 py-1 text-[9px] font-bold transition-colors ${b===B?"text-purple-400 border-b-2 border-purple-500":"text-gray-600 hover:text-gray-400"}`,children:[a.jsx(Rr,{size:7})," G",B+1]},B))}),a.jsxs("div",{className:`relative overflow-hidden transition-all duration-300 ${l?"max-h-[300px]":"max-h-[110px]"}`,children:[a.jsx("img",{src:`data:image/jpeg;base64,${w[b]}`,alt:`Ghost ${b+1}`,className:"w-full object-contain"}),a.jsxs("div",{className:"absolute top-1.5 left-1.5 flex items-center gap-1 px-2 py-0.5 bg-black/75 rounded-lg text-[9px] font-bold text-purple-400 border border-purple-500/30",children:[a.jsx(Rr,{size:8,className:"animate-pulse"})," G",b+1]}),a.jsx("div",{className:"absolute bottom-1.5 right-1.5 px-1.5 py-0.5 bg-black/70 rounded text-[8px] font-mono text-purple-300 border border-purple-500/20",children:"LIVE"})]})]}):h&&d?a.jsxs("div",{className:`relative overflow-hidden transition-all duration-300 ${l?"max-h-[300px]":"max-h-[120px]"}`,children:[a.jsx("img",{src:`data:image/jpeg;base64,${d}`,alt:"Shadow browser",className:"w-full object-contain"}),a.jsxs("div",{className:"absolute top-1.5 left-1.5 flex items-center gap-1 px-2 py-0.5 bg-black/75 rounded-lg text-[9px] font-bold text-purple-400 border border-purple-500/30",children:[a.jsx(Rr,{size:8,className:"animate-pulse"})," SHADOW"]}),a.jsx("div",{className:"absolute bottom-1.5 right-1.5 px-1.5 py-0.5 bg-black/70 rounded text-[8px] font-mono text-purple-300 border border-purple-500/20",children:"LIVE"})]}):r?a.jsxs("div",{className:`relative overflow-hidden transition-all duration-300 ${l?"max-h-[300px]":"max-h-[120px]"}`,children:[a.jsx("canvas",{ref:u,className:"w-full object-contain",style:{imageRendering:"auto"}}),r.elements&&r.elements.length>0&&a.jsxs("div",{className:"absolute bottom-1.5 right-1.5 px-2 py-0.5 bg-black/70 rounded text-[9px] font-mono text-orange-400 border border-orange-500/20",children:[r.elements.length," elements"]})]}):t?a.jsxs("div",{className:"flex items-center justify-center gap-2 py-8 text-orange-400 text-xs animate-pulse",children:[a.jsx(Ac,{size:13,className:"animate-spin"})," Scanning…"]}):a.jsx("div",{className:"flex items-center justify-center py-8 text-gray-700 text-[11px]",children:"No capture yet"})}),a.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[g.length>0&&a.jsxs("div",{className:"border-b border-white/5",children:[j&&a.jsx("div",{className:"px-3 py-1.5 border-b border-white/4 bg-white/[0.01]",children:a.jsxs("p",{className:"text-[10px] text-gray-500 truncate",children:[e.workflow.goal,": ",a.jsx("span",{className:"text-gray-300",children:j})]})}),a.jsx("div",{className:"p-2 space-y-1 max-h-[100px] overflow-y-auto scrollbar-hide",children:g.map(B=>{const z=$N[B.type]??qr;return a.jsxs("div",{className:`flex items-center gap-2 px-2.5 py-1.5 rounded-xl text-[11px] font-medium ${WN[B.status]}`,children:[B.status==="running"?a.jsx(Ne,{size:11,className:"animate-spin text-orange-400 shrink-0"}):B.status==="done"?a.jsx(Bt,{size:11,className:"text-green-500 shrink-0"}):a.jsx(z,{size:11,className:"text-gray-600 shrink-0"}),a.jsx("span",{className:"flex-1 truncate",children:B.label})]},B.id)})})]}),N.length>0&&a.jsxs("div",{className:"flex-1 overflow-hidden",children:[a.jsx("div",{className:"px-3 py-1 border-b border-white/4",children:a.jsx("span",{className:"text-[9px] font-bold text-gray-600 uppercase tracking-widest",children:"Control Feed"})}),a.jsxs("div",{className:"px-2 py-1 space-y-px overflow-y-auto max-h-[100px] scrollbar-hide font-mono",children:[N.map(B=>{const z=HN[B.action]??By,E=KN[B.action]??"text-gray-500";return a.jsxs("div",{className:"flex items-center gap-1.5 py-0.5",children:[a.jsx(z,{size:10,className:`${E} shrink-0`}),a.jsx("span",{className:`text-[10px] ${E} truncate flex-1`,children:B.label}),a.jsx("span",{className:"text-[9px] text-gray-700 shrink-0 tabular-nums",children:new Date(B.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})})]},B.id)}),a.jsx("div",{ref:S})]})]})]})]})]})})]})})}function qN(){const[e,t]=y.useState(!1);return y.useEffect(()=>{const n=as();return n.on("agentUpdate",r=>{r.type==="SCREEN_CAPTURE_START"&&t(!0),(r.type==="SCREEN_CAPTURED"||r.type==="SCREEN_CAPTURE_END")&&setTimeout(()=>t(!1),700)}),()=>{n.off("agentUpdate")}},[]),a.jsx(me,{children:e&&a.jsxs(H.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.25},className:"fixed inset-0 z-[9999] pointer-events-none",children:[a.jsxs("div",{className:"absolute inset-0",children:[a.jsx("div",{className:"absolute top-0 left-0 w-12 h-12 border-t-2 border-l-2 border-orange-500/70"}),a.jsx("div",{className:"absolute top-0 right-0 w-12 h-12 border-t-2 border-r-2 border-orange-500/70"}),a.jsx("div",{className:"absolute bottom-0 left-0 w-12 h-12 border-b-2 border-l-2 border-orange-500/70"}),a.jsx("div",{className:"absolute bottom-0 right-0 w-12 h-12 border-b-2 border-r-2 border-orange-500/70"})]}),a.jsx(H.div,{className:"absolute left-0 right-0 h-[2px] bg-gradient-to-r from-transparent via-orange-500/60 to-transparent",animate:{top:["0%","100%"]},transition:{duration:1.4,repeat:1/0,ease:"linear"}}),a.jsx("div",{className:"absolute top-4 left-1/2 -translate-x-1/2",children:a.jsxs(H.div,{initial:{y:-10,opacity:0},animate:{y:0,opacity:1},className:"flex items-center gap-2 px-4 py-2 bg-black/80 border border-orange-500/30 rounded-full shadow-[0_0_20px_rgba(234,88,12,0.3)] backdrop-blur-xl",children:[a.jsxs("span",{className:"relative flex h-2 w-2",children:[a.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-orange-400 opacity-75"}),a.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-orange-500"})]}),a.jsx(Ac,{size:12,className:"text-orange-400 animate-spin"}),a.jsx("span",{className:"text-orange-300 text-xs font-semibold tracking-wide",children:"Scanning screen…"})]})})]},"scan-overlay")})}const YN={html:kp,htm:kp,json:hr,js:hr,ts:hr,tsx:hr,jsx:hr};function QN(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function XN(e){try{return new Date(e).toLocaleString("en-US",{dateStyle:"short",timeStyle:"short"})}catch{return e}}function JN(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,t=>{let n="color:#86efac";return/^"/.test(t)&&(n=/:$/.test(t)?"color:#93c5fd":"color:#fca5a5"),/true|false/.test(t)&&(n="color:#f97316"),/null/.test(t)&&(n="color:#6b7280"),`<span style="${n}">${t}</span>`})}function ZN(){const[e,t]=y.useState([]),[n,r]=y.useState(null),[s,i]=y.useState(null),[o,l]=y.useState(!1),[c,u]=y.useState(null),[d,f]=y.useState(!1),h=y.useCallback(async()=>{f(!0);try{const b=await X("/api/workspace/files");if(b.ok){const m=await b.json();t(m.files??[])}}catch{}f(!1)},[]);y.useEffect(()=>{h()},[h]);const p=async b=>{r(b),i(null),u(null),l(!0);try{const m=await X(`/api/workspace/file?p=${encodeURIComponent(b.rel)}`);if(!m.ok)throw new Error(`HTTP ${m.status}`);const g=await m.json();i(g.content+(g.truncated?`
444
-
445
- [… file truncated at 1.5 MB …]`:""))}catch(m){u(m instanceof Error?m.message:"Failed to load file")}l(!1)},w=b=>{const m=YN[b]??wd;return a.jsx(m,{size:12,className:"shrink-0 text-gray-500"})},v=()=>{if(o)return a.jsxs("div",{className:"flex items-center justify-center h-full text-gray-600 text-xs gap-2",children:[a.jsx(Zt,{size:14,className:"animate-spin"})," Loading…"]});if(c)return a.jsxs("div",{className:"flex items-center justify-center h-full gap-2 text-red-400 text-xs",children:[a.jsx(rr,{size:14})," ",c]});if(!s)return a.jsx("div",{className:"flex items-center justify-center h-full text-gray-700 text-xs",children:"Select a file to preview"});const b=(n==null?void 0:n.ext)??"";if(b==="html"||b==="htm")return a.jsx("iframe",{srcDoc:s,sandbox:"allow-scripts",className:"w-full h-full border-0 bg-white",title:"workspace-preview"});const m=b==="json"?JN(s):s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;");return a.jsx("pre",{className:"w-full h-full overflow-auto p-4 text-[11px] font-mono text-gray-300 leading-relaxed whitespace-pre-wrap break-words bg-transparent",dangerouslySetInnerHTML:{__html:m}})};return a.jsxs("div",{className:"flex h-full overflow-hidden bg-[#080b12]",children:[a.jsxs("div",{className:"w-52 shrink-0 border-r border-white/5 flex flex-col overflow-hidden",children:[a.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-white/5",children:[a.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:[a.jsx(wa,{size:11,className:"text-orange-400"}),"Workspace"]}),a.jsx("button",{onClick:h,disabled:d,className:"text-gray-700 hover:text-gray-400 transition-colors",title:"Refresh",children:a.jsx(Zt,{size:11,className:d?"animate-spin":""})})]}),a.jsx("div",{className:"flex-1 overflow-y-auto py-1 scrollbar-hide",children:e.length===0?a.jsx("p",{className:"text-[10px] text-gray-700 text-center py-6",children:"No files in workspace yet"}):e.map(b=>a.jsxs("button",{onClick:()=>p(b),className:`w-full flex items-center gap-2 px-3 py-1.5 text-left transition-colors group ${(n==null?void 0:n.rel)===b.rel?"bg-orange-500/10 text-orange-300":"text-gray-500 hover:text-gray-300 hover:bg-white/3"}`,children:[w(b.ext),a.jsx("span",{className:"text-[11px] truncate flex-1",children:b.name}),a.jsx(pi,{size:10,className:`shrink-0 opacity-0 group-hover:opacity-100 transition-opacity ${(n==null?void 0:n.rel)===b.rel?"opacity-100 text-orange-400":""}`})]},b.rel))})]}),a.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[a.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-white/5 bg-white/[0.015] shrink-0",children:[a.jsx(me,{mode:"wait",children:n?a.jsxs(H.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},exit:{opacity:0},className:"flex items-center gap-2 min-w-0",children:[a.jsx("span",{className:"text-[11px] font-mono text-gray-400 truncate",children:n.rel}),a.jsxs("span",{className:"text-[9px] text-gray-700 shrink-0",children:[QN(n.size)," · ",XN(n.mtime)]})]},n.rel):a.jsx("span",{className:"text-[11px] text-gray-700",children:"No file selected"})}),n&&(n.ext==="html"||n.ext==="htm")&&a.jsx("button",{onClick:()=>window.open(`/api/workspace/file?p=${encodeURIComponent(n.rel)}&raw=1`,"_blank"),className:"text-gray-600 hover:text-gray-300 transition-colors shrink-0 ml-2",title:"Open in new tab",children:a.jsx(dj,{size:12})})]}),a.jsx("div",{className:"flex-1 overflow-hidden relative",children:v()})]})]})}function e4(e){if(!e)return"Never";try{return new Date(e).toLocaleString("en-US",{dateStyle:"short",timeStyle:"short"})}catch{return e}}function t4(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function n4(){const[e,t]=y.useState([]),[n,r]=y.useState(!1),[s,i]=y.useState(null),[o,l]=y.useState("idle"),[c,u]=y.useState(null),[d,f]=y.useState(null),h=y.useCallback(async()=>{r(!0);try{const v=await X("/api/skills/list");if(v.ok){const b=await v.json();t(b.skills??[])}}catch{}r(!1)},[]);y.useEffect(()=>{h()},[h]),y.useEffect(()=>{const v=as(),b=m=>{m.type==="skillRunStart"&&m.skillId&&(i(m.skillId),l("running")),m.type==="planFinish"&&(l(m.type==="planFinish"?"done":"idle"),i(null),h(),setTimeout(()=>l("idle"),2500))};return v.on("agentUpdate",b),()=>{v.off("agentUpdate",b)}},[h]);const p=async v=>{if(!s){i(v.id),l("running");try{const b=await X("/api/skills/run",{method:"POST",body:JSON.stringify({id:v.id})});if(!b.ok)throw new Error(`HTTP ${b.status}`)}catch{l("error"),i(null),setTimeout(()=>l("idle"),3e3)}}},w=async v=>{u(v);try{await X(`/api/skills/${v}`,{method:"DELETE"}),t(b=>b.filter(m=>m.id!==v))}catch{}u(null),f(null)};return a.jsxs("div",{className:"h-full flex flex-col overflow-hidden bg-[#080b12]",children:[a.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-white/5 shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(ej,{size:14,className:"text-orange-400"}),a.jsx("span",{className:"text-[13px] font-bold text-gray-300",children:"Skill Library"}),e.length>0&&a.jsx("span",{className:"text-[10px] text-gray-600 bg-white/5 px-2 py-0.5 rounded-full font-mono",children:e.length})]}),a.jsx("button",{onClick:h,disabled:n,className:"text-gray-600 hover:text-gray-400 transition-colors",title:"Refresh",children:a.jsx(Zt,{size:13,className:n?"animate-spin":""})})]}),a.jsx(me,{children:o!=="idle"&&a.jsxs(H.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:`px-6 py-2 border-b flex items-center gap-2 text-xs font-medium ${o==="running"?"bg-orange-500/8 border-orange-500/15 text-orange-400":o==="done"?"bg-green-500/8 border-green-500/15 text-green-400":"bg-red-500/8 border-red-500/15 text-red-400"}`,children:[o==="running"&&a.jsx(Ne,{size:12,className:"animate-spin"}),o==="done"&&a.jsx(Bt,{size:12}),o==="error"&&a.jsx(rr,{size:12}),o==="running"?"Running skill…":o==="done"?"Skill completed":"Skill run failed"]})}),a.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-hide p-4 space-y-3",children:n&&e.length===0?a.jsxs("div",{className:"flex items-center justify-center py-16 text-gray-700 text-xs gap-2",children:[a.jsx(Ne,{size:13,className:"animate-spin"})," Loading skills…"]}):e.length===0?a.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[a.jsx(Pt,{size:36,className:"text-gray-700 mb-4"}),a.jsx("p",{className:"text-sm font-semibold text-gray-500",children:"No skills saved yet"}),a.jsxs("p",{className:"text-xs text-gray-700 mt-1 max-w-xs",children:["Complete a workflow in the Chat tab, then click"," ",a.jsx("span",{className:"text-orange-400 font-medium",children:"Save as Skill"})," to build your library."]})]}):e.map((v,b)=>{const m=s===v.id&&o==="running",g=s===v.id&&o==="done",x=c===v.id;return a.jsx(H.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:b*.04},className:`rounded-2xl border bg-[#0c0f18] transition-all ${m?"border-orange-500/30 shadow-[0_0_12px_rgba(234,88,12,0.12)]":g?"border-green-500/20":"border-white/6 hover:border-white/12"}`,children:a.jsxs("div",{className:"p-4",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[a.jsx(Pt,{size:13,className:"text-orange-400 shrink-0 mt-0.5"}),a.jsx("p",{className:"text-[13px] font-bold text-white truncate",children:v.name})]}),a.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] text-gray-600 shrink-0 font-mono",children:[a.jsx(Dy,{size:9}),v.runCount,"×"]})]}),a.jsx("p",{className:"text-[11px] text-gray-500 leading-relaxed mb-2 line-clamp-2",children:v.goal}),v.steps.length>0&&a.jsxs("div",{className:"flex flex-wrap gap-1 mb-3",children:[v.steps.slice(0,4).map((j,k)=>a.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded-md bg-white/4 text-gray-600 font-mono",children:j.tool??"step"},k)),v.steps.length>4&&a.jsxs("span",{className:"text-[9px] px-1.5 py-0.5 rounded-md bg-white/4 text-gray-600 font-mono",children:["+",v.steps.length-4," more"]})]}),a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-gray-700",children:[a.jsx(sj,{size:9}),a.jsx("span",{children:t4(v.savedAt)}),v.lastRunAt&&a.jsxs("span",{className:"text-gray-800",children:["· last run ",e4(v.lastRunAt)]})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[d===v.id?a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("span",{className:"text-[10px] text-red-400",children:"Delete?"}),a.jsx("button",{onClick:()=>w(v.id),disabled:x,className:"text-[10px] px-2 py-0.5 rounded bg-red-500/15 text-red-400 hover:bg-red-500/25 transition-colors",children:x?"…":"Yes"}),a.jsx("button",{onClick:()=>f(null),className:"text-[10px] px-2 py-0.5 rounded bg-white/5 text-gray-500 hover:bg-white/8",children:"No"})]}):a.jsx("button",{onClick:()=>f(v.id),className:"p-1.5 rounded-lg text-gray-700 hover:text-red-400 hover:bg-red-500/8 transition-all",title:"Delete skill",children:a.jsx(Nd,{size:12})}),a.jsx("button",{onClick:()=>p(v),disabled:!!s,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-[11px] font-semibold transition-all ${m?"bg-orange-500/15 text-orange-400 border border-orange-500/25 cursor-not-allowed":g?"bg-green-500/12 text-green-400 border border-green-500/20":"bg-orange-500/10 hover:bg-orange-500/20 text-orange-400 border border-orange-500/20 hover:border-orange-500/35 disabled:opacity-40 disabled:cursor-not-allowed"}`,children:m?a.jsxs(a.Fragment,{children:[a.jsx(Ne,{size:11,className:"animate-spin"})," Running…"]}):g?a.jsxs(a.Fragment,{children:[a.jsx(Bt,{size:11})," Done"]}):a.jsxs(a.Fragment,{children:[a.jsx(jd,{size:11})," Run"]})})]})]})]})},v.id)})})]})}function r4(e){return`${Math.round(e*100)}%`}const Mp={skill:{label:"Skill",icon:Pt,color:"text-orange-400"},conversation:{label:"Conversation",icon:bd,color:"text-blue-400"},workspace:{label:"Workspace",icon:wa,color:"text-green-400"},custom:{label:"Custom",icon:wd,color:"text-gray-400"}};function s4(){const[e,t]=y.useState(""),[n,r]=y.useState([]),[s,i]=y.useState(null),[o,l]=y.useState(!1),[c,u]=y.useState(null),[d,f]=y.useState(null),[h,p]=y.useState(!1),w=y.useRef(null),v=y.useCallback(async x=>{const j=x.trim();if(j){l(!0),r([]);try{const k=await X(`/api/memory/search?q=${encodeURIComponent(j)}&limit=10`);if(k.ok){const N=await k.json();r(N.results??[])}}catch{}l(!1)}},[]),b=x=>{x.key==="Enter"&&v(e)},m=y.useCallback(async()=>{try{const x=await X("/api/memory/stats");x.ok&&i(await x.json())}catch{}},[]),g=async x=>{u(x),f(null);try{const j=x==="clear"?await X("/api/memory/clear-index",{method:"DELETE"}):await X(`/api/memory/index-${x}`,{method:"POST"});if(j.ok){const k=await j.json(),N=x==="clear"?"Index cleared":`Indexed ${k.indexed??0} ${x==="skills"?"skills":"files"}`;f({ok:!0,msg:N}),m(),x==="clear"&&r([])}else f({ok:!1,msg:"Operation failed"})}catch{f({ok:!1,msg:"Request error"})}u(null),setTimeout(()=>f(null),4e3)};return a.jsxs("div",{className:"h-full flex flex-col overflow-hidden bg-[#080b12]",children:[a.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-white/5 shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(qr,{size:14,className:"text-orange-400"}),a.jsx("span",{className:"text-[13px] font-bold text-gray-300",children:"Memory Insights"}),s&&a.jsxs("span",{className:"text-[10px] text-gray-600 bg-white/5 px-2 py-0.5 rounded-full font-mono",children:[s.items.toLocaleString()," vectors"]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:()=>{p(x=>!x),s||m()},className:`text-gray-600 hover:text-gray-400 transition-colors ${h?"text-orange-400":""}`,title:"Index controls",children:a.jsx(Tj,{size:13})}),a.jsx("button",{onClick:m,className:"text-gray-600 hover:text-gray-400 transition-colors",title:"Refresh stats",children:a.jsx(Zt,{size:13})})]})]}),a.jsx(me,{children:h&&a.jsxs(H.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"border-b border-white/5 bg-white/2 overflow-hidden shrink-0",children:[a.jsxs("div",{className:"px-6 py-3 flex flex-wrap items-center gap-2",children:[a.jsx("span",{className:"text-[10px] text-gray-600 uppercase tracking-widest font-bold shrink-0",children:"Index:"}),["skills","workspace"].map(x=>a.jsxs("button",{onClick:()=>g(x),disabled:c!==null,className:"flex items-center gap-1 px-2.5 py-1 rounded-lg bg-white/4 border border-white/6 text-[11px] text-gray-400 hover:text-gray-200 hover:bg-white/8 transition-all disabled:opacity-40 capitalize",children:[c===x?a.jsx(Ne,{size:10,className:"animate-spin"}):x==="skills"?a.jsx(Pt,{size:10}):a.jsx(wa,{size:10}),x]},x)),a.jsxs("button",{onClick:()=>g("clear"),disabled:c!==null,className:"flex items-center gap-1 px-2.5 py-1 rounded-lg bg-red-500/8 border border-red-500/15 text-[11px] text-red-400 hover:bg-red-500/15 transition-all disabled:opacity-40 ml-auto",children:[c==="clear"?a.jsx(Ne,{size:10,className:"animate-spin"}):a.jsx(Nd,{size:10}),"Clear Index"]})]}),a.jsx(me,{children:d&&a.jsxs(H.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:`flex items-center gap-1.5 px-6 pb-3 text-[11px] font-medium ${d.ok?"text-green-400":"text-red-400"}`,children:[d.ok?a.jsx(Bt,{size:11}):a.jsx(rr,{size:11}),d.msg]})})]})}),a.jsxs("div",{className:"px-6 py-3 border-b border-white/5 shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-xl bg-white/4 border border-white/8 focus-within:border-orange-500/30 transition-colors",children:[a.jsx(Fy,{size:13,className:"text-gray-600 shrink-0"}),a.jsx("input",{ref:w,value:e,onChange:x=>t(x.target.value),onKeyDown:b,placeholder:"Search your memory…",className:"flex-1 bg-transparent text-[13px] text-gray-200 outline-none placeholder-gray-700"}),o?a.jsx(Ne,{size:13,className:"text-orange-400 animate-spin shrink-0"}):a.jsx("button",{onClick:()=>v(e),disabled:!e.trim(),className:"text-[10px] px-2 py-0.5 rounded-lg bg-orange-500/12 text-orange-400 font-semibold hover:bg-orange-500/22 border border-orange-500/20 transition-all disabled:opacity-30",children:"⌘↵"})]}),a.jsx("p",{className:"text-[10px] text-gray-700 mt-1.5 ml-1",children:"Semantic similarity search — press Enter or click to search"})]}),a.jsxs("div",{className:"flex-1 overflow-y-auto scrollbar-hide p-4 space-y-3",children:[n.length===0&&!o&&a.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[a.jsx(qr,{size:36,className:"text-gray-700 mb-4"}),a.jsx("p",{className:"text-sm font-semibold text-gray-500",children:e.trim()?"No memories found":"Search your AI memory"}),a.jsx("p",{className:"text-xs text-gray-700 mt-1 max-w-xs leading-relaxed",children:e.trim()?"Try a different phrase or index more content using the controls above.":"Type a phrase to find semantically similar skills, conversations, and workspace files."})]}),n.map((x,j)=>{const k=Mp[x.metadata.source]??Mp.custom,N=k.icon;return a.jsxs(H.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:j*.04},className:"rounded-2xl border border-white/6 bg-[#0c0f18] p-4 hover:border-white/12 transition-all",children:[a.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[a.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[a.jsx(N,{size:11,className:`${k.color} shrink-0`}),a.jsx("p",{className:"text-[12px] font-semibold text-gray-300 truncate",children:x.metadata.title})]}),a.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[a.jsx("span",{className:`text-[9px] font-bold px-1.5 py-0.5 rounded-full border ${x.score>=.85?"bg-green-500/10 border-green-500/20 text-green-400":x.score>=.65?"bg-orange-500/10 border-orange-500/20 text-orange-400":"bg-white/4 border-white/6 text-gray-500"}`,children:r4(x.score)}),a.jsx("span",{className:`text-[9px] px-1.5 py-0.5 rounded-full bg-white/4 border border-white/6 font-medium ${k.color}`,children:k.label})]})]}),a.jsx("p",{className:"text-[11px] text-gray-500 leading-relaxed line-clamp-3 mb-2",children:x.text}),x.metadata.tags&&x.metadata.tags.length>0&&a.jsx("div",{className:"flex flex-wrap gap-1",children:x.metadata.tags.map((C,S)=>a.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded-md bg-white/4 text-gray-600 font-mono",children:C},S))}),a.jsx("div",{className:"mt-2 h-0.5 bg-white/4 rounded-full overflow-hidden",children:a.jsx("div",{className:"h-full rounded-full bg-gradient-to-r from-orange-600 to-amber-400",style:{width:`${x.score*100}%`}})})]},j)})]})]})}const i4={node:Oy,python:hr},o4={node:"text-green-400",python:"text-blue-400"};function a4(){const[e,t]=y.useState([]),[n,r]=y.useState(!1),[s,i]=y.useState(null),[o,l]=y.useState(null),[c,u]=y.useState(!1),[d,f]=y.useState(""),[h,p]=y.useState(""),[w,v]=y.useState("node"),[b,m]=y.useState(""),[g,x]=y.useState(!1),j=(S,M)=>{l({ok:S,msg:M}),setTimeout(()=>l(null),4e3)},k=y.useCallback(async()=>{r(!0);try{const S=await X("/api/plugins/list");if(S.ok){const M=await S.json();t(M.plugins??[])}}catch{}r(!1)},[]);y.useEffect(()=>{k()},[k]);const N=async(S,M)=>{i(S);try{(await X(M?"/api/plugins/stop":"/api/plugins/run",{method:"POST",body:JSON.stringify({name:S})})).ok?(j(!0,M?`${S} stopped`:`${S} launched`),await k()):j(!1,"Operation failed")}catch{j(!1,"Request error")}i(null)},C=async()=>{if(!(!d.trim()||!h.trim())){x(!0);try{(await X("/api/plugins/build",{method:"POST",body:JSON.stringify({name:d.trim(),goal:h.trim(),lang:w,context:b.trim()||void 0})})).ok?(j(!0,`Plugin "${d}" created`),f(""),p(""),m(""),u(!1),await k()):j(!1,"Build failed")}catch{j(!1,"Request error")}x(!1)}};return a.jsxs("div",{className:"h-full flex flex-col overflow-hidden bg-[#080b12]",children:[a.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-white/5 shrink-0",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Mc,{size:14,className:"text-orange-400"}),a.jsx("span",{className:"text-[13px] font-bold text-gray-300",children:"Plugin Architect"}),a.jsxs("span",{className:"text-[10px] text-gray-600 bg-white/5 px-2 py-0.5 rounded-full font-mono",children:[e.length," installed"]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:k,className:"text-gray-600 hover:text-gray-400 transition-colors",title:"Refresh",children:a.jsx(Zt,{size:13,className:n?"animate-spin":""})}),a.jsxs("button",{onClick:()=>u(S=>!S),className:`flex items-center gap-1 text-[10px] px-2.5 py-1 rounded-lg border font-semibold transition-all ${c?"bg-orange-500/15 border-orange-500/25 text-orange-400":"bg-white/4 border-white/8 text-gray-500 hover:text-gray-300"}`,children:[a.jsx(Iy,{size:10}),"New Plugin"]})]})]}),a.jsx(me,{children:o&&a.jsxs(H.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:`flex items-center gap-1.5 px-6 py-2 text-[11px] font-medium shrink-0 ${o.ok?"text-green-400":"text-red-400"}`,children:[o.ok?a.jsx(Bt,{size:11}):a.jsx(rr,{size:11}),o.msg]})}),a.jsx(me,{children:c&&a.jsx(H.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"border-b border-white/5 bg-white/2 overflow-hidden shrink-0",children:a.jsxs("div",{className:"px-6 py-4 space-y-3",children:[a.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:"Build New Plugin"}),a.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a.jsx("input",{value:d,onChange:S=>f(S.target.value),placeholder:"Plugin name (e.g. weather-monitor)",className:"col-span-2 px-3 py-2 rounded-lg bg-white/4 border border-white/8 text-[12px] text-gray-200 outline-none placeholder-gray-700 focus:border-orange-500/30 transition-colors"}),a.jsx("input",{value:h,onChange:S=>p(S.target.value),placeholder:"Goal (e.g. poll OpenWeather API every 5 min)",className:"col-span-2 px-3 py-2 rounded-lg bg-white/4 border border-white/8 text-[12px] text-gray-200 outline-none placeholder-gray-700 focus:border-orange-500/30 transition-colors"}),a.jsx("input",{value:b,onChange:S=>m(S.target.value),placeholder:"Optional context / notes",className:"col-span-2 px-3 py-2 rounded-lg bg-white/4 border border-white/8 text-[12px] text-gray-200 outline-none placeholder-gray-700 focus:border-orange-500/30 transition-colors"}),a.jsx("div",{className:"flex gap-2",children:["node","python"].map(S=>a.jsx("button",{onClick:()=>v(S),className:`flex-1 py-1.5 rounded-lg border text-[11px] font-semibold transition-all capitalize ${w===S?"bg-orange-500/15 border-orange-500/25 text-orange-400":"bg-white/4 border-white/8 text-gray-500"}`,children:S},S))}),a.jsxs("button",{onClick:C,disabled:g||!d.trim()||!h.trim(),className:"flex items-center justify-center gap-1.5 py-2 rounded-lg bg-orange-500/12 border border-orange-500/20 text-orange-400 text-[11px] font-bold hover:bg-orange-500/20 transition-all disabled:opacity-40",children:[g?a.jsx(Ne,{size:11,className:"animate-spin"}):a.jsx(Pt,{size:11}),"Generate Plugin"]})]})]})})}),a.jsxs("div",{className:"flex-1 overflow-y-auto scrollbar-hide p-4 space-y-2",children:[e.length===0&&!n&&a.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[a.jsx(Mc,{size:36,className:"text-gray-700 mb-4"}),a.jsx("p",{className:"text-sm font-semibold text-gray-500",children:"No plugins installed"}),a.jsx("p",{className:"text-xs text-gray-700 mt-1",children:'Click "New Plugin" to generate your first plugin.'})]}),e.map((S,M)=>{const R=i4[S.lang]??Oy,V=s===S.name;return a.jsxs(H.div,{initial:{opacity:0,y:8},animate:{opacity:1,y:0},transition:{delay:M*.04},className:`flex items-center gap-3 p-3 rounded-2xl border transition-all ${S.running?"bg-green-500/5 border-green-500/15 hover:border-green-500/25":"bg-[#0c0f18] border-white/6 hover:border-white/12"}`,children:[a.jsx(R,{size:13,className:o4[S.lang]??"text-gray-400"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"text-[12px] font-semibold text-gray-300 truncate",children:S.name}),a.jsx("p",{className:"text-[10px] text-gray-600 font-mono",children:S.filename})]}),S.running&&a.jsx("span",{className:"text-[9px] px-1.5 py-0.5 rounded-full bg-green-500/12 border border-green-500/20 text-green-400 font-bold",children:"RUNNING"}),a.jsxs("button",{disabled:V,onClick:()=>N(S.name,S.running),className:`flex items-center gap-1 px-2.5 py-1.5 rounded-lg border text-[10px] font-bold transition-all disabled:opacity-40 ${S.running?"bg-red-500/8 border-red-500/15 text-red-400 hover:bg-red-500/15":"bg-green-500/8 border-green-500/15 text-green-400 hover:bg-green-500/15"}`,children:[V?a.jsx(Ne,{size:10,className:"animate-spin"}):S.running?a.jsx(Pj,{size:10}):a.jsx(jd,{size:10}),S.running?"Stop":"Run"]})]},S.name)})]})]})}const l4=[{id:"chat",icon:bd,label:"Chat"},{id:"workspace",icon:wa,label:"Workspace"},{id:"skills",icon:Pt,label:"Skills"},{id:"memory",icon:qr,label:"Memory"},{id:"plugins",icon:Mc,label:"Plugins"}];function c4(){const[e,t]=y.useState("chat");return y.useEffect(()=>{const n=as(),r=s=>{try{if(s!=null&&typeof s=="object"&&"type"in s){const i=s.type;(i==="planStart"||i==="skillRunStart")&&t("chat")}}catch{}};return n.on("agentUpdate",r),()=>{n.off("agentUpdate",r)}},[]),a.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[a.jsx(qN,{}),a.jsx(GN,{}),a.jsx("div",{className:"flex items-center gap-1 px-4 py-2 border-b border-white/5 bg-black/10 shrink-0",children:l4.map(({id:n,icon:r,label:s})=>a.jsxs("button",{onClick:()=>t(n),className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[12px] font-medium transition-all ${e===n?"bg-orange-500/12 text-orange-400 border border-orange-500/20":"text-gray-600 hover:text-gray-300 hover:bg-white/4"}`,children:[a.jsx(r,{size:13}),s]},n))}),a.jsxs("div",{className:"flex-1 min-h-0 overflow-hidden",children:[e==="chat"&&a.jsx(UN,{}),e==="workspace"&&a.jsx(ZN,{}),e==="skills"&&a.jsx(n4,{}),e==="memory"&&a.jsx(s4,{}),e==="plugins"&&a.jsx(a4,{})]})]})}const ml=[{id:"openrouter",label:"OpenRouter",placeholder:"sk-or-v1-..."},{id:"openai",label:"OpenAI",placeholder:"sk-..."},{id:"anthropic",label:"Anthropic",placeholder:"sk-ant-..."},{id:"ollama",label:"Ollama (local)",placeholder:"ollama (no key needed)"}];function u4(){const[e,t]=y.useState(null),[n,r]=y.useState("openrouter"),[s,i]=y.useState(""),[o,l]=y.useState(!1),[c,u]=y.useState(!1),[d,f]=y.useState(!1),[h,p]=y.useState(null),[w,v]=y.useState(null),[b,m]=y.useState(!!window.__MUSTB_NEED_API_KEY);y.useEffect(()=>{X("/api/setup/status").then(C=>C.ok?C.json():null).then(C=>{C&&(t(C),C.provider&&r(C.provider))}).catch(()=>{});const N=()=>{m(!0),window.__MUSTB_NEED_API_KEY=!0};return window.addEventListener("mustb:401",N),()=>window.removeEventListener("mustb:401",N)},[]);const g=async()=>{u(!0),p(null);try{const C=await(await X("/api/setup/test-key",{method:"POST",body:JSON.stringify({provider:n,apiKey:s||void 0})})).json();p({ok:C.ok,msg:C.message??(C.ok?"Connection successful":"Connection failed")})}catch{p({ok:!1,msg:"Gateway unreachable"})}u(!1)},x=async()=>{if(!(!s.trim()&&n!=="ollama")){f(!0),v(null);try{const N=await X("/api/setup/update-key",{method:"POST",body:JSON.stringify({provider:n,apiKey:s})});if(N.ok){v("API key saved."),i(""),window.__MUSTB_NEED_API_KEY=!1,m(!1);const C=await X("/api/setup/status");C.ok&&t(await C.json())}else{const C=await N.json();v(C.error??"Failed to save.")}}catch{v("Gateway unreachable.")}f(!1),setTimeout(()=>v(null),5e3)}},j=ml.find(N=>N.id===n)??ml[0],k=n==="ollama";return a.jsx("div",{className:"h-full overflow-y-auto p-6 font-sans",children:a.jsxs("div",{className:"max-w-xl mx-auto space-y-5",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("div",{className:"w-10 h-10 rounded-2xl bg-orange-500/10 border border-orange-500/20 flex items-center justify-center shrink-0",children:a.jsx(Qo,{size:18,className:"text-orange-400"})}),a.jsxs("div",{children:[a.jsx("h1",{className:"text-lg font-bold text-white",children:"Settings"}),a.jsxs("p",{className:"text-[12px] text-gray-500",children:[e!=null&&e.name?`Signed in as ${e.name}`:"Configure Must-b",e!=null&&e.mode?` · ${e.mode} mode`:""]})]})]}),b&&a.jsxs("div",{className:"flex items-start gap-3 px-4 py-3 rounded-xl bg-red-500/10 border border-red-500/25 text-red-300",children:[a.jsx(Us,{size:15,className:"shrink-0 mt-0.5"}),a.jsxs("div",{children:[a.jsx("p",{className:"text-[13px] font-semibold",children:"API key missing or invalid"}),a.jsx("p",{className:"text-[11px] text-red-400/70 mt-0.5",children:"A request returned 401 Unauthorized. Update your API key below."})]})]}),e&&a.jsxs("div",{className:"px-4 py-3 rounded-xl bg-white/3 border border-white/8",children:[a.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-2",children:"Current Configuration"}),a.jsxs("div",{className:"flex items-center gap-2",children:[e.configured?a.jsx(Bt,{size:13,className:"text-green-400"}):a.jsx(Us,{size:13,className:"text-amber-400"}),a.jsx("span",{className:"text-[13px] text-gray-300",children:e.configured?`Active · Provider: ${e.provider??"unknown"}`:"Not configured — use the setup wizard below"})]})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest px-1",children:"LLM Provider"}),a.jsx("div",{className:"grid grid-cols-2 gap-2",children:ml.map(N=>a.jsx("button",{onClick:()=>{r(N.id),p(null)},className:`px-3 py-2.5 rounded-xl border text-[13px] font-medium text-left transition-all ${n===N.id?"bg-orange-500/10 border-orange-500/30 text-orange-300":"bg-white/3 border-white/8 text-gray-400 hover:text-white hover:bg-white/6"}`,children:N.label},N.id))})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsxs("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest px-1 flex items-center gap-1.5",children:[a.jsx(pj,{size:9})," API Key"]}),k?a.jsx("div",{className:"px-4 py-3 rounded-xl bg-green-500/5 border border-green-500/15 text-green-400 text-[13px]",children:"Ollama runs locally — no API key required."}):a.jsxs("div",{className:"relative",children:[a.jsx("input",{type:o?"text":"password",value:s,onChange:N=>{i(N.target.value),p(null)},placeholder:j.placeholder,className:"w-full bg-white/4 border border-white/10 rounded-xl px-4 py-3 pr-10 text-[13px] text-white placeholder:text-gray-600 outline-none focus:border-orange-500/40 transition-colors"}),a.jsx("button",{onClick:()=>l(N=>!N),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-500 hover:text-gray-300 transition-colors",children:o?a.jsx(zy,{size:13}):a.jsx(vd,{size:13})})]}),a.jsx("p",{className:"text-[11px] text-gray-600 px-1",children:"Stored locally in .env — never sent to external servers."})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[!k&&a.jsxs("button",{onClick:g,disabled:c||!s&&!(e!=null&&e.configured),className:"flex items-center gap-2 px-4 py-2.5 rounded-xl bg-white/5 border border-white/10 text-[13px] text-gray-300 font-medium hover:bg-white/8 hover:text-white transition-all disabled:opacity-40",children:[a.jsx(Zt,{size:13,className:c?"animate-spin":""}),"Test Connection"]}),a.jsxs("button",{onClick:x,disabled:d||!s.trim()&&!k,className:"flex items-center gap-2 px-4 py-2.5 rounded-xl bg-orange-600 hover:bg-orange-500 text-white text-[13px] font-semibold transition-all disabled:opacity-40 shadow-lg shadow-orange-500/20",children:[a.jsx(jj,{size:13,className:d?"animate-spin":""}),"Save Key"]})]}),h&&a.jsxs("div",{className:`flex items-start gap-2.5 px-4 py-3 rounded-xl border text-[13px] ${h.ok?"bg-green-500/8 border-green-500/20 text-green-300":"bg-red-500/8 border-red-500/20 text-red-300"}`,children:[h.ok?a.jsx(Bt,{size:14,className:"shrink-0 mt-0.5"}):a.jsx(Us,{size:14,className:"shrink-0 mt-0.5"}),h.msg]}),w&&a.jsx("div",{className:"px-4 py-3 rounded-xl bg-orange-500/8 border border-orange-500/20 text-orange-300 text-[13px]",children:w}),a.jsxs("div",{className:"pt-2 border-t border-white/5",children:[a.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-3",children:"Advanced"}),a.jsxs("a",{href:"/setup",className:"inline-flex items-center gap-2 px-4 py-2.5 rounded-xl bg-white/4 border border-white/8 text-[13px] text-gray-400 hover:text-white hover:bg-white/7 transition-all font-medium",children:[a.jsx(Qo,{size:13}),"Re-run Setup Wizard"]})]})]})})}function d4(){return new URLSearchParams(window.location.search).get("token")??""}function f4(){const[e,t]=y.useState("connecting"),[n,r]=y.useState([]),[s,i]=y.useState([]),[o,l]=y.useState("idle"),[c,u]=y.useState(null),[d,f]=y.useState(""),h=y.useRef(null),p=y.useRef(null),w=y.useRef([]),v=d4();y.useEffect(()=>{if(!v){t("denied");return}const k=$s(`${window.location.origin}/mobile`,{query:{token:v},transports:["websocket","polling"]});return h.current=k,k.on("connect",()=>t("connected")),k.on("disconnect",()=>t("disconnected")),k.on("authError",()=>{t("denied"),k.disconnect()}),k.on("agentUpdate",N=>{const{type:C}=N;if(C==="planStart"&&r([]),C==="stepStart"){const S=N.step;r(M=>[...M,{id:`${Date.now()}-${Math.random()}`,description:(S==null?void 0:S.description)??"Working…",status:"running"}])}C==="stepFinish"&&r(S=>{const M=[...S],R=M.findLastIndex(V=>V.status==="running");return R>=0&&(M[R]={...M[R],status:N.status==="error"?"error":"done"}),M}),C==="skillRunStart"&&N.skillId&&u(N.skillId),C==="planFinish"&&u(null)}),()=>{k.disconnect()}},[v]);const b=y.useCallback(async()=>{try{const k=await fetch("/api/skills/list",{headers:{Authorization:`Bearer ${v}`}});if(k.ok){const N=await k.json();i(N.skills??[])}}catch{}},[v]);y.useEffect(()=>{b()},[b]);const m=async()=>{try{const k=await navigator.mediaDevices.getUserMedia({audio:!0}),N=new MediaRecorder(k,{mimeType:"audio/webm"});w.current=[],N.ondataavailable=C=>{C.data.size>0&&w.current.push(C.data)},N.onstop=()=>{k.getTracks().forEach(C=>C.stop()),x()},N.start(),p.current=N,l("recording")}catch{l("idle")}},g=()=>{var k;(k=p.current)==null||k.stop(),l("sending")},x=async()=>{const k=new Blob(w.current,{type:"audio/webm"}),N=new FormData;N.append("audio",k,"voice.webm");try{const C=await fetch("/api/voice/transcribe",{method:"POST",headers:{Authorization:`Bearer ${v}`},body:N});if(C.ok){const{text:S}=await C.json();f(S),await fetch("/api/goal",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${v}`},body:JSON.stringify({goal:S})})}}catch{}l("idle")},j=async k=>{if(!c){u(k.id);try{await fetch("/api/skills/run",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${v}`},body:JSON.stringify({id:k.id})})}catch{u(null)}}};return!v||e==="denied"?a.jsxs("div",{className:"min-h-screen bg-[#02040a] flex flex-col items-center justify-center gap-4 text-center px-8",children:[a.jsx(rr,{size:40,className:"text-red-400"}),a.jsx("p",{className:"text-white font-bold text-xl",children:"Access Denied"}),a.jsxs("p",{className:"text-gray-500 text-sm",children:["This link is invalid or has expired.",a.jsx("br",{}),"Generate a new QR code from your desktop."]})]}):a.jsxs("div",{className:"min-h-screen bg-[#02040a] text-white flex flex-col pb-8",children:[a.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-white/5",children:[a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsx("img",{src:"/logo.png",alt:"Must-b",className:"w-8 h-8 object-contain"}),a.jsx("span",{className:"font-bold text-base",children:"Must-b"}),a.jsx("span",{className:"text-[10px] text-orange-400 font-medium bg-orange-400/10 border border-orange-400/20 px-2 py-0.5 rounded-full",children:"Companion"})]}),a.jsx("div",{className:"flex items-center gap-1.5 text-xs",children:e==="connected"?a.jsxs(a.Fragment,{children:[a.jsx(Mj,{size:13,className:"text-green-400"}),a.jsx("span",{className:"text-green-400",children:"Connected"})]}):e==="connecting"?a.jsxs(a.Fragment,{children:[a.jsx(Ne,{size:13,className:"animate-spin text-orange-400"}),a.jsx("span",{className:"text-orange-400",children:"Connecting…"})]}):a.jsxs(a.Fragment,{children:[a.jsx(Rj,{size:13,className:"text-gray-600"}),a.jsx("span",{className:"text-gray-500",children:"Offline"})]})})]}),a.jsxs("div",{className:"flex flex-col items-center justify-center py-10 px-6 border-b border-white/5",children:[a.jsx("p",{className:"text-[11px] text-gray-500 font-medium uppercase tracking-widest mb-6",children:"Voice Command"}),a.jsxs(H.button,{onPointerDown:m,onPointerUp:g,onPointerLeave:o==="recording"?g:void 0,disabled:o==="sending"||e!=="connected",whileTap:{scale:.93},className:`relative w-28 h-28 rounded-full flex items-center justify-center transition-all select-none ${o==="recording"?"bg-red-500/20 border-2 border-red-500 shadow-[0_0_40px_rgba(239,68,68,0.4)]":o==="sending"?"bg-orange-500/10 border-2 border-orange-500/30":"bg-orange-500/10 border-2 border-orange-500/40 hover:bg-orange-500/20 active:scale-95"} disabled:opacity-40`,children:[o==="sending"?a.jsx(Ne,{size:36,className:"text-orange-400 animate-spin"}):o==="recording"?a.jsx(kd,{size:36,className:"text-red-400"}):a.jsx(Sd,{size:36,className:"text-orange-400"}),o==="recording"&&a.jsx(H.span,{className:"absolute inset-0 rounded-full border-2 border-red-500",animate:{scale:[1,1.3,1],opacity:[.8,0,.8]},transition:{duration:1.4,repeat:1/0}})]}),a.jsx("p",{className:"text-[12px] text-gray-600 mt-4",children:o==="recording"?"Listening… release to send":"Hold to speak"}),d&&a.jsxs("p",{className:"text-[11px] text-orange-300 mt-3 text-center max-w-xs",children:['"',d,'"']})]}),a.jsxs("div",{className:"px-5 pt-6 pb-4 border-b border-white/5",children:[a.jsx("p",{className:"text-[10px] text-gray-500 font-bold uppercase tracking-widest mb-3",children:"Live Workflow"}),a.jsx(me,{children:n.length===0?a.jsx("p",{className:"text-[12px] text-gray-700 text-center py-4",children:"No active workflow"}):a.jsx("div",{className:"space-y-2",children:n.slice(-6).map(k=>a.jsxs(H.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},className:`flex items-start gap-2.5 p-3 rounded-xl border text-[12px] ${k.status==="running"?"bg-orange-500/8 border-orange-500/20":k.status==="error"?"bg-red-500/8 border-red-500/15":"bg-white/3 border-white/5"}`,children:[k.status==="running"&&a.jsx(Ne,{size:12,className:"animate-spin text-orange-400 mt-0.5 shrink-0"}),k.status==="done"&&a.jsx(Bt,{size:12,className:"text-green-400 mt-0.5 shrink-0"}),k.status==="error"&&a.jsx(rr,{size:12,className:"text-red-400 mt-0.5 shrink-0"}),a.jsx("span",{className:k.status==="running"?"text-orange-300":k.status==="error"?"text-red-300":"text-gray-400",children:k.description})]},k.id))})})]}),a.jsxs("div",{className:"px-5 pt-6",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsx("p",{className:"text-[10px] text-gray-500 font-bold uppercase tracking-widest",children:"My Skills"}),a.jsx("button",{onClick:b,className:"text-gray-600 hover:text-gray-400 transition-colors",children:a.jsx(Zt,{size:12})})]}),s.length===0?a.jsx("p",{className:"text-[12px] text-gray-700 text-center py-6",children:"No skills saved yet"}):a.jsx("div",{className:"space-y-2.5",children:s.map(k=>{const N=c===k.id;return a.jsxs(H.div,{layout:!0,className:`flex items-center gap-3 p-3.5 rounded-2xl border transition-all ${N?"bg-orange-500/10 border-orange-500/25":"bg-[#0c0f18] border-white/6"}`,children:[a.jsx(Pt,{size:14,className:"text-orange-400 shrink-0"}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsx("p",{className:"font-semibold text-[13px] text-white truncate",children:k.name}),a.jsxs("p",{className:"text-[10px] text-gray-600 mt-0.5",children:[k.runCount,"× run"]})]}),a.jsxs("button",{onClick:()=>j(k),disabled:!!c,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-xl text-[11px] font-semibold transition-all ${N?"bg-orange-500/15 text-orange-400 border border-orange-500/25 cursor-not-allowed":"bg-orange-500/10 border border-orange-500/20 text-orange-400 hover:bg-orange-500/20 disabled:opacity-40 disabled:cursor-not-allowed"}`,children:[N?a.jsx(Ne,{size:11,className:"animate-spin"}):a.jsx(jd,{size:11}),N?"Running":"Run"]})]},k.id)})})]})]})}const gl=[{code:"en",label:"English",flag:"🇬🇧",native:"English"},{code:"tr",label:"Turkish",flag:"🇹🇷",native:"Türkçe"},{code:"de",label:"German",flag:"🇩🇪",native:"Deutsch"}];function ox(){const{locale:e,setLocale:t}=is(),[n,r]=y.useState(!1),s=y.useRef(null),i=gl.find(o=>o.code===e)??gl[0];return y.useEffect(()=>{if(!n)return;const o=l=>{l.key==="Escape"&&r(!1)};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[n]),a.jsxs("div",{ref:s,className:"relative",children:[a.jsxs("button",{onClick:()=>r(o=>!o),"aria-label":"Switch language",className:`flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg border text-[12px] font-medium transition-all select-none ${n?"bg-white/10 border-white/15 text-white":"bg-white/5 border-white/8 text-gray-300 hover:bg-white/8 hover:text-white"}`,children:[a.jsx(gj,{size:12,className:"text-orange-400 shrink-0"}),a.jsx("span",{children:i.flag}),a.jsx("span",{className:"tracking-wide",children:i.code.toUpperCase()})]}),a.jsx(me,{children:n&&a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>r(!1)}),a.jsxs(H.div,{initial:{opacity:0,y:-6,scale:.96},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:-6,scale:.96},transition:{duration:.13,ease:"easeOut"},className:"absolute right-0 top-full mt-2 z-20 w-44 bg-[#0c0f18] border border-white/10 rounded-xl shadow-2xl shadow-black/60 overflow-hidden",children:[a.jsx("div",{className:"px-3 py-2 border-b border-white/6",children:a.jsx("p",{className:"text-[9px] font-bold text-gray-600 uppercase tracking-widest",children:"Language"})}),gl.map(o=>{const l=e===o.code;return a.jsxs("button",{onClick:()=>{t(o.code),r(!1)},className:`w-full flex items-center gap-3 px-3 py-2.5 text-[12px] font-medium transition-colors ${l?"bg-orange-500/12 text-orange-400":"text-gray-300 hover:bg-white/5 hover:text-white"}`,children:[a.jsx("span",{className:"text-base leading-none",children:o.flag}),a.jsxs("div",{className:"text-left flex-1",children:[a.jsx("p",{className:"leading-none",children:o.native}),!l&&a.jsx("p",{className:"text-[10px] text-gray-600 mt-0.5",children:o.label})]}),l&&a.jsx(ss,{size:12,className:"text-orange-400 shrink-0"})]},o.code)})]})]})})]})}function h4({onClose:e}){const{t}=is(),n=es(),r=ts(),s=n.pathname,[i,o]=y.useState([]),[l,c]=y.useState(null),[u,d]=y.useState(""),[f,h]=y.useState(null),[p,w]=y.useState(""),[v,b]=y.useState(""),m=y.useCallback(async()=>{try{const C=await X("/api/chats");C.ok&&o(await C.json())}catch{}},[]);y.useEffect(()=>{m();const C=setInterval(m,1e4);return()=>clearInterval(C)},[m]),y.useEffect(()=>{X("/api/setup/status").then(C=>C.ok?C.json():null).then(C=>{C&&(w(C.activeProvider??""),b(C.activeModel??""))}).catch(()=>{})},[]);const g=async()=>{try{const C=await X("/api/chats",{method:"POST",body:JSON.stringify({title:"New Chat"})});if(!C.ok){dr.error("Failed to create chat.");return}const S=await C.json();o(M=>[S,...M]),r(`/app?chat=${S.id}`),e()}catch{dr.error("Gateway unreachable.")}},x=async()=>{if(f){try{await X(`/api/chats/${f}`,{method:"DELETE"}),o(C=>C.filter(S=>S.id!==f)),dr.success("Chat deleted."),s.includes(f)&&r("/app")}catch{dr.error("Failed to delete chat.")}h(null)}},j=C=>{c(C.id),d(C.title)},k=async()=>{if(!l||!u.trim()){c(null);return}try{await X(`/api/chats/${l}`,{method:"PATCH",body:JSON.stringify({title:u})}),o(C=>C.map(S=>S.id===l?{...S,title:u}:S)),dr.success("Chat renamed.")}catch{dr.error("Failed to rename chat.")}c(null)},N=s==="/app/settings";return a.jsxs("aside",{className:"w-[280px] h-screen glass-panel flex flex-col overflow-hidden font-sans",children:[a.jsxs("div",{className:"flex items-center justify-between p-4 shrink-0 border-b border-white/[0.06]",children:[a.jsxs("div",{className:"flex items-center gap-2.5",children:[a.jsxs("div",{className:"relative w-7 h-7 shrink-0",children:[a.jsx("div",{className:"absolute inset-0 bg-orange-500 rounded-full blur-md opacity-40"}),a.jsx("img",{src:"/logo.png",alt:"Must-b",className:"w-full h-full object-contain relative z-10"})]}),a.jsx("span",{className:"text-base font-bold tracking-tight text-white",children:"Must-b"})]}),a.jsx("button",{onClick:e,title:t.layout.closePanel,className:"p-1.5 rounded-lg text-gray-500 hover:text-white hover:bg-white/8 transition-all",children:a.jsx(_c,{size:16})})]}),a.jsx("div",{className:"px-3 pt-3 pb-2 shrink-0",children:a.jsxs("button",{onClick:g,className:"w-full h-10 bg-orange-600 hover:bg-orange-500 text-white rounded-xl flex items-center justify-center gap-2 text-sm font-semibold transition-all shadow-lg shadow-orange-500/20 active:scale-[0.98]",children:[a.jsx(Iy,{size:16,strokeWidth:2.5}),t.sidebar.newChat]})}),a.jsxs("div",{className:"flex-1 overflow-y-auto scrollbar-hide px-2 pb-4",children:[a.jsx("h3",{className:"px-2 mt-3 mb-2 text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:t.sidebar.recentChats}),a.jsx("div",{className:"space-y-0.5",children:i.map(C=>a.jsx("div",{className:"group relative",children:l===C.id?a.jsxs("div",{className:"flex items-center gap-1 px-2 py-1.5 bg-white/5 rounded-lg border border-orange-500/40",children:[a.jsx("input",{type:"text",value:u,onChange:S=>d(S.target.value),className:"flex-1 bg-transparent text-[13px] text-white outline-none min-w-0",autoFocus:!0,onKeyDown:S=>{S.key==="Enter"&&k(),S.key==="Escape"&&c(null)}}),a.jsx("button",{onClick:k,className:"p-1 hover:bg-green-500/20 text-green-500 rounded",children:a.jsx(ss,{size:12})}),a.jsx("button",{onClick:()=>c(null),className:"p-1 hover:bg-red-500/20 text-red-500 rounded",children:a.jsx(Cd,{size:12})})]}):a.jsxs(a.Fragment,{children:[a.jsxs(fc,{to:`/app?chat=${C.id}`,onClick:e,className:ze("flex items-center gap-2.5 px-2.5 py-2 rounded-lg transition-all text-[13px] font-medium pr-10",s.includes(C.id)?"bg-orange-500/10 text-white border border-orange-500/15":"text-gray-400 hover:text-white hover:bg-white/5"),children:[a.jsx(bd,{size:13,className:s.includes(C.id)?"text-orange-400 shrink-0":"text-gray-600 shrink-0"}),a.jsx("span",{className:"flex-1 truncate",children:C.title})]}),a.jsxs("div",{className:"absolute right-1 top-1/2 -translate-y-1/2 opacity-0 group-hover:opacity-100 transition-opacity flex items-center gap-0.5 bg-[#0f0f14] px-1 rounded-md shadow-lg border border-white/5",children:[a.jsx("button",{onClick:S=>{S.preventDefault(),S.stopPropagation(),j(C)},className:"p-1 hover:bg-white/10 rounded text-gray-500 hover:text-orange-400",title:"Rename",children:a.jsx(Sj,{size:12})}),a.jsx("button",{onClick:S=>{S.preventDefault(),S.stopPropagation(),h(C.id)},className:"p-1 hover:bg-white/10 rounded text-gray-500 hover:text-red-400",title:"Delete",children:a.jsx(Nd,{size:12})})]})]})},C.id))}),a.jsx("h3",{className:"px-2 mt-5 mb-2 text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:t.sidebar.system}),a.jsxs(fc,{to:"/app/settings",onClick:e,className:ze("flex items-center gap-2.5 px-2.5 py-2 rounded-lg transition-all text-[13px] font-medium",N?"bg-orange-500/10 text-white border border-orange-500/15":"text-gray-400 hover:text-white hover:bg-white/5"),children:[a.jsx(Qo,{size:14,className:N?"text-orange-400":"text-gray-600"}),t.sidebar.settings]})]}),a.jsxs("div",{className:"border-t border-white/[0.06] bg-black/20 p-3 shrink-0",children:[v&&a.jsxs("div",{className:"mb-3 px-1",children:[a.jsx("p",{className:"text-[9px] text-gray-600 font-bold uppercase tracking-[0.2em] mb-0.5",children:"Active Model"}),a.jsx("p",{className:"text-orange-400 text-[11px] font-bold truncate",children:v}),p&&a.jsx("p",{className:"text-gray-600 text-[10px] capitalize",children:p})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsxs("button",{onClick:()=>{r("/"),e()},className:"flex-1 flex items-center gap-2 px-2.5 py-2 rounded-lg text-gray-500 hover:text-red-400 hover:bg-red-500/5 transition-all text-xs font-medium",children:[a.jsx(xj,{size:13}),t.sidebar.logout]}),a.jsx(ox,{})]}),a.jsxs("p",{className:"mt-2 text-[10px] text-gray-700 px-1",children:[t.sidebar.poweredBy," ",a.jsx("span",{className:"text-orange-600 font-semibold",children:"Auto Step"})]})]}),f&&a.jsx("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 backdrop-blur-sm p-4",children:a.jsxs("div",{className:"glass-panel rounded-2xl p-6 w-full max-w-sm shadow-2xl",children:[a.jsx("h3",{className:"text-lg font-bold text-white mb-2",children:t.sidebar.deleteChat}),a.jsx("p",{className:"text-gray-400 text-sm mb-6",children:t.sidebar.deleteConfirm}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("button",{onClick:()=>h(null),className:"flex-1 px-4 py-2 rounded-xl bg-white/5 hover:bg-white/10 text-white text-sm font-medium transition-colors",children:t.sidebar.cancel}),a.jsx("button",{onClick:x,className:"flex-1 px-4 py-2 rounded-xl bg-red-600 hover:bg-red-500 text-white text-sm font-medium transition-colors shadow-lg shadow-red-500/20",children:t.sidebar.delete})]})]})})]})}function p4({url:e,size:t=220}){const n=`https://chart.googleapis.com/chart?chs=${t}x${t}&cht=qr&chl=${encodeURIComponent(e)}&choe=UTF-8`;return a.jsx("div",{style:{width:t,height:t},className:"bg-white p-3 rounded-2xl shadow-[0_0_40px_rgba(234,88,12,0.15)] mx-auto",children:a.jsx("img",{src:n,alt:"QR code",width:t-24,height:t-24,className:"rounded-lg"})})}function m4(e){const[t,n]=y.useState("");return y.useEffect(()=>{if(!e){n("");return}const r=()=>{const i=Math.max(0,e-Date.now()),o=Math.floor(i/6e4),l=Math.floor(i%6e4/1e3);n(`${o}:${l.toString().padStart(2,"0")}`)};r();const s=setInterval(r,1e3);return()=>clearInterval(s)},[e]),t}function g4({onClose:e}){const[t,n]=y.useState("idle"),[r,s]=y.useState(null),i=m4((r==null?void 0:r.expiresAt)??null),o=y.useCallback(async()=>{n("loading");try{const l=await X("/api/companion/pair");if(!l.ok)throw new Error(`HTTP ${l.status}`);const c=await l.json();s(c),n("ready")}catch{n("error")}},[]);return y.useEffect(()=>{o()},[o]),y.useEffect(()=>{const l=c=>{c.key==="Escape"&&e()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[e]),a.jsx(me,{children:a.jsx(H.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 bg-black/70 backdrop-blur-sm flex items-center justify-center p-6",onClick:e,children:a.jsxs(H.div,{initial:{opacity:0,scale:.94,y:12},animate:{opacity:1,scale:1,y:0},exit:{opacity:0,scale:.94,y:12},transition:{duration:.22},className:"relative w-full max-w-sm bg-[#0c0f18] border border-white/8 rounded-3xl overflow-hidden shadow-2xl",onClick:l=>l.stopPropagation(),children:[a.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-white/5",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Uy,{size:15,className:"text-orange-400"}),a.jsx("span",{className:"font-bold text-sm text-white",children:"Connect Mobile"})]}),a.jsx("button",{onClick:e,className:"text-gray-600 hover:text-gray-400 transition-colors",children:a.jsx(Cd,{size:16})})]}),a.jsxs("div",{className:"p-6 flex flex-col items-center gap-4",children:[t==="loading"&&a.jsxs("div",{className:"flex flex-col items-center gap-3 py-10",children:[a.jsx(Ne,{size:24,className:"text-orange-400 animate-spin"}),a.jsx("p",{className:"text-xs text-gray-500",children:"Generating secure link…"})]}),t==="error"&&a.jsxs("div",{className:"flex flex-col items-center gap-3 py-8",children:[a.jsx(rr,{size:24,className:"text-red-400"}),a.jsx("p",{className:"text-sm text-gray-400 text-center",children:"Failed to generate pairing link."}),a.jsxs("button",{onClick:o,className:"flex items-center gap-1.5 px-4 py-2 rounded-xl bg-orange-500/12 border border-orange-500/20 text-orange-400 text-xs font-medium hover:bg-orange-500/22 transition-all",children:[a.jsx(Zt,{size:12})," Retry"]})]}),t==="ready"&&r&&a.jsxs(a.Fragment,{children:[a.jsx(p4,{url:r.url,size:224}),a.jsxs("p",{className:"text-[11px] text-gray-500 text-center leading-relaxed",children:["Scan with your phone's camera to open the",a.jsx("br",{}),a.jsx("span",{className:"text-orange-400 font-medium",children:"Must-b Companion"})," in your browser."]}),a.jsxs("div",{className:"w-full bg-[#080b12] rounded-2xl p-4 border border-white/5",children:[a.jsx("p",{className:"text-[10px] text-gray-600 mb-1 font-medium uppercase tracking-widest",children:"Access URL"}),a.jsx("p",{className:"text-[11px] text-orange-300 font-mono break-all leading-relaxed",children:r.url})]}),a.jsxs("div",{className:"flex items-center justify-between w-full text-[11px]",children:[a.jsx("span",{className:"text-gray-600",children:"Expires in"}),a.jsx("span",{className:`font-mono font-bold ${i<"1:00"?"text-red-400":"text-orange-400"}`,children:i})]}),a.jsxs("button",{onClick:o,className:"flex items-center gap-1.5 text-[11px] text-gray-600 hover:text-gray-400 transition-colors",children:[a.jsx(Zt,{size:10})," Generate new code"]})]})]})]},"panel")},"backdrop")})}const Ap={master:"text-amber-400 bg-amber-400/10 border-amber-400/25",planner:"text-blue-400 bg-blue-400/10 border-blue-400/25",worker:"text-green-400 bg-green-400/10 border-green-400/25"},y4={master:aj,planner:qr,worker:$y},x4={master:"Full autonomy",planner:"Plan & delegate",worker:"Execute tasks"};function v4(e){const t=e/1073741824;return t>=1?`${t.toFixed(1)} GB`:`${(e/1048576).toFixed(0)} MB`}function Lp(e){return e.replace(/^[^/]+\//,"").replace(/[-_]/g," ").replace(/\b(\w)/g,t=>t.toUpperCase()).replace(/:(\w+)$/," $1").trim()}function w4({onClose:e}){var N,C;const{t}=is(),[n,r]=y.useState(null),[s,i]=y.useState([]),[o,l]=y.useState(!1),[c,u]=y.useState(!1),[d,f]=y.useState(!1),[h,p]=y.useState(()=>[!1,!1,!1]),[w,v]=y.useState(()=>[!1,!1,!1]),[b,m]=y.useState(null);y.useEffect(()=>{const S=async()=>{try{const V=await X("/api/status");V.ok&&r(await V.json())}catch{}},M=async()=>{try{const V=await X("/api/models");if(V.ok){const U=await V.json();i((U.models??[]).slice(0,5))}}catch{}};S(),M(),X("/api/ghost/status").then(async V=>{if(V.ok){const U=await V.json();p(U.pool.map(ve=>ve.enabled))}}).catch(()=>{});const R=setInterval(()=>{S(),M()},2e4);return()=>clearInterval(R)},[]),y.useEffect(()=>{const S=M=>{var R,V;try{const U=M.detail;(U==null?void 0:U.type)==="toneChange"&&typeof U.tone=="string"&&U.tone!=="normal"&&(m({tone:String(U.tone),score:typeof U.score=="number"?U.score:0,badgeClass:typeof((R=U.theme)==null?void 0:R.badgeClass)=="string"?U.theme.badgeClass:"",badgeLabel:typeof((V=U.theme)==null?void 0:V.badgeLabel)=="string"?U.theme.badgeLabel:String(U.tone)}),setTimeout(()=>m(null),8e3))}catch{}};return window.addEventListener("mustb:agentUpdate",S),()=>window.removeEventListener("mustb:agentUpdate",S)},[]);const g=((N=n==null?void 0:n.tier)==null?void 0:N.toLowerCase())??"worker",x=Ap[g]??Ap.worker,j=y4[g]??$y,k=Math.min(100,Math.round(((n==null?void 0:n.score)??0)*10));return a.jsxs("aside",{className:"w-[240px] h-screen glass-panel flex flex-col overflow-hidden font-sans",children:[a.jsxs("div",{className:"flex items-center justify-between px-3 pt-3 pb-2 shrink-0 border-b border-white/[0.06]",children:[a.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest",children:t.layout.system}),a.jsx("button",{onClick:e,title:t.layout.closePanel,className:"p-1.5 rounded-lg text-gray-600 hover:text-white hover:bg-white/8 transition-all",children:a.jsx(pi,{size:14})})]}),a.jsxs("div",{className:"px-3 py-3 border-b border-white/[0.05]",children:[a.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-2",children:t.rightPanel.agentRole}),n?a.jsxs(H.div,{initial:{opacity:0,y:5},animate:{opacity:1,y:0},className:`flex items-center gap-2 px-3 py-2 rounded-xl border text-sm font-bold ${x}`,children:[a.jsx(j,{size:13}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("p",{className:"leading-none text-xs",children:n.role}),a.jsx("p",{className:"text-[9px] font-normal opacity-60 mt-0.5 leading-none",children:x4[g]??""})]})]}):a.jsx("div",{className:"h-10 bg-white/4 rounded-xl animate-pulse"})]}),a.jsxs("div",{className:"px-3 py-3 border-b border-white/[0.05]",children:[a.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-2",children:t.rightPanel.hardware}),a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsxs("div",{className:"flex items-center gap-1 text-gray-400 text-[11px]",children:[a.jsx(Rc,{size:10,className:"text-orange-400"})," Score"]}),a.jsx("span",{className:"text-orange-400 font-bold text-[11px] tabular-nums",children:((C=n==null?void 0:n.score)==null?void 0:C.toFixed(2))??"—"})]}),a.jsx("div",{className:"h-1 bg-white/5 rounded-full overflow-hidden mb-2",children:a.jsx(H.div,{className:"h-full bg-gradient-to-r from-orange-600 to-amber-400 rounded-full",initial:{width:0},animate:{width:`${k}%`},transition:{duration:1.2,ease:"easeOut"}})}),a.jsxs("div",{className:"space-y-0.5",children:[(n==null?void 0:n.cpuPct)!=null&&a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-gray-600",children:[a.jsx(Rc,{size:8})," CPU"]}),a.jsxs("span",{className:"text-[10px] text-gray-500 tabular-nums",children:[n.cpuPct,"%"]})]}),(n==null?void 0:n.ramGb)!=null&&a.jsxs("p",{className:"text-[10px] text-gray-600 flex items-center gap-1",children:[a.jsx(Dy,{size:8})," ",n.ramGb," GB RAM"]}),(n==null?void 0:n.gpu)&&a.jsxs("p",{className:"text-[10px] text-gray-600 flex items-center gap-1 truncate",title:n.gpu,children:[a.jsx(Pt,{size:8})," ",a.jsx("span",{className:"truncate",children:n.gpu})]})]})]}),a.jsxs("div",{className:"px-3 py-3 border-b border-white/[0.05]",children:[a.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-2",children:t.rightPanel.model}),a.jsxs("div",{className:"flex items-start gap-1.5",children:[a.jsx(Pt,{size:12,className:"text-orange-400 mt-0.5 shrink-0"}),a.jsx("p",{className:"text-[11px] font-medium text-gray-300 break-all leading-relaxed",children:n!=null&&n.model?Lp(n.model):a.jsx("span",{className:"text-gray-600 italic text-[10px]",children:"No model active"})})]})]}),a.jsxs("div",{className:"px-3 py-3 flex-1 overflow-hidden",children:[a.jsxs("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-2 flex items-center gap-1",children:[a.jsx(lj,{size:9,className:"text-gray-600"})," Available Models"]}),a.jsx(me,{children:s.length===0?a.jsx("p",{className:"text-[10px] text-gray-700 italic",children:"Ollama not detected"}):a.jsx("div",{className:"space-y-1 overflow-y-auto scrollbar-hide max-h-[140px]",children:s.map((S,M)=>{const R=(n==null?void 0:n.model)&&S.name.startsWith(n.model.split(":")[0]);return a.jsxs(H.div,{initial:{opacity:0,x:6},animate:{opacity:1,x:0},transition:{delay:M*.04},className:`flex items-center gap-2 px-2 py-1.5 rounded-xl text-[11px] transition-colors ${R?"bg-orange-500/10 border border-orange-500/20":"bg-white/2 border border-white/4"}`,children:[R?a.jsx(Bt,{size:9,className:"text-orange-400 shrink-0"}):a.jsx("span",{className:"w-2 h-2 rounded-full bg-white/10 shrink-0"}),a.jsxs("div",{className:"min-w-0 flex-1",children:[a.jsx("p",{className:`font-medium leading-none truncate text-[10px] ${R?"text-orange-300":"text-gray-400"}`,children:Lp(S.name)}),a.jsx("p",{className:"text-[9px] text-gray-700 mt-0.5",children:v4(S.size)})]})]},S.name)})})})]}),a.jsx("div",{className:"px-3 pb-2 border-b border-white/[0.05]",children:a.jsxs("button",{onClick:async()=>{f(!0);try{const S=!c;(await X("/api/shadow/toggle",{method:"POST",body:JSON.stringify({enabled:S})})).ok&&u(S)}catch{}f(!1)},disabled:d,className:`w-full flex items-center justify-between gap-2 py-1.5 px-2.5 rounded-xl border text-[11px] font-semibold transition-all ${c?"bg-purple-500/12 border-purple-500/30 text-purple-300":"bg-white/4 border-white/8 text-gray-500 hover:text-gray-300 hover:bg-white/8"} disabled:opacity-50`,children:[a.jsxs("div",{className:"flex items-center gap-1.5",children:[d?a.jsx(Ne,{size:11,className:"animate-spin"}):a.jsx(Rr,{size:11,className:c?"animate-pulse":""}),"Shadow Mode"]}),a.jsx("div",{className:`w-7 h-3.5 rounded-full border transition-all relative ${c?"bg-purple-500/40 border-purple-500/50":"bg-white/8 border-white/10"}`,children:a.jsx("div",{className:`absolute top-0.5 w-2.5 h-2.5 rounded-full transition-all ${c?"left-[14px] bg-purple-400":"left-0.5 bg-gray-600"}`})})]})}),a.jsxs("div",{className:"px-3 pb-2 border-b border-white/[0.05]",children:[a.jsxs("p",{className:"text-[9px] font-bold text-gray-600 uppercase tracking-widest mb-1.5 flex items-center gap-1",children:[a.jsx(yj,{size:8})," Ghost Slots"]}),a.jsx("div",{className:"flex gap-1.5",children:[0,1,2].map(S=>a.jsxs("button",{disabled:w[S],onClick:async()=>{const M=!h[S];v(R=>{const V=[...R];return V[S]=!0,V});try{(await X("/api/ghost/toggle",{method:"POST",body:JSON.stringify({slot:S,enabled:M})})).ok&&p(V=>{const U=[...V];return U[S]=M,U})}catch{}v(R=>{const V=[...R];return V[S]=!1,V})},className:`flex-1 flex flex-col items-center py-1 rounded-lg border text-[9px] font-bold transition-all ${h[S]?"bg-purple-500/15 border-purple-500/30 text-purple-300":"bg-white/4 border-white/8 text-gray-600 hover:text-gray-400"} disabled:opacity-40`,children:[w[S]?a.jsx(Ne,{size:8,className:"animate-spin"}):a.jsx(Rr,{size:8,className:h[S]?"animate-pulse":""}),"G",S+1]},S))})]}),a.jsx(me,{children:b&&a.jsx(H.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"px-3 pb-1",children:a.jsxs("div",{className:`flex items-center gap-1.5 px-2 py-1 rounded-lg border text-[10px] font-semibold ${b.badgeClass}`,children:[a.jsx(Z5,{size:8,className:"animate-pulse"}),b.badgeLabel,a.jsxs("span",{className:"ml-auto text-[9px] opacity-60",children:[Math.round(b.score*100),"%"]})]})})}),a.jsx("div",{className:"px-3 pb-2",children:a.jsxs("button",{onClick:()=>l(!0),className:"w-full flex items-center justify-center gap-1.5 py-1.5 rounded-xl bg-orange-500/8 border border-orange-500/18 text-orange-400 text-[11px] font-semibold hover:bg-orange-500/15 hover:border-orange-500/30 transition-all",children:[a.jsx(Uy,{size:11}),"Connect Mobile"]})}),a.jsx("div",{className:"px-3 pb-3 pt-2 border-t border-white/[0.05]",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsxs("span",{className:"relative flex h-2 w-2",children:[a.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-green-400 opacity-60"}),a.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-green-400 glow-green"})]}),a.jsx("span",{className:"text-[10px] text-gray-600 font-medium",children:t.rightPanel.connected})]})}),o&&a.jsx(g4,{onClose:()=>l(!1)})]})}function b4({onWake:e}){const[t,n]=y.useState(!1),[r,s]=y.useState("Must-b"),[i,o]=y.useState(!1),l=y.useRef(null),c=y.useRef(!1);y.useEffect(()=>{c.current=t},[t]),y.useEffect(()=>{const f=window.SpeechRecognition||window.webkitSpeechRecognition;o(!!f),X("/api/identity").then(h=>h.json()).then(h=>{h.name&&s(h.name)}).catch(()=>{})},[]);const u=`hey ${r}`.toLowerCase(),d=y.useCallback(()=>{const f=window.SpeechRecognition||window.webkitSpeechRecognition;if(!f||!c.current)return;const h=new f;h.continuous=!0,h.interimResults=!0,h.lang="en-US",h.maxAlternatives=1,h.onresult=p=>{for(let w=p.resultIndex;w<p.results.length;w++)p.results[w][0].transcript.toLowerCase().trim().includes(u)&&e()},h.onend=()=>{c.current&&setTimeout(d,300)},h.onerror=p=>{p.error!=="no-speech"&&console.warn("[WakeWord] SpeechRecognition error:",p.error),c.current&&setTimeout(d,1e3)},l.current=h;try{h.start()}catch{}},[u,e]);return y.useEffect(()=>{var f;return t?d():((f=l.current)==null||f.stop(),l.current=null),()=>{var h;(h=l.current)==null||h.stop()}},[t,d]),i?a.jsx("button",{type:"button",onClick:()=>n(f=>!f),title:t?`Listening for "Hey ${r}" — click to disable`:`Enable wake word "Hey ${r}"`,className:`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all duration-200 ${t?"text-orange-400 bg-orange-500/10 border border-orange-500/20 shadow-[0_0_8px_rgba(234,88,12,0.2)]":"text-gray-600 hover:text-gray-400 hover:bg-white/5 border border-transparent"}`,children:t?a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"relative flex h-2 w-2",children:[a.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-orange-400 opacity-75"}),a.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-orange-500"})]}),a.jsx(uj,{size:13}),a.jsxs("span",{children:["Hey ",r]})]}):a.jsxs(a.Fragment,{children:[a.jsx(cj,{size:13}),a.jsx("span",{children:"Wake word off"})]})}):null}function k4(){const{t:e}=is(),[t,n]=y.useState(!1),[r,s]=y.useState(!1),i=()=>{var o;(o=document.querySelector("textarea"))==null||o.focus()};return a.jsxs("div",{className:"relative flex min-h-screen overflow-hidden font-sans text-white",children:[a.jsx("div",{className:"fixed inset-0 bg-gradient-to-br from-[#020407] via-[#04060e] to-[#020508] pointer-events-none"}),a.jsx("div",{className:"fixed inset-0 bg-[radial-gradient(ellipse_90%_55%_at_50%_-10%,rgba(234,88,12,0.10),transparent)] pointer-events-none"}),a.jsx("div",{className:"fixed inset-0 bg-[radial-gradient(ellipse_60%_40%_at_80%_110%,rgba(30,20,60,0.25),transparent)] pointer-events-none"}),a.jsx(me,{children:t&&a.jsx(H.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},className:"fixed inset-0 z-40 bg-black/50 backdrop-blur-sm",onClick:()=>n(!1)},"left-backdrop")}),a.jsx(me,{children:t&&a.jsx(H.div,{initial:{x:"-100%",opacity:.6},animate:{x:0,opacity:1},exit:{x:"-100%",opacity:0},transition:{type:"spring",stiffness:340,damping:32},className:"fixed left-0 top-0 z-50 h-screen",children:a.jsx(h4,{onClose:()=>n(!1)})},"left-panel")}),a.jsx(me,{children:r&&a.jsx(H.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.18},className:"fixed inset-0 z-40 bg-black/50 backdrop-blur-sm",onClick:()=>s(!1)},"right-backdrop")}),a.jsx(me,{children:r&&a.jsx(H.div,{initial:{x:"100%",opacity:.6},animate:{x:0,opacity:1},exit:{x:"100%",opacity:0},transition:{type:"spring",stiffness:340,damping:32},className:"fixed right-0 top-0 z-50 h-screen",children:a.jsx(w4,{onClose:()=>s(!1)})},"right-panel")}),a.jsxs("main",{className:"relative flex-1 flex flex-col h-screen overflow-hidden min-w-0",children:[a.jsxs("div",{className:"relative z-10 flex items-center justify-between px-3 py-2 shrink-0 border-b border-white/[0.06] bg-black/20 backdrop-blur-xl",children:[a.jsxs("button",{onClick:()=>n(!0),title:e.layout.openChats,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl glass border border-white/8 text-gray-400 hover:text-orange-400 hover:border-orange-500/25 transition-all text-xs font-medium",children:[a.jsx(bj,{size:14}),a.jsx("span",{className:"hidden sm:inline",children:e.layout.chats})]}),a.jsxs("div",{className:"flex items-center gap-2 select-none",children:[a.jsxs("div",{className:"relative w-6 h-6",children:[a.jsx("div",{className:"absolute inset-0 bg-orange-500 rounded-full blur-[6px] opacity-50"}),a.jsx("img",{src:"/logo.png",alt:"Must-b",className:"relative z-10 w-full h-full object-contain"})]}),a.jsx("span",{className:"text-sm font-bold tracking-tight text-white/80",children:"Must-b"})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(b4,{onWake:i}),a.jsx(ox,{}),a.jsxs("button",{onClick:()=>s(!0),title:e.layout.openSystem,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-xl glass border border-white/8 text-gray-400 hover:text-orange-400 hover:border-orange-500/25 transition-all text-xs font-medium",children:[a.jsx("span",{className:"hidden sm:inline",children:e.layout.system}),a.jsx(kj,{size:14})]})]})]}),a.jsx("div",{className:"relative flex-1 overflow-hidden min-h-0",children:a.jsx(Vw,{})})]})]})}const S4=[{decision:"duplicate",label:"Create New Agent",sublabel:"Keep both — cloud data is copied to a separate folder",icon:hj,accent:"border-blue-500/30 bg-blue-500/8 hover:border-blue-500/50 text-blue-400"},{decision:"restore",label:"Use Cloud (Overwrite)",sublabel:"Cloud wins — local memory is replaced with cloud version",icon:ij,accent:"border-orange-500/30 bg-orange-500/8 hover:border-orange-500/50 text-orange-400"},{decision:"upload",label:"Keep Mine",sublabel:"Local wins — cloud memory is overwritten with local data",icon:Ej,accent:"border-green-500/30 bg-green-500/8 hover:border-green-500/50 text-green-400"}];function j4(){const[e,t]=y.useState(null),[n,r]=y.useState(!1),[s,i]=y.useState(!1);y.useEffect(()=>{const c=as(),u=d=>{d.type==="CONFLICT_DETECTED"&&(t({localAgentName:d.localAgentName??null,cloudAgentName:d.cloudAgentName??null,localMtime:d.localMtime??null,cloudTimestamp:d.cloudTimestamp??null}),i(!1)),d.type==="syncResolveFinish"&&(i(!0),setTimeout(()=>{t(null),i(!1)},1800))};return c.on("agentUpdate",u),()=>{c.off("agentUpdate",u)}},[]);const o=async c=>{if(!n){r(!0);try{await fetch("/api/setup/sync-resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({decision:c})})}catch{}r(!1)}},l=c=>{if(!c)return"—";try{return new Date(c).toLocaleString("en-US",{dateStyle:"medium",timeStyle:"short"})}catch{return c}};return a.jsx(me,{children:e&&a.jsx(H.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[200] flex items-center justify-center bg-black/70 backdrop-blur-sm px-4",children:a.jsxs(H.div,{initial:{opacity:0,y:24,scale:.95},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:24,scale:.95},transition:{duration:.25},className:"w-full max-w-md bg-[#0c0f18] border border-white/10 rounded-2xl shadow-2xl overflow-hidden",children:[a.jsxs("div",{className:"flex items-center gap-3 px-6 py-5 border-b border-white/8 bg-amber-500/5",children:[a.jsx("div",{className:"w-9 h-9 rounded-full bg-amber-500/15 flex items-center justify-center flex-shrink-0",children:a.jsx(Us,{size:18,className:"text-amber-400"})}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-white font-bold text-base",children:"Memory Conflict Detected"}),a.jsx("p",{className:"text-gray-500 text-xs mt-0.5",children:"Two agent identities found — action required"})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3 px-6 pt-5 pb-2",children:[a.jsxs("div",{className:"rounded-xl border border-white/8 bg-white/3 px-4 py-3",children:[a.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest mb-1",children:"Local Agent"}),a.jsx("p",{className:"text-white font-bold text-sm",children:e.localAgentName??"—"}),a.jsx("p",{className:"text-gray-600 text-[10px] mt-1",children:l(e.localMtime)})]}),a.jsxs("div",{className:"rounded-xl border border-orange-500/20 bg-orange-500/5 px-4 py-3",children:[a.jsx("p",{className:"text-[10px] font-bold text-orange-400/60 uppercase tracking-widest mb-1",children:"Cloud Agent"}),a.jsx("p",{className:"text-orange-300 font-bold text-sm",children:e.cloudAgentName??"—"}),a.jsx("p",{className:"text-orange-400/40 text-[10px] mt-1",children:l(e.cloudTimestamp)})]})]}),a.jsx("div",{className:"px-6 py-4 space-y-2",children:s?a.jsxs("div",{className:"flex items-center justify-center gap-2 py-6 text-green-400 text-sm font-semibold",children:[a.jsx("span",{className:"w-4 h-4 rounded-full border-2 border-green-400 flex items-center justify-center text-[10px]",children:"✓"}),"Conflict resolved"]}):S4.map(c=>{const u=c.icon;return a.jsxs("button",{onClick:()=>o(c.decision),disabled:n,className:`w-full flex items-center gap-3 px-4 py-3 rounded-xl border transition-all text-left disabled:opacity-50 disabled:cursor-not-allowed ${c.accent}`,children:[n?a.jsx(Ne,{size:16,className:"animate-spin flex-shrink-0"}):a.jsx(u,{size:16,className:"flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-semibold text-sm text-white",children:c.label}),a.jsx("p",{className:"text-[11px] text-gray-500 mt-0.5",children:c.sublabel})]})]},c.decision)})}),a.jsx("div",{className:"px-6 pb-5 pt-1",children:a.jsx("p",{className:"text-[10px] text-gray-700 text-center",children:'This action cannot be undone · If unsure, choose "Create New Agent" first'})})]})})})}class N4 extends y.Component{constructor(t){super(t),this.state={error:null}}static getDerivedStateFromError(t){return{error:t}}componentDidCatch(t,n){console.error("[ErrorBoundary]",t,n.componentStack)}render(){return this.state.error?a.jsxs("div",{className:"min-h-screen bg-[#02040a] flex flex-col items-center justify-center gap-4 text-center px-6",children:[a.jsx("span",{className:"text-3xl",children:"⚠️"}),a.jsx("p",{className:"text-orange-400 font-bold text-sm",children:"Something went wrong"}),a.jsx("p",{className:"text-gray-600 text-xs font-mono max-w-sm break-all",children:this.state.error.message}),a.jsx("button",{onClick:()=>this.setState({error:null}),className:"mt-2 px-4 py-2 rounded-xl bg-orange-500/10 border border-orange-500/20 text-orange-400 text-xs font-bold hover:bg-orange-500/20 transition-all",children:"Retry"})]}):this.props.children}}function C4({children:e}){const t=ts(),[n,r]=y.useState(!1);return y.useEffect(()=>{let s=!1;return fetch("/api/setup/status").then(i=>i.ok?i.json():{configured:!0}).then(i=>{s||(i.configured?r(!0):t("/setup",{replace:!0}))}).catch(()=>{s||r(!0)}),()=>{s=!0}},[t]),n?a.jsx(a.Fragment,{children:e}):null}function E4(){return a.jsx(N4,{children:a.jsx(Dj,{children:a.jsxs(Gw,{children:[a.jsx(S2,{position:"top-right",theme:"dark",closeButton:!0,richColors:!0}),a.jsx(j4,{}),a.jsxs(Iw,{children:[a.jsx(Rt,{path:"/",element:a.jsx(jp,{})}),a.jsx(Rt,{path:"/welcome",element:a.jsx(jp,{})}),a.jsx(Rt,{path:"/setup",element:a.jsx(Uj,{})}),a.jsxs(Rt,{path:"/app",element:a.jsx(C4,{children:a.jsx(k4,{})}),children:[a.jsx(Rt,{index:!0,element:a.jsx(c4,{})}),a.jsx(Rt,{path:"settings",element:a.jsx(u4,{})}),a.jsx(Rt,{path:"*",element:a.jsx(th,{to:"/app",replace:!0})})]}),a.jsx(Rt,{path:"/mobile",element:a.jsx(f4,{})}),a.jsx(Rt,{path:"*",element:a.jsx(th,{to:"/",replace:!0})})]})]})})})}Y0(document.getElementById("root")).render(a.jsx(y.StrictMode,{children:a.jsx(E4,{})}));