@task-shepherd/agent 1.0.23 → 1.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +1 -1
- package/dist/index.js +1 -1
- package/dist/meta.json +71 -56
- package/package.json +4 -3
- package/web/dist/assets/index-12a45a6d.css +1 -0
- package/web/dist/assets/index-1a4f1b39.js +69 -0
- package/web/dist/assets/index-1a4f1b39.js.map +1 -0
- package/web/dist/index.html +15 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
function Pp(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 a of i.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).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 lr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tc={exports:{}},Ai={},Oc={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 os=Symbol.for("react.element"),Tp=Symbol.for("react.portal"),Op=Symbol.for("react.fragment"),Ap=Symbol.for("react.strict_mode"),zp=Symbol.for("react.profiler"),Rp=Symbol.for("react.provider"),Mp=Symbol.for("react.context"),_p=Symbol.for("react.forward_ref"),Lp=Symbol.for("react.suspense"),Fp=Symbol.for("react.memo"),Ip=Symbol.for("react.lazy"),Bl=Symbol.iterator;function Dp(e){return e===null||typeof e!="object"?null:(e=Bl&&e[Bl]||e["@@iterator"],typeof e=="function"?e:null)}var Ac={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zc=Object.assign,Rc={};function ur(e,t,n){this.props=e,this.context=t,this.refs=Rc,this.updater=n||Ac}ur.prototype.isReactComponent={};ur.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")};ur.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Mc(){}Mc.prototype=ur.prototype;function Ua(e,t,n){this.props=e,this.context=t,this.refs=Rc,this.updater=n||Ac}var Wa=Ua.prototype=new Mc;Wa.constructor=Ua;zc(Wa,ur.prototype);Wa.isPureReactComponent=!0;var Hl=Array.isArray,_c=Object.prototype.hasOwnProperty,Ba={current:null},Lc={key:!0,ref:!0,__self:!0,__source:!0};function Fc(e,t,n){var r,s={},i=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)_c.call(t,r)&&!Lc.hasOwnProperty(r)&&(s[r]=t[r]);var l=arguments.length-2;if(l===1)s.children=n;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];s.children=u}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)s[r]===void 0&&(s[r]=l[r]);return{$$typeof:os,type:e,key:i,ref:a,props:s,_owner:Ba.current}}function $p(e,t){return{$$typeof:os,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Ha(e){return typeof e=="object"&&e!==null&&e.$$typeof===os}function Up(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ql=/\/+/g;function Ji(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Up(""+e.key):t.toString(36)}function Is(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case os:case Tp:a=!0}}if(a)return a=e,s=s(a),e=r===""?"."+Ji(a,0):r,Hl(s)?(n="",e!=null&&(n=e.replace(ql,"$&/")+"/"),Is(s,t,n,"",function(c){return c})):s!=null&&(Ha(s)&&(s=$p(s,n+(!s.key||a&&a.key===s.key?"":(""+s.key).replace(ql,"$&/")+"/")+e)),t.push(s)),1;if(a=0,r=r===""?".":r+":",Hl(e))for(var l=0;l<e.length;l++){i=e[l];var u=r+Ji(i,l);a+=Is(i,t,n,u,s)}else if(u=Dp(e),typeof u=="function")for(e=u.call(e),l=0;!(i=e.next()).done;)i=i.value,u=r+Ji(i,l++),a+=Is(i,t,n,u,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 a}function gs(e,t,n){if(e==null)return e;var r=[],s=0;return Is(e,r,"","",function(i){return t.call(n,i,s++)}),r}function Wp(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 De={current:null},Ds={transition:null},Bp={ReactCurrentDispatcher:De,ReactCurrentBatchConfig:Ds,ReactCurrentOwner:Ba};function Ic(){throw Error("act(...) is not supported in production builds of React.")}G.Children={map:gs,forEach:function(e,t,n){gs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return gs(e,function(){t++}),t},toArray:function(e){return gs(e,function(t){return t})||[]},only:function(e){if(!Ha(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};G.Component=ur;G.Fragment=Op;G.Profiler=zp;G.PureComponent=Ua;G.StrictMode=Ap;G.Suspense=Lp;G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Bp;G.act=Ic;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=zc({},e.props),s=e.key,i=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,a=Ba.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)_c.call(t,u)&&!Lc.hasOwnProperty(u)&&(r[u]=t[u]===void 0&&l!==void 0?l[u]:t[u])}var u=arguments.length-2;if(u===1)r.children=n;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];r.children=l}return{$$typeof:os,type:e.type,key:s,ref:i,props:r,_owner:a}};G.createContext=function(e){return e={$$typeof:Mp,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Rp,_context:e},e.Consumer=e};G.createElement=Fc;G.createFactory=function(e){var t=Fc.bind(null,e);return t.type=e,t};G.createRef=function(){return{current:null}};G.forwardRef=function(e){return{$$typeof:_p,render:e}};G.isValidElement=Ha;G.lazy=function(e){return{$$typeof:Ip,_payload:{_status:-1,_result:e},_init:Wp}};G.memo=function(e,t){return{$$typeof:Fp,type:e,compare:t===void 0?null:t}};G.startTransition=function(e){var t=Ds.transition;Ds.transition={};try{e()}finally{Ds.transition=t}};G.unstable_act=Ic;G.useCallback=function(e,t){return De.current.useCallback(e,t)};G.useContext=function(e){return De.current.useContext(e)};G.useDebugValue=function(){};G.useDeferredValue=function(e){return De.current.useDeferredValue(e)};G.useEffect=function(e,t){return De.current.useEffect(e,t)};G.useId=function(){return De.current.useId()};G.useImperativeHandle=function(e,t,n){return De.current.useImperativeHandle(e,t,n)};G.useInsertionEffect=function(e,t){return De.current.useInsertionEffect(e,t)};G.useLayoutEffect=function(e,t){return De.current.useLayoutEffect(e,t)};G.useMemo=function(e,t){return De.current.useMemo(e,t)};G.useReducer=function(e,t,n){return De.current.useReducer(e,t,n)};G.useRef=function(e){return De.current.useRef(e)};G.useState=function(e){return De.current.useState(e)};G.useSyncExternalStore=function(e,t,n){return De.current.useSyncExternalStore(e,t,n)};G.useTransition=function(){return De.current.useTransition()};G.version="18.3.1";Oc.exports=G;var N=Oc.exports;const R=lr(N),Hp=Pp({__proto__:null,default:R},[N]);/**
|
|
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 qp=N,Qp=Symbol.for("react.element"),Vp=Symbol.for("react.fragment"),Kp=Object.prototype.hasOwnProperty,Gp=qp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Yp={key:!0,ref:!0,__self:!0,__source:!0};function Dc(e,t,n){var r,s={},i=null,a=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)Kp.call(t,r)&&!Yp.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:Qp,type:e,key:i,ref:a,props:s,_owner:Gp.current}}Ai.Fragment=Vp;Ai.jsx=Dc;Ai.jsxs=Dc;Tc.exports=Ai;var o=Tc.exports,Ro={},$c={exports:{}},Xe={},Uc={exports:{}},Wc={};/**
|
|
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(O,D){var F=O.length;O.push(D);e:for(;0<F;){var Q=F-1>>>1,I=O[Q];if(0<s(I,D))O[Q]=D,O[F]=I,F=Q;else break e}}function n(O){return O.length===0?null:O[0]}function r(O){if(O.length===0)return null;var D=O[0],F=O.pop();if(F!==D){O[0]=F;e:for(var Q=0,I=O.length,ie=I>>>1;Q<ie;){var Ae=2*(Q+1)-1,Qe=O[Ae],ke=Ae+1,at=O[ke];if(0>s(Qe,F))ke<I&&0>s(at,Qe)?(O[Q]=at,O[ke]=F,Q=ke):(O[Q]=Qe,O[Ae]=F,Q=Ae);else if(ke<I&&0>s(at,F))O[Q]=at,O[ke]=F,Q=ke;else break e}}return D}function s(O,D){var F=O.sortIndex-D.sortIndex;return F!==0?F:O.id-D.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var a=Date,l=a.now();e.unstable_now=function(){return a.now()-l}}var u=[],c=[],d=1,f=null,p=3,y=!1,v=!1,x=!1,b=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(O){for(var D=n(c);D!==null;){if(D.callback===null)r(c);else if(D.startTime<=O)r(c),D.sortIndex=D.expirationTime,t(u,D);else break;D=n(c)}}function w(O){if(x=!1,g(O),!v)if(n(u)!==null)v=!0,X(C);else{var D=n(c);D!==null&&re(w,D.startTime-O)}}function C(O,D){v=!1,x&&(x=!1,m(j),j=-1),y=!0;var F=p;try{for(g(D),f=n(u);f!==null&&(!(f.expirationTime>D)||O&&!q());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,p=f.priorityLevel;var I=Q(f.expirationTime<=D);D=e.unstable_now(),typeof I=="function"?f.callback=I:f===n(u)&&r(u),g(D)}else r(u);f=n(u)}if(f!==null)var ie=!0;else{var Ae=n(c);Ae!==null&&re(w,Ae.startTime-D),ie=!1}return ie}finally{f=null,p=F,y=!1}}var E=!1,S=null,j=-1,z=5,A=-1;function q(){return!(e.unstable_now()-A<z)}function P(){if(S!==null){var O=e.unstable_now();A=O;var D=!0;try{D=S(!0,O)}finally{D?ee():(E=!1,S=null)}}else E=!1}var ee;if(typeof h=="function")ee=function(){h(P)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,Z=U.port2;U.port1.onmessage=P,ee=function(){Z.postMessage(null)}}else ee=function(){b(P,0)};function X(O){S=O,E||(E=!0,ee())}function re(O,D){j=b(function(){O(e.unstable_now())},D)}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(O){O.callback=null},e.unstable_continueExecution=function(){v||y||(v=!0,X(C))},e.unstable_forceFrameRate=function(O){0>O||125<O?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):z=0<O?Math.floor(1e3/O):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(O){switch(p){case 1:case 2:case 3:var D=3;break;default:D=p}var F=p;p=D;try{return O()}finally{p=F}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(O,D){switch(O){case 1:case 2:case 3:case 4:case 5:break;default:O=3}var F=p;p=O;try{return D()}finally{p=F}},e.unstable_scheduleCallback=function(O,D,F){var Q=e.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?Q+F:Q):F=Q,O){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=F+I,O={id:d++,callback:D,priorityLevel:O,startTime:F,expirationTime:I,sortIndex:-1},F>Q?(O.sortIndex=F,t(c,O),n(u)===null&&O===n(c)&&(x?(m(j),j=-1):x=!0,re(w,F-Q))):(O.sortIndex=I,t(u,O),v||y||(v=!0,X(C))),O},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(O){var D=p;return function(){var F=p;p=D;try{return O.apply(this,arguments)}finally{p=F}}}})(Wc);Uc.exports=Wc;var Xp=Uc.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 Jp=N,Ye=Xp;function T(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 Bc=new Set,Ur={};function En(e,t){tr(e,t),tr(e+"Capture",t)}function tr(e,t){for(Ur[e]=t,e=0;e<t.length;e++)Bc.add(t[e])}var zt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mo=Object.prototype.hasOwnProperty,Zp=/^[: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]*$/,Ql={},Vl={};function eh(e){return Mo.call(Vl,e)?!0:Mo.call(Ql,e)?!1:Zp.test(e)?Vl[e]=!0:(Ql[e]=!0,!1)}function th(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 nh(e,t,n,r){if(t===null||typeof t>"u"||th(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,a){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=a}var Oe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Oe[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];Oe[t]=new $e(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Oe[e]=new $e(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Oe[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){Oe[e]=new $e(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Oe[e]=new $e(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Oe[e]=new $e(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Oe[e]=new $e(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Oe[e]=new $e(e,5,!1,e.toLowerCase(),null,!1,!1)});var qa=/[\-:]([a-z])/g;function Qa(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(qa,Qa);Oe[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(qa,Qa);Oe[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(qa,Qa);Oe[t]=new $e(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Oe[e]=new $e(e,1,!1,e.toLowerCase(),null,!1,!1)});Oe.xlinkHref=new $e("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Oe[e]=new $e(e,1,!1,e.toLowerCase(),null,!0,!0)});function Va(e,t,n,r){var s=Oe.hasOwnProperty(t)?Oe[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(nh(t,n,s,r)&&(n=null),r||s===null?eh(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 Lt=Jp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,ys=Symbol.for("react.element"),_n=Symbol.for("react.portal"),Ln=Symbol.for("react.fragment"),Ka=Symbol.for("react.strict_mode"),_o=Symbol.for("react.profiler"),Hc=Symbol.for("react.provider"),qc=Symbol.for("react.context"),Ga=Symbol.for("react.forward_ref"),Lo=Symbol.for("react.suspense"),Fo=Symbol.for("react.suspense_list"),Ya=Symbol.for("react.memo"),$t=Symbol.for("react.lazy"),Qc=Symbol.for("react.offscreen"),Kl=Symbol.iterator;function hr(e){return e===null||typeof e!="object"?null:(e=Kl&&e[Kl]||e["@@iterator"],typeof e=="function"?e:null)}var ge=Object.assign,Zi;function Cr(e){if(Zi===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Zi=t&&t[1]||""}return`
|
|
34
|
+
`+Zi+e}var eo=!1;function to(e,t){if(!e||eo)return"";eo=!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(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
|
|
35
|
+
`),i=r.stack.split(`
|
|
36
|
+
`),a=s.length-1,l=i.length-1;1<=a&&0<=l&&s[a]!==i[l];)l--;for(;1<=a&&0<=l;a--,l--)if(s[a]!==i[l]){if(a!==1||l!==1)do if(a--,l--,0>l||s[a]!==i[l]){var u=`
|
|
37
|
+
`+s[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=l);break}}}finally{eo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Cr(e):""}function rh(e){switch(e.tag){case 5:return Cr(e.type);case 16:return Cr("Lazy");case 13:return Cr("Suspense");case 19:return Cr("SuspenseList");case 0:case 2:case 15:return e=to(e.type,!1),e;case 11:return e=to(e.type.render,!1),e;case 1:return e=to(e.type,!0),e;default:return""}}function Io(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 Ln:return"Fragment";case _n:return"Portal";case _o:return"Profiler";case Ka:return"StrictMode";case Lo:return"Suspense";case Fo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case qc:return(e.displayName||"Context")+".Consumer";case Hc:return(e._context.displayName||"Context")+".Provider";case Ga:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ya:return t=e.displayName||null,t!==null?t:Io(e.type)||"Memo";case $t:t=e._payload,e=e._init;try{return Io(e(t))}catch{}}return null}function sh(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 Io(t);case 8:return t===Ka?"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 an(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Vc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ih(e){var t=Vc(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(a){r=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function vs(e){e._valueTracker||(e._valueTracker=ih(e))}function Kc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Vc(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Zs(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 Do(e,t){var n=t.checked;return ge({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gl(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=an(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 Gc(e,t){t=t.checked,t!=null&&Va(e,"checked",t,!1)}function $o(e,t){Gc(e,t);var n=an(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")?Uo(e,t.type,n):t.hasOwnProperty("defaultValue")&&Uo(e,t.type,an(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Yl(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 Uo(e,t,n){(t!=="number"||Zs(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Er=Array.isArray;function Kn(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=""+an(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 Wo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(T(91));return ge({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Xl(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(T(92));if(Er(n)){if(1<n.length)throw Error(T(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:an(n)}}function Yc(e,t){var n=an(t.value),r=an(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 Jl(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Xc(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 Bo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Xc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var xs,Jc=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(xs=xs||document.createElement("div"),xs.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=xs.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ar={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},oh=["Webkit","ms","Moz","O"];Object.keys(Ar).forEach(function(e){oh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ar[t]=Ar[e]})});function Zc(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Ar.hasOwnProperty(e)&&Ar[e]?(""+t).trim():t+"px"}function ed(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=Zc(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var ah=ge({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 Ho(e,t){if(t){if(ah[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(T(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(T(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(T(61))}if(t.style!=null&&typeof t.style!="object")throw Error(T(62))}}function qo(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 Qo=null;function Xa(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Vo=null,Gn=null,Yn=null;function Zl(e){if(e=us(e)){if(typeof Vo!="function")throw Error(T(280));var t=e.stateNode;t&&(t=Li(t),Vo(e.stateNode,e.type,t))}}function td(e){Gn?Yn?Yn.push(e):Yn=[e]:Gn=e}function nd(){if(Gn){var e=Gn,t=Yn;if(Yn=Gn=null,Zl(e),t)for(e=0;e<t.length;e++)Zl(t[e])}}function rd(e,t){return e(t)}function sd(){}var no=!1;function id(e,t,n){if(no)return e(t,n);no=!0;try{return rd(e,t,n)}finally{no=!1,(Gn!==null||Yn!==null)&&(sd(),nd())}}function Br(e,t){var n=e.stateNode;if(n===null)return null;var r=Li(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(T(231,t,typeof n));return n}var Ko=!1;if(zt)try{var mr={};Object.defineProperty(mr,"passive",{get:function(){Ko=!0}}),window.addEventListener("test",mr,mr),window.removeEventListener("test",mr,mr)}catch{Ko=!1}function lh(e,t,n,r,s,i,a,l,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var zr=!1,ei=null,ti=!1,Go=null,uh={onError:function(e){zr=!0,ei=e}};function ch(e,t,n,r,s,i,a,l,u){zr=!1,ei=null,lh.apply(uh,arguments)}function dh(e,t,n,r,s,i,a,l,u){if(ch.apply(this,arguments),zr){if(zr){var c=ei;zr=!1,ei=null}else throw Error(T(198));ti||(ti=!0,Go=c)}}function Pn(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 od(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 eu(e){if(Pn(e)!==e)throw Error(T(188))}function fh(e){var t=e.alternate;if(!t){if(t=Pn(e),t===null)throw Error(T(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 eu(s),e;if(i===r)return eu(s),t;i=i.sibling}throw Error(T(188))}if(n.return!==r.return)n=s,r=i;else{for(var a=!1,l=s.child;l;){if(l===n){a=!0,n=s,r=i;break}if(l===r){a=!0,r=s,n=i;break}l=l.sibling}if(!a){for(l=i.child;l;){if(l===n){a=!0,n=i,r=s;break}if(l===r){a=!0,r=i,n=s;break}l=l.sibling}if(!a)throw Error(T(189))}}if(n.alternate!==r)throw Error(T(190))}if(n.tag!==3)throw Error(T(188));return n.stateNode.current===n?e:t}function ad(e){return e=fh(e),e!==null?ld(e):null}function ld(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=ld(e);if(t!==null)return t;e=e.sibling}return null}var ud=Ye.unstable_scheduleCallback,tu=Ye.unstable_cancelCallback,ph=Ye.unstable_shouldYield,hh=Ye.unstable_requestPaint,xe=Ye.unstable_now,mh=Ye.unstable_getCurrentPriorityLevel,Ja=Ye.unstable_ImmediatePriority,cd=Ye.unstable_UserBlockingPriority,ni=Ye.unstable_NormalPriority,gh=Ye.unstable_LowPriority,dd=Ye.unstable_IdlePriority,zi=null,Nt=null;function yh(e){if(Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(zi,e,void 0,(e.current.flags&128)===128)}catch{}}var mt=Math.clz32?Math.clz32:wh,vh=Math.log,xh=Math.LN2;function wh(e){return e>>>=0,e===0?32:31-(vh(e)/xh|0)|0}var ws=64,js=4194304;function Pr(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 ri(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,a=n&268435455;if(a!==0){var l=a&~s;l!==0?r=Pr(l):(i&=a,i!==0&&(r=Pr(i)))}else a=n&~s,a!==0?r=Pr(a):i!==0&&(r=Pr(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-mt(t),s=1<<n,r|=e[n],t&=~s;return r}function jh(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 bh(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-mt(i),l=1<<a,u=s[a];u===-1?(!(l&n)||l&r)&&(s[a]=jh(l,t)):u<=t&&(e.expiredLanes|=l),i&=~l}}function Yo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function fd(){var e=ws;return ws<<=1,!(ws&4194240)&&(ws=64),e}function ro(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function as(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-mt(t),e[t]=n}function Nh(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-mt(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Za(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-mt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var se=0;function pd(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var hd,el,md,gd,yd,Xo=!1,bs=[],Yt=null,Xt=null,Jt=null,Hr=new Map,qr=new Map,Ht=[],kh="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 nu(e,t){switch(e){case"focusin":case"focusout":Yt=null;break;case"dragenter":case"dragleave":Xt=null;break;case"mouseover":case"mouseout":Jt=null;break;case"pointerover":case"pointerout":Hr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":qr.delete(t.pointerId)}}function gr(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=us(t),t!==null&&el(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Sh(e,t,n,r,s){switch(t){case"focusin":return Yt=gr(Yt,e,t,n,r,s),!0;case"dragenter":return Xt=gr(Xt,e,t,n,r,s),!0;case"mouseover":return Jt=gr(Jt,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Hr.set(i,gr(Hr.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,qr.set(i,gr(qr.get(i)||null,e,t,n,r,s)),!0}return!1}function vd(e){var t=hn(e.target);if(t!==null){var n=Pn(t);if(n!==null){if(t=n.tag,t===13){if(t=od(n),t!==null){e.blockedOn=t,yd(e.priority,function(){md(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 $s(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Qo=r,n.target.dispatchEvent(r),Qo=null}else return t=us(n),t!==null&&el(t),e.blockedOn=n,!1;t.shift()}return!0}function ru(e,t,n){$s(e)&&n.delete(t)}function Ch(){Xo=!1,Yt!==null&&$s(Yt)&&(Yt=null),Xt!==null&&$s(Xt)&&(Xt=null),Jt!==null&&$s(Jt)&&(Jt=null),Hr.forEach(ru),qr.forEach(ru)}function yr(e,t){e.blockedOn===t&&(e.blockedOn=null,Xo||(Xo=!0,Ye.unstable_scheduleCallback(Ye.unstable_NormalPriority,Ch)))}function Qr(e){function t(s){return yr(s,e)}if(0<bs.length){yr(bs[0],e);for(var n=1;n<bs.length;n++){var r=bs[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Yt!==null&&yr(Yt,e),Xt!==null&&yr(Xt,e),Jt!==null&&yr(Jt,e),Hr.forEach(t),qr.forEach(t),n=0;n<Ht.length;n++)r=Ht[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Ht.length&&(n=Ht[0],n.blockedOn===null);)vd(n),n.blockedOn===null&&Ht.shift()}var Xn=Lt.ReactCurrentBatchConfig,si=!0;function Eh(e,t,n,r){var s=se,i=Xn.transition;Xn.transition=null;try{se=1,tl(e,t,n,r)}finally{se=s,Xn.transition=i}}function Ph(e,t,n,r){var s=se,i=Xn.transition;Xn.transition=null;try{se=4,tl(e,t,n,r)}finally{se=s,Xn.transition=i}}function tl(e,t,n,r){if(si){var s=Jo(e,t,n,r);if(s===null)ho(e,t,r,ii,n),nu(e,r);else if(Sh(s,e,t,n,r))r.stopPropagation();else if(nu(e,r),t&4&&-1<kh.indexOf(e)){for(;s!==null;){var i=us(s);if(i!==null&&hd(i),i=Jo(e,t,n,r),i===null&&ho(e,t,r,ii,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else ho(e,t,r,null,n)}}var ii=null;function Jo(e,t,n,r){if(ii=null,e=Xa(r),e=hn(e),e!==null)if(t=Pn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=od(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 ii=e,null}function xd(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(mh()){case Ja:return 1;case cd:return 4;case ni:case gh:return 16;case dd:return 536870912;default:return 16}default:return 16}}var Vt=null,nl=null,Us=null;function wd(){if(Us)return Us;var e,t=nl,n=t.length,r,s="value"in Vt?Vt.value:Vt.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===s[i-r];r++);return Us=s.slice(e,1<r?1-r:void 0)}function Ws(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 Ns(){return!0}function su(){return!1}function Je(e){function t(n,r,s,i,a){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=a,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)?Ns:su,this.isPropagationStopped=su,this}return ge(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=Ns)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ns)},persist:function(){},isPersistent:Ns}),t}var cr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rl=Je(cr),ls=ge({},cr,{view:0,detail:0}),Th=Je(ls),so,io,vr,Ri=ge({},ls,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:sl,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!==vr&&(vr&&e.type==="mousemove"?(so=e.screenX-vr.screenX,io=e.screenY-vr.screenY):io=so=0,vr=e),so)},movementY:function(e){return"movementY"in e?e.movementY:io}}),iu=Je(Ri),Oh=ge({},Ri,{dataTransfer:0}),Ah=Je(Oh),zh=ge({},ls,{relatedTarget:0}),oo=Je(zh),Rh=ge({},cr,{animationName:0,elapsedTime:0,pseudoElement:0}),Mh=Je(Rh),_h=ge({},cr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lh=Je(_h),Fh=ge({},cr,{data:0}),ou=Je(Fh),Ih={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dh={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"},$h={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Uh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$h[e])?!!t[e]:!1}function sl(){return Uh}var Wh=ge({},ls,{key:function(e){if(e.key){var t=Ih[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ws(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Dh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:sl,charCode:function(e){return e.type==="keypress"?Ws(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ws(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Bh=Je(Wh),Hh=ge({},Ri,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),au=Je(Hh),qh=ge({},ls,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:sl}),Qh=Je(qh),Vh=ge({},cr,{propertyName:0,elapsedTime:0,pseudoElement:0}),Kh=Je(Vh),Gh=ge({},Ri,{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}),Yh=Je(Gh),Xh=[9,13,27,32],il=zt&&"CompositionEvent"in window,Rr=null;zt&&"documentMode"in document&&(Rr=document.documentMode);var Jh=zt&&"TextEvent"in window&&!Rr,jd=zt&&(!il||Rr&&8<Rr&&11>=Rr),lu=String.fromCharCode(32),uu=!1;function bd(e,t){switch(e){case"keyup":return Xh.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fn=!1;function Zh(e,t){switch(e){case"compositionend":return Nd(t);case"keypress":return t.which!==32?null:(uu=!0,lu);case"textInput":return e=t.data,e===lu&&uu?null:e;default:return null}}function em(e,t){if(Fn)return e==="compositionend"||!il&&bd(e,t)?(e=wd(),Us=nl=Vt=null,Fn=!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 jd&&t.locale!=="ko"?null:t.data;default:return null}}var tm={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 cu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!tm[e.type]:t==="textarea"}function kd(e,t,n,r){td(r),t=oi(t,"onChange"),0<t.length&&(n=new rl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Mr=null,Vr=null;function nm(e){_d(e,0)}function Mi(e){var t=$n(e);if(Kc(t))return e}function rm(e,t){if(e==="change")return t}var Sd=!1;if(zt){var ao;if(zt){var lo="oninput"in document;if(!lo){var du=document.createElement("div");du.setAttribute("oninput","return;"),lo=typeof du.oninput=="function"}ao=lo}else ao=!1;Sd=ao&&(!document.documentMode||9<document.documentMode)}function fu(){Mr&&(Mr.detachEvent("onpropertychange",Cd),Vr=Mr=null)}function Cd(e){if(e.propertyName==="value"&&Mi(Vr)){var t=[];kd(t,Vr,e,Xa(e)),id(nm,t)}}function sm(e,t,n){e==="focusin"?(fu(),Mr=t,Vr=n,Mr.attachEvent("onpropertychange",Cd)):e==="focusout"&&fu()}function im(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Mi(Vr)}function om(e,t){if(e==="click")return Mi(t)}function am(e,t){if(e==="input"||e==="change")return Mi(t)}function lm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var yt=typeof Object.is=="function"?Object.is:lm;function Kr(e,t){if(yt(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(!Mo.call(t,s)||!yt(e[s],t[s]))return!1}return!0}function pu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hu(e,t){var n=pu(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=pu(n)}}function Ed(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ed(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Pd(){for(var e=window,t=Zs();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Zs(e.document)}return t}function ol(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 um(e){var t=Pd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ed(n.ownerDocument.documentElement,n)){if(r!==null&&ol(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=hu(n,i);var a=hu(n,r);s&&a&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.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 cm=zt&&"documentMode"in document&&11>=document.documentMode,In=null,Zo=null,_r=null,ea=!1;function mu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ea||In==null||In!==Zs(r)||(r=In,"selectionStart"in r&&ol(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}),_r&&Kr(_r,r)||(_r=r,r=oi(Zo,"onSelect"),0<r.length&&(t=new rl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=In)))}function ks(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Dn={animationend:ks("Animation","AnimationEnd"),animationiteration:ks("Animation","AnimationIteration"),animationstart:ks("Animation","AnimationStart"),transitionend:ks("Transition","TransitionEnd")},uo={},Td={};zt&&(Td=document.createElement("div").style,"AnimationEvent"in window||(delete Dn.animationend.animation,delete Dn.animationiteration.animation,delete Dn.animationstart.animation),"TransitionEvent"in window||delete Dn.transitionend.transition);function _i(e){if(uo[e])return uo[e];if(!Dn[e])return e;var t=Dn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Td)return uo[e]=t[n];return e}var Od=_i("animationend"),Ad=_i("animationiteration"),zd=_i("animationstart"),Rd=_i("transitionend"),Md=new Map,gu="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 un(e,t){Md.set(e,t),En(t,[e])}for(var co=0;co<gu.length;co++){var fo=gu[co],dm=fo.toLowerCase(),fm=fo[0].toUpperCase()+fo.slice(1);un(dm,"on"+fm)}un(Od,"onAnimationEnd");un(Ad,"onAnimationIteration");un(zd,"onAnimationStart");un("dblclick","onDoubleClick");un("focusin","onFocus");un("focusout","onBlur");un(Rd,"onTransitionEnd");tr("onMouseEnter",["mouseout","mouseover"]);tr("onMouseLeave",["mouseout","mouseover"]);tr("onPointerEnter",["pointerout","pointerover"]);tr("onPointerLeave",["pointerout","pointerover"]);En("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));En("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));En("onBeforeInput",["compositionend","keypress","textInput","paste"]);En("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));En("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));En("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Tr="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(" "),pm=new Set("cancel close invalid load scroll toggle".split(" ").concat(Tr));function yu(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,dh(r,t,void 0,e),e.currentTarget=null}function _d(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 a=r.length-1;0<=a;a--){var l=r[a],u=l.instance,c=l.currentTarget;if(l=l.listener,u!==i&&s.isPropagationStopped())break e;yu(s,l,c),i=u}else for(a=0;a<r.length;a++){if(l=r[a],u=l.instance,c=l.currentTarget,l=l.listener,u!==i&&s.isPropagationStopped())break e;yu(s,l,c),i=u}}}if(ti)throw e=Go,ti=!1,Go=null,e}function ce(e,t){var n=t[ia];n===void 0&&(n=t[ia]=new Set);var r=e+"__bubble";n.has(r)||(Ld(t,e,2,!1),n.add(r))}function po(e,t,n){var r=0;t&&(r|=4),Ld(n,e,r,t)}var Ss="_reactListening"+Math.random().toString(36).slice(2);function Gr(e){if(!e[Ss]){e[Ss]=!0,Bc.forEach(function(n){n!=="selectionchange"&&(pm.has(n)||po(n,!1,e),po(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ss]||(t[Ss]=!0,po("selectionchange",!1,t))}}function Ld(e,t,n,r){switch(xd(t)){case 1:var s=Eh;break;case 4:s=Ph;break;default:s=tl}n=s.bind(null,t,n,e),s=void 0,!Ko||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 ho(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(a===4)for(a=r.return;a!==null;){var u=a.tag;if((u===3||u===4)&&(u=a.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;a=a.return}for(;l!==null;){if(a=hn(l),a===null)return;if(u=a.tag,u===5||u===6){r=i=a;continue e}l=l.parentNode}}r=r.return}id(function(){var c=i,d=Xa(n),f=[];e:{var p=Md.get(e);if(p!==void 0){var y=rl,v=e;switch(e){case"keypress":if(Ws(n)===0)break e;case"keydown":case"keyup":y=Bh;break;case"focusin":v="focus",y=oo;break;case"focusout":v="blur",y=oo;break;case"beforeblur":case"afterblur":y=oo;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":y=iu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Ah;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Qh;break;case Od:case Ad:case zd:y=Mh;break;case Rd:y=Kh;break;case"scroll":y=Th;break;case"wheel":y=Yh;break;case"copy":case"cut":case"paste":y=Lh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=au}var x=(t&4)!==0,b=!x&&e==="scroll",m=x?p!==null?p+"Capture":null:p;x=[];for(var h=c,g;h!==null;){g=h;var w=g.stateNode;if(g.tag===5&&w!==null&&(g=w,m!==null&&(w=Br(h,m),w!=null&&x.push(Yr(h,w,g)))),b)break;h=h.return}0<x.length&&(p=new y(p,v,null,n,d),f.push({event:p,listeners:x}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",p&&n!==Qo&&(v=n.relatedTarget||n.fromElement)&&(hn(v)||v[Rt]))break e;if((y||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,y?(v=n.relatedTarget||n.toElement,y=c,v=v?hn(v):null,v!==null&&(b=Pn(v),v!==b||v.tag!==5&&v.tag!==6)&&(v=null)):(y=null,v=c),y!==v)){if(x=iu,w="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(x=au,w="onPointerLeave",m="onPointerEnter",h="pointer"),b=y==null?p:$n(y),g=v==null?p:$n(v),p=new x(w,h+"leave",y,n,d),p.target=b,p.relatedTarget=g,w=null,hn(d)===c&&(x=new x(m,h+"enter",v,n,d),x.target=g,x.relatedTarget=b,w=x),b=w,y&&v)t:{for(x=y,m=v,h=0,g=x;g;g=Rn(g))h++;for(g=0,w=m;w;w=Rn(w))g++;for(;0<h-g;)x=Rn(x),h--;for(;0<g-h;)m=Rn(m),g--;for(;h--;){if(x===m||m!==null&&x===m.alternate)break t;x=Rn(x),m=Rn(m)}x=null}else x=null;y!==null&&vu(f,p,y,x,!1),v!==null&&b!==null&&vu(f,b,v,x,!0)}}e:{if(p=c?$n(c):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var C=rm;else if(cu(p))if(Sd)C=am;else{C=im;var E=sm}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=om);if(C&&(C=C(e,c))){kd(f,C,n,d);break e}E&&E(e,p,c),e==="focusout"&&(E=p._wrapperState)&&E.controlled&&p.type==="number"&&Uo(p,"number",p.value)}switch(E=c?$n(c):window,e){case"focusin":(cu(E)||E.contentEditable==="true")&&(In=E,Zo=c,_r=null);break;case"focusout":_r=Zo=In=null;break;case"mousedown":ea=!0;break;case"contextmenu":case"mouseup":case"dragend":ea=!1,mu(f,n,d);break;case"selectionchange":if(cm)break;case"keydown":case"keyup":mu(f,n,d)}var S;if(il)e:{switch(e){case"compositionstart":var j="onCompositionStart";break e;case"compositionend":j="onCompositionEnd";break e;case"compositionupdate":j="onCompositionUpdate";break e}j=void 0}else Fn?bd(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(jd&&n.locale!=="ko"&&(Fn||j!=="onCompositionStart"?j==="onCompositionEnd"&&Fn&&(S=wd()):(Vt=d,nl="value"in Vt?Vt.value:Vt.textContent,Fn=!0)),E=oi(c,j),0<E.length&&(j=new ou(j,e,null,n,d),f.push({event:j,listeners:E}),S?j.data=S:(S=Nd(n),S!==null&&(j.data=S)))),(S=Jh?Zh(e,n):em(e,n))&&(c=oi(c,"onBeforeInput"),0<c.length&&(d=new ou("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=S))}_d(f,t)})}function Yr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function oi(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Br(e,n),i!=null&&r.unshift(Yr(e,i,s)),i=Br(e,t),i!=null&&r.push(Yr(e,i,s))),e=e.return}return r}function Rn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function vu(e,t,n,r,s){for(var i=t._reactName,a=[];n!==null&&n!==r;){var l=n,u=l.alternate,c=l.stateNode;if(u!==null&&u===r)break;l.tag===5&&c!==null&&(l=c,s?(u=Br(n,i),u!=null&&a.unshift(Yr(n,u,l))):s||(u=Br(n,i),u!=null&&a.push(Yr(n,u,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var hm=/\r\n?/g,mm=/\u0000|\uFFFD/g;function xu(e){return(typeof e=="string"?e:""+e).replace(hm,`
|
|
38
|
+
`).replace(mm,"")}function Cs(e,t,n){if(t=xu(t),xu(e)!==t&&n)throw Error(T(425))}function ai(){}var ta=null,na=null;function ra(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 sa=typeof setTimeout=="function"?setTimeout:void 0,gm=typeof clearTimeout=="function"?clearTimeout:void 0,wu=typeof Promise=="function"?Promise:void 0,ym=typeof queueMicrotask=="function"?queueMicrotask:typeof wu<"u"?function(e){return wu.resolve(null).then(e).catch(vm)}:sa;function vm(e){setTimeout(function(){throw e})}function mo(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),Qr(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Qr(t)}function Zt(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 ju(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 dr=Math.random().toString(36).slice(2),bt="__reactFiber$"+dr,Xr="__reactProps$"+dr,Rt="__reactContainer$"+dr,ia="__reactEvents$"+dr,xm="__reactListeners$"+dr,wm="__reactHandles$"+dr;function hn(e){var t=e[bt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Rt]||n[bt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ju(e);e!==null;){if(n=e[bt])return n;e=ju(e)}return t}e=n,n=e.parentNode}return null}function us(e){return e=e[bt]||e[Rt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function $n(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(T(33))}function Li(e){return e[Xr]||null}var oa=[],Un=-1;function cn(e){return{current:e}}function de(e){0>Un||(e.current=oa[Un],oa[Un]=null,Un--)}function ae(e,t){Un++,oa[Un]=e.current,e.current=t}var ln={},_e=cn(ln),Be=cn(!1),bn=ln;function nr(e,t){var n=e.type.contextTypes;if(!n)return ln;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 He(e){return e=e.childContextTypes,e!=null}function li(){de(Be),de(_e)}function bu(e,t,n){if(_e.current!==ln)throw Error(T(168));ae(_e,t),ae(Be,n)}function Fd(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(T(108,sh(e)||"Unknown",s));return ge({},n,r)}function ui(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ln,bn=_e.current,ae(_e,e),ae(Be,Be.current),!0}function Nu(e,t,n){var r=e.stateNode;if(!r)throw Error(T(169));n?(e=Fd(e,t,bn),r.__reactInternalMemoizedMergedChildContext=e,de(Be),de(_e),ae(_e,e)):de(Be),ae(Be,n)}var Et=null,Fi=!1,go=!1;function Id(e){Et===null?Et=[e]:Et.push(e)}function jm(e){Fi=!0,Id(e)}function dn(){if(!go&&Et!==null){go=!0;var e=0,t=se;try{var n=Et;for(se=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Et=null,Fi=!1}catch(s){throw Et!==null&&(Et=Et.slice(e+1)),ud(Ja,dn),s}finally{se=t,go=!1}}return null}var Wn=[],Bn=0,ci=null,di=0,tt=[],nt=0,Nn=null,Tt=1,Ot="";function fn(e,t){Wn[Bn++]=di,Wn[Bn++]=ci,ci=e,di=t}function Dd(e,t,n){tt[nt++]=Tt,tt[nt++]=Ot,tt[nt++]=Nn,Nn=e;var r=Tt;e=Ot;var s=32-mt(r)-1;r&=~(1<<s),n+=1;var i=32-mt(t)+s;if(30<i){var a=s-s%5;i=(r&(1<<a)-1).toString(32),r>>=a,s-=a,Tt=1<<32-mt(t)+s|n<<s|r,Ot=i+e}else Tt=1<<i|n<<s|r,Ot=e}function al(e){e.return!==null&&(fn(e,1),Dd(e,1,0))}function ll(e){for(;e===ci;)ci=Wn[--Bn],Wn[Bn]=null,di=Wn[--Bn],Wn[Bn]=null;for(;e===Nn;)Nn=tt[--nt],tt[nt]=null,Ot=tt[--nt],tt[nt]=null,Tt=tt[--nt],tt[nt]=null}var Ge=null,Ke=null,pe=!1,ht=null;function $d(e,t){var n=rt(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 ku(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,Ge=e,Ke=Zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ge=e,Ke=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Nn!==null?{id:Tt,overflow:Ot}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=rt(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ge=e,Ke=null,!0):!1;default:return!1}}function aa(e){return(e.mode&1)!==0&&(e.flags&128)===0}function la(e){if(pe){var t=Ke;if(t){var n=t;if(!ku(e,t)){if(aa(e))throw Error(T(418));t=Zt(n.nextSibling);var r=Ge;t&&ku(e,t)?$d(r,n):(e.flags=e.flags&-4097|2,pe=!1,Ge=e)}}else{if(aa(e))throw Error(T(418));e.flags=e.flags&-4097|2,pe=!1,Ge=e}}}function Su(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ge=e}function Es(e){if(e!==Ge)return!1;if(!pe)return Su(e),pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!ra(e.type,e.memoizedProps)),t&&(t=Ke)){if(aa(e))throw Ud(),Error(T(418));for(;t;)$d(e,t),t=Zt(t.nextSibling)}if(Su(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(T(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ke=Zt(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ke=null}}else Ke=Ge?Zt(e.stateNode.nextSibling):null;return!0}function Ud(){for(var e=Ke;e;)e=Zt(e.nextSibling)}function rr(){Ke=Ge=null,pe=!1}function ul(e){ht===null?ht=[e]:ht.push(e)}var bm=Lt.ReactCurrentBatchConfig;function xr(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(T(309));var r=n.stateNode}if(!r)throw Error(T(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(a){var l=s.refs;a===null?delete l[i]:l[i]=a},t._stringRef=i,t)}if(typeof e!="string")throw Error(T(284));if(!n._owner)throw Error(T(290,e))}return e}function Ps(e,t){throw e=Object.prototype.toString.call(t),Error(T(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Cu(e){var t=e._init;return t(e._payload)}function Wd(e){function t(m,h){if(e){var g=m.deletions;g===null?(m.deletions=[h],m.flags|=16):g.push(h)}}function n(m,h){if(!e)return null;for(;h!==null;)t(m,h),h=h.sibling;return null}function r(m,h){for(m=new Map;h!==null;)h.key!==null?m.set(h.key,h):m.set(h.index,h),h=h.sibling;return m}function s(m,h){return m=rn(m,h),m.index=0,m.sibling=null,m}function i(m,h,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<h?(m.flags|=2,h):g):(m.flags|=2,h)):(m.flags|=1048576,h)}function a(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,h,g,w){return h===null||h.tag!==6?(h=No(g,m.mode,w),h.return=m,h):(h=s(h,g),h.return=m,h)}function u(m,h,g,w){var C=g.type;return C===Ln?d(m,h,g.props.children,w,g.key):h!==null&&(h.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===$t&&Cu(C)===h.type)?(w=s(h,g.props),w.ref=xr(m,h,g),w.return=m,w):(w=Gs(g.type,g.key,g.props,null,m.mode,w),w.ref=xr(m,h,g),w.return=m,w)}function c(m,h,g,w){return h===null||h.tag!==4||h.stateNode.containerInfo!==g.containerInfo||h.stateNode.implementation!==g.implementation?(h=ko(g,m.mode,w),h.return=m,h):(h=s(h,g.children||[]),h.return=m,h)}function d(m,h,g,w,C){return h===null||h.tag!==7?(h=wn(g,m.mode,w,C),h.return=m,h):(h=s(h,g),h.return=m,h)}function f(m,h,g){if(typeof h=="string"&&h!==""||typeof h=="number")return h=No(""+h,m.mode,g),h.return=m,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case ys:return g=Gs(h.type,h.key,h.props,null,m.mode,g),g.ref=xr(m,null,h),g.return=m,g;case _n:return h=ko(h,m.mode,g),h.return=m,h;case $t:var w=h._init;return f(m,w(h._payload),g)}if(Er(h)||hr(h))return h=wn(h,m.mode,g,null),h.return=m,h;Ps(m,h)}return null}function p(m,h,g,w){var C=h!==null?h.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return C!==null?null:l(m,h,""+g,w);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case ys:return g.key===C?u(m,h,g,w):null;case _n:return g.key===C?c(m,h,g,w):null;case $t:return C=g._init,p(m,h,C(g._payload),w)}if(Er(g)||hr(g))return C!==null?null:d(m,h,g,w,null);Ps(m,g)}return null}function y(m,h,g,w,C){if(typeof w=="string"&&w!==""||typeof w=="number")return m=m.get(g)||null,l(h,m,""+w,C);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case ys:return m=m.get(w.key===null?g:w.key)||null,u(h,m,w,C);case _n:return m=m.get(w.key===null?g:w.key)||null,c(h,m,w,C);case $t:var E=w._init;return y(m,h,g,E(w._payload),C)}if(Er(w)||hr(w))return m=m.get(g)||null,d(h,m,w,C,null);Ps(h,w)}return null}function v(m,h,g,w){for(var C=null,E=null,S=h,j=h=0,z=null;S!==null&&j<g.length;j++){S.index>j?(z=S,S=null):z=S.sibling;var A=p(m,S,g[j],w);if(A===null){S===null&&(S=z);break}e&&S&&A.alternate===null&&t(m,S),h=i(A,h,j),E===null?C=A:E.sibling=A,E=A,S=z}if(j===g.length)return n(m,S),pe&&fn(m,j),C;if(S===null){for(;j<g.length;j++)S=f(m,g[j],w),S!==null&&(h=i(S,h,j),E===null?C=S:E.sibling=S,E=S);return pe&&fn(m,j),C}for(S=r(m,S);j<g.length;j++)z=y(S,m,j,g[j],w),z!==null&&(e&&z.alternate!==null&&S.delete(z.key===null?j:z.key),h=i(z,h,j),E===null?C=z:E.sibling=z,E=z);return e&&S.forEach(function(q){return t(m,q)}),pe&&fn(m,j),C}function x(m,h,g,w){var C=hr(g);if(typeof C!="function")throw Error(T(150));if(g=C.call(g),g==null)throw Error(T(151));for(var E=C=null,S=h,j=h=0,z=null,A=g.next();S!==null&&!A.done;j++,A=g.next()){S.index>j?(z=S,S=null):z=S.sibling;var q=p(m,S,A.value,w);if(q===null){S===null&&(S=z);break}e&&S&&q.alternate===null&&t(m,S),h=i(q,h,j),E===null?C=q:E.sibling=q,E=q,S=z}if(A.done)return n(m,S),pe&&fn(m,j),C;if(S===null){for(;!A.done;j++,A=g.next())A=f(m,A.value,w),A!==null&&(h=i(A,h,j),E===null?C=A:E.sibling=A,E=A);return pe&&fn(m,j),C}for(S=r(m,S);!A.done;j++,A=g.next())A=y(S,m,j,A.value,w),A!==null&&(e&&A.alternate!==null&&S.delete(A.key===null?j:A.key),h=i(A,h,j),E===null?C=A:E.sibling=A,E=A);return e&&S.forEach(function(P){return t(m,P)}),pe&&fn(m,j),C}function b(m,h,g,w){if(typeof g=="object"&&g!==null&&g.type===Ln&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case ys:e:{for(var C=g.key,E=h;E!==null;){if(E.key===C){if(C=g.type,C===Ln){if(E.tag===7){n(m,E.sibling),h=s(E,g.props.children),h.return=m,m=h;break e}}else if(E.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===$t&&Cu(C)===E.type){n(m,E.sibling),h=s(E,g.props),h.ref=xr(m,E,g),h.return=m,m=h;break e}n(m,E);break}else t(m,E);E=E.sibling}g.type===Ln?(h=wn(g.props.children,m.mode,w,g.key),h.return=m,m=h):(w=Gs(g.type,g.key,g.props,null,m.mode,w),w.ref=xr(m,h,g),w.return=m,m=w)}return a(m);case _n:e:{for(E=g.key;h!==null;){if(h.key===E)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(m,h.sibling),h=s(h,g.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=ko(g,m.mode,w),h.return=m,m=h}return a(m);case $t:return E=g._init,b(m,h,E(g._payload),w)}if(Er(g))return v(m,h,g,w);if(hr(g))return x(m,h,g,w);Ps(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,h!==null&&h.tag===6?(n(m,h.sibling),h=s(h,g),h.return=m,m=h):(n(m,h),h=No(g,m.mode,w),h.return=m,m=h),a(m)):n(m,h)}return b}var sr=Wd(!0),Bd=Wd(!1),fi=cn(null),pi=null,Hn=null,cl=null;function dl(){cl=Hn=pi=null}function fl(e){var t=fi.current;de(fi),e._currentValue=t}function ua(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 Jn(e,t){pi=e,cl=Hn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(We=!0),e.firstContext=null)}function it(e){var t=e._currentValue;if(cl!==e)if(e={context:e,memoizedValue:t,next:null},Hn===null){if(pi===null)throw Error(T(308));Hn=e,pi.dependencies={lanes:0,firstContext:e}}else Hn=Hn.next=e;return t}var mn=null;function pl(e){mn===null?mn=[e]:mn.push(e)}function Hd(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,pl(t)):(n.next=s.next,s.next=n),t.interleaved=n,Mt(e,r)}function Mt(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 Ut=!1;function hl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function qd(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 At(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function en(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,te&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Mt(e,n)}return s=r.interleaved,s===null?(t.next=t,pl(r)):(t.next=s.next,s.next=t),r.interleaved=t,Mt(e,n)}function Bs(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,Za(e,n)}}function Eu(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 a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=a:i=i.next=a,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 hi(e,t,n,r){var s=e.updateQueue;Ut=!1;var i=s.firstBaseUpdate,a=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var u=l,c=u.next;u.next=null,a===null?i=c:a.next=c,a=u;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=c:l.next=c,d.lastBaseUpdate=u))}if(i!==null){var f=s.baseState;a=0,d=c=u=null,l=i;do{var p=l.lane,y=l.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:y,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var v=e,x=l;switch(p=t,y=n,x.tag){case 1:if(v=x.payload,typeof v=="function"){f=v.call(y,f,p);break e}f=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=x.payload,p=typeof v=="function"?v.call(y,f,p):v,p==null)break e;f=ge({},f,p);break e;case 2:Ut=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[l]:p.push(l))}else y={eventTime:y,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(c=d=y,u=f):d=d.next=y,a|=p;if(l=l.next,l===null){if(l=s.shared.pending,l===null)break;p=l,l=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(1);if(d===null&&(u=f),s.baseState=u,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do a|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Sn|=a,e.lanes=a,e.memoizedState=f}}function Pu(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(T(191,s));s.call(r)}}}var cs={},kt=cn(cs),Jr=cn(cs),Zr=cn(cs);function gn(e){if(e===cs)throw Error(T(174));return e}function ml(e,t){switch(ae(Zr,t),ae(Jr,e),ae(kt,cs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Bo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Bo(t,e)}de(kt),ae(kt,t)}function ir(){de(kt),de(Jr),de(Zr)}function Qd(e){gn(Zr.current);var t=gn(kt.current),n=Bo(t,e.type);t!==n&&(ae(Jr,e),ae(kt,n))}function gl(e){Jr.current===e&&(de(kt),de(Jr))}var he=cn(0);function mi(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 yo=[];function yl(){for(var e=0;e<yo.length;e++)yo[e]._workInProgressVersionPrimary=null;yo.length=0}var Hs=Lt.ReactCurrentDispatcher,vo=Lt.ReactCurrentBatchConfig,kn=0,me=null,be=null,Se=null,gi=!1,Lr=!1,es=0,Nm=0;function ze(){throw Error(T(321))}function vl(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!yt(e[n],t[n]))return!1;return!0}function xl(e,t,n,r,s,i){if(kn=i,me=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Hs.current=e===null||e.memoizedState===null?Em:Pm,e=n(r,s),Lr){i=0;do{if(Lr=!1,es=0,25<=i)throw Error(T(301));i+=1,Se=be=null,t.updateQueue=null,Hs.current=Tm,e=n(r,s)}while(Lr)}if(Hs.current=yi,t=be!==null&&be.next!==null,kn=0,Se=be=me=null,gi=!1,t)throw Error(T(300));return e}function wl(){var e=es!==0;return es=0,e}function wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Se===null?me.memoizedState=Se=e:Se=Se.next=e,Se}function ot(){if(be===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=be.next;var t=Se===null?me.memoizedState:Se.next;if(t!==null)Se=t,be=e;else{if(e===null)throw Error(T(310));be=e,e={memoizedState:be.memoizedState,baseState:be.baseState,baseQueue:be.baseQueue,queue:be.queue,next:null},Se===null?me.memoizedState=Se=e:Se=Se.next=e}return Se}function ts(e,t){return typeof t=="function"?t(e):t}function xo(e){var t=ot(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=be,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var a=s.next;s.next=i.next,i.next=a}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var l=a=null,u=null,c=i;do{var d=c.lane;if((kn&d)===d)u!==null&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};u===null?(l=u=f,a=r):u=u.next=f,me.lanes|=d,Sn|=d}c=c.next}while(c!==null&&c!==i);u===null?a=r:u.next=l,yt(r,t.memoizedState)||(We=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,me.lanes|=i,Sn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function wo(e){var t=ot(),n=t.queue;if(n===null)throw Error(T(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var a=s=s.next;do i=e(i,a.action),a=a.next;while(a!==s);yt(i,t.memoizedState)||(We=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function Vd(){}function Kd(e,t){var n=me,r=ot(),s=t(),i=!yt(r.memoizedState,s);if(i&&(r.memoizedState=s,We=!0),r=r.queue,jl(Xd.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||Se!==null&&Se.memoizedState.tag&1){if(n.flags|=2048,ns(9,Yd.bind(null,n,r,s,t),void 0,null),Ce===null)throw Error(T(349));kn&30||Gd(n,t,s)}return s}function Gd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Yd(e,t,n,r){t.value=n,t.getSnapshot=r,Jd(t)&&Zd(e)}function Xd(e,t,n){return n(function(){Jd(t)&&Zd(e)})}function Jd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!yt(e,n)}catch{return!0}}function Zd(e){var t=Mt(e,1);t!==null&>(t,e,1,-1)}function Tu(e){var t=wt();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ts,lastRenderedState:e},t.queue=e,e=e.dispatch=Cm.bind(null,me,e),[t.memoizedState,e]}function ns(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=me.updateQueue,t===null?(t={lastEffect:null,stores:null},me.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 ef(){return ot().memoizedState}function qs(e,t,n,r){var s=wt();me.flags|=e,s.memoizedState=ns(1|t,n,void 0,r===void 0?null:r)}function Ii(e,t,n,r){var s=ot();r=r===void 0?null:r;var i=void 0;if(be!==null){var a=be.memoizedState;if(i=a.destroy,r!==null&&vl(r,a.deps)){s.memoizedState=ns(t,n,i,r);return}}me.flags|=e,s.memoizedState=ns(1|t,n,i,r)}function Ou(e,t){return qs(8390656,8,e,t)}function jl(e,t){return Ii(2048,8,e,t)}function tf(e,t){return Ii(4,2,e,t)}function nf(e,t){return Ii(4,4,e,t)}function rf(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 sf(e,t,n){return n=n!=null?n.concat([e]):null,Ii(4,4,rf.bind(null,t,e),n)}function bl(){}function of(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&vl(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function af(e,t){var n=ot();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&vl(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function lf(e,t,n){return kn&21?(yt(n,t)||(n=fd(),me.lanes|=n,Sn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,We=!0),e.memoizedState=n)}function km(e,t){var n=se;se=n!==0&&4>n?n:4,e(!0);var r=vo.transition;vo.transition={};try{e(!1),t()}finally{se=n,vo.transition=r}}function uf(){return ot().memoizedState}function Sm(e,t,n){var r=nn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cf(e))df(t,n);else if(n=Hd(e,t,n,r),n!==null){var s=Ie();gt(n,e,r,s),ff(n,t,r)}}function Cm(e,t,n){var r=nn(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cf(e))df(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,l=i(a,n);if(s.hasEagerState=!0,s.eagerState=l,yt(l,a)){var u=t.interleaved;u===null?(s.next=s,pl(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=Hd(e,t,s,r),n!==null&&(s=Ie(),gt(n,e,r,s),ff(n,t,r))}}function cf(e){var t=e.alternate;return e===me||t!==null&&t===me}function df(e,t){Lr=gi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ff(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Za(e,n)}}var yi={readContext:it,useCallback:ze,useContext:ze,useEffect:ze,useImperativeHandle:ze,useInsertionEffect:ze,useLayoutEffect:ze,useMemo:ze,useReducer:ze,useRef:ze,useState:ze,useDebugValue:ze,useDeferredValue:ze,useTransition:ze,useMutableSource:ze,useSyncExternalStore:ze,useId:ze,unstable_isNewReconciler:!1},Em={readContext:it,useCallback:function(e,t){return wt().memoizedState=[e,t===void 0?null:t],e},useContext:it,useEffect:Ou,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,qs(4194308,4,rf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return qs(4194308,4,e,t)},useInsertionEffect:function(e,t){return qs(4,2,e,t)},useMemo:function(e,t){var n=wt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=wt();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=Sm.bind(null,me,e),[r.memoizedState,e]},useRef:function(e){var t=wt();return e={current:e},t.memoizedState=e},useState:Tu,useDebugValue:bl,useDeferredValue:function(e){return wt().memoizedState=e},useTransition:function(){var e=Tu(!1),t=e[0];return e=km.bind(null,e[1]),wt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=me,s=wt();if(pe){if(n===void 0)throw Error(T(407));n=n()}else{if(n=t(),Ce===null)throw Error(T(349));kn&30||Gd(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Ou(Xd.bind(null,r,i,e),[e]),r.flags|=2048,ns(9,Yd.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=wt(),t=Ce.identifierPrefix;if(pe){var n=Ot,r=Tt;n=(r&~(1<<32-mt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=es++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=Nm++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Pm={readContext:it,useCallback:of,useContext:it,useEffect:jl,useImperativeHandle:sf,useInsertionEffect:tf,useLayoutEffect:nf,useMemo:af,useReducer:xo,useRef:ef,useState:function(){return xo(ts)},useDebugValue:bl,useDeferredValue:function(e){var t=ot();return lf(t,be.memoizedState,e)},useTransition:function(){var e=xo(ts)[0],t=ot().memoizedState;return[e,t]},useMutableSource:Vd,useSyncExternalStore:Kd,useId:uf,unstable_isNewReconciler:!1},Tm={readContext:it,useCallback:of,useContext:it,useEffect:jl,useImperativeHandle:sf,useInsertionEffect:tf,useLayoutEffect:nf,useMemo:af,useReducer:wo,useRef:ef,useState:function(){return wo(ts)},useDebugValue:bl,useDeferredValue:function(e){var t=ot();return be===null?t.memoizedState=e:lf(t,be.memoizedState,e)},useTransition:function(){var e=wo(ts)[0],t=ot().memoizedState;return[e,t]},useMutableSource:Vd,useSyncExternalStore:Kd,useId:uf,unstable_isNewReconciler:!1};function dt(e,t){if(e&&e.defaultProps){t=ge({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function ca(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Di={isMounted:function(e){return(e=e._reactInternals)?Pn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ie(),s=nn(e),i=At(r,s);i.payload=t,n!=null&&(i.callback=n),t=en(e,i,s),t!==null&&(gt(t,e,s,r),Bs(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ie(),s=nn(e),i=At(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=en(e,i,s),t!==null&&(gt(t,e,s,r),Bs(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ie(),r=nn(e),s=At(n,r);s.tag=2,t!=null&&(s.callback=t),t=en(e,s,r),t!==null&&(gt(t,e,r,n),Bs(t,e,r))}};function Au(e,t,n,r,s,i,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,a):t.prototype&&t.prototype.isPureReactComponent?!Kr(n,r)||!Kr(s,i):!0}function pf(e,t,n){var r=!1,s=ln,i=t.contextType;return typeof i=="object"&&i!==null?i=it(i):(s=He(t)?bn:_e.current,r=t.contextTypes,i=(r=r!=null)?nr(e,s):ln),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Di,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function zu(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&&Di.enqueueReplaceState(t,t.state,null)}function da(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},hl(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=it(i):(i=He(t)?bn:_e.current,s.context=nr(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(ca(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&&Di.enqueueReplaceState(s,s.state,null),hi(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function or(e,t){try{var n="",r=t;do n+=rh(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 jo(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function fa(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Om=typeof WeakMap=="function"?WeakMap:Map;function hf(e,t,n){n=At(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xi||(xi=!0,ba=r),fa(e,t)},n}function mf(e,t,n){n=At(-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(){fa(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){fa(e,t),typeof r!="function"&&(tn===null?tn=new Set([this]):tn.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Ru(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Om;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=Hm.bind(null,e,t,n),t.then(e,e))}function Mu(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 _u(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=At(-1,1),t.tag=2,en(n,t,1))),n.lanes|=1),e)}var Am=Lt.ReactCurrentOwner,We=!1;function Le(e,t,n,r){t.child=e===null?Bd(t,null,n,r):sr(t,e.child,n,r)}function Lu(e,t,n,r,s){n=n.render;var i=t.ref;return Jn(t,s),r=xl(e,t,n,r,i,s),n=wl(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_t(e,t,s)):(pe&&n&&al(t),t.flags|=1,Le(e,t,r,s),t.child)}function Fu(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Ol(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,gf(e,t,i,r,s)):(e=Gs(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 a=i.memoizedProps;if(n=n.compare,n=n!==null?n:Kr,n(a,r)&&e.ref===t.ref)return _t(e,t,s)}return t.flags|=1,e=rn(i,r),e.ref=t.ref,e.return=t,t.child=e}function gf(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Kr(i,r)&&e.ref===t.ref)if(We=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(We=!0);else return t.lanes=e.lanes,_t(e,t,s)}return pa(e,t,n,r,s)}function yf(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},ae(Qn,Ve),Ve|=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,ae(Qn,Ve),Ve|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,ae(Qn,Ve),Ve|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,ae(Qn,Ve),Ve|=r;return Le(e,t,s,n),t.child}function vf(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function pa(e,t,n,r,s){var i=He(n)?bn:_e.current;return i=nr(t,i),Jn(t,s),n=xl(e,t,n,r,i,s),r=wl(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,_t(e,t,s)):(pe&&r&&al(t),t.flags|=1,Le(e,t,n,s),t.child)}function Iu(e,t,n,r,s){if(He(n)){var i=!0;ui(t)}else i=!1;if(Jn(t,s),t.stateNode===null)Qs(e,t),pf(t,n,r),da(t,n,r,s),r=!0;else if(e===null){var a=t.stateNode,l=t.memoizedProps;a.props=l;var u=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=it(c):(c=He(n)?bn:_e.current,c=nr(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==r||u!==c)&&zu(t,a,r,c),Ut=!1;var p=t.memoizedState;a.state=p,hi(t,r,a,s),u=t.memoizedState,l!==r||p!==u||Be.current||Ut?(typeof d=="function"&&(ca(t,n,d,r),u=t.memoizedState),(l=Ut||Au(t,n,l,r,p,u,c))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=c,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,qd(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:dt(t.type,l),a.props=c,f=t.pendingProps,p=a.context,u=n.contextType,typeof u=="object"&&u!==null?u=it(u):(u=He(n)?bn:_e.current,u=nr(t,u));var y=n.getDerivedStateFromProps;(d=typeof y=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(l!==f||p!==u)&&zu(t,a,r,u),Ut=!1,p=t.memoizedState,a.state=p,hi(t,r,a,s);var v=t.memoizedState;l!==f||p!==v||Be.current||Ut?(typeof y=="function"&&(ca(t,n,y,r),v=t.memoizedState),(c=Ut||Au(t,n,c,r,p,v,u)||!1)?(d||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,v,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,v,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=v),a.props=r,a.state=v,a.context=u,r=c):(typeof a.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return ha(e,t,n,r,i,s)}function ha(e,t,n,r,s,i){vf(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return s&&Nu(t,n,!1),_t(e,t,i);r=t.stateNode,Am.current=t;var l=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=sr(t,e.child,null,i),t.child=sr(t,null,l,i)):Le(e,t,l,i),t.memoizedState=r.state,s&&Nu(t,n,!0),t.child}function xf(e){var t=e.stateNode;t.pendingContext?bu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&bu(e,t.context,!1),ml(e,t.containerInfo)}function Du(e,t,n,r,s){return rr(),ul(s),t.flags|=256,Le(e,t,n,r),t.child}var ma={dehydrated:null,treeContext:null,retryLane:0};function ga(e){return{baseLanes:e,cachePool:null,transitions:null}}function wf(e,t,n){var r=t.pendingProps,s=he.current,i=!1,a=(t.flags&128)!==0,l;if((l=a)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),ae(he,s&1),e===null)return la(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):(a=r.children,e=r.fallback,i?(r=t.mode,i=t.child,a={mode:"hidden",children:a},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=a):i=Wi(a,r,0,null),e=wn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=ga(n),t.memoizedState=ma,e):Nl(t,a));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return zm(e,t,a,r,l,s,n);if(i){i=r.fallback,a=t.mode,s=e.child,l=s.sibling;var u={mode:"hidden",children:r.children};return!(a&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=rn(s,u),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=rn(l,i):(i=wn(i,a,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,a=e.child.memoizedState,a=a===null?ga(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},i.memoizedState=a,i.childLanes=e.childLanes&~n,t.memoizedState=ma,r}return i=e.child,e=i.sibling,r=rn(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 Nl(e,t){return t=Wi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ts(e,t,n,r){return r!==null&&ul(r),sr(t,e.child,null,n),e=Nl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zm(e,t,n,r,s,i,a){if(n)return t.flags&256?(t.flags&=-257,r=jo(Error(T(422))),Ts(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Wi({mode:"visible",children:r.children},s,0,null),i=wn(i,s,a,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&sr(t,e.child,null,a),t.child.memoizedState=ga(a),t.memoizedState=ma,i);if(!(t.mode&1))return Ts(e,t,a,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(T(419)),r=jo(i,r,void 0),Ts(e,t,a,r)}if(l=(a&e.childLanes)!==0,We||l){if(r=Ce,r!==null){switch(a&-a){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|a)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Mt(e,s),gt(r,e,s,-1))}return Tl(),r=jo(Error(T(421))),Ts(e,t,a,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=qm.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Ke=Zt(s.nextSibling),Ge=t,pe=!0,ht=null,e!==null&&(tt[nt++]=Tt,tt[nt++]=Ot,tt[nt++]=Nn,Tt=e.id,Ot=e.overflow,Nn=t),t=Nl(t,r.children),t.flags|=4096,t)}function $u(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function bo(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 jf(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Le(e,t,r.children,n),r=he.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&&$u(e,n,t);else if(e.tag===19)$u(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(ae(he,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&&mi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),bo(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&&mi(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}bo(t,!0,n,null,i);break;case"together":bo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Qs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function _t(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Sn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(T(153));if(t.child!==null){for(e=t.child,n=rn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=rn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Rm(e,t,n){switch(t.tag){case 3:xf(t),rr();break;case 5:Qd(t);break;case 1:He(t.type)&&ui(t);break;case 4:ml(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;ae(fi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ae(he,he.current&1),t.flags|=128,null):n&t.child.childLanes?wf(e,t,n):(ae(he,he.current&1),e=_t(e,t,n),e!==null?e.sibling:null);ae(he,he.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return jf(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),ae(he,he.current),r)break;return null;case 22:case 23:return t.lanes=0,yf(e,t,n)}return _t(e,t,n)}var bf,ya,Nf,kf;bf=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}};ya=function(){};Nf=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,gn(kt.current);var i=null;switch(n){case"input":s=Do(e,s),r=Do(e,r),i=[];break;case"select":s=ge({},s,{value:void 0}),r=ge({},r,{value:void 0}),i=[];break;case"textarea":s=Wo(e,s),r=Wo(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ai)}Ho(n,r);var a;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var l=s[c];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Ur.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var u=r[c];if(l=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(u!=null||l!=null))if(c==="style")if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(i||(i=[]),i.push(c,n)),n=u;else c==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,l=l?l.__html:void 0,u!=null&&l!==u&&(i=i||[]).push(c,u)):c==="children"?typeof u!="string"&&typeof u!="number"||(i=i||[]).push(c,""+u):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Ur.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&ce("scroll",e),i||l===u||(i=[])):(i=i||[]).push(c,u))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};kf=function(e,t,n,r){n!==r&&(t.flags|=4)};function wr(e,t){if(!pe)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 Re(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 Mm(e,t,n){var r=t.pendingProps;switch(ll(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Re(t),null;case 1:return He(t.type)&&li(),Re(t),null;case 3:return r=t.stateNode,ir(),de(Be),de(_e),yl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Es(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ht!==null&&(Sa(ht),ht=null))),ya(e,t),Re(t),null;case 5:gl(t);var s=gn(Zr.current);if(n=t.type,e!==null&&t.stateNode!=null)Nf(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(T(166));return Re(t),null}if(e=gn(kt.current),Es(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[bt]=t,r[Xr]=i,e=(t.mode&1)!==0,n){case"dialog":ce("cancel",r),ce("close",r);break;case"iframe":case"object":case"embed":ce("load",r);break;case"video":case"audio":for(s=0;s<Tr.length;s++)ce(Tr[s],r);break;case"source":ce("error",r);break;case"img":case"image":case"link":ce("error",r),ce("load",r);break;case"details":ce("toggle",r);break;case"input":Gl(r,i),ce("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ce("invalid",r);break;case"textarea":Xl(r,i),ce("invalid",r)}Ho(n,i),s=null;for(var a in i)if(i.hasOwnProperty(a)){var l=i[a];a==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Cs(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Cs(r.textContent,l,e),s=["children",""+l]):Ur.hasOwnProperty(a)&&l!=null&&a==="onScroll"&&ce("scroll",r)}switch(n){case"input":vs(r),Yl(r,i,!0);break;case"textarea":vs(r),Jl(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ai)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Xc(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[bt]=t,e[Xr]=r,bf(e,t,!1,!1),t.stateNode=e;e:{switch(a=qo(n,r),n){case"dialog":ce("cancel",e),ce("close",e),s=r;break;case"iframe":case"object":case"embed":ce("load",e),s=r;break;case"video":case"audio":for(s=0;s<Tr.length;s++)ce(Tr[s],e);s=r;break;case"source":ce("error",e),s=r;break;case"img":case"image":case"link":ce("error",e),ce("load",e),s=r;break;case"details":ce("toggle",e),s=r;break;case"input":Gl(e,r),s=Do(e,r),ce("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ge({},r,{value:void 0}),ce("invalid",e);break;case"textarea":Xl(e,r),s=Wo(e,r),ce("invalid",e);break;default:s=r}Ho(n,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];i==="style"?ed(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&Jc(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&Wr(e,u):typeof u=="number"&&Wr(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Ur.hasOwnProperty(i)?u!=null&&i==="onScroll"&&ce("scroll",e):u!=null&&Va(e,i,u,a))}switch(n){case"input":vs(e),Yl(e,r,!1);break;case"textarea":vs(e),Jl(e);break;case"option":r.value!=null&&e.setAttribute("value",""+an(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Kn(e,!!r.multiple,i,!1):r.defaultValue!=null&&Kn(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=ai)}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 Re(t),null;case 6:if(e&&t.stateNode!=null)kf(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(T(166));if(n=gn(Zr.current),gn(kt.current),Es(t)){if(r=t.stateNode,n=t.memoizedProps,r[bt]=t,(i=r.nodeValue!==n)&&(e=Ge,e!==null))switch(e.tag){case 3:Cs(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Cs(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[bt]=t,t.stateNode=r}return Re(t),null;case 13:if(de(he),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(pe&&Ke!==null&&t.mode&1&&!(t.flags&128))Ud(),rr(),t.flags|=98560,i=!1;else if(i=Es(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(T(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(T(317));i[bt]=t}else rr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Re(t),i=!1}else ht!==null&&(Sa(ht),ht=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||he.current&1?Ne===0&&(Ne=3):Tl())),t.updateQueue!==null&&(t.flags|=4),Re(t),null);case 4:return ir(),ya(e,t),e===null&&Gr(t.stateNode.containerInfo),Re(t),null;case 10:return fl(t.type._context),Re(t),null;case 17:return He(t.type)&&li(),Re(t),null;case 19:if(de(he),i=t.memoizedState,i===null)return Re(t),null;if(r=(t.flags&128)!==0,a=i.rendering,a===null)if(r)wr(i,!1);else{if(Ne!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=mi(e),a!==null){for(t.flags|=128,wr(i,!1),r=a.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,a=i.alternate,a===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=a.childLanes,i.lanes=a.lanes,i.child=a.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=a.memoizedProps,i.memoizedState=a.memoizedState,i.updateQueue=a.updateQueue,i.type=a.type,e=a.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return ae(he,he.current&1|2),t.child}e=e.sibling}i.tail!==null&&xe()>ar&&(t.flags|=128,r=!0,wr(i,!1),t.lanes=4194304)}else{if(!r)if(e=mi(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!pe)return Re(t),null}else 2*xe()-i.renderingStartTime>ar&&n!==1073741824&&(t.flags|=128,r=!0,wr(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(n=i.last,n!==null?n.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=xe(),t.sibling=null,n=he.current,ae(he,r?n&1|2:n&1),t):(Re(t),null);case 22:case 23:return Pl(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ve&1073741824&&(Re(t),t.subtreeFlags&6&&(t.flags|=8192)):Re(t),null;case 24:return null;case 25:return null}throw Error(T(156,t.tag))}function _m(e,t){switch(ll(t),t.tag){case 1:return He(t.type)&&li(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ir(),de(Be),de(_e),yl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return gl(t),null;case 13:if(de(he),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(T(340));rr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return de(he),null;case 4:return ir(),null;case 10:return fl(t.type._context),null;case 22:case 23:return Pl(),null;case 24:return null;default:return null}}var Os=!1,Me=!1,Lm=typeof WeakSet=="function"?WeakSet:Set,_=null;function qn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ye(e,t,r)}else n.current=null}function va(e,t,n){try{n()}catch(r){ye(e,t,r)}}var Uu=!1;function Fm(e,t){if(ta=si,e=Pd(),ol(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 a=0,l=-1,u=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var y;f!==n||s!==0&&f.nodeType!==3||(l=a+s),f!==i||r!==0&&f.nodeType!==3||(u=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(y=f.firstChild)!==null;)p=f,f=y;for(;;){if(f===e)break t;if(p===n&&++c===s&&(l=a),p===i&&++d===r&&(u=a),(y=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=y}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(na={focusedElem:e,selectionRange:n},si=!1,_=t;_!==null;)if(t=_,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_=e;else for(;_!==null;){t=_;try{var v=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var x=v.memoizedProps,b=v.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?x:dt(t.type,x),b);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(T(163))}}catch(w){ye(t,t.return,w)}if(e=t.sibling,e!==null){e.return=t.return,_=e;break}_=t.return}return v=Uu,Uu=!1,v}function Fr(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&&va(t,n,i)}s=s.next}while(s!==r)}}function $i(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 xa(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 Sf(e){var t=e.alternate;t!==null&&(e.alternate=null,Sf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[bt],delete t[Xr],delete t[ia],delete t[xm],delete t[wm])),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 Cf(e){return e.tag===5||e.tag===3||e.tag===4}function Wu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cf(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 wa(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=ai));else if(r!==4&&(e=e.child,e!==null))for(wa(e,t,n),e=e.sibling;e!==null;)wa(e,t,n),e=e.sibling}function ja(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(ja(e,t,n),e=e.sibling;e!==null;)ja(e,t,n),e=e.sibling}var Pe=null,pt=!1;function It(e,t,n){for(n=n.child;n!==null;)Ef(e,t,n),n=n.sibling}function Ef(e,t,n){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(zi,n)}catch{}switch(n.tag){case 5:Me||qn(n,t);case 6:var r=Pe,s=pt;Pe=null,It(e,t,n),Pe=r,pt=s,Pe!==null&&(pt?(e=Pe,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Pe.removeChild(n.stateNode));break;case 18:Pe!==null&&(pt?(e=Pe,n=n.stateNode,e.nodeType===8?mo(e.parentNode,n):e.nodeType===1&&mo(e,n),Qr(e)):mo(Pe,n.stateNode));break;case 4:r=Pe,s=pt,Pe=n.stateNode.containerInfo,pt=!0,It(e,t,n),Pe=r,pt=s;break;case 0:case 11:case 14:case 15:if(!Me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,a=i.destroy;i=i.tag,a!==void 0&&(i&2||i&4)&&va(n,t,a),s=s.next}while(s!==r)}It(e,t,n);break;case 1:if(!Me&&(qn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){ye(n,t,l)}It(e,t,n);break;case 21:It(e,t,n);break;case 22:n.mode&1?(Me=(r=Me)||n.memoizedState!==null,It(e,t,n),Me=r):It(e,t,n);break;default:It(e,t,n)}}function Bu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Lm),t.forEach(function(r){var s=Qm.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function ut(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,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 5:Pe=l.stateNode,pt=!1;break e;case 3:Pe=l.stateNode.containerInfo,pt=!0;break e;case 4:Pe=l.stateNode.containerInfo,pt=!0;break e}l=l.return}if(Pe===null)throw Error(T(160));Ef(i,a,s),Pe=null,pt=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(c){ye(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Pf(t,e),t=t.sibling}function Pf(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ut(t,e),xt(e),r&4){try{Fr(3,e,e.return),$i(3,e)}catch(x){ye(e,e.return,x)}try{Fr(5,e,e.return)}catch(x){ye(e,e.return,x)}}break;case 1:ut(t,e),xt(e),r&512&&n!==null&&qn(n,n.return);break;case 5:if(ut(t,e),xt(e),r&512&&n!==null&&qn(n,n.return),e.flags&32){var s=e.stateNode;try{Wr(s,"")}catch(x){ye(e,e.return,x)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,a=n!==null?n.memoizedProps:i,l=e.type,u=e.updateQueue;if(e.updateQueue=null,u!==null)try{l==="input"&&i.type==="radio"&&i.name!=null&&Gc(s,i),qo(l,a);var c=qo(l,i);for(a=0;a<u.length;a+=2){var d=u[a],f=u[a+1];d==="style"?ed(s,f):d==="dangerouslySetInnerHTML"?Jc(s,f):d==="children"?Wr(s,f):Va(s,d,f,c)}switch(l){case"input":$o(s,i);break;case"textarea":Yc(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var y=i.value;y!=null?Kn(s,!!i.multiple,y,!1):p!==!!i.multiple&&(i.defaultValue!=null?Kn(s,!!i.multiple,i.defaultValue,!0):Kn(s,!!i.multiple,i.multiple?[]:"",!1))}s[Xr]=i}catch(x){ye(e,e.return,x)}}break;case 6:if(ut(t,e),xt(e),r&4){if(e.stateNode===null)throw Error(T(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(x){ye(e,e.return,x)}}break;case 3:if(ut(t,e),xt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Qr(t.containerInfo)}catch(x){ye(e,e.return,x)}break;case 4:ut(t,e),xt(e);break;case 13:ut(t,e),xt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Cl=xe())),r&4&&Bu(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Me=(c=Me)||d,ut(t,e),Me=c):ut(t,e),xt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(_=e,d=e.child;d!==null;){for(f=_=d;_!==null;){switch(p=_,y=p.child,p.tag){case 0:case 11:case 14:case 15:Fr(4,p,p.return);break;case 1:qn(p,p.return);var v=p.stateNode;if(typeof v.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,v.props=t.memoizedProps,v.state=t.memoizedState,v.componentWillUnmount()}catch(x){ye(r,n,x)}}break;case 5:qn(p,p.return);break;case 22:if(p.memoizedState!==null){qu(f);continue}}y!==null?(y.return=p,_=y):qu(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(l=f.stateNode,u=f.memoizedProps.style,a=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=Zc("display",a))}catch(x){ye(e,e.return,x)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(x){ye(e,e.return,x)}}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:ut(t,e),xt(e),r&4&&Bu(e);break;case 21:break;default:ut(t,e),xt(e)}}function xt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Cf(n)){var r=n;break e}n=n.return}throw Error(T(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(Wr(s,""),r.flags&=-33);var i=Wu(e);ja(e,i,s);break;case 3:case 4:var a=r.stateNode.containerInfo,l=Wu(e);wa(e,l,a);break;default:throw Error(T(161))}}catch(u){ye(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Im(e,t,n){_=e,Tf(e)}function Tf(e,t,n){for(var r=(e.mode&1)!==0;_!==null;){var s=_,i=s.child;if(s.tag===22&&r){var a=s.memoizedState!==null||Os;if(!a){var l=s.alternate,u=l!==null&&l.memoizedState!==null||Me;l=Os;var c=Me;if(Os=a,(Me=u)&&!c)for(_=s;_!==null;)a=_,u=a.child,a.tag===22&&a.memoizedState!==null?Qu(s):u!==null?(u.return=a,_=u):Qu(s);for(;i!==null;)_=i,Tf(i),i=i.sibling;_=s,Os=l,Me=c}Hu(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,_=i):Hu(e)}}function Hu(e){for(;_!==null;){var t=_;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Me||$i(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Me)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:dt(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Pu(t,i,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Pu(t,a,n)}break;case 5:var l=t.stateNode;if(n===null&&t.flags&4){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Qr(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(T(163))}Me||t.flags&512&&xa(t)}catch(p){ye(t,t.return,p)}}if(t===e){_=null;break}if(n=t.sibling,n!==null){n.return=t.return,_=n;break}_=t.return}}function qu(e){for(;_!==null;){var t=_;if(t===e){_=null;break}var n=t.sibling;if(n!==null){n.return=t.return,_=n;break}_=t.return}}function Qu(e){for(;_!==null;){var t=_;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{$i(4,t)}catch(u){ye(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){ye(t,s,u)}}var i=t.return;try{xa(t)}catch(u){ye(t,i,u)}break;case 5:var a=t.return;try{xa(t)}catch(u){ye(t,a,u)}}}catch(u){ye(t,t.return,u)}if(t===e){_=null;break}var l=t.sibling;if(l!==null){l.return=t.return,_=l;break}_=t.return}}var Dm=Math.ceil,vi=Lt.ReactCurrentDispatcher,kl=Lt.ReactCurrentOwner,st=Lt.ReactCurrentBatchConfig,te=0,Ce=null,we=null,Te=0,Ve=0,Qn=cn(0),Ne=0,rs=null,Sn=0,Ui=0,Sl=0,Ir=null,Ue=null,Cl=0,ar=1/0,Ct=null,xi=!1,ba=null,tn=null,As=!1,Kt=null,wi=0,Dr=0,Na=null,Vs=-1,Ks=0;function Ie(){return te&6?xe():Vs!==-1?Vs:Vs=xe()}function nn(e){return e.mode&1?te&2&&Te!==0?Te&-Te:bm.transition!==null?(Ks===0&&(Ks=fd()),Ks):(e=se,e!==0||(e=window.event,e=e===void 0?16:xd(e.type)),e):1}function gt(e,t,n,r){if(50<Dr)throw Dr=0,Na=null,Error(T(185));as(e,n,r),(!(te&2)||e!==Ce)&&(e===Ce&&(!(te&2)&&(Ui|=n),Ne===4&&qt(e,Te)),qe(e,r),n===1&&te===0&&!(t.mode&1)&&(ar=xe()+500,Fi&&dn()))}function qe(e,t){var n=e.callbackNode;bh(e,t);var r=ri(e,e===Ce?Te:0);if(r===0)n!==null&&tu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&tu(n),t===1)e.tag===0?jm(Vu.bind(null,e)):Id(Vu.bind(null,e)),ym(function(){!(te&6)&&dn()}),n=null;else{switch(pd(r)){case 1:n=Ja;break;case 4:n=cd;break;case 16:n=ni;break;case 536870912:n=dd;break;default:n=ni}n=Ff(n,Of.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Of(e,t){if(Vs=-1,Ks=0,te&6)throw Error(T(327));var n=e.callbackNode;if(Zn()&&e.callbackNode!==n)return null;var r=ri(e,e===Ce?Te:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=ji(e,r);else{t=r;var s=te;te|=2;var i=zf();(Ce!==e||Te!==t)&&(Ct=null,ar=xe()+500,xn(e,t));do try{Wm();break}catch(l){Af(e,l)}while(1);dl(),vi.current=i,te=s,we!==null?t=0:(Ce=null,Te=0,t=Ne)}if(t!==0){if(t===2&&(s=Yo(e),s!==0&&(r=s,t=ka(e,s))),t===1)throw n=rs,xn(e,0),qt(e,r),qe(e,xe()),n;if(t===6)qt(e,r);else{if(s=e.current.alternate,!(r&30)&&!$m(s)&&(t=ji(e,r),t===2&&(i=Yo(e),i!==0&&(r=i,t=ka(e,i))),t===1))throw n=rs,xn(e,0),qt(e,r),qe(e,xe()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(T(345));case 2:pn(e,Ue,Ct);break;case 3:if(qt(e,r),(r&130023424)===r&&(t=Cl+500-xe(),10<t)){if(ri(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Ie(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=sa(pn.bind(null,e,Ue,Ct),t);break}pn(e,Ue,Ct);break;case 4:if(qt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var a=31-mt(r);i=1<<a,a=t[a],a>s&&(s=a),r&=~i}if(r=s,r=xe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Dm(r/1960))-r,10<r){e.timeoutHandle=sa(pn.bind(null,e,Ue,Ct),r);break}pn(e,Ue,Ct);break;case 5:pn(e,Ue,Ct);break;default:throw Error(T(329))}}}return qe(e,xe()),e.callbackNode===n?Of.bind(null,e):null}function ka(e,t){var n=Ir;return e.current.memoizedState.isDehydrated&&(xn(e,t).flags|=256),e=ji(e,t),e!==2&&(t=Ue,Ue=n,t!==null&&Sa(t)),e}function Sa(e){Ue===null?Ue=e:Ue.push.apply(Ue,e)}function $m(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(!yt(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 qt(e,t){for(t&=~Sl,t&=~Ui,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-mt(t),r=1<<n;e[n]=-1,t&=~r}}function Vu(e){if(te&6)throw Error(T(327));Zn();var t=ri(e,0);if(!(t&1))return qe(e,xe()),null;var n=ji(e,t);if(e.tag!==0&&n===2){var r=Yo(e);r!==0&&(t=r,n=ka(e,r))}if(n===1)throw n=rs,xn(e,0),qt(e,t),qe(e,xe()),n;if(n===6)throw Error(T(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,pn(e,Ue,Ct),qe(e,xe()),null}function El(e,t){var n=te;te|=1;try{return e(t)}finally{te=n,te===0&&(ar=xe()+500,Fi&&dn())}}function Cn(e){Kt!==null&&Kt.tag===0&&!(te&6)&&Zn();var t=te;te|=1;var n=st.transition,r=se;try{if(st.transition=null,se=1,e)return e()}finally{se=r,st.transition=n,te=t,!(te&6)&&dn()}}function Pl(){Ve=Qn.current,de(Qn)}function xn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,gm(n)),we!==null)for(n=we.return;n!==null;){var r=n;switch(ll(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&li();break;case 3:ir(),de(Be),de(_e),yl();break;case 5:gl(r);break;case 4:ir();break;case 13:de(he);break;case 19:de(he);break;case 10:fl(r.type._context);break;case 22:case 23:Pl()}n=n.return}if(Ce=e,we=e=rn(e.current,null),Te=Ve=t,Ne=0,rs=null,Sl=Ui=Sn=0,Ue=Ir=null,mn!==null){for(t=0;t<mn.length;t++)if(n=mn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var a=i.next;i.next=s,r.next=a}n.pending=r}mn=null}return e}function Af(e,t){do{var n=we;try{if(dl(),Hs.current=yi,gi){for(var r=me.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}gi=!1}if(kn=0,Se=be=me=null,Lr=!1,es=0,kl.current=null,n===null||n.return===null){Ne=1,rs=t,we=null;break}e:{var i=e,a=n.return,l=n,u=t;if(t=Te,l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){var c=u,d=l,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var y=Mu(a);if(y!==null){y.flags&=-257,_u(y,a,l,i,t),y.mode&1&&Ru(i,c,t),t=y,u=c;var v=t.updateQueue;if(v===null){var x=new Set;x.add(u),t.updateQueue=x}else v.add(u);break e}else{if(!(t&1)){Ru(i,c,t),Tl();break e}u=Error(T(426))}}else if(pe&&l.mode&1){var b=Mu(a);if(b!==null){!(b.flags&65536)&&(b.flags|=256),_u(b,a,l,i,t),ul(or(u,l));break e}}i=u=or(u,l),Ne!==4&&(Ne=2),Ir===null?Ir=[i]:Ir.push(i),i=a;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=hf(i,u,t);Eu(i,m);break e;case 1:l=u;var h=i.type,g=i.stateNode;if(!(i.flags&128)&&(typeof h.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(tn===null||!tn.has(g)))){i.flags|=65536,t&=-t,i.lanes|=t;var w=mf(i,l,t);Eu(i,w);break e}}i=i.return}while(i!==null)}Mf(n)}catch(C){t=C,we===n&&n!==null&&(we=n=n.return);continue}break}while(1)}function zf(){var e=vi.current;return vi.current=yi,e===null?yi:e}function Tl(){(Ne===0||Ne===3||Ne===2)&&(Ne=4),Ce===null||!(Sn&268435455)&&!(Ui&268435455)||qt(Ce,Te)}function ji(e,t){var n=te;te|=2;var r=zf();(Ce!==e||Te!==t)&&(Ct=null,xn(e,t));do try{Um();break}catch(s){Af(e,s)}while(1);if(dl(),te=n,vi.current=r,we!==null)throw Error(T(261));return Ce=null,Te=0,Ne}function Um(){for(;we!==null;)Rf(we)}function Wm(){for(;we!==null&&!ph();)Rf(we)}function Rf(e){var t=Lf(e.alternate,e,Ve);e.memoizedProps=e.pendingProps,t===null?Mf(e):we=t,kl.current=null}function Mf(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=_m(n,t),n!==null){n.flags&=32767,we=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ne=6,we=null;return}}else if(n=Mm(n,t,Ve),n!==null){we=n;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);Ne===0&&(Ne=5)}function pn(e,t,n){var r=se,s=st.transition;try{st.transition=null,se=1,Bm(e,t,n,r)}finally{st.transition=s,se=r}return null}function Bm(e,t,n,r){do Zn();while(Kt!==null);if(te&6)throw Error(T(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(T(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(Nh(e,i),e===Ce&&(we=Ce=null,Te=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||As||(As=!0,Ff(ni,function(){return Zn(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=st.transition,st.transition=null;var a=se;se=1;var l=te;te|=4,kl.current=null,Fm(e,n),Pf(n,e),um(na),si=!!ta,na=ta=null,e.current=n,Im(n),hh(),te=l,se=a,st.transition=i}else e.current=n;if(As&&(As=!1,Kt=e,wi=s),i=e.pendingLanes,i===0&&(tn=null),yh(n.stateNode),qe(e,xe()),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(xi)throw xi=!1,e=ba,ba=null,e;return wi&1&&e.tag!==0&&Zn(),i=e.pendingLanes,i&1?e===Na?Dr++:(Dr=0,Na=e):Dr=0,dn(),null}function Zn(){if(Kt!==null){var e=pd(wi),t=st.transition,n=se;try{if(st.transition=null,se=16>e?16:e,Kt===null)var r=!1;else{if(e=Kt,Kt=null,wi=0,te&6)throw Error(T(331));var s=te;for(te|=4,_=e.current;_!==null;){var i=_,a=i.child;if(_.flags&16){var l=i.deletions;if(l!==null){for(var u=0;u<l.length;u++){var c=l[u];for(_=c;_!==null;){var d=_;switch(d.tag){case 0:case 11:case 15:Fr(8,d,i)}var f=d.child;if(f!==null)f.return=d,_=f;else for(;_!==null;){d=_;var p=d.sibling,y=d.return;if(Sf(d),d===c){_=null;break}if(p!==null){p.return=y,_=p;break}_=y}}}var v=i.alternate;if(v!==null){var x=v.child;if(x!==null){v.child=null;do{var b=x.sibling;x.sibling=null,x=b}while(x!==null)}}_=i}}if(i.subtreeFlags&2064&&a!==null)a.return=i,_=a;else e:for(;_!==null;){if(i=_,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Fr(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,_=m;break e}_=i.return}}var h=e.current;for(_=h;_!==null;){a=_;var g=a.child;if(a.subtreeFlags&2064&&g!==null)g.return=a,_=g;else e:for(a=h;_!==null;){if(l=_,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:$i(9,l)}}catch(C){ye(l,l.return,C)}if(l===a){_=null;break e}var w=l.sibling;if(w!==null){w.return=l.return,_=w;break e}_=l.return}}if(te=s,dn(),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(zi,e)}catch{}r=!0}return r}finally{se=n,st.transition=t}}return!1}function Ku(e,t,n){t=or(n,t),t=hf(e,t,1),e=en(e,t,1),t=Ie(),e!==null&&(as(e,1,t),qe(e,t))}function ye(e,t,n){if(e.tag===3)Ku(e,e,n);else for(;t!==null;){if(t.tag===3){Ku(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(tn===null||!tn.has(r))){e=or(n,e),e=mf(t,e,1),t=en(t,e,1),e=Ie(),t!==null&&(as(t,1,e),qe(t,e));break}}t=t.return}}function Hm(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ie(),e.pingedLanes|=e.suspendedLanes&n,Ce===e&&(Te&n)===n&&(Ne===4||Ne===3&&(Te&130023424)===Te&&500>xe()-Cl?xn(e,0):Sl|=n),qe(e,t)}function _f(e,t){t===0&&(e.mode&1?(t=js,js<<=1,!(js&130023424)&&(js=4194304)):t=1);var n=Ie();e=Mt(e,t),e!==null&&(as(e,t,n),qe(e,n))}function qm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_f(e,n)}function Qm(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(T(314))}r!==null&&r.delete(t),_f(e,n)}var Lf;Lf=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Be.current)We=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return We=!1,Rm(e,t,n);We=!!(e.flags&131072)}else We=!1,pe&&t.flags&1048576&&Dd(t,di,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Qs(e,t),e=t.pendingProps;var s=nr(t,_e.current);Jn(t,n),s=xl(null,t,r,e,s,n);var i=wl();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,He(r)?(i=!0,ui(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,hl(t),s.updater=Di,t.stateNode=s,s._reactInternals=t,da(t,r,e,n),t=ha(null,t,r,!0,i,n)):(t.tag=0,pe&&i&&al(t),Le(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Qs(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Km(r),e=dt(r,e),s){case 0:t=pa(null,t,r,e,n);break e;case 1:t=Iu(null,t,r,e,n);break e;case 11:t=Lu(null,t,r,e,n);break e;case 14:t=Fu(null,t,r,dt(r.type,e),n);break e}throw Error(T(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:dt(r,s),pa(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:dt(r,s),Iu(e,t,r,s,n);case 3:e:{if(xf(t),e===null)throw Error(T(387));r=t.pendingProps,i=t.memoizedState,s=i.element,qd(e,t),hi(t,r,null,n);var a=t.memoizedState;if(r=a.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=or(Error(T(423)),t),t=Du(e,t,r,n,s);break e}else if(r!==s){s=or(Error(T(424)),t),t=Du(e,t,r,n,s);break e}else for(Ke=Zt(t.stateNode.containerInfo.firstChild),Ge=t,pe=!0,ht=null,n=Bd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(rr(),r===s){t=_t(e,t,n);break e}Le(e,t,r,n)}t=t.child}return t;case 5:return Qd(t),e===null&&la(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,a=s.children,ra(r,s)?a=null:i!==null&&ra(r,i)&&(t.flags|=32),vf(e,t),Le(e,t,a,n),t.child;case 6:return e===null&&la(t),null;case 13:return wf(e,t,n);case 4:return ml(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=sr(t,null,r,n):Le(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:dt(r,s),Lu(e,t,r,s,n);case 7:return Le(e,t,t.pendingProps,n),t.child;case 8:return Le(e,t,t.pendingProps.children,n),t.child;case 12:return Le(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,a=s.value,ae(fi,r._currentValue),r._currentValue=a,i!==null)if(yt(i.value,a)){if(i.children===s.children&&!Be.current){t=_t(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var l=i.dependencies;if(l!==null){a=i.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=At(-1,n&-n),u.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}i.lanes|=n,u=i.alternate,u!==null&&(u.lanes|=n),ua(i.return,n,t),l.lanes|=n;break}u=u.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(T(341));a.lanes|=n,l=a.alternate,l!==null&&(l.lanes|=n),ua(a,n,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Le(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Jn(t,n),s=it(s),r=r(s),t.flags|=1,Le(e,t,r,n),t.child;case 14:return r=t.type,s=dt(r,t.pendingProps),s=dt(r.type,s),Fu(e,t,r,s,n);case 15:return gf(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:dt(r,s),Qs(e,t),t.tag=1,He(r)?(e=!0,ui(t)):e=!1,Jn(t,n),pf(t,r,s),da(t,r,s,n),ha(null,t,r,!0,e,n);case 19:return jf(e,t,n);case 22:return yf(e,t,n)}throw Error(T(156,t.tag))};function Ff(e,t){return ud(e,t)}function Vm(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 rt(e,t,n,r){return new Vm(e,t,n,r)}function Ol(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Km(e){if(typeof e=="function")return Ol(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ga)return 11;if(e===Ya)return 14}return 2}function rn(e,t){var n=e.alternate;return n===null?(n=rt(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 Gs(e,t,n,r,s,i){var a=2;if(r=e,typeof e=="function")Ol(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Ln:return wn(n.children,s,i,t);case Ka:a=8,s|=8;break;case _o:return e=rt(12,n,t,s|2),e.elementType=_o,e.lanes=i,e;case Lo:return e=rt(13,n,t,s),e.elementType=Lo,e.lanes=i,e;case Fo:return e=rt(19,n,t,s),e.elementType=Fo,e.lanes=i,e;case Qc:return Wi(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Hc:a=10;break e;case qc:a=9;break e;case Ga:a=11;break e;case Ya:a=14;break e;case $t:a=16,r=null;break e}throw Error(T(130,e==null?e:typeof e,""))}return t=rt(a,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function wn(e,t,n,r){return e=rt(7,e,r,t),e.lanes=n,e}function Wi(e,t,n,r){return e=rt(22,e,r,t),e.elementType=Qc,e.lanes=n,e.stateNode={isHidden:!1},e}function No(e,t,n){return e=rt(6,e,null,t),e.lanes=n,e}function ko(e,t,n){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Gm(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=ro(0),this.expirationTimes=ro(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ro(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Al(e,t,n,r,s,i,a,l,u){return e=new Gm(e,t,n,l,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=rt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},hl(i),e}function Ym(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_n,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function If(e){if(!e)return ln;e=e._reactInternals;e:{if(Pn(e)!==e||e.tag!==1)throw Error(T(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(He(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(T(171))}if(e.tag===1){var n=e.type;if(He(n))return Fd(e,n,t)}return t}function Df(e,t,n,r,s,i,a,l,u){return e=Al(n,r,!0,e,s,i,a,l,u),e.context=If(null),n=e.current,r=Ie(),s=nn(n),i=At(r,s),i.callback=t??null,en(n,i,s),e.current.lanes=s,as(e,s,r),qe(e,r),e}function Bi(e,t,n,r){var s=t.current,i=Ie(),a=nn(s);return n=If(n),t.context===null?t.context=n:t.pendingContext=n,t=At(i,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=en(s,t,a),e!==null&&(gt(e,s,a,i),Bs(e,s,a)),a}function bi(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 Gu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function zl(e,t){Gu(e,t),(e=e.alternate)&&Gu(e,t)}function Xm(){return null}var $f=typeof reportError=="function"?reportError:function(e){console.error(e)};function Rl(e){this._internalRoot=e}Hi.prototype.render=Rl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(T(409));Bi(e,t,null,null)};Hi.prototype.unmount=Rl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cn(function(){Bi(null,e,null,null)}),t[Rt]=null}};function Hi(e){this._internalRoot=e}Hi.prototype.unstable_scheduleHydration=function(e){if(e){var t=gd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ht.length&&t!==0&&t<Ht[n].priority;n++);Ht.splice(n,0,e),n===0&&vd(e)}};function Ml(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function qi(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yu(){}function Jm(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=bi(a);i.call(c)}}var a=Df(t,r,e,0,null,!1,!1,"",Yu);return e._reactRootContainer=a,e[Rt]=a.current,Gr(e.nodeType===8?e.parentNode:e),Cn(),a}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var c=bi(u);l.call(c)}}var u=Al(e,0,!1,null,null,!1,!1,"",Yu);return e._reactRootContainer=u,e[Rt]=u.current,Gr(e.nodeType===8?e.parentNode:e),Cn(function(){Bi(t,u,n,r)}),u}function Qi(e,t,n,r,s){var i=n._reactRootContainer;if(i){var a=i;if(typeof s=="function"){var l=s;s=function(){var u=bi(a);l.call(u)}}Bi(t,a,e,s)}else a=Jm(n,t,e,s,r);return bi(a)}hd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Pr(t.pendingLanes);n!==0&&(Za(t,n|1),qe(t,xe()),!(te&6)&&(ar=xe()+500,dn()))}break;case 13:Cn(function(){var r=Mt(e,1);if(r!==null){var s=Ie();gt(r,e,1,s)}}),zl(e,1)}};el=function(e){if(e.tag===13){var t=Mt(e,134217728);if(t!==null){var n=Ie();gt(t,e,134217728,n)}zl(e,134217728)}};md=function(e){if(e.tag===13){var t=nn(e),n=Mt(e,t);if(n!==null){var r=Ie();gt(n,e,t,r)}zl(e,t)}};gd=function(){return se};yd=function(e,t){var n=se;try{return se=e,t()}finally{se=n}};Vo=function(e,t,n){switch(t){case"input":if($o(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=Li(r);if(!s)throw Error(T(90));Kc(r),$o(r,s)}}}break;case"textarea":Yc(e,n);break;case"select":t=n.value,t!=null&&Kn(e,!!n.multiple,t,!1)}};rd=El;sd=Cn;var Zm={usingClientEntryPoint:!1,Events:[us,$n,Li,td,nd,El]},jr={findFiberByHostInstance:hn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},eg={bundleType:jr.bundleType,version:jr.version,rendererPackageName:jr.rendererPackageName,rendererConfig:jr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Lt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ad(e),e===null?null:e.stateNode},findFiberByHostInstance:jr.findFiberByHostInstance||Xm,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 zs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zs.isDisabled&&zs.supportsFiber)try{zi=zs.inject(eg),Nt=zs}catch{}}Xe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Zm;Xe.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ml(t))throw Error(T(200));return Ym(e,t,null,n)};Xe.createRoot=function(e,t){if(!Ml(e))throw Error(T(299));var n=!1,r="",s=$f;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Al(e,1,!1,null,null,n,!1,r,s),e[Rt]=t.current,Gr(e.nodeType===8?e.parentNode:e),new Rl(t)};Xe.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(T(188)):(e=Object.keys(e).join(","),Error(T(268,e)));return e=ad(t),e=e===null?null:e.stateNode,e};Xe.flushSync=function(e){return Cn(e)};Xe.hydrate=function(e,t,n){if(!qi(t))throw Error(T(200));return Qi(null,e,t,!0,n)};Xe.hydrateRoot=function(e,t,n){if(!Ml(e))throw Error(T(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",a=$f;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Df(t,null,e,1,n??null,s,!1,i,a),e[Rt]=t.current,Gr(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 Hi(t)};Xe.render=function(e,t,n){if(!qi(t))throw Error(T(200));return Qi(null,e,t,!1,n)};Xe.unmountComponentAtNode=function(e){if(!qi(e))throw Error(T(40));return e._reactRootContainer?(Cn(function(){Qi(null,null,e,!1,function(){e._reactRootContainer=null,e[Rt]=null})}),!0):!1};Xe.unstable_batchedUpdates=El;Xe.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!qi(n))throw Error(T(200));if(e==null||e._reactInternals===void 0)throw Error(T(38));return Qi(e,t,n,!1,r)};Xe.version="18.3.1-next-f1338f8080-20240426";function Uf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Uf)}catch(e){console.error(e)}}Uf(),$c.exports=Xe;var Wf=$c.exports;const tg=lr(Wf);var Xu=Wf;Ro.createRoot=Xu.createRoot,Ro.hydrateRoot=Xu.hydrateRoot;/**
|
|
41
|
+
* @remix-run/router v1.23.0
|
|
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 ss(){return ss=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},ss.apply(this,arguments)}var Gt;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Gt||(Gt={}));const Ju="popstate";function ng(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:a,hash:l}=r.location;return Ca("",{pathname:i,search:a,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:Ni(s)}return sg(t,n,null,e)}function je(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Bf(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function rg(){return Math.random().toString(36).substr(2,8)}function Zu(e,t){return{usr:e.state,key:e.key,idx:t}}function Ca(e,t,n,r){return n===void 0&&(n=null),ss({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?fr(t):t,{state:n,key:t&&t.key||r||rg()})}function Ni(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 fr(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 sg(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,a=s.history,l=Gt.Pop,u=null,c=d();c==null&&(c=0,a.replaceState(ss({},a.state,{idx:c}),""));function d(){return(a.state||{idx:null}).idx}function f(){l=Gt.Pop;let b=d(),m=b==null?null:b-c;c=b,u&&u({action:l,location:x.location,delta:m})}function p(b,m){l=Gt.Push;let h=Ca(x.location,b,m);n&&n(h,b),c=d()+1;let g=Zu(h,c),w=x.createHref(h);try{a.pushState(g,"",w)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;s.location.assign(w)}i&&u&&u({action:l,location:x.location,delta:1})}function y(b,m){l=Gt.Replace;let h=Ca(x.location,b,m);n&&n(h,b),c=d();let g=Zu(h,c),w=x.createHref(h);a.replaceState(g,"",w),i&&u&&u({action:l,location:x.location,delta:0})}function v(b){let m=s.location.origin!=="null"?s.location.origin:s.location.href,h=typeof b=="string"?b:Ni(b);return h=h.replace(/ $/,"%20"),je(m,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,m)}let x={get action(){return l},get location(){return e(s,a)},listen(b){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(Ju,f),u=b,()=>{s.removeEventListener(Ju,f),u=null}},createHref(b){return t(s,b)},createURL:v,encodeLocation(b){let m=v(b);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:y,go(b){return a.go(b)}};return x}var ec;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ec||(ec={}));function ig(e,t,n){return n===void 0&&(n="/"),og(e,t,n,!1)}function og(e,t,n,r){let s=typeof t=="string"?fr(t):t,i=_l(s.pathname||"/",n);if(i==null)return null;let a=Hf(e);ag(a);let l=null;for(let u=0;l==null&&u<a.length;++u){let c=vg(i);l=gg(a[u],c,r)}return l}function Hf(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,a,l)=>{let u={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:a,route:i};u.relativePath.startsWith("/")&&(je(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let c=sn([r,u.relativePath]),d=n.concat(u);i.children&&i.children.length>0&&(je(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Hf(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:hg(c,i.index),routesMeta:d})};return e.forEach((i,a)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))s(i,a);else for(let u of qf(i.path))s(i,a,u)}),t}function qf(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 a=qf(r.join("/")),l=[];return l.push(...a.map(u=>u===""?i:[i,u].join("/"))),s&&l.push(...a),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function ag(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:mg(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const lg=/^:[\w-]+$/,ug=3,cg=2,dg=1,fg=10,pg=-2,tc=e=>e==="*";function hg(e,t){let n=e.split("/"),r=n.length;return n.some(tc)&&(r+=pg),t&&(r+=cg),n.filter(s=>!tc(s)).reduce((s,i)=>s+(lg.test(i)?ug:i===""?dg:fg),r)}function mg(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 gg(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},i="/",a=[];for(let l=0;l<r.length;++l){let u=r[l],c=l===r.length-1,d=i==="/"?t:t.slice(i.length)||"/",f=nc({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),p=u.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=nc({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),a.push({params:s,pathname:sn([i,f.pathname]),pathnameBase:bg(sn([i,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(i=sn([i,f.pathnameBase]))}return a}function nc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=yg(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],a=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((c,d,f)=>{let{paramName:p,isOptional:y}=d;if(p==="*"){let x=l[f]||"";a=i.slice(0,i.length-x.length).replace(/(.)\/+$/,"$1")}const v=l[f];return y&&!v?c[p]=void 0:c[p]=(v||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:a,pattern:e}}function yg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Bf(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,(a,l,u)=>(r.push({paramName:l,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function vg(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Bf(!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 _l(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)||"/"}function xg(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?fr(e):e;return{pathname:n?n.startsWith("/")?n:wg(n,t):t,search:Ng(r),hash:kg(s)}}function wg(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 So(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 jg(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Qf(e,t){let n=jg(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function Vf(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=fr(e):(s=ss({},e),je(!s.pathname||!s.pathname.includes("?"),So("?","pathname","search",s)),je(!s.pathname||!s.pathname.includes("#"),So("#","pathname","hash",s)),je(!s.search||!s.search.includes("#"),So("#","search","hash",s)));let i=e===""||s.pathname==="",a=i?"/":s.pathname,l;if(a==null)l=n;else{let f=t.length-1;if(!r&&a.startsWith("..")){let p=a.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}l=f>=0?t[f]:"/"}let u=xg(s,l),c=a&&a!=="/"&&a.endsWith("/"),d=(i||a===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const sn=e=>e.join("/").replace(/\/\/+/g,"/"),bg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ng=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kg=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Sg(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Kf=["post","put","patch","delete"];new Set(Kf);const Cg=["get",...Kf];new Set(Cg);/**
|
|
50
|
+
* React Router v6.30.1
|
|
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 is(){return is=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},is.apply(this,arguments)}const Ll=N.createContext(null),Eg=N.createContext(null),Tn=N.createContext(null),Vi=N.createContext(null),On=N.createContext({outlet:null,matches:[],isDataRoute:!1}),Gf=N.createContext(null);function Pg(e,t){let{relative:n}=t===void 0?{}:t;ds()||je(!1);let{basename:r,navigator:s}=N.useContext(Tn),{hash:i,pathname:a,search:l}=Xf(e,{relative:n}),u=a;return r!=="/"&&(u=a==="/"?r:sn([r,a])),s.createHref({pathname:u,search:l,hash:i})}function ds(){return N.useContext(Vi)!=null}function fs(){return ds()||je(!1),N.useContext(Vi).location}function Yf(e){N.useContext(Tn).static||N.useLayoutEffect(e)}function Tg(){let{isDataRoute:e}=N.useContext(On);return e?Wg():Og()}function Og(){ds()||je(!1);let e=N.useContext(Ll),{basename:t,future:n,navigator:r}=N.useContext(Tn),{matches:s}=N.useContext(On),{pathname:i}=fs(),a=JSON.stringify(Qf(s,n.v7_relativeSplatPath)),l=N.useRef(!1);return Yf(()=>{l.current=!0}),N.useCallback(function(c,d){if(d===void 0&&(d={}),!l.current)return;if(typeof c=="number"){r.go(c);return}let f=Vf(c,JSON.parse(a),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:sn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,a,i,e])}function Xf(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=N.useContext(Tn),{matches:s}=N.useContext(On),{pathname:i}=fs(),a=JSON.stringify(Qf(s,r.v7_relativeSplatPath));return N.useMemo(()=>Vf(e,JSON.parse(a),i,n==="path"),[e,a,i,n])}function Ag(e,t){return zg(e,t)}function zg(e,t,n,r){ds()||je(!1);let{navigator:s}=N.useContext(Tn),{matches:i}=N.useContext(On),a=i[i.length-1],l=a?a.params:{};a&&a.pathname;let u=a?a.pathnameBase:"/";a&&a.route;let c=fs(),d;if(t){var f;let b=typeof t=="string"?fr(t):t;u==="/"||(f=b.pathname)!=null&&f.startsWith(u)||je(!1),d=b}else d=c;let p=d.pathname||"/",y=p;if(u!=="/"){let b=u.replace(/^\//,"").split("/");y="/"+p.replace(/^\//,"").split("/").slice(b.length).join("/")}let v=ig(e,{pathname:y}),x=Fg(v&&v.map(b=>Object.assign({},b,{params:Object.assign({},l,b.params),pathname:sn([u,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?u:sn([u,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&x?N.createElement(Vi.Provider,{value:{location:is({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:Gt.Pop}},x):x}function Rg(){let e=Ug(),t=Sg(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)"},i=null;return N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},t),n?N.createElement("pre",{style:s},n):null,i)}const Mg=N.createElement(Rg,null);class _g extends N.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?N.createElement(On.Provider,{value:this.props.routeContext},N.createElement(Gf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Lg(e){let{routeContext:t,match:n,children:r}=e,s=N.useContext(Ll);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),N.createElement(On.Provider,{value:t},r)}function Fg(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 a=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=a.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||je(!1),a=a.slice(0,Math.min(a.length,d+1))}let u=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<a.length;d++){let f=a[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:p,errors:y}=n,v=f.route.loader&&p[f.route.id]===void 0&&(!y||y[f.route.id]===void 0);if(f.route.lazy||v){u=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((d,f,p)=>{let y,v=!1,x=null,b=null;n&&(y=l&&f.route.id?l[f.route.id]:void 0,x=f.route.errorElement||Mg,u&&(c<0&&p===0?(Bg("route-fallback",!1),v=!0,b=null):c===p&&(v=!0,b=f.route.hydrateFallbackElement||null)));let m=t.concat(a.slice(0,p+1)),h=()=>{let g;return y?g=x:v?g=b:f.route.Component?g=N.createElement(f.route.Component,null):f.route.element?g=f.route.element:g=d,N.createElement(Lg,{match:f,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:g})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?N.createElement(_g,{location:n.location,revalidation:n.revalidation,component:x,error:y,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):h()},null)}var Jf=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Jf||{}),ki=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}(ki||{});function Ig(e){let t=N.useContext(Ll);return t||je(!1),t}function Dg(e){let t=N.useContext(Eg);return t||je(!1),t}function $g(e){let t=N.useContext(On);return t||je(!1),t}function Zf(e){let t=$g(),n=t.matches[t.matches.length-1];return n.route.id||je(!1),n.route.id}function Ug(){var e;let t=N.useContext(Gf),n=Dg(ki.UseRouteError),r=Zf(ki.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Wg(){let{router:e}=Ig(Jf.UseNavigateStable),t=Zf(ki.UseNavigateStable),n=N.useRef(!1);return Yf(()=>{n.current=!0}),N.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,is({fromRouteId:t},i)))},[e,t])}const rc={};function Bg(e,t,n){!t&&!rc[e]&&(rc[e]=!0)}function Hg(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function Ys(e){je(!1)}function qg(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Gt.Pop,navigator:i,static:a=!1,future:l}=e;ds()&&je(!1);let u=t.replace(/^\/*/,"/"),c=N.useMemo(()=>({basename:u,navigator:i,static:a,future:is({v7_relativeSplatPath:!1},l)}),[u,l,i,a]);typeof r=="string"&&(r=fr(r));let{pathname:d="/",search:f="",hash:p="",state:y=null,key:v="default"}=r,x=N.useMemo(()=>{let b=_l(d,u);return b==null?null:{location:{pathname:b,search:f,hash:p,state:y,key:v},navigationType:s}},[u,d,f,p,y,v,s]);return x==null?null:N.createElement(Tn.Provider,{value:c},N.createElement(Vi.Provider,{children:n,value:x}))}function Qg(e){let{children:t,location:n}=e;return Ag(Ea(t),n)}new Promise(()=>{});function Ea(e,t){t===void 0&&(t=[]);let n=[];return N.Children.forEach(e,(r,s)=>{if(!N.isValidElement(r))return;let i=[...t,s];if(r.type===N.Fragment){n.push.apply(n,Ea(r.props.children,i));return}r.type!==Ys&&je(!1),!r.props.index||!r.props.children||je(!1);let a={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&&(a.children=Ea(r.props.children,i)),n.push(a)}),n}/**
|
|
59
|
+
* React Router DOM v6.30.1
|
|
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 Pa(){return Pa=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},Pa.apply(this,arguments)}function Vg(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 Kg(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Gg(e,t){return e.button===0&&(!t||t==="_self")&&!Kg(e)}const Yg=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Xg="6";try{window.__reactRouterVersion=Xg}catch{}const Jg="startTransition",sc=Hp[Jg];function Zg(e){let{basename:t,children:n,future:r,window:s}=e,i=N.useRef();i.current==null&&(i.current=ng({window:s,v5Compat:!0}));let a=i.current,[l,u]=N.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},d=N.useCallback(f=>{c&&sc?sc(()=>u(f)):u(f)},[u,c]);return N.useLayoutEffect(()=>a.listen(d),[a,d]),N.useEffect(()=>Hg(r),[r]),N.createElement(qg,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:a,future:r})}const e0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",t0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ep=N.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:a,state:l,target:u,to:c,preventScrollReset:d,viewTransition:f}=t,p=Vg(t,Yg),{basename:y}=N.useContext(Tn),v,x=!1;if(typeof c=="string"&&t0.test(c)&&(v=c,e0))try{let g=new URL(window.location.href),w=c.startsWith("//")?new URL(g.protocol+c):new URL(c),C=_l(w.pathname,y);w.origin===g.origin&&C!=null?c=C+w.search+w.hash:x=!0}catch{}let b=Pg(c,{relative:s}),m=n0(c,{replace:a,state:l,target:u,preventScrollReset:d,relative:s,viewTransition:f});function h(g){r&&r(g),g.defaultPrevented||m(g)}return N.createElement("a",Pa({},p,{href:v||b,onClick:x||i?r:h,ref:n,target:u}))});var ic;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ic||(ic={}));var oc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(oc||(oc={}));function n0(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:a,viewTransition:l}=t===void 0?{}:t,u=Tg(),c=fs(),d=Xf(e,{relative:a});return N.useCallback(f=>{if(Gg(f,n)){f.preventDefault();let p=r!==void 0?r:Ni(c)===Ni(d);u(e,{replace:p,state:s,preventScrollReset:i,relative:a,viewTransition:l})}},[c,u,d,r,s,n,e,i,a,l])}class Ki{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Fl=typeof window>"u"||"Deno"in window;function ft(){}function r0(e,t){return typeof e=="function"?e(t):e}function s0(e){return typeof e=="number"&&e>=0&&e!==1/0}function i0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Rs(e,t,n){return Gi(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Wt(e,t,n){return Gi(e)?[{...t,queryKey:e},n]:[e||{},t]}function ac(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:l}=e;if(Gi(a)){if(r){if(t.queryHash!==Il(a,t.options))return!1}else if(!Si(t.queryKey,a))return!1}if(n!=="all"){const u=t.isActive();if(n==="active"&&!u||n==="inactive"&&u)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||typeof s<"u"&&s!==t.state.fetchStatus||i&&!i(t))}function lc(e,t){const{exact:n,fetching:r,predicate:s,mutationKey:i}=e;if(Gi(i)){if(!t.options.mutationKey)return!1;if(n){if(yn(t.options.mutationKey)!==yn(i))return!1}else if(!Si(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||s&&!s(t))}function Il(e,t){return((t==null?void 0:t.queryKeyHashFn)||yn)(e)}function yn(e){return JSON.stringify(e,(t,n)=>Ta(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Si(e,t){return tp(e,t)}function tp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!tp(e[n],t[n])):!1}function np(e,t){if(e===t)return e;const n=uc(e)&&uc(t);if(n||Ta(e)&&Ta(t)){const r=n?e.length:Object.keys(e).length,s=n?t:Object.keys(t),i=s.length,a=n?[]:{};let l=0;for(let u=0;u<i;u++){const c=n?u:s[u];a[c]=np(e[c],t[c]),a[c]===e[c]&&l++}return r===i&&l===r?e:a}return t}function uc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ta(e){if(!cc(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!cc(n)||!n.hasOwnProperty("isPrototypeOf"))}function cc(e){return Object.prototype.toString.call(e)==="[object Object]"}function Gi(e){return Array.isArray(e)}function rp(e){return new Promise(t=>{setTimeout(t,e)})}function dc(e){rp(0).then(e)}function o0(){if(typeof AbortController=="function")return new AbortController}function a0(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?np(e,t):t}class l0 extends Ki{constructor(){super(),this.setup=t=>{if(!Fl&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Oa=new l0,fc=["online","offline"];class u0 extends Ki{constructor(){super(),this.setup=t=>{if(!Fl&&window.addEventListener){const n=()=>t();return fc.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{fc.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Ci=new u0;function c0(e){return Math.min(1e3*2**e,3e4)}function Dl(e){return(e??"online")==="online"?Ci.isOnline():!0}class sp{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Co(e){return e instanceof sp}function ip(e){let t=!1,n=0,r=!1,s,i,a;const l=new Promise((b,m)=>{i=b,a=m}),u=b=>{r||(y(new sp(b)),e.abort==null||e.abort())},c=()=>{t=!0},d=()=>{t=!1},f=()=>!Oa.isFocused()||e.networkMode!=="always"&&!Ci.isOnline(),p=b=>{r||(r=!0,e.onSuccess==null||e.onSuccess(b),s==null||s(),i(b))},y=b=>{r||(r=!0,e.onError==null||e.onError(b),s==null||s(),a(b))},v=()=>new Promise(b=>{s=m=>{const h=r||!f();return h&&b(m),h},e.onPause==null||e.onPause()}).then(()=>{s=void 0,r||e.onContinue==null||e.onContinue()}),x=()=>{if(r)return;let b;try{b=e.fn()}catch(m){b=Promise.reject(m)}Promise.resolve(b).then(p).catch(m=>{var h,g;if(r)return;const w=(h=e.retry)!=null?h:3,C=(g=e.retryDelay)!=null?g:c0,E=typeof C=="function"?C(n,m):C,S=w===!0||typeof w=="number"&&n<w||typeof w=="function"&&w(n,m);if(t||!S){y(m);return}n++,e.onFail==null||e.onFail(n,m),rp(E).then(()=>{if(f())return v()}).then(()=>{t?y(m):x()})})};return Dl(e.networkMode)?x():v().then(x),{promise:l,cancel:u,continue:()=>(s==null?void 0:s())?l:Promise.resolve(),cancelRetry:c,continueRetry:d}}const $l=console;function d0(){let e=[],t=0,n=d=>{d()},r=d=>{d()};const s=d=>{let f;t++;try{f=d()}finally{t--,t||l()}return f},i=d=>{t?e.push(d):dc(()=>{n(d)})},a=d=>(...f)=>{i(()=>{d(...f)})},l=()=>{const d=e;e=[],d.length&&dc(()=>{r(()=>{d.forEach(f=>{n(f)})})})};return{batch:s,batchCalls:a,schedule:i,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{r=d}}}const Fe=d0();class op{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),s0(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Fl?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class f0 extends op{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||$l,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||p0(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=a0(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(ft).catch(ft):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!i0(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const y=this.observers.find(v=>v.options.queryFn);y&&this.setOptions(y.options)}const a=o0(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=y=>{Object.defineProperty(y,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};u(l);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(l)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),d={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(u(d),(r=this.options.behavior)==null||r.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=d.fetchOptions)==null?void 0:s.meta)){var f;this.dispatch({type:"fetch",meta:(f=d.fetchOptions)==null?void 0:f.meta})}const p=y=>{if(Co(y)&&y.silent||this.dispatch({type:"error",error:y}),!Co(y)){var v,x,b,m;(v=(x=this.cache.config).onError)==null||v.call(x,y,this),(b=(m=this.cache.config).onSettled)==null||b.call(m,this.state.data,y,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=ip({fn:d.fetchFn,abort:a==null?void 0:a.abort.bind(a),onSuccess:y=>{var v,x,b,m;if(typeof y>"u"){p(new Error(this.queryHash+" data is undefined"));return}this.setData(y),(v=(x=this.cache.config).onSuccess)==null||v.call(x,y,this),(b=(m=this.cache.config).onSettled)==null||b.call(m,y,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:p,onFail:(y,v)=>{this.dispatch({type:"failed",failureCount:y,error:v})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var s,i;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(s=t.meta)!=null?s:null,fetchStatus:Dl(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=t.error;return Co(a)&&a.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:a,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Fe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function p0(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class h0 extends Ki{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var s;const i=n.queryKey,a=(s=n.queryHash)!=null?s:Il(i,n);let l=this.get(a);return l||(l=new f0({cache:this,logger:t.getLogger(),queryKey:i,queryHash:a,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(l)),l}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Fe.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Wt(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(s=>ac(r,s))}findAll(t,n){const[r]=Wt(t,n);return Object.keys(r).length>0?this.queries.filter(s=>ac(r,s)):this.queries}notify(t){Fe.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){Fe.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Fe.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class m0 extends op{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||$l,this.observers=[],this.state=t.state||g0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var S;return this.retryer=ip({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(j,z)=>{this.dispatch({type:"failed",failureCount:j,error:z})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(S=this.options.retry)!=null?S:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,s,i,a,l,u,c,d;if(!n){var f,p,y,v;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(p=this.mutationCache.config).onMutate)==null?void 0:f.call(p,this.state.variables,this));const j=await((y=(v=this.options).onMutate)==null?void 0:y.call(v,this.state.variables));j!==this.state.context&&this.dispatch({type:"loading",context:j,variables:this.state.variables})}const S=await t();return await((r=(s=this.mutationCache.config).onSuccess)==null?void 0:r.call(s,S,this.state.variables,this.state.context,this)),await((i=(a=this.options).onSuccess)==null?void 0:i.call(a,S,this.state.variables,this.state.context)),await((l=(u=this.mutationCache.config).onSettled)==null?void 0:l.call(u,S,null,this.state.variables,this.state.context,this)),await((c=(d=this.options).onSettled)==null?void 0:c.call(d,S,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:S}),S}catch(S){try{var x,b,m,h,g,w,C,E;throw await((x=(b=this.mutationCache.config).onError)==null?void 0:x.call(b,S,this.state.variables,this.state.context,this)),await((m=(h=this.options).onError)==null?void 0:m.call(h,S,this.state.variables,this.state.context)),await((g=(w=this.mutationCache.config).onSettled)==null?void 0:g.call(w,void 0,S,this.state.variables,this.state.context,this)),await((C=(E=this.options).onSettled)==null?void 0:C.call(E,void 0,S,this.state.variables,this.state.context)),S}finally{this.dispatch({type:"error",error:S})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Dl(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),Fe.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function g0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class y0 extends Ki{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const s=new m0({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(s),s}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){Fe.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>lc(t,n))}findAll(t){return this.mutations.filter(n=>lc(t,n))}notify(t){Fe.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return Fe.batch(()=>n.reduce((r,s)=>r.then(()=>s.continue().catch(ft)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function v0(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,s,i,a;const l=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,u=(r=e.fetchOptions)==null||(s=r.meta)==null?void 0:s.fetchMore,c=u==null?void 0:u.pageParam,d=(u==null?void 0:u.direction)==="forward",f=(u==null?void 0:u.direction)==="backward",p=((i=e.state.data)==null?void 0:i.pages)||[],y=((a=e.state.data)==null?void 0:a.pageParams)||[];let v=y,x=!1;const b=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>{var S;if((S=e.signal)!=null&&S.aborted)x=!0;else{var j;(j=e.signal)==null||j.addEventListener("abort",()=>{x=!0})}return e.signal}})},m=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),h=(E,S,j,z)=>(v=z?[S,...v]:[...v,S],z?[j,...E]:[...E,j]),g=(E,S,j,z)=>{if(x)return Promise.reject("Cancelled");if(typeof j>"u"&&!S&&E.length)return Promise.resolve(E);const A={queryKey:e.queryKey,pageParam:j,meta:e.options.meta};b(A);const q=m(A);return Promise.resolve(q).then(ee=>h(E,j,ee,z))};let w;if(!p.length)w=g([]);else if(d){const E=typeof c<"u",S=E?c:pc(e.options,p);w=g(p,E,S)}else if(f){const E=typeof c<"u",S=E?c:x0(e.options,p);w=g(p,E,S,!0)}else{v=[];const E=typeof e.options.getNextPageParam>"u";w=(l&&p[0]?l(p[0],0,p):!0)?g([],E,y[0]):Promise.resolve(h([],y[0],p[0]));for(let j=1;j<p.length;j++)w=w.then(z=>{if(l&&p[j]?l(p[j],j,p):!0){const q=E?y[j]:pc(e.options,z);return g(z,E,q)}return Promise.resolve(h(z,y[j],p[j]))})}return w.then(E=>({pages:E,pageParams:v}))}}}}function pc(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function x0(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class w0{constructor(t={}){this.queryCache=t.queryCache||new h0,this.mutationCache=t.mutationCache||new y0,this.logger=t.logger||$l,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Oa.subscribe(()=>{Oa.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Ci.subscribe(()=>{Ci.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Wt(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const s=Rs(t,n,r),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(t,n,r){const s=this.queryCache.find(t),i=s==null?void 0:s.state.data,a=r0(n,i);if(typeof a>"u")return;const l=Rs(t),u=this.defaultQueryOptions(l);return this.queryCache.build(this,u).setData(a,{...r,manual:!0})}setQueriesData(t,n,r){return Fe.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Wt(t,n),s=this.queryCache;Fe.batch(()=>{s.findAll(r).forEach(i=>{s.remove(i)})})}resetQueries(t,n,r){const[s,i]=Wt(t,n,r),a=this.queryCache,l={type:"active",...s};return Fe.batch(()=>(a.findAll(s).forEach(u=>{u.reset()}),this.refetchQueries(l,i)))}cancelQueries(t,n,r){const[s,i={}]=Wt(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const a=Fe.batch(()=>this.queryCache.findAll(s).map(l=>l.cancel(i)));return Promise.all(a).then(ft).catch(ft)}invalidateQueries(t,n,r){const[s,i]=Wt(t,n,r);return Fe.batch(()=>{var a,l;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const u={...s,type:(a=(l=s.refetchType)!=null?l:s.type)!=null?a:"active"};return this.refetchQueries(u,i)})}refetchQueries(t,n,r){const[s,i]=Wt(t,n,r),a=Fe.batch(()=>this.queryCache.findAll(s).filter(u=>!u.isDisabled()).map(u=>{var c;return u.fetch(void 0,{...i,cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:s.refetchPage}})}));let l=Promise.all(a).then(ft);return i!=null&&i.throwOnError||(l=l.catch(ft)),l}fetchQuery(t,n,r){const s=Rs(t,n,r),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const a=this.queryCache.build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(ft).catch(ft)}fetchInfiniteQuery(t,n,r){const s=Rs(t,n,r);return s.behavior=v0(),this.fetchQuery(s)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(ft).catch(ft)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(s=>yn(t)===yn(s.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Si(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(s=>yn(t)===yn(s.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Si(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=Il(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}const hc=N.createContext(void 0),j0=N.createContext(!1);function b0(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=hc),window.ReactQueryClientContext):hc)}const N0=({client:e,children:t,context:n,contextSharing:r=!1})=>{N.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const s=b0(n,r);return N.createElement(j0.Provider,{value:!n&&r},N.createElement(s.Provider,{value:e},t))};var ap={exports:{}},k0="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",S0=k0,C0=S0;function lp(){}function up(){}up.resetWarningCache=lp;var E0=function(){function e(r,s,i,a,l,u){if(u!==C0){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:up,resetWarningCache:lp};return n.PropTypes=n,n};ap.exports=E0();var P0=ap.exports;const J=lr(P0);var T0=typeof Element<"u",O0=typeof Map=="function",A0=typeof Set=="function",z0=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function Xs(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var n,r,s;if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!Xs(e[r],t[r]))return!1;return!0}var i;if(O0&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;for(i=e.entries();!(r=i.next()).done;)if(!Xs(r.value[1],t.get(r.value[0])))return!1;return!0}if(A0&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(i=e.entries();!(r=i.next()).done;)if(!t.has(r.value[0]))return!1;return!0}if(z0&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(e[r]!==t[r])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(t,s[r]))return!1;if(T0&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!Xs(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var R0=function(t,n){try{return Xs(t,n)}catch(r){if((r.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw r}};const M0=lr(R0);var _0=function(e,t,n,r,s,i,a,l){if(!e){var u;if(t===void 0)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,s,i,a,l],d=0;u=new Error(t.replace(/%s/g,function(){return c[d++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},L0=_0;const mc=lr(L0);var F0=function(t,n,r,s){var i=r?r.call(s,t,n):void 0;if(i!==void 0)return!!i;if(t===n)return!0;if(typeof t!="object"||!t||typeof n!="object"||!n)return!1;var a=Object.keys(t),l=Object.keys(n);if(a.length!==l.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(n),c=0;c<a.length;c++){var d=a[c];if(!u(d))return!1;var f=t[d],p=n[d];if(i=r?r.call(s,f,p,d):void 0,i===!1||i===void 0&&f!==p)return!1}return!0};const I0=lr(F0);function ve(){return ve=Object.assign||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},ve.apply(this,arguments)}function Ul(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Aa(e,t)}function Aa(e,t){return Aa=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},Aa(e,t)}function gc(e,t){if(e==null)return{};var n,r,s={},i=Object.keys(e);for(r=0;r<i.length;r++)t.indexOf(n=i[r])>=0||(s[n]=e[n]);return s}var $={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},D0={rel:["amphtml","canonical","alternate"]},$0={type:["application/ld+json"]},U0={charset:"",name:["robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},yc=Object.keys($).map(function(e){return $[e]}),Ei={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},W0=Object.keys(Ei).reduce(function(e,t){return e[Ei[t]]=t,e},{}),er=function(e,t){for(var n=e.length-1;n>=0;n-=1){var r=e[n];if(Object.prototype.hasOwnProperty.call(r,t))return r[t]}return null},B0=function(e){var t=er(e,$.TITLE),n=er(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,function(){return t});var r=er(e,"defaultTitle");return t||r||void 0},H0=function(e){return er(e,"onChangeClientState")||function(){}},Eo=function(e,t){return t.filter(function(n){return n[e]!==void 0}).map(function(n){return n[e]}).reduce(function(n,r){return ve({},n,r)},{})},q0=function(e,t){return t.filter(function(n){return n[$.BASE]!==void 0}).map(function(n){return n[$.BASE]}).reverse().reduce(function(n,r){if(!n.length)for(var s=Object.keys(r),i=0;i<s.length;i+=1){var a=s[i].toLowerCase();if(e.indexOf(a)!==-1&&r[a])return n.concat(r)}return n},[])},br=function(e,t,n){var r={};return n.filter(function(s){return!!Array.isArray(s[e])||(s[e]!==void 0&&console&&typeof console.warn=="function"&&console.warn("Helmet: "+e+' should be of type "Array". Instead found type "'+typeof s[e]+'"'),!1)}).map(function(s){return s[e]}).reverse().reduce(function(s,i){var a={};i.filter(function(f){for(var p,y=Object.keys(f),v=0;v<y.length;v+=1){var x=y[v],b=x.toLowerCase();t.indexOf(b)===-1||p==="rel"&&f[p].toLowerCase()==="canonical"||b==="rel"&&f[b].toLowerCase()==="stylesheet"||(p=b),t.indexOf(x)===-1||x!=="innerHTML"&&x!=="cssText"&&x!=="itemprop"||(p=x)}if(!p||!f[p])return!1;var m=f[p].toLowerCase();return r[p]||(r[p]={}),a[p]||(a[p]={}),!r[p][m]&&(a[p][m]=!0,!0)}).reverse().forEach(function(f){return s.push(f)});for(var l=Object.keys(a),u=0;u<l.length;u+=1){var c=l[u],d=ve({},r[c],a[c]);r[c]=d}return s},[]).reverse()},Q0=function(e,t){if(Array.isArray(e)&&e.length){for(var n=0;n<e.length;n+=1)if(e[n][t])return!0}return!1},cp=function(e){return Array.isArray(e)?e.join(""):e},Po=function(e,t){return Array.isArray(e)?e.reduce(function(n,r){return function(s,i){for(var a=Object.keys(s),l=0;l<a.length;l+=1)if(i[a[l]]&&i[a[l]].includes(s[a[l]]))return!0;return!1}(r,t)?n.priority.push(r):n.default.push(r),n},{priority:[],default:[]}):{default:e}},vc=function(e,t){var n;return ve({},e,((n={})[t]=void 0,n))},V0=[$.NOSCRIPT,$.SCRIPT,$.STYLE],To=function(e,t){return t===void 0&&(t=!0),t===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")},xc=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n]!==void 0?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},wc=function(e,t){return t===void 0&&(t={}),Object.keys(e).reduce(function(n,r){return n[Ei[r]||r]=e[r],n},t)},Js=function(e,t){return t.map(function(n,r){var s,i=((s={key:r})["data-rh"]=!0,s);return Object.keys(n).forEach(function(a){var l=Ei[a]||a;l==="innerHTML"||l==="cssText"?i.dangerouslySetInnerHTML={__html:n.innerHTML||n.cssText}:i[l]=n[a]}),R.createElement(e,i)})},et=function(e,t,n){switch(e){case $.TITLE:return{toComponent:function(){return s=t.titleAttributes,(i={key:r=t.title})["data-rh"]=!0,a=wc(s,i),[R.createElement($.TITLE,a,r)];var r,s,i,a},toString:function(){return function(r,s,i,a){var l=xc(i),u=cp(s);return l?"<"+r+' data-rh="true" '+l+">"+To(u,a)+"</"+r+">":"<"+r+' data-rh="true">'+To(u,a)+"</"+r+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return wc(t)},toString:function(){return xc(t)}};default:return{toComponent:function(){return Js(e,t)},toString:function(){return function(r,s,i){return s.reduce(function(a,l){var u=Object.keys(l).filter(function(f){return!(f==="innerHTML"||f==="cssText")}).reduce(function(f,p){var y=l[p]===void 0?p:p+'="'+To(l[p],i)+'"';return f?f+" "+y:y},""),c=l.innerHTML||l.cssText||"",d=V0.indexOf(r)===-1;return a+"<"+r+' data-rh="true" '+u+(d?"/>":">"+c+"</"+r+">")},"")}(e,t,n)}}}},za=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,s=e.htmlAttributes,i=e.noscriptTags,a=e.styleTags,l=e.title,u=l===void 0?"":l,c=e.titleAttributes,d=e.linkTags,f=e.metaTags,p=e.scriptTags,y={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var v=function(x){var b=x.linkTags,m=x.scriptTags,h=x.encode,g=Po(x.metaTags,U0),w=Po(b,D0),C=Po(m,$0);return{priorityMethods:{toComponent:function(){return[].concat(Js($.META,g.priority),Js($.LINK,w.priority),Js($.SCRIPT,C.priority))},toString:function(){return et($.META,g.priority,h)+" "+et($.LINK,w.priority,h)+" "+et($.SCRIPT,C.priority,h)}},metaTags:g.default,linkTags:w.default,scriptTags:C.default}}(e);y=v.priorityMethods,d=v.linkTags,f=v.metaTags,p=v.scriptTags}return{priority:y,base:et($.BASE,t,r),bodyAttributes:et("bodyAttributes",n,r),htmlAttributes:et("htmlAttributes",s,r),link:et($.LINK,d,r),meta:et($.META,f,r),noscript:et($.NOSCRIPT,i,r),script:et($.SCRIPT,p,r),style:et($.STYLE,a,r),title:et($.TITLE,{title:u,titleAttributes:c},r)}},Ms=[],Ra=function(e,t){var n=this;t===void 0&&(t=typeof document<"u"),this.instances=[],this.value={setHelmet:function(r){n.context.helmet=r},helmetInstances:{get:function(){return n.canUseDOM?Ms:n.instances},add:function(r){(n.canUseDOM?Ms:n.instances).push(r)},remove:function(r){var s=(n.canUseDOM?Ms:n.instances).indexOf(r);(n.canUseDOM?Ms:n.instances).splice(s,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=za({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},dp=R.createContext({}),K0=J.shape({setHelmet:J.func,helmetInstances:J.shape({get:J.func,add:J.func,remove:J.func})}),G0=typeof document<"u",Vn=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new Ra(r.props.context,t.canUseDOM),r}return Ul(t,e),t.prototype.render=function(){return R.createElement(dp.Provider,{value:this.helmetData.value},this.props.children)},t}(N.Component);Vn.canUseDOM=G0,Vn.propTypes={context:J.shape({helmet:J.shape()}),children:J.node.isRequired},Vn.defaultProps={context:{}},Vn.displayName="HelmetProvider";var Mn=function(e,t){var n,r=document.head||document.querySelector($.HEAD),s=r.querySelectorAll(e+"[data-rh]"),i=[].slice.call(s),a=[];return t&&t.length&&t.forEach(function(l){var u=document.createElement(e);for(var c in l)Object.prototype.hasOwnProperty.call(l,c)&&(c==="innerHTML"?u.innerHTML=l.innerHTML:c==="cssText"?u.styleSheet?u.styleSheet.cssText=l.cssText:u.appendChild(document.createTextNode(l.cssText)):u.setAttribute(c,l[c]===void 0?"":l[c]));u.setAttribute("data-rh","true"),i.some(function(d,f){return n=f,u.isEqualNode(d)})?i.splice(n,1):a.push(u)}),i.forEach(function(l){return l.parentNode.removeChild(l)}),a.forEach(function(l){return r.appendChild(l)}),{oldTags:i,newTags:a}},Oo=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute("data-rh"),s=r?r.split(","):[],i=[].concat(s),a=Object.keys(t),l=0;l<a.length;l+=1){var u=a[l],c=t[u]||"";n.getAttribute(u)!==c&&n.setAttribute(u,c),s.indexOf(u)===-1&&s.push(u);var d=i.indexOf(u);d!==-1&&i.splice(d,1)}for(var f=i.length-1;f>=0;f-=1)n.removeAttribute(i[f]);s.length===i.length?n.removeAttribute("data-rh"):n.getAttribute("data-rh")!==a.join(",")&&n.setAttribute("data-rh",a.join(","))}},jc=function(e,t){var n=e.baseTag,r=e.htmlAttributes,s=e.linkTags,i=e.metaTags,a=e.noscriptTags,l=e.onChangeClientState,u=e.scriptTags,c=e.styleTags,d=e.title,f=e.titleAttributes;Oo($.BODY,e.bodyAttributes),Oo($.HTML,r),function(x,b){x!==void 0&&document.title!==x&&(document.title=cp(x)),Oo($.TITLE,b)}(d,f);var p={baseTag:Mn($.BASE,n),linkTags:Mn($.LINK,s),metaTags:Mn($.META,i),noscriptTags:Mn($.NOSCRIPT,a),scriptTags:Mn($.SCRIPT,u),styleTags:Mn($.STYLE,c)},y={},v={};Object.keys(p).forEach(function(x){var b=p[x],m=b.newTags,h=b.oldTags;m.length&&(y[x]=m),h.length&&(v[x]=p[x].oldTags)}),t&&t(),l(e,y,v)},Nr=null,Pi=function(e){function t(){for(var r,s=arguments.length,i=new Array(s),a=0;a<s;a++)i[a]=arguments[a];return(r=e.call.apply(e,[this].concat(i))||this).rendered=!1,r}Ul(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(r){return!I0(r,this.props)},n.componentDidUpdate=function(){this.emitChange()},n.componentWillUnmount=function(){this.props.context.helmetInstances.remove(this),this.emitChange()},n.emitChange=function(){var r,s,i=this.props.context,a=i.setHelmet,l=null,u=(r=i.helmetInstances.get().map(function(c){var d=ve({},c.props);return delete d.context,d}),{baseTag:q0(["href"],r),bodyAttributes:Eo("bodyAttributes",r),defer:er(r,"defer"),encode:er(r,"encodeSpecialCharacters"),htmlAttributes:Eo("htmlAttributes",r),linkTags:br($.LINK,["rel","href"],r),metaTags:br($.META,["name","charset","http-equiv","property","itemprop"],r),noscriptTags:br($.NOSCRIPT,["innerHTML"],r),onChangeClientState:H0(r),scriptTags:br($.SCRIPT,["src","innerHTML"],r),styleTags:br($.STYLE,["cssText"],r),title:B0(r),titleAttributes:Eo("titleAttributes",r),prioritizeSeoTags:Q0(r,"prioritizeSeoTags")});Vn.canUseDOM?(s=u,Nr&&cancelAnimationFrame(Nr),s.defer?Nr=requestAnimationFrame(function(){jc(s,function(){Nr=null})}):(jc(s),Nr=null)):za&&(l=za(u)),a(l)},n.init=function(){this.rendered||(this.rendered=!0,this.props.context.helmetInstances.add(this),this.emitChange())},n.render=function(){return this.init(),null},t}(N.Component);Pi.propTypes={context:K0.isRequired},Pi.displayName="HelmetDispatcher";var Y0=["children"],X0=["children"],jn=function(e){function t(){return e.apply(this,arguments)||this}Ul(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(r){return!M0(vc(this.props,"helmetData"),vc(r,"helmetData"))},n.mapNestedChildrenToProps=function(r,s){if(!s)return null;switch(r.type){case $.SCRIPT:case $.NOSCRIPT:return{innerHTML:s};case $.STYLE:return{cssText:s};default:throw new Error("<"+r.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")}},n.flattenArrayTypeChildren=function(r){var s,i=r.child,a=r.arrayTypeChildren;return ve({},a,((s={})[i.type]=[].concat(a[i.type]||[],[ve({},r.newChildProps,this.mapNestedChildrenToProps(i,r.nestedChildren))]),s))},n.mapObjectTypeChildren=function(r){var s,i,a=r.child,l=r.newProps,u=r.newChildProps,c=r.nestedChildren;switch(a.type){case $.TITLE:return ve({},l,((s={})[a.type]=c,s.titleAttributes=ve({},u),s));case $.BODY:return ve({},l,{bodyAttributes:ve({},u)});case $.HTML:return ve({},l,{htmlAttributes:ve({},u)});default:return ve({},l,((i={})[a.type]=ve({},u),i))}},n.mapArrayTypeChildrenToProps=function(r,s){var i=ve({},s);return Object.keys(r).forEach(function(a){var l;i=ve({},i,((l={})[a]=r[a],l))}),i},n.warnOnInvalidChildren=function(r,s){return mc(yc.some(function(i){return r.type===i}),typeof r.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":"Only elements types "+yc.join(", ")+" are allowed. Helmet does not support rendering <"+r.type+"> elements. Refer to our API for more information."),mc(!s||typeof s=="string"||Array.isArray(s)&&!s.some(function(i){return typeof i!="string"}),"Helmet expects a string as a child of <"+r.type+">. Did you forget to wrap your children in braces? ( <"+r.type+">{``}</"+r.type+"> ) Refer to our API for more information."),!0},n.mapChildrenToProps=function(r,s){var i=this,a={};return R.Children.forEach(r,function(l){if(l&&l.props){var u=l.props,c=u.children,d=gc(u,Y0),f=Object.keys(d).reduce(function(y,v){return y[W0[v]||v]=d[v],y},{}),p=l.type;switch(typeof p=="symbol"?p=p.toString():i.warnOnInvalidChildren(l,c),p){case $.FRAGMENT:s=i.mapChildrenToProps(c,s);break;case $.LINK:case $.META:case $.NOSCRIPT:case $.SCRIPT:case $.STYLE:a=i.flattenArrayTypeChildren({child:l,arrayTypeChildren:a,newChildProps:f,nestedChildren:c});break;default:s=i.mapObjectTypeChildren({child:l,newProps:s,newChildProps:f,nestedChildren:c})}}}),this.mapArrayTypeChildrenToProps(a,s)},n.render=function(){var r=this.props,s=r.children,i=gc(r,X0),a=ve({},i),l=i.helmetData;return s&&(a=this.mapChildrenToProps(s,a)),!l||l instanceof Ra||(l=new Ra(l.context,l.instances)),l?R.createElement(Pi,ve({},a,{context:l.value,helmetData:void 0})):R.createElement(dp.Consumer,null,function(u){return R.createElement(Pi,ve({},a,{context:u}))})},t}(N.Component);jn.propTypes={base:J.object,bodyAttributes:J.object,children:J.oneOfType([J.arrayOf(J.node),J.node]),defaultTitle:J.string,defer:J.bool,encodeSpecialCharacters:J.bool,htmlAttributes:J.object,link:J.arrayOf(J.object),meta:J.arrayOf(J.object),noscript:J.arrayOf(J.object),onChangeClientState:J.func,script:J.arrayOf(J.object),style:J.arrayOf(J.object),title:J.string,titleAttributes:J.object,titleTemplate:J.string,prioritizeSeoTags:J.bool,helmetData:J.object},jn.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},jn.displayName="Helmet";function J0(e,{insertAt:t}={}){if(!e||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))}J0(`[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: 6px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}[data-sonner-toaster][data-x-position=right]{right:max(var(--offset),env(safe-area-inset-right))}[data-sonner-toaster][data-x-position=left]{left:max(var(--offset),env(safe-area-inset-left))}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translate(-50%)}[data-sonner-toaster][data-y-position=top]{top:max(var(--offset),env(safe-area-inset-top))}[data-sonner-toaster][data-y-position=bottom]{bottom:max(var(--offset),env(safe-area-inset-bottom))}[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);touch-action:none;will-change:transform,opacity,height;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none}[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}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}[data-sonner-toast][data-y-position=top]{top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}[data-sonner-toast] [data-description]{font-weight:400;line-height:1.4;color:inherit}[data-sonner-toast] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:-3px;margin-right:4px}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast] [data-icon]>*{flex-shrink:0}[data-sonner-toast] [data-icon] svg{margin-left:-1px}[data-sonner-toast] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast] [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:auto;border:none;cursor:pointer;outline:none;transition:opacity .4s,box-shadow .2s}[data-sonner-toast] [data-button]:focus-visible{box-shadow:0 0 0 2px #0006}[data-sonner-toast] [data-button]:first-of-type{margin-left:auto}[data-sonner-toast] [data-cancel]{color:var(--color);background:var(--border-color)}[data-sonner-toast] [data-close-button]{position:absolute;left:0;top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:translate(-35%,-35%);border-radius:50%;opacity:0;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]{opacity:1}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]:before{content:"";position:absolute;left:0;right:0;height:100%}[data-sonner-toast][data-y-position=top][data-swiping=true]:before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]:before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]:before{content:"";position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast]:after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y: translateY(0);opacity:1}[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)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y: translateY(calc(var(--lift) * -100%));opacity:0}[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}[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}[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, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - 32px)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--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-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[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=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}}
|
|
68
|
+
`);var Z0=e=>{switch(e){case"success":return ny;case"error":return ry;default:return null}},ey=Array(12).fill(0),ty=({visible:e})=>R.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},R.createElement("div",{className:"sonner-spinner"},ey.map((t,n)=>R.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),ny=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),ry=R.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},R.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"})),Ma=0,sy=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:Ma++;return this.toasts.find(i=>i.id===s)?this.toasts=this.toasts.map(i=>i.id===s?(this.publish({...i,...e,id:s,title:n}),{...i,...e,id:s,title:n}):i):this.addToast({title:n,...r,id:s}),s},this.dismiss=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.promise=(e,t)=>{let n=this.create({...t,promise:e,type:"loading",message:t.loading});return(e instanceof Promise?e:e()).then(r=>{let s=typeof t.success=="function"?t.success(r):t.success;this.create({id:n,type:"success",message:s})}).catch(r=>{let s=typeof t.error=="function"?t.error(r):t.error;this.create({id:n,type:"error",message:s})}),n},this.custom=(e,t)=>{let n=(t==null?void 0:t.id)||Ma++;this.publish({jsx:e(n),id:n,...t})},this.subscribers=[],this.toasts=[]}},Bt=new sy,iy=(e,t)=>{let n=(t==null?void 0:t.id)||Ma++;return Bt.addToast({title:e,...t,id:n}),n},oy=iy;Object.assign(oy,{success:Bt.success,error:Bt.error,custom:Bt.custom,message:Bt.message,promise:Bt.promise,dismiss:Bt.dismiss});var ay=3,ly="32px",uy=4e3,cy=356,fp=14,dy=20,fy=200,py=e=>{let{invert:t,toast:n,interacting:r,setHeights:s,visibleToasts:i,heights:a,index:l,toasts:u,expanded:c,removeToast:d,closeButton:f,style:p,className:y="",descriptionClassName:v="",duration:x,position:b,expandByDefault:m}=e,[h,g]=R.useState(!1),[w,C]=R.useState(!1),[E,S]=R.useState(!1),[j,z]=R.useState(!1),[A,q]=R.useState(0),[P,ee]=R.useState(0),U=R.useRef(null),Z=l===0,X=l+1<=i,re=n.type,O=n.className||"",D=n.descriptionClassName||"",F=R.useMemo(()=>a.findIndex(B=>B.toastId===n.id)||0,[a,n.id]),Q=R.useMemo(()=>n.duration||x||uy,[n.duration,x]),I=R.useRef(0),ie=R.useRef(0),Ae=R.useRef(Q),Qe=R.useRef(0),ke=R.useRef(null),[at,pr]=b.split("-"),ps=R.useMemo(()=>a.reduce((B,fe,Ee)=>Ee>=F?B:B+fe.height,0),[a,F]),Yi=n.invert||t,zn=re==="loading";ie.current=R.useMemo(()=>F*fp+ps,[F,ps]),R.useEffect(()=>{g(!0)},[]),R.useLayoutEffect(()=>{if(!h)return;let B=U.current,fe=B.style.height;B.style.height="auto";let Ee=B.getBoundingClientRect().height;B.style.height=fe,ee(Ee),s(lt=>lt.find(St=>St.toastId===n.id)?lt.map(St=>St.toastId===n.id?{...St,height:Ee}:St):[{toastId:n.id,height:Ee},...lt])},[h,n.title,n.description,s,n.id]);let vt=R.useCallback(()=>{C(!0),q(ie.current),s(B=>B.filter(fe=>fe.toastId!==n.id)),setTimeout(()=>{d(n)},fy)},[n,d,s,ie]);return R.useEffect(()=>{if(n.promise&&re==="loading"||n.duration===1/0)return;let B;return c||r?(()=>{if(Qe.current<I.current){let fe=new Date().getTime()-I.current;Ae.current=Ae.current-fe}Qe.current=new Date().getTime()})():(I.current=new Date().getTime(),B=setTimeout(()=>{var fe;(fe=n.onAutoClose)==null||fe.call(n,n),vt()},Ae.current)),()=>clearTimeout(B)},[c,r,m,n,Q,vt,n.promise,re]),R.useEffect(()=>{let B=U.current;if(B){let fe=B.getBoundingClientRect().height;return ee(fe),s(Ee=>[{toastId:n.id,height:fe},...Ee]),()=>s(Ee=>Ee.filter(lt=>lt.toastId!==n.id))}},[s,n.id]),R.useEffect(()=>{n.delete&&vt()},[vt,n.delete]),R.createElement("li",{"aria-live":n.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:U,className:y+" "+O,"data-sonner-toast":"","data-styled":!n.jsx,"data-mounted":h,"data-promise":!!n.promise,"data-removed":w,"data-visible":X,"data-y-position":at,"data-x-position":pr,"data-index":l,"data-front":Z,"data-swiping":E,"data-type":re,"data-invert":Yi,"data-swipe-out":j,"data-expanded":!!(c||m&&h),style:{"--index":l,"--toasts-before":l,"--z-index":u.length-l,"--offset":`${w?A:ie.current}px`,"--initial-height":m?"auto":`${P}px`,...p,...n.style},onPointerDown:B=>{zn||(q(ie.current),B.target.setPointerCapture(B.pointerId),B.target.tagName!=="BUTTON"&&(S(!0),ke.current={x:B.clientX,y:B.clientY}))},onPointerUp:()=>{var B,fe,Ee;if(j)return;ke.current=null;let lt=Number(((B=U.current)==null?void 0:B.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(lt)>=dy){q(ie.current),(fe=n.onDismiss)==null||fe.call(n,n),vt(),z(!0);return}(Ee=U.current)==null||Ee.style.setProperty("--swipe-amount","0px"),S(!1)},onPointerMove:B=>{var fe;if(!ke.current)return;let Ee=B.clientY-ke.current.y,lt=B.clientX-ke.current.x,St=(at==="top"?Math.min:Math.max)(0,Ee),hs=B.pointerType==="touch"?10:2;Math.abs(St)>hs?(fe=U.current)==null||fe.style.setProperty("--swipe-amount",`${Ee}px`):Math.abs(lt)>hs&&(ke.current=null)}},f&&!n.jsx?R.createElement("button",{"aria-label":"Close toast","data-disabled":zn,"data-close-button":!0,onClick:zn?void 0:()=>{var B;vt(),(B=n.onDismiss)==null||B.call(n,n)}},R.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"},R.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),R.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,n.jsx||R.isValidElement(n.title)?n.jsx||n.title:R.createElement(R.Fragment,null,re||n.icon||n.promise?R.createElement("div",{"data-icon":""},n.promise?R.createElement(ty,{visible:re==="loading"}):null,n.icon||Z0(re)):null,R.createElement("div",{"data-content":""},R.createElement("div",{"data-title":""},n.title),n.description?R.createElement("div",{"data-description":"",className:v+D},n.description):null),n.cancel?R.createElement("button",{"data-button":!0,"data-cancel":!0,onClick:()=>{var B;vt(),(B=n.cancel)!=null&&B.onClick&&n.cancel.onClick()}},n.cancel.label):null,n.action?R.createElement("button",{"data-button":"",onClick:B=>{var fe;(fe=n.action)==null||fe.onClick(B),!B.defaultPrevented&&vt()}},n.action.label):null))},hy=e=>{var t;let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:a,className:l,offset:u,theme:c="light",richColors:d,duration:f,style:p,visibleToasts:y=ay,toastOptions:v}=e,[x,b]=R.useState([]),[m,h]=R.useState([]),[g,w]=R.useState(!1),[C,E]=R.useState(!1),[S,j]=R.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[z,A]=r.split("-"),q=R.useRef(null),P=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),ee=R.useCallback(U=>b(Z=>Z.filter(({id:X})=>X!==U.id)),[]);return R.useEffect(()=>Bt.subscribe(U=>{if(U.dismiss){b(Z=>Z.map(X=>X.id===U.id?{...X,delete:!0}:X));return}setTimeout(()=>{tg.flushSync(()=>{b(Z=>{let X=Z.findIndex(re=>re.id===U.id);return X!==-1?[...Z.slice(0,X),{...Z[X],...U},...Z.slice(X+1)]:[U,...Z]})})})}),[]),R.useEffect(()=>{if(c!=="system"){j(c);return}typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:U})=>{j(U?"dark":"light")})},[c]),R.useEffect(()=>{x.length<=1&&w(!1)},[x]),R.useEffect(()=>{let U=Z=>{var X,re;s.every(O=>Z[O]||Z.code===O)&&(w(!0),(X=q.current)==null||X.focus()),Z.code==="Escape"&&(document.activeElement===q.current||(re=q.current)!=null&&re.contains(document.activeElement))&&w(!1)};return document.addEventListener("keydown",U),()=>document.removeEventListener("keydown",U)},[s]),x.length?R.createElement("section",{"aria-label":`Notifications ${P}`,tabIndex:-1},R.createElement("ol",{tabIndex:-1,ref:q,className:l,"data-sonner-toaster":!0,"data-theme":S,"data-rich-colors":d,"data-y-position":z,"data-x-position":A,style:{"--front-toast-height":`${(t=m[0])==null?void 0:t.height}px`,"--offset":typeof u=="number"?`${u}px`:u||ly,"--width":`${cy}px`,"--gap":`${fp}px`,...p},onMouseEnter:()=>w(!0),onMouseMove:()=>w(!0),onMouseLeave:()=>{C||w(!1)},onPointerDown:()=>{E(!0)},onPointerUp:()=>E(!1)},x.map((U,Z)=>R.createElement(py,{key:U.id,index:Z,toast:U,duration:f,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:n,visibleToasts:y,closeButton:a,interacting:C,position:r,style:v==null?void 0:v.style,removeToast:ee,toasts:x,heights:m,setHeights:h,expandByDefault:i,expanded:g})))):null},my={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"};const gy=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),V=(e,t)=>{const n=N.forwardRef(({color:r="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:a,children:l,...u},c)=>N.createElement("svg",{ref:c,...my,width:s,height:s,stroke:r,strokeWidth:a?Number(i)*24/Number(s):i,className:`lucide lucide-${gy(e)}`,...u},[...t.map(([d,f])=>N.createElement(d,f)),...(Array.isArray(l)?l:[l])||[]]));return n.displayName=`${e}`,n},Ao=V("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]),jt=V("AlertCircle",[["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"}]]),Ti=V("AlertTriangle",[["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-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),yy=V("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),vy=V("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),on=V("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["polyline",{points:"22 4 12 14.01 9 11.01",key:"6xbx8j"}]]),bc=V("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),xy=V("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),_a=V("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Pt=V("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),wy=V("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]),jy=V("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"}]]),by=V("FolderOpen",[["path",{d:"m6 14 1.45-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.55 6a2 2 0 0 1-1.94 1.5H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.93a2 2 0 0 1 1.66.9l.82 1.2a2 2 0 0 0 1.66.9H18a2 2 0 0 1 2 2v2",key:"1nmvlm"}]]),Ny=V("Folder",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}]]),pp=V("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]),zo=V("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),ky=V("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]),Nc=V("PauseCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]]),La=V("PenSquare",[["path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1qinfi"}],["path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4Z",key:"w2jsv5"}]]),kc=V("PlayCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]),Or=V("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),Sy=V("PowerOff",[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15",key:"dxknvb"}],["path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68",key:"1x7qb5"}],["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),Cy=V("Power",[["path",{d:"M18.36 6.64a9 9 0 1 1-12.73 0",key:"phirl6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"12",key:"aemgbe"}]]),Qt=V("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"}]]),Fa=V("Save",[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]]),Ey=V("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),hp=V("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"}]]),Py=V("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),Ty=V("ToggleLeft",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"8",cy:"12",r:"2",key:"1nvbw3"}]]),Oy=V("ToggleRight",[["rect",{width:"20",height:"12",x:"2",y:"6",rx:"6",ry:"6",key:"f2vt7d"}],["circle",{cx:"16",cy:"12",r:"2",key:"4ma0v8"}]]),Oi=V("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"}]]),Ay=V("TrendingUp",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]]),zy=V("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),Ry=V("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]),Sc=V("Wand2",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72Z",key:"1bcowg"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]),Ia=V("XCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),$r=V("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),mp=V("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);function gp(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=gp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function My(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=gp(e))&&(r&&(r+=" "),r+=t);return r}function _y(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=yp(t))&&(r&&(r+=" "),r+=n);return r}function yp(e){if(typeof e=="string")return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=yp(e[r]))&&(n&&(n+=" "),n+=t);return n}var Wl="-";function Ly(e){var t=Iy(e),n=e.conflictingClassGroups,r=e.conflictingClassGroupModifiers,s=r===void 0?{}:r;function i(l){var u=l.split(Wl);return u[0]===""&&u.length!==1&&u.shift(),vp(u,t)||Fy(l)}function a(l,u){var c=n[l]||[];return u&&s[l]?[].concat(c,s[l]):c}return{getClassGroupId:i,getConflictingClassGroupIds:a}}function vp(e,t){var a;if(e.length===0)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),s=r?vp(e.slice(1),r):void 0;if(s)return s;if(t.validators.length!==0){var i=e.join(Wl);return(a=t.validators.find(function(l){var u=l.validator;return u(i)}))==null?void 0:a.classGroupId}}var Cc=/^\[(.+)\]$/;function Fy(e){if(Cc.test(e)){var t=Cc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function Iy(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},s=$y(Object.entries(e.classGroups),n);return s.forEach(function(i){var a=i[0],l=i[1];Da(l,r,a,t)}),r}function Da(e,t,n,r){e.forEach(function(s){if(typeof s=="string"){var i=s===""?t:Ec(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(Dy(s)){Da(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(function(a){var l=a[0],u=a[1];Da(u,Ec(t,l),n,r)})})}function Ec(e,t){var n=e;return t.split(Wl).forEach(function(r){n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function Dy(e){return e.isThemeGetter}function $y(e,t){return t?e.map(function(n){var r=n[0],s=n[1],i=s.map(function(a){return typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(function(l){var u=l[0],c=l[1];return[t+u,c]})):a});return[r,i]}):e}function Uy(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function s(i,a){n.set(i,a),t++,t>e&&(t=0,r=n,n=new Map)}return{get:function(a){var l=n.get(a);if(l!==void 0)return l;if((l=r.get(a))!==void 0)return s(a,l),l},set:function(a,l){n.has(a)?n.set(a,l):s(a,l)}}}var xp="!";function Wy(e){var t=e.separator||":",n=t.length===1,r=t[0],s=t.length;return function(a){for(var l=[],u=0,c=0,d,f=0;f<a.length;f++){var p=a[f];if(u===0){if(p===r&&(n||a.slice(f,f+s)===t)){l.push(a.slice(c,f)),c=f+s;continue}if(p==="/"){d=f;continue}}p==="["?u++:p==="]"&&u--}var y=l.length===0?a:a.substring(c),v=y.startsWith(xp),x=v?y.substring(1):y,b=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:b}}}function By(e){if(e.length<=1)return e;var t=[],n=[];return e.forEach(function(r){var s=r[0]==="[";s?(t.push.apply(t,n.sort().concat([r])),n=[]):n.push(r)}),t.push.apply(t,n.sort()),t}function Hy(e){return{cache:Uy(e.cacheSize),splitModifiers:Wy(e),...Ly(e)}}var qy=/\s+/;function Qy(e,t){var n=t.splitModifiers,r=t.getClassGroupId,s=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(qy).map(function(a){var l=n(a),u=l.modifiers,c=l.hasImportantModifier,d=l.baseClassName,f=l.maybePostfixModifierPosition,p=r(f?d.substring(0,f):d),y=!!f;if(!p){if(!f)return{isTailwindClass:!1,originalClassName:a};if(p=r(d),!p)return{isTailwindClass:!1,originalClassName:a};y=!1}var v=By(u).join(":"),x=c?v+xp:v;return{isTailwindClass:!0,modifierId:x,classGroupId:p,originalClassName:a,hasPostfixModifier:y}}).reverse().filter(function(a){if(!a.isTailwindClass)return!0;var l=a.modifierId,u=a.classGroupId,c=a.hasPostfixModifier,d=l+u;return i.has(d)?!1:(i.add(d),s(u,c).forEach(function(f){return i.add(l+f)}),!0)}).reverse().map(function(a){return a.originalClassName}).join(" ")}function Vy(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,s,i,a=l;function l(c){var d=t[0],f=t.slice(1),p=f.reduce(function(y,v){return v(y)},d());return r=Hy(p),s=r.cache.get,i=r.cache.set,a=u,u(c)}function u(c){var d=s(c);if(d)return d;var f=Qy(c,r);return i(c,f),f}return function(){return a(_y.apply(null,arguments))}}function ue(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var wp=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ky=/^\d+\/\d+$/,Gy=new Set(["px","full","screen"]),Yy=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xy=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Jy=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function ct(e){return vn(e)||Gy.has(e)||Ky.test(e)||$a(e)}function $a(e){return An(e,"length",sv)}function Zy(e){return An(e,"size",jp)}function ev(e){return An(e,"position",jp)}function tv(e){return An(e,"url",iv)}function _s(e){return An(e,"number",vn)}function vn(e){return!Number.isNaN(Number(e))}function nv(e){return e.endsWith("%")&&vn(e.slice(0,-1))}function kr(e){return Pc(e)||An(e,"number",Pc)}function Y(e){return wp.test(e)}function Sr(){return!0}function Dt(e){return Yy.test(e)}function rv(e){return An(e,"",ov)}function An(e,t,n){var r=wp.exec(e);return r?r[1]?r[1]===t:n(r[2]):!1}function sv(e){return Xy.test(e)}function jp(){return!1}function iv(e){return e.startsWith("url(")}function Pc(e){return Number.isInteger(Number(e))}function ov(e){return Jy.test(e)}function av(){var e=ue("colors"),t=ue("spacing"),n=ue("blur"),r=ue("brightness"),s=ue("borderColor"),i=ue("borderRadius"),a=ue("borderSpacing"),l=ue("borderWidth"),u=ue("contrast"),c=ue("grayscale"),d=ue("hueRotate"),f=ue("invert"),p=ue("gap"),y=ue("gradientColorStops"),v=ue("gradientColorStopPositions"),x=ue("inset"),b=ue("margin"),m=ue("opacity"),h=ue("padding"),g=ue("saturate"),w=ue("scale"),C=ue("sepia"),E=ue("skew"),S=ue("space"),j=ue("translate"),z=function(){return["auto","contain","none"]},A=function(){return["auto","hidden","clip","visible","scroll"]},q=function(){return["auto",Y,t]},P=function(){return[Y,t]},ee=function(){return["",ct]},U=function(){return["auto",vn,Y]},Z=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},X=function(){return["solid","dashed","dotted","double","none"]},re=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},O=function(){return["start","end","center","between","around","evenly","stretch"]},D=function(){return["","0",Y]},F=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},Q=function(){return[vn,_s]},I=function(){return[vn,Y]};return{cacheSize:500,theme:{colors:[Sr],spacing:[ct],blur:["none","",Dt,Y],brightness:Q(),borderColor:[e],borderRadius:["none","","full",Dt,Y],borderSpacing:P(),borderWidth:ee(),contrast:Q(),grayscale:D(),hueRotate:I(),invert:D(),gap:P(),gradientColorStops:[e],gradientColorStopPositions:[nv,$a],inset:q(),margin:q(),opacity:Q(),padding:P(),saturate:Q(),scale:Q(),sepia:D(),skew:I(),space:P(),translate:P()},classGroups:{aspect:[{aspect:["auto","square","video",Y]}],container:["container"],columns:[{columns:[Dt]}],"break-after":[{"break-after":F()}],"break-before":[{"break-before":F()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none"]}],clear:[{clear:["left","right","both","none"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[].concat(Z(),[Y])}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[x]}],"inset-x":[{"inset-x":[x]}],"inset-y":[{"inset-y":[x]}],start:[{start:[x]}],end:[{end:[x]}],top:[{top:[x]}],right:[{right:[x]}],bottom:[{bottom:[x]}],left:[{left:[x]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",kr]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Y]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",kr]}],"grid-cols":[{"grid-cols":[Sr]}],"col-start-end":[{col:["auto",{span:["full",kr]},Y]}],"col-start":[{"col-start":U()}],"col-end":[{"col-end":U()}],"grid-rows":[{"grid-rows":[Sr]}],"row-start-end":[{row:["auto",{span:[kr]},Y]}],"row-start":[{"row-start":U()}],"row-end":[{"row-end":U()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Y]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal"].concat(O())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(O(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(O(),["baseline"])}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[h]}],px:[{px:[h]}],py:[{py:[h]}],ps:[{ps:[h]}],pe:[{pe:[h]}],pt:[{pt:[h]}],pr:[{pr:[h]}],pb:[{pb:[h]}],pl:[{pl:[h]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",Y,t]}],"min-w":[{"min-w":["min","max","fit",Y,ct]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Dt]},Dt,Y]}],h:[{h:[Y,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",Y,ct]}],"max-h":[{"max-h":[Y,t,"min","max","fit"]}],"font-size":[{text:["base",Dt,$a]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",_s]}],"font-family":[{font:[Sr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Y]}],"line-clamp":[{"line-clamp":["none",vn,_s]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Y,ct]}],"list-image":[{"list-image":["none",Y]}],"list-style-type":[{list:["none","disc","decimal",Y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[].concat(X(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",ct]}],"underline-offset":[{"underline-offset":["auto",Y,ct]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:P()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Y]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[].concat(Z(),[ev])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Zy]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},tv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[v]}],"gradient-via-pos":[{via:[v]}],"gradient-to-pos":[{to:[v]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[].concat(X(),["hidden"])}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:X()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:[""].concat(X())}],"outline-offset":[{"outline-offset":[Y,ct]}],"outline-w":[{outline:[ct]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ee()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[ct]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Dt,rv]}],"shadow-color":[{shadow:[Sr]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":re()}],"bg-blend":[{"bg-blend":re()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Dt,Y]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[g]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Y]}],duration:[{duration:I()}],ease:[{ease:["linear","in","out","in-out",Y]}],delay:[{delay:I()}],animate:[{animate:["none","spin","ping","pulse","bounce",Y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[w]}],"scale-x":[{"scale-x":[w]}],"scale-y":[{"scale-y":[w]}],rotate:[{rotate:[kr,Y]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Y]}],accent:[{accent:["auto",e]}],appearance:["appearance-none"],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":P()}],"scroll-mx":[{"scroll-mx":P()}],"scroll-my":[{"scroll-my":P()}],"scroll-ms":[{"scroll-ms":P()}],"scroll-me":[{"scroll-me":P()}],"scroll-mt":[{"scroll-mt":P()}],"scroll-mr":[{"scroll-mr":P()}],"scroll-mb":[{"scroll-mb":P()}],"scroll-ml":[{"scroll-ml":P()}],"scroll-p":[{"scroll-p":P()}],"scroll-px":[{"scroll-px":P()}],"scroll-py":[{"scroll-py":P()}],"scroll-ps":[{"scroll-ps":P()}],"scroll-pe":[{"scroll-pe":P()}],"scroll-pt":[{"scroll-pt":P()}],"scroll-pr":[{"scroll-pr":P()}],"scroll-pb":[{"scroll-pb":P()}],"scroll-pl":[{"scroll-pl":P()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","pinch-zoom","manipulation",{pan:["x","left","right","y","up","down"]}]}],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ct,_s]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}}var lv=Vy(av);function uv(...e){return lv(My(e))}const cv=[{name:"Dashboard",href:"/",icon:pp},{name:"Organizations",href:"/organizations",icon:hp}];function dv({children:e}){const t=fs();return o.jsxs("div",{className:"min-h-screen bg-background",style:{minHeight:"100vh",backgroundColor:"#ffffff"},children:[o.jsx("header",{className:"border-b border-border bg-card",style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #e0e0e0"},children:o.jsx("div",{className:"flex h-16 items-center px-6",children:o.jsxs("div",{className:"flex items-center space-x-4",children:[o.jsx(ky,{className:"h-6 w-6 md:hidden"}),o.jsx("h1",{className:"text-xl font-semibold text-foreground",style:{color:"#000000",fontSize:"1.25rem",fontWeight:"600"},children:"AI Agent Service"})]})})}),o.jsxs("div",{className:"flex",children:[o.jsx("aside",{className:"hidden w-64 border-r border-border bg-card md:block",children:o.jsx("nav",{className:"space-y-1 p-4",children:cv.map(n=>{const r=t.pathname===n.href||n.href!=="/"&&t.pathname.startsWith(n.href);return o.jsxs(ep,{to:n.href,className:uv("flex items-center space-x-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors",r?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[o.jsx(n.icon,{className:"h-5 w-5"}),o.jsx("span",{children:n.name})]},n.name)})})}),o.jsx("main",{className:"flex-1 p-6",children:o.jsx("div",{className:"mx-auto max-w-7xl",children:e})})]})]})}const fv={}.VITE_API_URL||"/api";function pv(e){const t=e.startsWith("/")?e.slice(1):e;return`${fv}/${t}`}async function Ls(e,t){const n=pv(e);try{const r=await fetch(n,{...t,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}});if(!r.ok)throw new Error(`API request failed: ${r.status} ${r.statusText}`);return r}catch(r){throw console.error(`API request error for ${e}:`,r),r}}const Fs={health:"health",ready:"ready",analysis:"analysis",analysisStatus:e=>`analysis/${e}`,queueQueued:"queue/queued",queueInProgress:"queue/in-progress",queueCompleted:"queue/completed",queueFailed:"queue/failed",workItemsHealth:"work-items/health",workItemsErrors:"work-items/errors",workItemsLogs:"work-items/logs",errorsRecent:"errors/recent",workspaceDiscover:"workspace/discover",workspaceList:"workspace/list",workspaceStats:e=>e?`workspace/stats/${e}`:"workspace/stats",websocketStatus:"websocket/status",websocketActivity:"websocket/activity",websocketWorker:"websocket/worker",websocketReconnect:"websocket/reconnect",usageStats:"usage/stats",usageHistory:"usage/history",usageRateLimit:"usage/rate-limit",analyticsProjects:"analytics/projects",analyticsStats:"analytics/stats",analyticsOperations:"analytics/operations"};function hv(){var j,z,A,q;const[e,t]=N.useState(null),[n,r]=N.useState(null),[s,i]=N.useState(null),[a,l]=N.useState(null),[u,c]=N.useState(!0),[d,f]=N.useState(null),[p,y]=N.useState("queued"),[v,x]=N.useState(null);N.useEffect(()=>{const P=async()=>{try{c(!0),f(null);const[U,Z,X,re]=await Promise.allSettled([Ls(Fs.queueQueued),Ls(Fs.queueInProgress),Ls(Fs.queueCompleted+"?limit=10"),Ls(Fs.queueFailed+"?limit=10")]);if(U.status==="fulfilled"&&U.value.ok){const O=await U.value.json();t(O.data)}if(Z.status==="fulfilled"&&Z.value.ok){const O=await Z.value.json();r(O.data)}if(X.status==="fulfilled"&&X.value.ok){const O=await X.value.json();i(O.data)}if(re.status==="fulfilled"&&re.value.ok){const O=await re.value.json();l(O.data)}}catch(U){f(U instanceof Error?U.message:"Failed to fetch work queue data")}finally{c(!1)}};P();const ee=setInterval(P,1e4);return()=>clearInterval(ee)},[]);const b=P=>{const ee=Math.floor(P/60),U=Math.floor(ee/60);return U>0?`${U}h ${ee%60}m`:ee>0?`${ee}m`:`${P}s`},m=P=>{const ee=new Date,U=new Date(P),Z=ee.getTime()-U.getTime(),X=Math.floor(Z/(1e3*60));if(X<1)return"Just now";if(X<60)return`${X}m ago`;const re=Math.floor(X/60);return re<24?`${re}h ago`:`${Math.floor(re/24)}d ago`},h=P=>{switch(P){case"project_review":return"📋";case"code_review":return"🔍";case"story_implementation":return"⚡";case"development_planning":return"📊";default:return"📄"}},g=P=>P>=9?"text-red-600 bg-red-50":P>=7?"text-orange-600 bg-orange-50":P>=5?"text-yellow-600 bg-yellow-50":"text-green-600 bg-green-50",w=P=>P>=9?"Critical":P>=7?"High":P>=5?"Medium":"Low",C=P=>{switch(P){case"completed":return o.jsx(on,{className:"w-4 h-4 text-green-600"});case"failed":return o.jsx(jt,{className:"w-4 h-4 text-red-600"});case"in_progress":return o.jsx(zo,{className:"w-4 h-4 text-blue-600 animate-spin"});case"queued":return o.jsx(Pt,{className:"w-4 h-4 text-yellow-600"});default:return o.jsx(Pt,{className:"w-4 h-4 text-gray-400"})}},E=P=>{switch(P){case"completed":return"text-green-600 bg-green-50 border-green-200";case"failed":return"text-red-600 bg-red-50 border-red-200";case"in_progress":return"text-blue-600 bg-blue-50 border-blue-200";case"queued":return"text-yellow-600 bg-yellow-50 border-yellow-200";default:return"text-gray-600 bg-gray-50 border-gray-200"}},S=(P,ee)=>{var U;return o.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50 transition-colors",children:[o.jsxs("div",{className:"flex items-start justify-between mb-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-lg",children:h(P.type)}),o.jsxs("div",{children:[o.jsx("h4",{className:"font-medium text-sm",children:P.title}),o.jsx("p",{className:"text-xs text-gray-600",children:P.projectName})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[ee==="completed"&&o.jsxs("span",{className:`px-2 py-1 rounded border text-xs font-medium flex items-center gap-1 ${E(P.status)}`,children:[C(P.status),P.status==="completed"?"Success":P.status==="failed"?"Failed":P.status]}),o.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${g(P.priority)}`,children:w(P.priority)}),P.estimatedDuration&&o.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[o.jsx(Pt,{className:"w-3 h-3"}),b(P.estimatedDuration)]}),P.actualDuration&&ee==="completed"&&o.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[o.jsx(Pt,{className:"w-3 h-3"}),b(Math.round(P.actualDuration/1e3))," actual"]})]})]}),P.description&&o.jsx("p",{className:"text-xs text-gray-600 mb-2 line-clamp-2",children:P.description}),P.progress&&P.status==="in_progress"&&o.jsxs("div",{className:"mb-2",children:[o.jsxs("div",{className:"flex justify-between text-xs text-gray-600 mb-1",children:[o.jsx("span",{children:P.progress.currentStep}),o.jsxs("span",{children:[P.progress.percentage,"%"]})]}),o.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:o.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all duration-300",style:{width:`${P.progress.percentage}%`}})})]}),P.status==="failed"&&o.jsxs("div",{className:"mb-2 p-2 bg-red-50 rounded border border-red-200 flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(jt,{className:"w-4 h-4 text-red-600"}),o.jsx("span",{className:"text-xs text-red-800 font-medium",children:"Work item failed"}),((U=P.metadata)==null?void 0:U.failedAt)&&o.jsxs("span",{className:"text-xs text-red-600",children:["• Failed: ",m(P.metadata.failedAt)]})]}),o.jsx("button",{onClick:Z=>{Z.stopPropagation(),x(P)},className:"px-2 py-1 text-xs bg-red-100 text-red-700 hover:bg-red-200 rounded transition-colors",children:"View Details"})]}),o.jsxs("div",{className:"flex justify-between items-center text-xs text-gray-500",children:[o.jsxs("span",{children:["Created ",m(P.createdAt)]}),P.assignedTo&&o.jsx("span",{className:"bg-blue-100 text-blue-800 px-2 py-1 rounded",children:P.assignedTo}),P.completedAt&&o.jsxs("span",{className:"text-green-600",children:["Completed ",m(P.completedAt)]})]})]},`${ee}-${P.id}`)};return u?o.jsx("div",{className:"rounded-lg border bg-card p-6",children:o.jsxs("div",{className:"flex items-center justify-center py-8",children:[o.jsx(zo,{className:"h-8 w-8 animate-spin text-blue-600"}),o.jsx("span",{className:"ml-2 text-sm text-gray-600",children:"Loading work queue..."})]})}):d?o.jsx("div",{className:"rounded-lg border bg-card p-6",children:o.jsxs("div",{className:"flex items-center justify-center py-8 text-red-600",children:[o.jsx(jt,{className:"h-6 w-6 mr-2"}),o.jsx("span",{className:"text-sm",children:d})]})}):o.jsxs("div",{className:"rounded-lg border bg-card",children:[o.jsxs("div",{className:"p-6 border-b",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"Work Queue Status"}),o.jsxs("div",{className:"flex space-x-1 bg-gray-100 rounded-lg p-1",children:[o.jsxs("button",{onClick:()=>y("queued"),className:`flex-1 flex items-center justify-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors ${p==="queued"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:[o.jsx(Nc,{className:"w-4 h-4"}),"Queued (",(e==null?void 0:e.total)||0,")"]}),o.jsxs("button",{onClick:()=>y("progress"),className:`flex-1 flex items-center justify-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors ${p==="progress"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:[o.jsx(kc,{className:"w-4 h-4"}),"In Progress (",(n==null?void 0:n.total)||0,")"]}),o.jsxs("button",{onClick:()=>y("completed"),className:`flex-1 flex items-center justify-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors ${p==="completed"?"bg-white text-blue-600 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:[o.jsx(on,{className:"w-4 h-4"}),"Recent (",(s==null?void 0:s.total)||0,")"]}),o.jsxs("button",{onClick:()=>y("failed"),className:`flex-1 flex items-center justify-center gap-2 px-3 py-2 rounded-md text-sm font-medium transition-colors ${p==="failed"?"bg-white text-red-600 shadow-sm":"text-gray-600 hover:text-gray-900"}`,children:[o.jsx(jt,{className:"w-4 h-4"}),"Failed (",(a==null?void 0:a.total)||0,")"]})]})]}),o.jsxs("div",{className:"p-6",children:[p==="queued"&&(e==null?void 0:e.estimatedWaitTime)&&o.jsx("div",{className:"mb-4 p-3 bg-yellow-50 rounded-lg border border-yellow-200",children:o.jsxs("p",{className:"text-sm text-yellow-800",children:[o.jsx(Pt,{className:"w-4 h-4 inline mr-1"}),"Estimated wait time: ",b(e.estimatedWaitTime)]})}),p==="progress"&&(n==null?void 0:n.totalEstimatedRemaining)&&o.jsx("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg border border-blue-200",children:o.jsxs("p",{className:"text-sm text-blue-800",children:[o.jsx(zo,{className:"w-4 h-4 inline mr-1"}),"Estimated remaining time: ",b(n.totalEstimatedRemaining)]})}),o.jsxs("div",{className:"space-y-3",children:[p==="queued"&&o.jsx(o.Fragment,{children:(e==null?void 0:e.items.length)===0?o.jsxs("div",{className:"text-center py-8 text-gray-500",children:[o.jsx(Nc,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No items in queue"})]}):e==null?void 0:e.items.map(P=>S(P,"queued"))}),p==="progress"&&o.jsx(o.Fragment,{children:(n==null?void 0:n.items.length)===0?o.jsxs("div",{className:"text-center py-8 text-gray-500",children:[o.jsx(kc,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No items in progress"})]}):n==null?void 0:n.items.map(P=>S(P,"progress"))}),p==="completed"&&o.jsx(o.Fragment,{children:(s==null?void 0:s.items.length)===0?o.jsxs("div",{className:"text-center py-8 text-gray-500",children:[o.jsx(on,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No completed items"})]}):s==null?void 0:s.items.map(P=>S(P,"completed"))}),p==="failed"&&o.jsx(o.Fragment,{children:(a==null?void 0:a.items.length)===0?o.jsxs("div",{className:"text-center py-8 text-gray-500",children:[o.jsx(jt,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No failed items"})]}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"mb-4 p-3 bg-red-50 rounded-lg border border-red-200",children:o.jsxs("p",{className:"text-sm text-red-800",children:[o.jsx(jt,{className:"w-4 h-4 inline mr-1"}),(a==null?void 0:a.total)||0," work items have failed and may need attention"]})}),a==null?void 0:a.items.map(P=>S(P,"failed"))]})})]}),p==="completed"&&(s==null?void 0:s.hasMore)&&o.jsx("div",{className:"mt-4 text-center",children:o.jsx("button",{className:"px-4 py-2 text-sm text-blue-600 hover:text-blue-800 hover:bg-blue-50 rounded-lg transition-colors",children:"Load more completed items"})})]}),v&&o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:o.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-2xl w-full mx-4 max-h-[80vh] overflow-y-auto",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(jt,{className:"w-5 h-5 text-red-600"}),o.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Error Details"})]}),o.jsx("button",{onClick:()=>x(null),className:"text-gray-400 hover:text-gray-600 transition-colors",children:o.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"border rounded-lg p-4 bg-gray-50",children:[o.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:"Work Item Information"}),o.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Type:"}),o.jsx("span",{className:"ml-2",children:v.type})]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Status:"}),o.jsx("span",{className:"ml-2 text-red-600",children:"Failed"})]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Project:"}),o.jsx("span",{className:"ml-2",children:v.projectName})]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Created:"}),o.jsxs("span",{className:"ml-2",children:[m(v.createdAt)," ago"]})]}),v.completedAt&&o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Failed:"}),o.jsxs("span",{className:"ml-2",children:[m(v.completedAt)," ago"]})]}),v.assignedTo&&o.jsxs("div",{children:[o.jsx("span",{className:"font-medium text-gray-600",children:"Assigned to:"}),o.jsx("span",{className:"ml-2",children:v.assignedTo})]})]})]}),o.jsxs("div",{className:"border rounded-lg p-4 bg-red-50 border-red-200",children:[o.jsxs("h3",{className:"font-medium text-red-900 mb-2 flex items-center gap-2",children:[o.jsx(jt,{className:"w-4 h-4"}),"Error Message"]}),o.jsx("p",{className:"text-red-800 text-sm",children:((j=v.metadata)==null?void 0:j.reason)||((z=v.metadata)==null?void 0:z.failureReason)||((A=v.metadata)==null?void 0:A.error)||"No specific error message available"})]}),((q=v.metadata)==null?void 0:q.errorHistory)&&v.metadata.errorHistory.length>0&&o.jsxs("div",{className:"border rounded-lg p-4",children:[o.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:"Attempt History"}),o.jsxs("div",{className:"text-sm text-gray-600",children:[o.jsxs("p",{className:"mb-2",children:["This work item failed after ",v.metadata.errorHistory.length," attempt",v.metadata.errorHistory.length>1?"s":"",":"]}),o.jsx("div",{className:"space-y-2",children:v.metadata.errorHistory.map((P,ee)=>o.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:[o.jsxs("span",{children:["Attempt #",P.attemptNumber||ee+1]}),o.jsx("span",{className:"text-xs text-gray-500",children:P.timestamp&&m(P.timestamp)})]},ee))})]})]}),v.metadata&&Object.keys(v.metadata).length>0&&o.jsxs("div",{className:"border rounded-lg p-4",children:[o.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:"Additional Information"}),o.jsxs("details",{className:"text-sm",children:[o.jsx("summary",{className:"cursor-pointer text-gray-600 hover:text-gray-800",children:"View raw metadata"}),o.jsx("pre",{className:"mt-2 text-xs bg-gray-50 p-2 rounded overflow-x-auto",children:JSON.stringify(v.metadata,null,2)})]})]})]}),o.jsx("div",{className:"flex justify-end mt-6",children:o.jsx("button",{onClick:()=>x(null),className:"px-4 py-2 bg-gray-100 text-gray-700 rounded hover:bg-gray-200 transition-colors",children:"Close"})})]})})]})}function mv(){const[e,t]=N.useState([]),[n,r]=N.useState(!0),[s,i]=N.useState(null),[a,l]=N.useState(null);N.useEffect(()=>{const y=async()=>{try{r(!0),i(null);const x=await fetch("/api/workspace/list");if(!x.ok)throw new Error(`HTTP ${x.status}: ${x.statusText}`);const b=await x.json();if(b.success)t(b.data||[]);else throw new Error(b.details||"Failed to fetch workspaces")}catch(x){i(x instanceof Error?x.message:"Failed to fetch workspace data")}finally{r(!1)}};y();const v=setInterval(y,3e4);return()=>clearInterval(v)},[]);const u=async y=>{if(confirm(`Are you sure you want to remove workspace "${y.name}"? This action cannot be undone.`)){l(`remove-${y.id}`);try{const v=await fetch(`/api/workspace/${y.id}`,{method:"DELETE"});if(!v.ok){const b=await v.json();throw new Error(b.error||"Failed to remove workspace")}const x=await fetch("/api/workspace/list");if(x.ok){const b=await x.json();b.success&&t(b.data||[])}}catch(v){i(v instanceof Error?v.message:"Failed to remove workspace")}finally{l(null)}}},c=async y=>{const v=!y.isActive;l(`toggle-${y.id}`);try{const x=await fetch(`/api/workspace/${y.id}/status`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:v})});if(!x.ok){const b=await x.json();throw new Error(b.error||"Failed to update workspace status")}t(b=>b.map(m=>m.id===y.id?{...m,isActive:v}:m))}catch(x){i(x instanceof Error?x.message:"Failed to update workspace status")}finally{l(null)}},d=y=>{switch(y.toLowerCase()){case"react":return"⚛️";case"node.js":return"🟢";case"typescript":return"🔷";case"python":return"🐍";case"database":return"🗄️";case"redis":return"🔴";default:return"💻"}},f=y=>y?o.jsx(on,{className:"w-5 h-5 text-green-600"}):o.jsx(Ia,{className:"w-5 h-5 text-gray-400"}),p=y=>y?"bg-green-50 border-green-200":"bg-gray-50 border-gray-200";return n?o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"Configured Workspaces"}),o.jsxs("div",{className:"flex items-center justify-center py-8",children:[o.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"}),o.jsx("span",{className:"ml-2 text-sm text-gray-600",children:"Loading workspaces..."})]})]}):s?o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"Configured Workspaces"}),o.jsxs("div",{className:"flex items-center justify-center py-8 text-red-600",children:[o.jsx(Ti,{className:"h-6 w-6 mr-2"}),o.jsx("span",{className:"text-sm",children:s})]})]}):o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4",children:[o.jsx("h3",{className:"text-lg font-medium",children:"Configured Workspaces"}),o.jsxs("span",{className:"text-sm text-gray-500",children:[e.length," workspace",e.length!==1?"s":""]})]}),e.length===0?o.jsxs("div",{className:"text-center py-8 text-gray-500",children:[o.jsx(Ny,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),o.jsx("p",{className:"text-sm",children:"No workspaces configured"}),o.jsx("p",{className:"text-xs mt-1",children:"Workspaces will be discovered automatically"})]}):o.jsx("div",{className:"space-y-3",children:e.map(y=>o.jsxs("div",{className:`border rounded-lg p-4 transition-colors ${p(y.isActive)}`,children:[o.jsxs("div",{className:"flex items-start justify-between mb-2",children:[o.jsx("div",{className:"flex items-center gap-3",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-lg",children:d(y.technology)}),o.jsxs("div",{children:[o.jsx("h4",{className:"font-medium text-sm",children:y.name}),o.jsx("p",{className:"text-xs text-gray-600",children:y.description})]})]})}),o.jsxs("div",{className:"flex items-center gap-2",children:[y.port&&o.jsxs("span",{className:"text-xs bg-blue-100 text-blue-800 px-2 py-1 rounded-full flex items-center gap-1",children:[o.jsx(Ey,{className:"w-3 h-3"}),":",y.port]}),f(y.isActive),o.jsxs("div",{className:"flex items-center gap-1 ml-2",children:[o.jsx("button",{onClick:()=>c(y),disabled:a===`toggle-${y.id}`,className:`p-1 rounded hover:bg-gray-100 transition-colors ${a===`toggle-${y.id}`?"opacity-50 cursor-not-allowed":""}`,title:y.isActive?"Disable workspace":"Enable workspace",children:a===`toggle-${y.id}`?o.jsx("div",{className:"w-4 h-4 border-2 border-gray-300 border-t-gray-600 rounded-full animate-spin"}):y.isActive?o.jsx(Sy,{className:"w-4 h-4 text-orange-600"}):o.jsx(Cy,{className:"w-4 h-4 text-green-600"})}),o.jsx("button",{onClick:()=>u(y),disabled:a===`remove-${y.id}`,className:`p-1 rounded hover:bg-red-50 transition-colors ${a===`remove-${y.id}`?"opacity-50 cursor-not-allowed":""}`,title:"Remove workspace",children:a===`remove-${y.id}`?o.jsx("div",{className:"w-4 h-4 border-2 border-red-300 border-t-red-600 rounded-full animate-spin"}):o.jsx(Oi,{className:"w-4 h-4 text-red-600"})})]})]})]}),o.jsxs("div",{className:"mb-3",children:[o.jsxs("p",{className:"text-xs text-gray-600 mb-2",children:[o.jsx(wy,{className:"w-3 h-3 inline mr-1"}),y.path]}),y.services.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1",children:y.services.map((v,x)=>o.jsx("span",{className:"text-xs bg-gray-100 text-gray-700 px-2 py-1 rounded",children:v},x))})]}),o.jsxs("div",{className:"flex justify-between items-center text-xs text-gray-500",children:[o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(jy,{className:"w-3 h-3"}),y.technology]}),o.jsx("span",{className:y.isActive?"text-green-600 font-medium":"text-gray-500",children:y.isActive?"Active":"Inactive"})]})]},y.id))}),e.length>0&&o.jsx("div",{className:"mt-4 pt-4 border-t",children:o.jsxs("div",{className:"grid grid-cols-2 gap-4 text-center",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-lg font-semibold text-green-600",children:e.filter(y=>y.isActive).length}),o.jsx("div",{className:"text-xs text-gray-600",children:"Active"})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-lg font-semibold text-gray-600",children:e.filter(y=>!y.isActive).length}),o.jsx("div",{className:"text-xs text-gray-600",children:"Inactive"})]})]})})]})}function gv(){const[e,t]=N.useState(null),[n,r]=N.useState(!0),[s,i]=N.useState(!1);N.useEffect(()=>{const d=async()=>{try{const p=await fetch("/api/smart-polling/metrics");if(p.ok){const y=await p.json();t(y.data)}}catch(p){console.error("Failed to fetch smart polling metrics:",p)}finally{r(!1)}};d();const f=setInterval(d,1e4);return()=>clearInterval(f)},[]);const a=async()=>{i(!0);try{if((await fetch("/api/smart-polling/force",{method:"POST"})).ok){const f=await fetch("/api/smart-polling/metrics");if(f.ok){const p=await f.json();t(p.data)}}}catch(d){console.error("Failed to force polling:",d)}finally{i(!1)}},l=d=>d<1e3?`${d}ms`:d<6e4?`${Math.round(d/1e3)}s`:`${Math.round(d/6e4)}m`,u=d=>{if(!d)return"Never";const f=new Date(d),y=new Date().getTime()-f.getTime();return y<6e4?`${Math.round(y/1e3)}s ago`:y<36e5?`${Math.round(y/6e4)}m ago`:f.toLocaleTimeString()},c=d=>d.isPolling?d.consecutiveErrors>=3?o.jsx(Ti,{className:"h-4 w-4 text-red-500"}):d.consecutiveErrors>0?o.jsx(Pt,{className:"h-4 w-4 text-yellow-500"}):o.jsx(on,{className:"h-4 w-4 text-green-500"}):o.jsx(Py,{className:"h-4 w-4 text-gray-500"});return n||!e?o.jsxs("div",{className:"rounded-lg border bg-card",children:[o.jsx("div",{className:"border-b border-border p-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ao,{className:"h-5 w-5"}),o.jsx("h3",{className:"text-lg font-medium",children:"Smart Polling Status"})]})}),o.jsx("div",{className:"p-6",children:o.jsx("div",{className:"animate-pulse",children:o.jsxs("div",{className:"space-y-3",children:[o.jsx("div",{className:"h-4 bg-muted rounded"}),o.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),o.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})})})]}):o.jsxs("div",{className:"rounded-lg border bg-card",children:[o.jsx("div",{className:"border-b border-border p-4",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Ao,{className:"h-5 w-5"}),o.jsx("h3",{className:"text-lg font-medium",children:"Smart Polling Status"}),o.jsxs("div",{className:"ml-auto flex items-center gap-4 text-sm text-muted-foreground",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),"Active: ",e.activePolling,"/",e.totalOrganizations]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(mp,{className:"h-3 w-3"}),"Avg: ",l(e.averageInterval)]}),o.jsxs("button",{onClick:a,disabled:s,className:"flex items-center gap-1 px-2 py-1 text-xs bg-blue-500 hover:bg-blue-600 disabled:bg-blue-300 text-white rounded transition-colors",title:"Force immediate polling for all organizations",children:[o.jsx(Qt,{className:`h-3 w-3 ${s?"animate-spin":""}`}),s?"Polling...":"Force Poll"]})]})]})}),o.jsxs("div",{className:"p-6",children:[o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-2xl font-bold text-blue-600",children:e.totalPolls}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Polls"})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-2xl font-bold text-green-600",children:e.totalClaimedWork}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Work Claimed"})]}),o.jsxs("div",{className:"text-center",children:[o.jsx("div",{className:"text-2xl font-bold text-red-600",children:e.totalErrors}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Errors"})]}),o.jsxs("div",{className:"text-center",children:[o.jsxs("div",{className:"text-2xl font-bold text-purple-600",children:[(e.errorRate*100).toFixed(1),"%"]}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"Error Rate"})]})]}),o.jsxs("div",{className:"space-y-3",children:[o.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Organization Status"}),e.organizationStats.length===0?o.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[o.jsx(Ao,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),o.jsx("p",{children:"No organizations configured"})]}):e.organizationStats.map(d=>o.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/50",children:[o.jsx("div",{className:"flex-shrink-0",children:c(d)}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[o.jsx("p",{className:"font-medium truncate",children:d.organizationName}),o.jsx("span",{className:`text-xs px-2 py-1 rounded ${d.isPolling?"bg-green-100 text-green-700":"bg-gray-100 text-gray-700"}`,children:d.isPolling?"Polling":"Stopped"})]}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 text-xs text-muted-foreground",children:[o.jsxs("div",{children:[o.jsx("span",{className:"font-medium",children:"Interval:"})," ",l(d.currentInterval)]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium",children:"Last Poll:"})," ",u(d.lastPollAt)]}),o.jsxs("div",{children:[o.jsx("span",{className:"font-medium",children:"Work Claimed:"})," ",d.claimedWorkCount]}),o.jsxs("div",{className:d.consecutiveErrors>0?"text-red-600":"",children:[o.jsx("span",{className:"font-medium",children:"Errors:"})," ",d.totalErrors,d.consecutiveErrors>0&&` (${d.consecutiveErrors} consecutive)`]})]})]}),o.jsxs("div",{className:"flex-shrink-0 text-right",children:[o.jsx("div",{className:"text-sm font-medium",children:d.totalPolls}),o.jsx("div",{className:"text-xs text-muted-foreground",children:"polls"})]})]},d.organizationId))]}),o.jsxs("div",{className:"mt-6 p-3 bg-muted/30 rounded-lg",children:[o.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Status Indicators"}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(on,{className:"h-3 w-3 text-green-500"}),o.jsx("span",{children:"Healthy polling"})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Pt,{className:"h-3 w-3 text-yellow-500"}),o.jsx("span",{children:"Some errors"})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx(Ti,{className:"h-3 w-3 text-red-500"}),o.jsx("span",{children:"Multiple failures"})]})]})]})]})]})}function yv(){const[e,t]=N.useState(null),[n,r]=N.useState(!0);N.useEffect(()=>{const i=async()=>{try{const l=await fetch("/api/queue/stats");if(l.ok){const u=await l.json();t({queued:u.queued,inProgress:u.inProgress,completedToday:u.completed,completedThisWeek:u.completed,averageCompletionTime:u.averageCompletionTime*1e3,successRate:u.successRate,activeAgents:u.workers,totalProcessed:u.total})}}catch(l){console.error("Failed to fetch queue stats:",l)}finally{r(!1)}};i();const a=setInterval(i,3e4);return()=>clearInterval(a)},[]);const s=i=>i<1e3?`${i}ms`:i<6e4?`${(i/1e3).toFixed(1)}s`:`${(i/6e4).toFixed(1)}m`;return o.jsxs(o.Fragment,{children:[o.jsx(jn,{children:o.jsx("title",{children:"Dashboard - AI Agent Service"})}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Dashboard"}),o.jsx("p",{className:"text-muted-foreground",children:"Overview of your AI Agent Service performance"})]}),o.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Total Tasks"}),o.jsx("div",{className:"text-2xl font-bold text-blue-600",children:n?"-":(e==null?void 0:e.totalProcessed)||0})]}),o.jsx(vy,{className:"h-8 w-8 text-blue-600"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"All time"})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Success Rate"}),o.jsx("div",{className:"text-2xl font-bold text-green-600",children:n?"-":`${Math.round(((e==null?void 0:e.successRate)||0)*100)}%`})]}),o.jsx(Ay,{className:"h-8 w-8 text-green-600"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Overall performance"})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Avg Completion Time"}),o.jsx("div",{className:"text-2xl font-bold text-purple-600",children:n?"-":s((e==null?void 0:e.averageCompletionTime)||0)})]}),o.jsx(Pt,{className:"h-8 w-8 text-purple-600"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Per task"})]}),o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Active Agents"}),o.jsx("div",{className:"text-2xl font-bold text-orange-600",children:n?"-":(e==null?void 0:e.activeAgents)||0})]}),o.jsx(Ry,{className:"h-8 w-8 text-orange-600"})]}),o.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Currently active"})]})]}),o.jsx(gv,{}),o.jsx(hv,{}),o.jsx(mv,{}),o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"Welcome to AI Agent Service"}),o.jsx("p",{className:"text-muted-foreground",children:"This dashboard provides insights into your AI agent performance across multiple Task Shepherd organizations. Visit the Organizations page to manage connections and the Analytics page for detailed metrics."})]})]})]})}const vv=({title:e,children:t,canProceed:n,onNext:r,onPrev:s,isFirst:i=!1,isLast:a=!1})=>o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"border-b border-gray-200 pb-4",children:o.jsx("h2",{className:"text-xl font-semibold text-gray-900",children:e})}),o.jsx("div",{className:"min-h-[400px]",children:t}),o.jsxs("div",{className:"flex justify-between pt-4 border-t border-gray-200",children:[o.jsxs("button",{onClick:s,disabled:i,className:"flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 disabled:opacity-50 disabled:cursor-not-allowed",children:[o.jsx(xy,{className:"w-4 h-4 mr-2"}),"Previous"]}),o.jsxs("button",{onClick:r,disabled:!n,className:"flex items-center px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:[a?"Complete":"Next",!a&&o.jsx(_a,{className:"w-4 h-4 ml-2"})]})]})]}),xv=({organizationId:e,onComplete:t,onCancel:n})=>{const[r,s]=N.useState(0),[i,a]=N.useState(""),[l,u]=N.useState(!1),[c,d]=N.useState(null),[f,p]=N.useState({}),[y,v]=N.useState([]),x=async()=>{if(i.trim()){u(!0);try{const g=await fetch(`/api/organizations/${e}/workspaces/discover`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:i.trim()})});if(!g.ok)throw new Error("Failed to analyze workspace path");const w=await g.json();if(w.success)d(w.data),p({name:w.data.name,description:w.data.description,id:w.data.workspaceId,path:w.data.path}),v(w.data.services.map(C=>C.name));else throw new Error(w.error||"Analysis failed")}catch(g){console.error("Path analysis failed:",g),alert(g instanceof Error?g.message:"Failed to analyze path")}finally{u(!1)}}},b=async()=>{try{const g=(c==null?void 0:c.services.filter(S=>y.includes(S.name)))||[],w={...f,services:g};console.log("Creating workspace with payload:",{...w,services:w.services.map(S=>{var j;return{name:S.name,type:S.type,technology:(j=S.metadata)==null?void 0:j.technology}})});const C=await fetch(`/api/organizations/${e}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(w)});if(!C.ok)throw new Error("Failed to create workspace");const E=await C.json();if(E.success)t(E.data);else throw new Error(E.error||"Failed to create workspace")}catch(g){console.error("Failed to create workspace:",g),alert(g instanceof Error?g.message:"Failed to create workspace")}},m=[{title:"Select Path",component:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{htmlFor:"path",className:"block text-sm font-medium text-gray-700",children:"Workspace Path"}),o.jsx("div",{className:"mt-1",children:o.jsx("input",{type:"text",id:"path",value:i,onChange:g=>a(g.target.value),className:"block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500",placeholder:"/path/to/your/project"})}),o.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"Enter the full path to your project directory for analysis"})]}),o.jsx("button",{onClick:x,disabled:!i.trim()||l,className:"w-full px-4 py-2 text-sm font-medium text-white bg-green-600 border border-transparent rounded-md hover:bg-green-700 disabled:opacity-50 disabled:cursor-not-allowed",children:l?"Analyzing...":"Analyze Path"}),l&&o.jsxs("div",{className:"flex items-center justify-center py-8",children:[o.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-blue-600"}),o.jsx("span",{className:"ml-3 text-sm text-gray-600",children:"Analyzing directory structure..."})]})]}),canProceed:c!==null},{title:"Review Suggestions",component:c?o.jsxs("div",{className:"space-y-6",children:[o.jsx("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:o.jsxs("div",{className:"flex items-center",children:[o.jsx("div",{className:"flex-shrink-0",children:o.jsx("div",{className:"w-8 h-8 bg-blue-100 rounded-full flex items-center justify-center",children:o.jsxs("span",{className:"text-blue-600 font-semibold text-sm",children:[Math.round(c.overallConfidence*100),"%"]})})}),o.jsxs("div",{className:"ml-3",children:[o.jsx("h3",{className:"text-sm font-medium text-blue-800",children:"Analysis Confidence"}),o.jsxs("p",{className:"text-sm text-blue-600",children:["Found ",c.services.length," services in this workspace"]})]})]})}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Workspace Name"}),o.jsx("input",{type:"text",value:f.name||"",onChange:g=>p({...f,name:g.target.value}),className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Description"}),o.jsx("textarea",{value:f.description||"",onChange:g=>p({...f,description:g.target.value}),rows:2,className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-sm font-medium text-gray-700",children:"Workspace ID"}),o.jsx("input",{type:"text",value:f.id||"",onChange:g=>p({...f,id:g.target.value}),className:"mt-1 block w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-blue-500 focus:border-blue-500"})]})]}),c.recommendations.length>0&&o.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[o.jsx("h4",{className:"text-sm font-medium text-green-800 mb-2",children:"Recommendations"}),o.jsx("ul",{className:"space-y-1",children:c.recommendations.map((g,w)=>o.jsxs("li",{className:"text-sm text-green-700",children:["• ",g]},w))})]}),c.warnings.length>0&&o.jsxs("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:[o.jsx("h4",{className:"text-sm font-medium text-yellow-800 mb-2",children:"Warnings"}),o.jsx("ul",{className:"space-y-1",children:c.warnings.map((g,w)=>o.jsxs("li",{className:"text-sm text-yellow-700",children:["• ",g]},w))})]})]}):null,canProceed:f.name&&f.id},{title:"Configure Services",component:c?o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsxs("h3",{className:"text-sm font-medium text-gray-700 mb-3",children:["Select services to include (",c.services.length," found)"]}),o.jsx("div",{className:"space-y-3 max-h-80 overflow-y-auto",children:c.services.map(g=>o.jsxs("div",{className:"flex items-start space-x-3 p-3 border border-gray-200 rounded-lg",children:[o.jsx("input",{type:"checkbox",id:`service-${g.name}`,checked:y.includes(g.name),onChange:w=>{w.target.checked?v([...y,g.name]):v(y.filter(C=>C!==g.name))},className:"mt-1 h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h4",{className:"text-sm font-medium text-gray-900",children:g.name}),o.jsx("span",{className:"text-xs bg-gray-100 text-gray-600 px-2 py-1 rounded",children:g.type})]}),o.jsxs("p",{className:"text-sm text-gray-600 mt-1",children:["Path: ",g.path]}),g.port&&o.jsxs("p",{className:"text-xs text-gray-500",children:["Port: ",g.port]}),g.description&&o.jsx("p",{className:"text-xs text-gray-500 mt-1",children:g.description}),o.jsxs("div",{className:"flex items-center mt-1",children:[o.jsx("div",{className:"flex-1 bg-gray-200 rounded-full h-1.5",children:o.jsx("div",{className:`h-1.5 rounded-full ${g.confidence>.8?"bg-green-500":g.confidence>.6?"bg-yellow-500":"bg-red-500"}`,style:{width:`${g.confidence*100}%`}})}),o.jsxs("span",{className:"ml-2 text-xs text-gray-500",children:[Math.round(g.confidence*100),"% confident"]})]})]})]},g.name))})]}),y.length===0&&o.jsx("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:o.jsx("p",{className:"text-sm text-yellow-700",children:"No services selected. The workspace will be created without any services."})})]}):null,canProceed:!0}],h=m[r];return o.jsxs("div",{className:"max-w-4xl mx-auto bg-white rounded-lg shadow-lg",children:[o.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Add Workspace"}),o.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600",children:o.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),o.jsx("div",{className:"mt-4",children:o.jsx("div",{className:"flex items-center",children:m.map((g,w)=>o.jsxs(R.Fragment,{children:[o.jsx("div",{className:`flex items-center justify-center w-8 h-8 rounded-full border-2 ${w<r?"bg-blue-600 border-blue-600 text-white":w===r?"border-blue-600 text-blue-600":"border-gray-300 text-gray-300"}`,children:w<r?"✓":w+1}),w<m.length-1&&o.jsx("div",{className:`flex-1 h-0.5 mx-4 ${w<r?"bg-blue-600":"bg-gray-300"}`})]},w))})})]}),o.jsx("div",{className:"p-6",children:o.jsx(vv,{title:h.title,canProceed:h.canProceed,onNext:r===m.length-1?b:()=>s(r+1),onPrev:r>0?()=>s(r-1):void 0,isFirst:r===0,isLast:r===m.length-1,children:h.component})})]})},wv=({organizationId:e,workspace:t,onClose:n,onApplyChanges:r})=>{var S;const[s,i]=N.useState(!1),[a,l]=N.useState(null),[u,c]=N.useState(new Set),[d,f]=N.useState(null),[p,y]=N.useState({}),v=async()=>{i(!0);try{const j=await fetch(`/api/organizations/${e}/workspaces/${t.id}/analyze`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!j.ok)throw new Error("Failed to analyze workspace");const z=await j.json();if(z.success)l(z.data);else throw new Error(z.error||"Analysis failed")}catch(j){console.error("Workspace analysis failed:",j),alert(j instanceof Error?j.message:"Failed to analyze workspace")}finally{i(!1)}},x=j=>{switch(j){case"found":return o.jsx(on,{className:"w-4 h-4 text-green-500"});case"outdated":return o.jsx(Ti,{className:"w-4 h-4 text-yellow-500"});case"missing":return o.jsx(Ia,{className:"w-4 h-4 text-red-500"});default:return null}},b=j=>{switch(j){case"add_service":return o.jsx(Or,{className:"w-4 h-4 text-green-500"});case"update_service":return o.jsx(Qt,{className:"w-4 h-4 text-blue-500"});case"remove_service":return o.jsx(Ia,{className:"w-4 h-4 text-red-500"});default:return o.jsx(yy,{className:"w-4 h-4 text-gray-500"})}},m=j=>{const z=new Set(u);z.has(j)?z.delete(j):z.add(j),c(z)},h=()=>{if(!a||u.size===0)return;const j=Array.from(u).map(z=>a.improvements[z]);r==null||r(j),n()},g=j=>{f(j.name),y({name:j.name,type:j.type,technology:j.technology,port:j.port,description:j.description})},w=()=>{f(null),y({})},C=async()=>{if(d)try{const j=await fetch(`/api/organizations/${e}/workspaces/${t.id}/services/${d}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(p)}),z=await j.json();if(j.ok&&z.success)f(null),y({}),await v();else throw new Error(z.error||"Failed to update service")}catch(j){console.error("Failed to update service:",j),alert(j instanceof Error?j.message:"Failed to update service")}},E=async j=>{if(confirm(`Are you sure you want to remove the service "${j}"? This action cannot be undone.`))try{const z=await fetch(`/api/organizations/${e}/workspaces/${t.id}/services/${j}`,{method:"DELETE"}),A=await z.json();if(z.ok&&A.success)await v();else throw new Error(A.error||"Failed to remove service")}catch(z){console.error("Failed to remove service:",z),alert(z instanceof Error?z.message:"Failed to remove service")}};return o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:o.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden",children:[o.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("h1",{className:"text-2xl font-bold text-gray-900",children:["Analyze Workspace: ",t.name]}),o.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600",children:o.jsx($r,{className:"w-6 h-6"})})]}),o.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"Analyze the current workspace configuration and discover improvements"})]}),o.jsxs("div",{className:"p-6 overflow-y-auto max-h-[calc(90vh-140px)]",children:[!a&&o.jsxs("div",{className:"text-center py-12",children:[o.jsxs("div",{className:"mb-6",children:[o.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-4",children:o.jsx(Qt,{className:"w-8 h-8 text-blue-600"})}),o.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Ready to Analyze Workspace"}),o.jsx("p",{className:"text-gray-600 mb-6 max-w-md mx-auto",children:"This will scan the workspace directory and compare it with your current configuration to suggest improvements."}),o.jsx("div",{className:"bg-gray-50 rounded-lg p-4 mb-6",children:o.jsxs("div",{className:"text-sm text-gray-700",children:[o.jsxs("div",{children:[o.jsx("strong",{children:"Workspace:"})," ",t.name]}),o.jsxs("div",{children:[o.jsx("strong",{children:"Path:"})," ",o.jsx("code",{className:"font-mono text-xs",children:t.path})]}),o.jsxs("div",{children:[o.jsx("strong",{children:"Current services:"})," ",((S=t.services)==null?void 0:S.length)||0]})]})})]}),o.jsx("button",{onClick:v,disabled:s,className:"inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:s?o.jsxs(o.Fragment,{children:[o.jsx(Qt,{className:"w-4 h-4 mr-2 animate-spin"}),"Analyzing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(Qt,{className:"w-4 h-4 mr-2"}),"Start Analysis"]})})]}),a&&o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[o.jsx("h3",{className:"text-lg font-medium text-blue-900 mb-2",children:"Analysis Summary"}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-sm",children:[o.jsxs("div",{children:[o.jsx("div",{className:"text-blue-800 font-medium",children:"Current Services"}),o.jsxs("div",{className:"text-blue-600",children:[a.currentServices.length," configured"]})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-blue-800 font-medium",children:"Discovered Services"}),o.jsxs("div",{className:"text-blue-600",children:[a.discoveredServices.length," found"]})]}),o.jsxs("div",{children:[o.jsx("div",{className:"text-blue-800 font-medium",children:"Improvements"}),o.jsxs("div",{className:"text-blue-600",children:[a.improvements.length," suggested"]})]})]})]}),o.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[o.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Current Services Status"}),a.currentServices.length>0?o.jsx("div",{className:"space-y-2",children:a.currentServices.map((j,z)=>o.jsx("div",{className:"p-3 bg-gray-50 rounded-lg border",children:d===j.name?o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Name"}),o.jsx("input",{type:"text",value:p.name||"",onChange:A=>y({...p,name:A.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Type"}),o.jsxs("select",{value:p.type||"backend",onChange:A=>y({...p,type:A.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[o.jsx("option",{value:"backend",children:"Backend"}),o.jsx("option",{value:"frontend",children:"Frontend"}),o.jsx("option",{value:"database",children:"Database"}),o.jsx("option",{value:"cache",children:"Cache"}),o.jsx("option",{value:"queue",children:"Queue"}),o.jsx("option",{value:"api",children:"API"}),o.jsx("option",{value:"service",children:"Service"}),o.jsx("option",{value:"other",children:"Other"})]})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Technology"}),o.jsx("input",{type:"text",value:p.technology||"",onChange:A=>y({...p,technology:A.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"e.g., Node.js, Python"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Port"}),o.jsx("input",{type:"number",value:p.port||"",onChange:A=>y({...p,port:A.target.value?parseInt(A.target.value):void 0}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"3000"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Description"}),o.jsx("input",{type:"text",value:p.description||"",onChange:A=>y({...p,description:A.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Optional description"})]}),o.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[o.jsxs("button",{onClick:C,className:"inline-flex items-center px-3 py-1 text-xs bg-green-600 text-white rounded hover:bg-green-700",children:[o.jsx(Fa,{className:"h-3 w-3 mr-1"}),"Save"]}),o.jsxs("button",{onClick:w,className:"inline-flex items-center px-3 py-1 text-xs bg-gray-600 text-white rounded hover:bg-gray-700",children:[o.jsx($r,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[x(j.status),o.jsxs("div",{children:[o.jsx("div",{className:"font-medium",children:j.name}),o.jsxs("div",{className:"text-sm text-gray-600",children:[j.type," ",j.technology&&`• ${j.technology}`," ",j.port&&`• Port ${j.port}`,j.description&&` • ${j.description}`]})]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:()=>g(j),className:"p-1 text-gray-500 hover:text-orange-600 transition-colors",title:"Edit service",children:o.jsx(La,{className:"h-3 w-3"})}),o.jsx("button",{onClick:()=>E(j.name),className:"p-1 text-gray-500 hover:text-red-600 transition-colors",title:"Remove service",children:o.jsx(Oi,{className:"h-3 w-3"})}),o.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${j.status==="found"?"bg-green-100 text-green-800":j.status==="outdated"?"bg-yellow-100 text-yellow-800":"bg-red-100 text-red-800"}`,children:j.status})]})]})},z))}):o.jsx("p",{className:"text-gray-600",children:"No services currently configured"})]}),a.improvements.length>0&&o.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[o.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:["Suggested Improvements (",a.improvements.length,")"]}),o.jsx("div",{className:"space-y-3",children:a.improvements.map((j,z)=>o.jsxs("div",{className:"flex items-start gap-3 p-3 border border-gray-200 rounded-lg hover:bg-gray-50",children:[o.jsx("input",{type:"checkbox",id:`improvement-${z}`,checked:u.has(z),onChange:()=>m(z),className:"mt-1 h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[b(j.type),o.jsx("span",{className:"font-medium",children:j.service}),o.jsx("span",{className:`px-2 py-1 text-xs rounded-full ${j.type==="add_service"?"bg-green-100 text-green-800":j.type==="update_service"?"bg-blue-100 text-blue-800":j.type==="remove_service"?"bg-red-100 text-red-800":"bg-gray-100 text-gray-800"}`,children:j.type.replace("_"," ")})]}),o.jsx("p",{className:"text-sm text-gray-700 mb-1",children:j.description}),o.jsx("p",{className:"text-xs text-gray-500",children:j.action})]})]},z))}),u.size>0&&o.jsx("div",{className:"mt-4 p-3 bg-blue-50 border border-blue-200 rounded-lg",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-sm text-blue-800",children:[u.size," improvement(s) selected"]}),o.jsx("button",{onClick:h,className:"px-3 py-1 text-sm bg-blue-600 text-white rounded hover:bg-blue-700",children:"Apply Selected"})]})})]}),a.recommendations.length>0&&o.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[o.jsx("h3",{className:"text-sm font-medium text-green-800 mb-2",children:"Recommendations"}),o.jsx("ul",{className:"space-y-1",children:a.recommendations.map((j,z)=>o.jsxs("li",{className:"text-sm text-green-700",children:["• ",j]},z))})]}),a.warnings.length>0&&o.jsxs("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:[o.jsx("h3",{className:"text-sm font-medium text-yellow-800 mb-2",children:"Warnings"}),o.jsx("ul",{className:"space-y-1",children:a.warnings.map((j,z)=>o.jsxs("li",{className:"text-sm text-yellow-700",children:["• ",j]},z))})]}),o.jsx("div",{className:"text-center pt-4 border-t border-gray-200",children:o.jsxs("button",{onClick:v,disabled:s,className:"inline-flex items-center px-3 py-2 text-sm text-gray-600 bg-gray-100 border border-gray-300 rounded-md hover:bg-gray-200 disabled:opacity-50",children:[o.jsx(Qt,{className:`w-4 h-4 mr-2 ${s?"animate-spin":""}`}),"Re-analyze"]})})]})]})]})})};function jv(){const[e,t]=N.useState(null),[n,r]=N.useState(!0),[s,i]=N.useState(!1),[a,l]=N.useState({name:"",basePath:"",apiKey:""}),[u,c]=N.useState([]),[d,f]=N.useState(new Set),[p,y]=N.useState(new Set),[v,x]=N.useState(null),[b,m]=N.useState(null),[h,g]=N.useState(null),[w,C]=N.useState({name:"",id:"",path:"",description:""}),[E,S]=N.useState(new Set),[j,z]=N.useState(null),[A,q]=N.useState({name:"",type:"backend",port:"",url:"",technology:"",description:""}),[P,ee]=N.useState(Date.now()),[U,Z]=N.useState(null),[X,re]=N.useState(null),[O,D]=N.useState({}),[F,Q]=N.useState({});N.useEffect(()=>{Ae()},[]);const I=(k,L,W)=>{const H={id:Date.now().toString(),type:k,title:L,message:W,timestamp:Date.now()};c(K=>[...K,H]),k==="success"&&setTimeout(()=>{c(K=>K.filter(le=>le.id!==H.id))},5e3)},ie=k=>{c(L=>L.filter(W=>W.id!==k))},Ae=async()=>{try{const k=await fetch("/api/organizations");if(k.ok){const L=await k.json();t(L.data),ee(Date.now())}}catch(k){console.error("Failed to fetch organizations:",k)}finally{r(!1)}},Qe=async()=>{await Ae()},ke=()=>{},at=()=>{},pr=()=>{},ps=async k=>{const L=new Set(d);L.has(k)?L.delete(k):L.add(k),f(L)},Yi=async(k,L)=>{k.preventDefault();try{const W=await fetch(`/api/organizations/${L}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(w)}),H=await W.json();if(W.ok&&H.success&&H.data){if(e){const K=e.organizations.map(le=>{if(le.id===L){const Ft=le.workspaces||[];return{...le,workspaces:[...Ft,H.data],workspaceCount:(le.workspaceCount||0)+1}}return le});t({...e,organizations:K})}x(null),C({name:"",id:"",path:"",description:""}),ke(),I("success","Workspace Added",`Successfully added workspace "${w.name}"`)}else I("error","Failed to Add Workspace",H.message||H.error)}catch(W){console.error("Failed to add workspace:",W),I("error","Network Error","Failed to add workspace. Please try again.")}},zn=async(k,L,W)=>{console.log("🔄 handleUpdateWorkspace called:",{orgId:k,workspaceId:L,updates:W});try{console.log("📡 Making PATCH request to:",`/api/organizations/${k}/workspaces/${L}`);const H=await fetch(`/api/organizations/${k}/workspaces/${L}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)});console.log("📨 Response status:",H.status,H.statusText);const K=await H.json();H.ok?(await Qe(),I("success","Workspace Updated","Workspace settings updated successfully")):I("error","Failed to Update Workspace",K.message||K.error)}catch(H){console.error("Failed to update workspace:",H),I("error","Network Error","Failed to update workspace. Please try again.")}},vt=k=>{Z(k.id),D({name:k.name,path:k.path,description:k.description})},B=()=>{Z(null),D({})},fe=async(k,L)=>{try{await zn(k,L,O),Z(null),D({}),I("success","Workspace Updated","Workspace details updated successfully")}catch{I("error","Update Failed","Failed to update workspace details")}},Ee=k=>{re(k.id),Q({name:k.name,type:k.type,technology:k.technology,port:k.port,url:k.url,description:k.description})},lt=()=>{re(null),Q({})},St=async(k,L,W)=>{try{const H=await fetch(`/api/organizations/${k}/workspaces/${L}/services/${W}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(F)}),K=await H.json();if(H.ok&&K.success)await Qe(),re(null),Q({}),I("success","Service Updated","Service details updated successfully");else throw new Error(K.error||"Failed to update service")}catch(H){console.error("Failed to update service:",H),I("error","Update Failed",H instanceof Error?H.message:"Failed to update service")}},hs=async(k,L,W,H)=>{if(confirm(`Are you sure you want to remove the service "${H}"? This action cannot be undone.`))try{const K=await fetch(`/api/organizations/${k}/workspaces/${L}/services/${W}`,{method:"DELETE"}),le=await K.json();if(K.ok&&le.success)await Qe(),I("success","Service Removed",`Service "${H}" has been removed`);else throw new Error(le.error||"Failed to remove service")}catch(K){console.error("Failed to remove service:",K),I("error","Removal Failed",K instanceof Error?K.message:"Failed to remove service")}},bp=async(k,L,W)=>{k.preventDefault();try{const H={...A,port:A.port?parseInt(A.port):void 0,isActive:!0},K=await fetch(`/api/organizations/${L}/workspaces/${W}/services`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(H)}),le=await K.json();if(K.ok&&le.success){if(e){const Ft=e.organizations.map(Ze=>{var M;if(Ze.id===L){const ne=(M=Ze.workspaces)==null?void 0:M.map(oe=>{if(oe.id===W){const ms=oe.services||[];return{...oe,services:[...ms,le.data]}}return oe});return{...Ze,workspaces:ne}}return Ze});t({...e,organizations:Ft})}z(null),q({name:"",type:"backend",port:"",url:"",technology:"",description:""}),ke(),I("success","Service Added",`Successfully added service "${H.name}"`)}else I("error","Failed to Add Service",le.message||le.error)}catch(H){console.error("Failed to add service:",H),I("error","Network Error","Failed to add service. Please try again.")}},Np=async(k,L,W,H)=>{try{const K=await fetch(`/api/organizations/${k}/workspaces/${L}/services/${W}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:H})}),le=await K.json();if(K.ok&&le.success){if(e){const Ft=e.organizations.map(Ze=>{var M;if(Ze.id===k){const ne=(M=Ze.workspaces)==null?void 0:M.map(oe=>{var ms;if(oe.id===L){const Ep=(ms=oe.services)==null?void 0:ms.map(Xi=>Xi.id===W?{...Xi,isActive:H}:Xi);return{...oe,services:Ep}}return oe});return{...Ze,workspaces:ne}}return Ze});t({...e,organizations:Ft})}I("success","Service Updated",`Service ${H?"activated":"deactivated"} successfully`)}else I("error","Failed to Update Service",le.message||le.error)}catch(K){console.error("Failed to update service:",K),I("error","Network Error","Failed to update service. Please try again.")}},kp=async k=>{y(L=>new Set(L).add(k));try{const L=await fetch(`/api/organizations/${k}/workspaces/sync`,{method:"POST"}),W=await L.json();L.ok?(await Qe(),I("success","Workspaces Synced",`Synchronized ${W.workspaceCount||0} workspace(s) from Task Shepherd`)):I("error","Failed to Sync Workspaces",W.message||W.error)}catch(L){console.error("Failed to sync workspaces:",L),I("error","Network Error","Failed to sync workspaces. Please try again.")}finally{y(L=>{const W=new Set(L);return W.delete(k),W})}},Sp=async k=>{k.preventDefault();try{const L=a.basePath.endsWith("/")?`${a.basePath}graphql`:`${a.basePath}/graphql`,W={name:a.name,apiUrl:L,apiKey:a.apiKey},H=await fetch("/api/organizations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(W)}),K=await H.json();H.ok?(await Ae(),i(!1),l({name:"",basePath:"",apiKey:""}),ke(),I("success","Organization Added",`Successfully added "${a.name}"`)):I("error","Failed to Add Organization",K.message||K.error)}catch(L){console.error("Failed to add organization:",L),I("error","Network Error","Failed to connect to server. Please try again.")}},Cp=async k=>{if(confirm("Are you sure you want to delete this organization?"))try{const L=await fetch(`/api/organizations/${k}`,{method:"DELETE"}),W=await L.json();L.ok?(await Ae(),I("success","Organization Deleted",W.message||"Organization deleted successfully")):I("error","Failed to Delete Organization",W.message||W.error)}catch(L){console.error("Failed to delete organization:",L),I("error","Network Error","Failed to delete organization. Please try again.")}};return o.jsxs(o.Fragment,{children:[o.jsx(jn,{children:o.jsx("title",{children:"Organizations - AI Agent Service"})}),o.jsxs("div",{className:"space-y-6",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Organizations"}),o.jsx("p",{className:"text-muted-foreground",children:"Manage Task Shepherd organizations and API connections"})]}),o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[o.jsx(Pt,{className:"h-4 w-4"}),o.jsxs("span",{children:["Last updated: ",new Date(P).toLocaleTimeString()]})]}),o.jsxs("button",{onClick:Qe,disabled:n,className:"inline-flex items-center px-3 py-2 text-sm text-gray-600 border border-gray-300 rounded-md hover:bg-gray-50 disabled:opacity-50",children:[o.jsx(Qt,{className:`h-4 w-4 mr-2 ${n?"animate-spin":""}`}),"Refresh"]}),o.jsxs("button",{onClick:()=>{i(!0)},className:"inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",children:[o.jsx(Or,{className:"h-4 w-4 mr-2"}),"Add Organization"]})]})]}),u.filter(k=>!(k.type==="success"&&k.title==="Connection Test")).length>0&&o.jsx("div",{className:"space-y-2",children:u.filter(k=>!(k.type==="success"&&k.title==="Connection Test")).map(k=>o.jsxs("div",{className:`flex items-start justify-between p-3 rounded-md border text-sm ${k.type==="error"?"border-red-200 bg-red-50 text-red-800":"border-green-200 bg-green-50 text-green-800"}`,children:[o.jsxs("div",{className:"flex items-start space-x-2",children:[k.type==="error"?o.jsx(jt,{className:"h-4 w-4 text-red-600 mt-0.5 flex-shrink-0"}):o.jsx(on,{className:"h-4 w-4 text-green-600 mt-0.5 flex-shrink-0"}),o.jsxs("div",{children:[o.jsx("p",{className:"font-medium",children:k.title}),o.jsx("p",{className:"opacity-90",children:k.message}),k.type==="error"&&o.jsx("p",{className:"text-xs mt-1 opacity-75",children:"Check your API URL format and ensure the Agent API key is valid for this organization."})]})]}),o.jsx("button",{onClick:()=>ie(k.id),className:"text-current opacity-60 hover:opacity-100 transition-opacity ml-2",children:o.jsx($r,{className:"h-3 w-3"})})]},k.id))}),!n&&e&&o.jsx("div",{className:"rounded-lg border bg-card p-6",children:o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(jt,{className:`h-5 w-5 ${e.setupCompleted?"text-green-600":"text-yellow-600"}`}),o.jsxs("div",{children:[o.jsx("h3",{className:"font-medium",children:e.setupCompleted?"Setup Complete":"Setup Required"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:e.setupCompleted?`You have ${e.organizations.length} organization(s) configured.`:"Add your first organization to get started with Task Shepherd integration."})]})]})}),s&&o.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"Add New Organization"}),o.jsxs("form",{onSubmit:Sp,className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{htmlFor:"name",className:"block text-sm font-medium mb-2",children:"Organization Name"}),o.jsx("input",{type:"text",id:"name",value:a.name,onChange:k=>l({...a,name:k.target.value}),onFocus:at,onBlur:pr,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"e.g. My Company",required:!0}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"A friendly name to identify this Task Shepherd instance"})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"basePath",className:"block text-sm font-medium mb-2",children:"API Base Path"}),o.jsx("input",{type:"url",id:"basePath",value:a.basePath,onChange:k=>l({...a,basePath:k.target.value}),onFocus:at,onBlur:pr,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"https://myorg.taskshepherd.com/api",required:!0}),o.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Base API path (GraphQL will be appended automatically: /api → /api/graphql)"}),a.basePath&&o.jsxs("p",{className:"text-xs text-blue-600 mt-1",children:["GraphQL URL will be: ",o.jsx("code",{children:a.basePath.endsWith("/")?`${a.basePath}graphql`:`${a.basePath}/graphql`})]})]}),o.jsxs("div",{children:[o.jsx("label",{htmlFor:"apiKey",className:"block text-sm font-medium mb-2",children:"Agent API Key"}),o.jsx("input",{type:"password",id:"apiKey",value:a.apiKey,onChange:k=>l({...a,apiKey:k.target.value}),onFocus:at,onBlur:pr,className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent",placeholder:"tks_agent_...",required:!0}),o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Generate an ",o.jsx("strong",{children:"Agent API key"})," from your Task Shepherd organization settings → API Keys → Create Agent Key"]})]}),o.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[o.jsx("button",{type:"button",onClick:()=>{i(!1),l({name:"",basePath:"",apiKey:""}),c([])},className:"px-4 py-2 text-gray-600 border border-gray-300 rounded-md hover:bg-gray-50",children:"Cancel"}),o.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700",children:"Add Organization"})]})]})]}),n?o.jsx("div",{className:"text-center py-12",children:o.jsx("div",{className:"text-muted-foreground",children:"Loading organizations..."})}):(e==null?void 0:e.organizations.length)===0?o.jsxs("div",{className:"text-center py-12",children:[o.jsx(hp,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),o.jsx("h3",{className:"text-lg font-medium mb-2",children:"No Organizations Configured"}),o.jsx("p",{className:"text-muted-foreground mb-4",children:"Add your first organization to start using the AI Agent Service with Task Shepherd."}),o.jsxs("button",{onClick:()=>{i(!0)},className:"inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700",children:[o.jsx(Or,{className:"h-4 w-4 mr-2"}),"Add Organization"]})]}):o.jsx("div",{className:"grid gap-4",children:e==null?void 0:e.organizations.map(k=>{var K,le,Ft,Ze;const L=((K=k.workerRegistration)==null?void 0:K.registered)||!1,W=((le=k.workerRegistration)==null?void 0:le.lastHeartbeat)||k.createdAt,H=(Ft=k.workerRegistration)!=null&&Ft.lastHeartbeat?"Last heartbeat":"Created";return o.jsx("div",{className:"rounded-lg border bg-card p-6",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex-1",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("h3",{className:"font-medium",children:k.name}),o.jsxs("div",{className:`flex items-center gap-1 text-sm ${L?"text-green-600":"text-yellow-600"}`,children:[o.jsx("div",{className:`w-2 h-2 rounded-full ${L?"bg-green-600 animate-pulse":"bg-yellow-600"}`}),L?"Connected":"Not Connected"]})]}),o.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:k.apiUrl}),W&&o.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[H,": ",new Date(W).toLocaleString()]}),L&&k.workerRegistration&&o.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[o.jsx(zy,{className:"h-4 w-4 text-gray-500"}),o.jsx("span",{className:"text-sm font-medium",children:"Worker Details"})]}),o.jsxs("div",{className:"space-y-1",children:[k.workerRegistration.workerId&&o.jsxs("p",{className:"text-xs text-gray-600",children:["Worker ID: ",o.jsx("code",{className:"text-xs font-mono bg-gray-100 px-1 rounded",children:k.workerRegistration.workerId})]}),k.workerRegistration.capabilities&&k.workerRegistration.capabilities.length>0&&o.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:k.workerRegistration.capabilities.map(M=>o.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 text-xs bg-blue-100 text-blue-700 rounded",children:[o.jsx(mp,{className:"h-3 w-3"}),M.replace("_"," ").toLowerCase()]},M))})]})]}),L&&o.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[o.jsxs("div",{className:"flex items-center justify-between mb-2",children:[o.jsxs("button",{onClick:()=>ps(k.id),className:"flex items-center gap-2 hover:text-blue-600 transition-colors",children:[d.has(k.id)?o.jsx(bc,{className:"h-4 w-4"}):o.jsx(_a,{className:"h-4 w-4"}),o.jsx(by,{className:"h-4 w-4 text-gray-500"}),o.jsxs("span",{className:"text-sm font-medium",children:["Workspaces ",k.workspaceCount!==void 0&&`(${k.workspaceCount})`]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{onClick:()=>kp(k.id),disabled:p.has(k.id),className:"inline-flex items-center px-2 py-1 text-xs text-blue-600 border border-blue-200 rounded-md hover:bg-blue-50 disabled:opacity-50",children:[o.jsx(Qt,{className:`h-3 w-3 mr-1 ${p.has(k.id)?"animate-spin":""}`}),"Sync"]}),d.has(k.id)&&o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{onClick:()=>{m(k.id)},className:"inline-flex items-center px-2 py-1 text-xs text-blue-600 border border-blue-200 rounded-md hover:bg-blue-50",title:"Use wizard to analyze a directory and create workspace",children:[o.jsx(Sc,{className:"h-3 w-3 mr-1"}),"Wizard"]}),o.jsxs("button",{onClick:()=>{x(k.id)},className:"inline-flex items-center px-2 py-1 text-xs text-green-600 border border-green-200 rounded-md hover:bg-green-50",title:"Manually add workspace",children:[o.jsx(Or,{className:"h-3 w-3 mr-1"}),"Add"]})]})]})]}),d.has(k.id)&&o.jsxs("div",{className:"mt-2 space-y-2",children:[p.has(k.id)?o.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"Loading workspaces..."}):k.workspaces&&k.workspaces.length>0?k.workspaces.map(M=>o.jsxs("div",{className:"bg-gray-50 p-3 rounded-md",children:[o.jsxs("div",{className:"flex items-start justify-between",children:[o.jsx("div",{className:"flex-1",children:U===M.id?o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Name"}),o.jsx("input",{type:"text",value:O.name||"",onChange:ne=>D({...O,name:ne.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Path"}),o.jsx("input",{type:"text",value:O.path||"",onChange:ne=>D({...O,path:ne.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Description"}),o.jsx("input",{type:"text",value:O.description||"",onChange:ne=>D({...O,description:ne.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Optional description"})]}),o.jsxs("p",{className:"text-xs text-gray-500",children:["ID: ",o.jsx("code",{className:"font-mono",children:M.id})]})]}):o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h4",{className:"text-sm font-medium",children:M.name}),o.jsx("span",{className:`px-1.5 py-0.5 text-xs rounded ${M.isActive?"bg-green-100 text-green-700":"bg-gray-200 text-gray-600"}`,children:M.isActive?"Active":"Inactive"})]}),M.description&&o.jsx("p",{className:"text-xs text-gray-600 mt-1",children:M.description}),o.jsxs("div",{className:"mt-1 space-y-0.5",children:[o.jsxs("p",{className:"text-xs text-gray-500",children:["ID: ",o.jsx("code",{className:"font-mono",children:M.id})]}),o.jsxs("p",{className:"text-xs text-gray-500",children:["Path: ",o.jsx("code",{className:"font-mono",children:M.path})]}),M.projectCount!==void 0&&o.jsxs("p",{className:"text-xs text-gray-500",children:["Projects: ",M.projectCount]})]})]})}),o.jsx("div",{className:"flex items-center gap-1",children:U===M.id?o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>fe(k.id,M.id),className:"p-1 text-gray-500 hover:text-green-600 transition-colors",title:"Save changes",children:o.jsx(Fa,{className:"h-3 w-3"})}),o.jsx("button",{onClick:B,className:"p-1 text-gray-500 hover:text-red-600 transition-colors",title:"Cancel editing",children:o.jsx($r,{className:"h-3 w-3"})})]}):o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>vt(M),className:"p-1 text-gray-500 hover:text-orange-600 transition-colors",title:"Edit workspace",children:o.jsx(La,{className:"h-3 w-3"})}),o.jsx("button",{onClick:()=>{g({orgId:k.id,workspace:M})},className:"p-1 text-gray-500 hover:text-purple-600 transition-colors",title:"Re-analyze workspace",children:o.jsx(Sc,{className:"h-3 w-3"})}),o.jsx("button",{onClick:()=>zn(k.id,M.id,{isActive:!M.isActive}),className:`p-1 transition-colors ${M.isActive?"text-green-500 hover:text-red-600":"text-gray-400 hover:text-green-600"}`,title:M.isActive?"Deactivate workspace":"Activate workspace",children:M.isActive?o.jsx(Oy,{className:"h-3 w-3"}):o.jsx(Ty,{className:"h-3 w-3"})})]})})]}),o.jsxs("div",{className:"mt-2 pt-2 border-t border-gray-200",children:[o.jsxs("div",{className:"flex items-center justify-between mb-1",children:[o.jsxs("button",{onClick:()=>{const ne=`${k.id}-${M.id}`,oe=new Set(E);oe.has(ne)?oe.delete(ne):oe.add(ne),S(oe)},className:"flex items-center gap-1 text-xs text-gray-600 hover:text-blue-600",children:[E.has(`${k.id}-${M.id}`)?o.jsx(bc,{className:"h-3 w-3"}):o.jsx(_a,{className:"h-3 w-3"}),"Services ",M.services?`(${M.services.length})`:"(0)"]}),o.jsx("button",{onClick:()=>{z({orgId:k.id,workspaceId:M.id})},className:"text-xs text-green-600 hover:text-green-700",children:o.jsx(Or,{className:"h-3 w-3"})})]}),E.has(`${k.id}-${M.id}`)&&o.jsx("div",{className:"space-y-1 ml-4",children:M.services&&M.services.length>0?M.services.map(ne=>o.jsx("div",{className:"bg-white p-2 rounded border",children:X===ne.id?o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Name"}),o.jsx("input",{type:"text",value:F.name||"",onChange:oe=>Q({...F,name:oe.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Type"}),o.jsxs("select",{value:F.type||"backend",onChange:oe=>Q({...F,type:oe.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",children:[o.jsx("option",{value:"backend",children:"Backend"}),o.jsx("option",{value:"frontend",children:"Frontend"}),o.jsx("option",{value:"database",children:"Database"}),o.jsx("option",{value:"cache",children:"Cache"}),o.jsx("option",{value:"queue",children:"Queue"}),o.jsx("option",{value:"api",children:"API"}),o.jsx("option",{value:"service",children:"Service"}),o.jsx("option",{value:"other",children:"Other"})]})]})]}),o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Technology"}),o.jsx("input",{type:"text",value:F.technology||"",onChange:oe=>Q({...F,technology:oe.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"e.g., Node.js, Python"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Port"}),o.jsx("input",{type:"number",value:F.port||"",onChange:oe=>Q({...F,port:oe.target.value?parseInt(oe.target.value):void 0}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"3000"})]})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"URL"}),o.jsx("input",{type:"url",value:F.url||"",onChange:oe=>Q({...F,url:oe.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"http://localhost:3000"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Description"}),o.jsx("input",{type:"text",value:F.description||"",onChange:oe=>Q({...F,description:oe.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",placeholder:"Optional description"})]}),o.jsxs("div",{className:"flex items-center justify-end gap-1 pt-1",children:[o.jsx("button",{onClick:()=>St(k.id,M.id,ne.id),className:"px-2 py-1 text-xs bg-green-600 text-white rounded hover:bg-green-700",children:o.jsx(Fa,{className:"h-3 w-3"})}),o.jsx("button",{onClick:lt,className:"px-2 py-1 text-xs bg-gray-600 text-white rounded hover:bg-gray-700",children:o.jsx($r,{className:"h-3 w-3"})})]})]}):o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[o.jsx("span",{className:"font-medium",children:ne.name}),o.jsxs("span",{className:"text-gray-500",children:["(",ne.type,")"]}),ne.port&&o.jsxs("span",{className:"text-gray-400",children:[":",ne.port]}),ne.technology&&o.jsx("span",{className:"px-1 py-0.5 bg-blue-100 text-blue-700 rounded text-xs",children:ne.technology}),ne.description&&o.jsxs("span",{className:"text-gray-400 italic",children:["- ",ne.description]})]}),o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("button",{onClick:()=>Ee(ne),className:"p-1 text-gray-500 hover:text-orange-600 transition-colors",title:"Edit service",children:o.jsx(La,{className:"h-3 w-3"})}),o.jsx("button",{onClick:()=>hs(k.id,M.id,ne.id,ne.name),className:"p-1 text-gray-500 hover:text-red-600 transition-colors",title:"Remove service",children:o.jsx(Oi,{className:"h-3 w-3"})}),o.jsx("button",{onClick:()=>Np(k.id,M.id,ne.id,!ne.isActive),className:`px-1.5 py-0.5 rounded text-xs ${ne.isActive?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"}`,children:ne.isActive?"Active":"Inactive"})]})]})},ne.id)):o.jsx("div",{className:"text-xs text-gray-500",children:"No services configured"})})]})]},M.id)):o.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:'No workspaces configured. Click "Sync" to import from Task Shepherd.'}),(j==null?void 0:j.orgId)===k.id&&((Ze=k.workspaces)==null?void 0:Ze.some(M=>M.id===j.workspaceId))&&o.jsxs("div",{className:"bg-green-50 p-3 rounded-md border border-green-200",children:[o.jsx("h5",{className:"text-sm font-medium mb-2",children:"Add New Service"}),o.jsxs("form",{onSubmit:M=>bp(M,j.orgId,j.workspaceId),className:"space-y-2",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsx("input",{type:"text",placeholder:"Service Name",value:A.name,onChange:M=>q({...A,name:M.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500",required:!0}),o.jsxs("select",{value:A.type,onChange:M=>q({...A,type:M.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500",required:!0,children:[o.jsx("option",{value:"backend",children:"Backend"}),o.jsx("option",{value:"frontend",children:"Frontend"}),o.jsx("option",{value:"database",children:"Database"}),o.jsx("option",{value:"cache",children:"Cache"}),o.jsx("option",{value:"queue",children:"Queue"}),o.jsx("option",{value:"api",children:"API"}),o.jsx("option",{value:"service",children:"Service"}),o.jsx("option",{value:"other",children:"Other"})]})]}),o.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[o.jsx("input",{type:"number",placeholder:"Port",value:A.port,onChange:M=>q({...A,port:M.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500"}),o.jsx("input",{type:"text",placeholder:"Technology (e.g., Node.js)",value:A.technology,onChange:M=>q({...A,technology:M.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500"}),o.jsx("input",{type:"url",placeholder:"URL (optional)",value:A.url,onChange:M=>q({...A,url:M.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500"})]}),o.jsx("input",{type:"text",placeholder:"Description (optional)",value:A.description,onChange:M=>q({...A,description:M.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500"}),o.jsxs("div",{className:"flex justify-end gap-1",children:[o.jsx("button",{type:"button",onClick:()=>{z(null),q({name:"",type:"backend",port:"",url:"",technology:"",description:""})},className:"px-2 py-1 text-xs text-gray-600 border border-gray-300 rounded hover:bg-gray-50",children:"Cancel"}),o.jsx("button",{type:"submit",className:"px-2 py-1 text-xs bg-green-600 text-white rounded hover:bg-green-700",children:"Add Service"})]})]})]}),v===k.id&&o.jsxs("div",{className:"bg-blue-50 p-3 rounded-md border border-blue-200",children:[o.jsx("h5",{className:"text-sm font-medium mb-2",children:"Add New Workspace"}),o.jsxs("form",{onSubmit:M=>Yi(M,k.id),className:"space-y-2",children:[o.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[o.jsx("input",{type:"text",placeholder:"Workspace Name",value:w.name,onChange:M=>C({...w,name:M.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",required:!0}),o.jsx("input",{type:"text",placeholder:"Workspace ID",value:w.id,onChange:M=>C({...w,id:M.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",required:!0})]}),o.jsx("input",{type:"text",placeholder:"Path (e.g., /home/user/projects/workspace)",value:w.path,onChange:M=>C({...w,path:M.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500",required:!0}),o.jsx("input",{type:"text",placeholder:"Description (optional)",value:w.description,onChange:M=>C({...w,description:M.target.value}),className:"w-full text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-blue-500"}),o.jsxs("div",{className:"flex justify-end gap-1",children:[o.jsx("button",{type:"button",onClick:()=>{x(null),C({name:"",id:"",path:"",description:""})},className:"px-2 py-1 text-xs text-gray-600 border border-gray-300 rounded hover:bg-gray-50",children:"Cancel"}),o.jsx("button",{type:"submit",className:"px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700",children:"Add Workspace"})]})]})]})]})]})]}),o.jsx("div",{className:"flex items-center gap-2",children:k.id!=="default"&&o.jsxs("button",{onClick:()=>Cp(k.id),className:"inline-flex items-center px-3 py-1 text-sm text-red-600 border border-red-200 rounded-md hover:bg-red-50",children:[o.jsx(Oi,{className:"h-3 w-3 mr-1"}),"Delete"]})})]})},k.id)})}),b&&o.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:o.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden",children:o.jsx(xv,{organizationId:b,onComplete:k=>{var W;if(e){const H=e.organizations.map(K=>{if(K.id===b){const le=[...K.workspaces||[],k];return{...K,workspaces:le,workspaceCount:le.length}}return K});t({...e,organizations:H})}m(null);const L=((W=k.services)==null?void 0:W.length)||0;I("success","Workspace Created",`Successfully created workspace "${k.name}" with ${L} service(s) using wizard`)},onCancel:()=>{m(null)}})})}),h&&o.jsx(wv,{organizationId:h.orgId,workspace:h.workspace,onClose:()=>{g(null)},onApplyChanges:async k=>{console.log("🔧 Applying workspace analysis changes:",k);try{const L=await fetch(`/api/organizations/${h.orgId}/workspaces/${h.workspace.id}/apply-improvements`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({improvements:k})}),W=await L.json();if(L.ok&&W.success)I("success","Changes Applied",`Applied ${k.length} improvement(s) to workspace "${h.workspace.name}"`),await Qe();else throw new Error(W.error||"Failed to apply changes")}catch(L){console.error("Failed to apply workspace changes:",L),I("error","Failed to Apply Changes",L instanceof Error?L.message:"Failed to apply workspace improvements")}}}),o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"rounded-lg border bg-green-50 p-6",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"Getting Your Task Shepherd API Information"}),o.jsxs("div",{className:"space-y-3 text-sm text-green-900",children:[o.jsxs("p",{children:[o.jsx("strong",{children:"Step 1:"})," Open your Task Shepherd frontend in a browser"]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Step 2:"})," Copy the URL up to ",o.jsx("code",{children:"/api"})]}),o.jsxs("div",{className:"bg-green-100 p-3 rounded-md font-mono text-xs",children:[o.jsx("p",{children:o.jsx("strong",{children:"Example:"})}),o.jsxs("p",{children:["• Frontend URL: ",o.jsx("code",{children:"https://myorg.taskshepherd.com"})]}),o.jsxs("p",{children:["• API Base Path: ",o.jsx("code",{children:"https://myorg.taskshepherd.com/api"})]})]}),o.jsxs("p",{children:[o.jsx("strong",{children:"Step 3:"})," Generate an ",o.jsx("strong",{children:"Agent API key"})," from Organization Settings → API Keys → Create Agent Key"]})]})]}),o.jsxs("div",{className:"rounded-lg border bg-blue-50 p-6",children:[o.jsx("h3",{className:"text-lg font-medium mb-4",children:"About Organization & Workspace Management"}),o.jsxs("div",{className:"space-y-2 text-sm text-blue-900",children:[o.jsxs("p",{children:["• ",o.jsx("strong",{children:"Organizations"})," represent different Task Shepherd instances you want to connect to"]}),o.jsxs("p",{children:["• Each organization needs an ",o.jsx("strong",{children:"Agent API key"})," (not a user API key) generated from the Task Shepherd organization settings"]}),o.jsxs("p",{children:["• ",o.jsx("strong",{children:"Workspaces"})," are collections of related projects within an organization"]}),o.jsxs("p",{children:["• Click ",o.jsx("strong",{children:"Sync"})," to import workspaces from Task Shepherd automatically"]}),o.jsx("p",{children:"• You can activate/deactivate workspaces to control which ones the agent works with"}),o.jsx("p",{children:"• The agent will automatically sync workspaces and accept work assignments from configured organizations"})]})]})]})]})]})}function bv(){return o.jsxs(o.Fragment,{children:[o.jsx(jn,{children:o.jsx("title",{children:"404 - Page Not Found"})}),o.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:o.jsxs("div",{className:"space-y-4",children:[o.jsx("h1",{className:"text-4xl font-bold",children:"404"}),o.jsx("h2",{className:"text-xl text-muted-foreground",children:"Page Not Found"}),o.jsx("p",{className:"text-muted-foreground max-w-md",children:"The page you're looking for doesn't exist or has been moved."}),o.jsxs(ep,{to:"/",className:"inline-flex items-center space-x-2 rounded-lg bg-primary px-4 py-2 text-primary-foreground hover:bg-primary/90",children:[o.jsx(pp,{className:"h-4 w-4"}),o.jsx("span",{children:"Go Home"})]})]})})]})}function Nv(){return o.jsxs(o.Fragment,{children:[o.jsxs(jn,{children:[o.jsx("title",{children:"AI Agent Service Dashboard"}),o.jsx("meta",{name:"description",content:"Analytics dashboard for AI agent service monitoring"})]}),o.jsx(dv,{children:o.jsxs(Qg,{children:[o.jsx(Ys,{path:"/",element:o.jsx(yv,{})}),o.jsx(Ys,{path:"/organizations",element:o.jsx(jv,{})}),o.jsx(Ys,{path:"*",element:o.jsx(bv,{})})]})})]})}const kv=new w0({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:1e3*60*5}}});Ro.createRoot(document.getElementById("root")).render(o.jsx(R.StrictMode,{children:o.jsx(Vn,{children:o.jsx(N0,{client:kv,children:o.jsxs(Zg,{children:[o.jsx(Nv,{}),o.jsx(hy,{position:"top-right"})]})})})}));
|
|
69
|
+
//# sourceMappingURL=index-1a4f1b39.js.map
|