@task-shepherd/agent 1.0.34 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,69 @@
1
+ function ph(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const i of s)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const i={};return s.integrity&&(i.integrity=s.integrity),s.referrerPolicy&&(i.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?i.credentials="include":s.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(s){if(s.ep)return;s.ep=!0;const i=n(s);fetch(s.href,i)}})();function wr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Yc={exports:{}},Qi={},Xc={exports:{}},X={};/**
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 xs=Symbol.for("react.element"),hh=Symbol.for("react.portal"),mh=Symbol.for("react.fragment"),gh=Symbol.for("react.strict_mode"),yh=Symbol.for("react.profiler"),vh=Symbol.for("react.provider"),xh=Symbol.for("react.context"),wh=Symbol.for("react.forward_ref"),jh=Symbol.for("react.suspense"),bh=Symbol.for("react.memo"),Nh=Symbol.for("react.lazy"),du=Symbol.iterator;function kh(e){return e===null||typeof e!="object"?null:(e=du&&e[du]||e["@@iterator"],typeof e=="function"?e:null)}var Jc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Zc=Object.assign,ed={};function jr(e,t,n){this.props=e,this.context=t,this.refs=ed,this.updater=n||Jc}jr.prototype.isReactComponent={};jr.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")};jr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function td(){}td.prototype=jr.prototype;function ol(e,t,n){this.props=e,this.context=t,this.refs=ed,this.updater=n||Jc}var ll=ol.prototype=new td;ll.constructor=ol;Zc(ll,jr.prototype);ll.isPureReactComponent=!0;var fu=Array.isArray,nd=Object.prototype.hasOwnProperty,ul={current:null},rd={key:!0,ref:!0,__self:!0,__source:!0};function sd(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)nd.call(t,r)&&!rd.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:xs,type:e,key:i,ref:o,props:s,_owner:ul.current}}function Sh(e,t){return{$$typeof:xs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function cl(e){return typeof e=="object"&&e!==null&&e.$$typeof===xs}function Ch(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var pu=/\/+/g;function ja(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ch(""+e.key):t.toString(36)}function Xs(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case xs:case hh:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+ja(o,0):r,fu(s)?(n="",e!=null&&(n=e.replace(pu,"$&/")+"/"),Xs(s,t,n,"",function(c){return c})):s!=null&&(cl(s)&&(s=Sh(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(pu,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",fu(e))for(var l=0;l<e.length;l++){i=e[l];var u=r+ja(i,l);o+=Xs(i,t,n,u,s)}else if(u=kh(e),typeof u=="function")for(e=u.call(e),l=0;!(i=e.next()).done;)i=i.value,u=r+ja(i,l++),o+=Xs(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 o}function Ts(e,t,n){if(e==null)return e;var r=[],s=0;return Xs(e,r,"","",function(i){return t.call(n,i,s++)}),r}function Eh(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 He={current:null},Js={transition:null},Ph={ReactCurrentDispatcher:He,ReactCurrentBatchConfig:Js,ReactCurrentOwner:ul};function id(){throw Error("act(...) is not supported in production builds of React.")}X.Children={map:Ts,forEach:function(e,t,n){Ts(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Ts(e,function(){t++}),t},toArray:function(e){return Ts(e,function(t){return t})||[]},only:function(e){if(!cl(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};X.Component=jr;X.Fragment=mh;X.Profiler=yh;X.PureComponent=ol;X.StrictMode=gh;X.Suspense=jh;X.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ph;X.act=id;X.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,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=ul.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)nd.call(t,u)&&!rd.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:xs,type:e.type,key:s,ref:i,props:r,_owner:o}};X.createContext=function(e){return e={$$typeof:xh,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:vh,_context:e},e.Consumer=e};X.createElement=sd;X.createFactory=function(e){var t=sd.bind(null,e);return t.type=e,t};X.createRef=function(){return{current:null}};X.forwardRef=function(e){return{$$typeof:wh,render:e}};X.isValidElement=cl;X.lazy=function(e){return{$$typeof:Nh,_payload:{_status:-1,_result:e},_init:Eh}};X.memo=function(e,t){return{$$typeof:bh,type:e,compare:t===void 0?null:t}};X.startTransition=function(e){var t=Js.transition;Js.transition={};try{e()}finally{Js.transition=t}};X.unstable_act=id;X.useCallback=function(e,t){return He.current.useCallback(e,t)};X.useContext=function(e){return He.current.useContext(e)};X.useDebugValue=function(){};X.useDeferredValue=function(e){return He.current.useDeferredValue(e)};X.useEffect=function(e,t){return He.current.useEffect(e,t)};X.useId=function(){return He.current.useId()};X.useImperativeHandle=function(e,t,n){return He.current.useImperativeHandle(e,t,n)};X.useInsertionEffect=function(e,t){return He.current.useInsertionEffect(e,t)};X.useLayoutEffect=function(e,t){return He.current.useLayoutEffect(e,t)};X.useMemo=function(e,t){return He.current.useMemo(e,t)};X.useReducer=function(e,t,n){return He.current.useReducer(e,t,n)};X.useRef=function(e){return He.current.useRef(e)};X.useState=function(e){return He.current.useState(e)};X.useSyncExternalStore=function(e,t,n){return He.current.useSyncExternalStore(e,t,n)};X.useTransition=function(){return He.current.useTransition()};X.version="18.3.1";Xc.exports=X;var k=Xc.exports;const L=wr(k),Th=ph({__proto__:null,default:L},[k]);/**
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 Oh=k,zh=Symbol.for("react.element"),Ah=Symbol.for("react.fragment"),Mh=Object.prototype.hasOwnProperty,Rh=Oh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_h={key:!0,ref:!0,__self:!0,__source:!0};function ad(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)Mh.call(t,r)&&!_h.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:zh,type:e,key:i,ref:o,props:s,_owner:Rh.current}}Qi.Fragment=Ah;Qi.jsx=ad;Qi.jsxs=ad;Yc.exports=Qi;var a=Yc.exports,to={},od={exports:{}},nt={},ld={exports:{}},ud={};/**
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(A,$){var U=A.length;A.push($);e:for(;0<U;){var ne=U-1>>>1,V=A[ne];if(0<s(V,$))A[ne]=$,A[U]=V,U=ne;else break e}}function n(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var $=A[0],U=A.pop();if(U!==$){A[0]=U;e:for(var ne=0,V=A.length,ee=V>>>1;ne<ee;){var be=2*(ne+1)-1,Qe=A[be],Ee=be+1,jt=A[Ee];if(0>s(Qe,U))Ee<V&&0>s(jt,Qe)?(A[ne]=jt,A[Ee]=U,ne=Ee):(A[ne]=Qe,A[be]=U,ne=be);else if(Ee<V&&0>s(jt,U))A[ne]=jt,A[Ee]=U,ne=Ee;else break e}}return $}function s(A,$){var U=A.sortIndex-$.sortIndex;return U!==0?U:A.id-$.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var u=[],c=[],d=1,f=null,p=3,v=!1,x=!1,w=!1,N=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 y(A){for(var $=n(c);$!==null;){if($.callback===null)r(c);else if($.startTime<=A)r(c),$.sortIndex=$.expirationTime,t(u,$);else break;$=n(c)}}function b(A){if(w=!1,y(A),!x)if(n(u)!==null)x=!0,Z(P);else{var $=n(c);$!==null&&oe(b,$.startTime-A)}}function P(A,$){x=!1,w&&(w=!1,m(j),j=-1),v=!0;var U=p;try{for(y($),f=n(u);f!==null&&(!(f.expirationTime>$)||A&&!K());){var ne=f.callback;if(typeof ne=="function"){f.callback=null,p=f.priorityLevel;var V=ne(f.expirationTime<=$);$=e.unstable_now(),typeof V=="function"?f.callback=V:f===n(u)&&r(u),y($)}else r(u);f=n(u)}if(f!==null)var ee=!0;else{var be=n(c);be!==null&&oe(b,be.startTime-$),ee=!1}return ee}finally{f=null,p=U,v=!1}}var T=!1,C=null,j=-1,R=5,M=-1;function K(){return!(e.unstable_now()-M<R)}function E(){if(C!==null){var A=e.unstable_now();M=A;var $=!0;try{$=C(!0,A)}finally{$?re():(T=!1,C=null)}}else T=!1}var re;if(typeof h=="function")re=function(){h(E)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,ae=q.port2;q.port1.onmessage=E,re=function(){ae.postMessage(null)}}else re=function(){N(E,0)};function Z(A){C=A,T||(T=!0,re())}function oe(A,$){j=N(function(){A(e.unstable_now())},$)}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(A){A.callback=null},e.unstable_continueExecution=function(){x||v||(x=!0,Z(P))},e.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):R=0<A?Math.floor(1e3/A):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(u)},e.unstable_next=function(A){switch(p){case 1:case 2:case 3:var $=3;break;default:$=p}var U=p;p=$;try{return A()}finally{p=U}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(A,$){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var U=p;p=A;try{return $()}finally{p=U}},e.unstable_scheduleCallback=function(A,$,U){var ne=e.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?ne+U:ne):U=ne,A){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=U+V,A={id:d++,callback:$,priorityLevel:A,startTime:U,expirationTime:V,sortIndex:-1},U>ne?(A.sortIndex=U,t(c,A),n(u)===null&&A===n(c)&&(w?(m(j),j=-1):w=!0,oe(b,U-ne))):(A.sortIndex=V,t(u,A),x||v||(x=!0,Z(P))),A},e.unstable_shouldYield=K,e.unstable_wrapCallback=function(A){var $=p;return function(){var U=p;p=$;try{return A.apply(this,arguments)}finally{p=U}}}})(ud);ld.exports=ud;var Lh=ld.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 Fh=k,tt=Lh;function O(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 cd=new Set,es={};function Fn(e,t){pr(e,t),pr(e+"Capture",t)}function pr(e,t){for(es[e]=t,e=0;e<t.length;e++)cd.add(t[e])}var Ft=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),no=Object.prototype.hasOwnProperty,Ih=/^[: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]*$/,hu={},mu={};function Dh(e){return no.call(mu,e)?!0:no.call(hu,e)?!1:Ih.test(e)?mu[e]=!0:(hu[e]=!0,!1)}function $h(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 Uh(e,t,n,r){if(t===null||typeof t>"u"||$h(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 qe(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var _e={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){_e[e]=new qe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];_e[t]=new qe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){_e[e]=new qe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){_e[e]=new qe(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){_e[e]=new qe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){_e[e]=new qe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){_e[e]=new qe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){_e[e]=new qe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){_e[e]=new qe(e,5,!1,e.toLowerCase(),null,!1,!1)});var dl=/[\-:]([a-z])/g;function fl(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(dl,fl);_e[t]=new qe(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(dl,fl);_e[t]=new qe(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(dl,fl);_e[t]=new qe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){_e[e]=new qe(e,1,!1,e.toLowerCase(),null,!1,!1)});_e.xlinkHref=new qe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){_e[e]=new qe(e,1,!1,e.toLowerCase(),null,!0,!0)});function pl(e,t,n,r){var s=_e.hasOwnProperty(t)?_e[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Uh(t,n,s,r)&&(n=null),r||s===null?Dh(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 Ut=Fh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Os=Symbol.for("react.element"),Qn=Symbol.for("react.portal"),Vn=Symbol.for("react.fragment"),hl=Symbol.for("react.strict_mode"),ro=Symbol.for("react.profiler"),dd=Symbol.for("react.provider"),fd=Symbol.for("react.context"),ml=Symbol.for("react.forward_ref"),so=Symbol.for("react.suspense"),io=Symbol.for("react.suspense_list"),gl=Symbol.for("react.memo"),Vt=Symbol.for("react.lazy"),pd=Symbol.for("react.offscreen"),gu=Symbol.iterator;function Cr(e){return e===null||typeof e!="object"?null:(e=gu&&e[gu]||e["@@iterator"],typeof e=="function"?e:null)}var we=Object.assign,ba;function $r(e){if(ba===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ba=t&&t[1]||""}return`
34
+ `+ba+e}var Na=!1;function ka(e,t){if(!e||Na)return"";Na=!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
+ `),o=s.length-1,l=i.length-1;1<=o&&0<=l&&s[o]!==i[l];)l--;for(;1<=o&&0<=l;o--,l--)if(s[o]!==i[l]){if(o!==1||l!==1)do if(o--,l--,0>l||s[o]!==i[l]){var u=`
37
+ `+s[o].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=o&&0<=l);break}}}finally{Na=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?$r(e):""}function Wh(e){switch(e.tag){case 5:return $r(e.type);case 16:return $r("Lazy");case 13:return $r("Suspense");case 19:return $r("SuspenseList");case 0:case 2:case 15:return e=ka(e.type,!1),e;case 11:return e=ka(e.type.render,!1),e;case 1:return e=ka(e.type,!0),e;default:return""}}function ao(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 Vn:return"Fragment";case Qn:return"Portal";case ro:return"Profiler";case hl:return"StrictMode";case so:return"Suspense";case io:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case fd:return(e.displayName||"Context")+".Consumer";case dd:return(e._context.displayName||"Context")+".Provider";case ml:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gl:return t=e.displayName||null,t!==null?t:ao(e.type)||"Memo";case Vt:t=e._payload,e=e._init;try{return ao(e(t))}catch{}}return null}function Bh(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 ao(t);case 8:return t===hl?"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 fn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hd(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Hh(e){var t=hd(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function zs(e){e._valueTracker||(e._valueTracker=Hh(e))}function md(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hd(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function gi(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 oo(e,t){var n=t.checked;return we({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function yu(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=fn(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 gd(e,t){t=t.checked,t!=null&&pl(e,"checked",t,!1)}function lo(e,t){gd(e,t);var n=fn(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,fn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function vu(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"||gi(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Ur=Array.isArray;function ar(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=""+fn(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 co(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(O(91));return we({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function xu(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(O(92));if(Ur(n)){if(1<n.length)throw Error(O(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:fn(n)}}function yd(e,t){var n=fn(t.value),r=fn(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 wu(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function vd(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 fo(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?vd(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var As,xd=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(As=As||document.createElement("div"),As.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=As.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ts(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var qr={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},qh=["Webkit","ms","Moz","O"];Object.keys(qr).forEach(function(e){qh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qr[t]=qr[e]})});function wd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||qr.hasOwnProperty(e)&&qr[e]?(""+t).trim():t+"px"}function jd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=wd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var Qh=we({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 po(e,t){if(t){if(Qh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(O(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(O(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(O(61))}if(t.style!=null&&typeof t.style!="object")throw Error(O(62))}}function ho(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 mo=null;function yl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var go=null,or=null,lr=null;function ju(e){if(e=bs(e)){if(typeof go!="function")throw Error(O(280));var t=e.stateNode;t&&(t=Xi(t),go(e.stateNode,e.type,t))}}function bd(e){or?lr?lr.push(e):lr=[e]:or=e}function Nd(){if(or){var e=or,t=lr;if(lr=or=null,ju(e),t)for(e=0;e<t.length;e++)ju(t[e])}}function kd(e,t){return e(t)}function Sd(){}var Sa=!1;function Cd(e,t,n){if(Sa)return e(t,n);Sa=!0;try{return kd(e,t,n)}finally{Sa=!1,(or!==null||lr!==null)&&(Sd(),Nd())}}function ns(e,t){var n=e.stateNode;if(n===null)return null;var r=Xi(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(O(231,t,typeof n));return n}var yo=!1;if(Ft)try{var Er={};Object.defineProperty(Er,"passive",{get:function(){yo=!0}}),window.addEventListener("test",Er,Er),window.removeEventListener("test",Er,Er)}catch{yo=!1}function Vh(e,t,n,r,s,i,o,l,u){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var Qr=!1,yi=null,vi=!1,vo=null,Kh={onError:function(e){Qr=!0,yi=e}};function Gh(e,t,n,r,s,i,o,l,u){Qr=!1,yi=null,Vh.apply(Kh,arguments)}function Yh(e,t,n,r,s,i,o,l,u){if(Gh.apply(this,arguments),Qr){if(Qr){var c=yi;Qr=!1,yi=null}else throw Error(O(198));vi||(vi=!0,vo=c)}}function In(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 Ed(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 bu(e){if(In(e)!==e)throw Error(O(188))}function Xh(e){var t=e.alternate;if(!t){if(t=In(e),t===null)throw Error(O(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 bu(s),e;if(i===r)return bu(s),t;i=i.sibling}throw Error(O(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?e:t}function Pd(e){return e=Xh(e),e!==null?Td(e):null}function Td(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Td(e);if(t!==null)return t;e=e.sibling}return null}var Od=tt.unstable_scheduleCallback,Nu=tt.unstable_cancelCallback,Jh=tt.unstable_shouldYield,Zh=tt.unstable_requestPaint,ke=tt.unstable_now,em=tt.unstable_getCurrentPriorityLevel,vl=tt.unstable_ImmediatePriority,zd=tt.unstable_UserBlockingPriority,xi=tt.unstable_NormalPriority,tm=tt.unstable_LowPriority,Ad=tt.unstable_IdlePriority,Vi=null,Pt=null;function nm(e){if(Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(Vi,e,void 0,(e.current.flags&128)===128)}catch{}}var vt=Math.clz32?Math.clz32:im,rm=Math.log,sm=Math.LN2;function im(e){return e>>>=0,e===0?32:31-(rm(e)/sm|0)|0}var Ms=64,Rs=4194304;function Wr(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 wi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var l=o&~s;l!==0?r=Wr(l):(i&=o,i!==0&&(r=Wr(i)))}else o=n&~s,o!==0?r=Wr(o):i!==0&&(r=Wr(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-vt(t),s=1<<n,r|=e[n],t&=~s;return r}function am(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 om(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-vt(i),l=1<<o,u=s[o];u===-1?(!(l&n)||l&r)&&(s[o]=am(l,t)):u<=t&&(e.expiredLanes|=l),i&=~l}}function xo(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Md(){var e=Ms;return Ms<<=1,!(Ms&4194240)&&(Ms=64),e}function Ca(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ws(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-vt(t),e[t]=n}function lm(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-vt(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function xl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-vt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var ue=0;function Rd(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var _d,wl,Ld,Fd,Id,wo=!1,_s=[],nn=null,rn=null,sn=null,rs=new Map,ss=new Map,Xt=[],um="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 ku(e,t){switch(e){case"focusin":case"focusout":nn=null;break;case"dragenter":case"dragleave":rn=null;break;case"mouseover":case"mouseout":sn=null;break;case"pointerover":case"pointerout":rs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ss.delete(t.pointerId)}}function Pr(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=bs(t),t!==null&&wl(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function cm(e,t,n,r,s){switch(t){case"focusin":return nn=Pr(nn,e,t,n,r,s),!0;case"dragenter":return rn=Pr(rn,e,t,n,r,s),!0;case"mouseover":return sn=Pr(sn,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return rs.set(i,Pr(rs.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,ss.set(i,Pr(ss.get(i)||null,e,t,n,r,s)),!0}return!1}function Dd(e){var t=bn(e.target);if(t!==null){var n=In(t);if(n!==null){if(t=n.tag,t===13){if(t=Ed(n),t!==null){e.blockedOn=t,Id(e.priority,function(){Ld(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 Zs(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);mo=r,n.target.dispatchEvent(r),mo=null}else return t=bs(n),t!==null&&wl(t),e.blockedOn=n,!1;t.shift()}return!0}function Su(e,t,n){Zs(e)&&n.delete(t)}function dm(){wo=!1,nn!==null&&Zs(nn)&&(nn=null),rn!==null&&Zs(rn)&&(rn=null),sn!==null&&Zs(sn)&&(sn=null),rs.forEach(Su),ss.forEach(Su)}function Tr(e,t){e.blockedOn===t&&(e.blockedOn=null,wo||(wo=!0,tt.unstable_scheduleCallback(tt.unstable_NormalPriority,dm)))}function is(e){function t(s){return Tr(s,e)}if(0<_s.length){Tr(_s[0],e);for(var n=1;n<_s.length;n++){var r=_s[n];r.blockedOn===e&&(r.blockedOn=null)}}for(nn!==null&&Tr(nn,e),rn!==null&&Tr(rn,e),sn!==null&&Tr(sn,e),rs.forEach(t),ss.forEach(t),n=0;n<Xt.length;n++)r=Xt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Xt.length&&(n=Xt[0],n.blockedOn===null);)Dd(n),n.blockedOn===null&&Xt.shift()}var ur=Ut.ReactCurrentBatchConfig,ji=!0;function fm(e,t,n,r){var s=ue,i=ur.transition;ur.transition=null;try{ue=1,jl(e,t,n,r)}finally{ue=s,ur.transition=i}}function pm(e,t,n,r){var s=ue,i=ur.transition;ur.transition=null;try{ue=4,jl(e,t,n,r)}finally{ue=s,ur.transition=i}}function jl(e,t,n,r){if(ji){var s=jo(e,t,n,r);if(s===null)La(e,t,r,bi,n),ku(e,r);else if(cm(s,e,t,n,r))r.stopPropagation();else if(ku(e,r),t&4&&-1<um.indexOf(e)){for(;s!==null;){var i=bs(s);if(i!==null&&_d(i),i=jo(e,t,n,r),i===null&&La(e,t,r,bi,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else La(e,t,r,null,n)}}var bi=null;function jo(e,t,n,r){if(bi=null,e=yl(r),e=bn(e),e!==null)if(t=In(e),t===null)e=null;else if(n=t.tag,n===13){if(e=Ed(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 bi=e,null}function $d(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(em()){case vl:return 1;case zd:return 4;case xi:case tm:return 16;case Ad:return 536870912;default:return 16}default:return 16}}var Zt=null,bl=null,ei=null;function Ud(){if(ei)return ei;var e,t=bl,n=t.length,r,s="value"in Zt?Zt.value:Zt.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return ei=s.slice(e,1<r?1-r:void 0)}function ti(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 Ls(){return!0}function Cu(){return!1}function rt(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ls:Cu,this.isPropagationStopped=Cu,this}return we(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=Ls)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ls)},persist:function(){},isPersistent:Ls}),t}var br={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nl=rt(br),js=we({},br,{view:0,detail:0}),hm=rt(js),Ea,Pa,Or,Ki=we({},js,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:kl,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!==Or&&(Or&&e.type==="mousemove"?(Ea=e.screenX-Or.screenX,Pa=e.screenY-Or.screenY):Pa=Ea=0,Or=e),Ea)},movementY:function(e){return"movementY"in e?e.movementY:Pa}}),Eu=rt(Ki),mm=we({},Ki,{dataTransfer:0}),gm=rt(mm),ym=we({},js,{relatedTarget:0}),Ta=rt(ym),vm=we({},br,{animationName:0,elapsedTime:0,pseudoElement:0}),xm=rt(vm),wm=we({},br,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),jm=rt(wm),bm=we({},br,{data:0}),Pu=rt(bm),Nm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},km={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"},Sm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Sm[e])?!!t[e]:!1}function kl(){return Cm}var Em=we({},js,{key:function(e){if(e.key){var t=Nm[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ti(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?km[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:kl,charCode:function(e){return e.type==="keypress"?ti(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ti(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Pm=rt(Em),Tm=we({},Ki,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tu=rt(Tm),Om=we({},js,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:kl}),zm=rt(Om),Am=we({},br,{propertyName:0,elapsedTime:0,pseudoElement:0}),Mm=rt(Am),Rm=we({},Ki,{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}),_m=rt(Rm),Lm=[9,13,27,32],Sl=Ft&&"CompositionEvent"in window,Vr=null;Ft&&"documentMode"in document&&(Vr=document.documentMode);var Fm=Ft&&"TextEvent"in window&&!Vr,Wd=Ft&&(!Sl||Vr&&8<Vr&&11>=Vr),Ou=String.fromCharCode(32),zu=!1;function Bd(e,t){switch(e){case"keyup":return Lm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Kn=!1;function Im(e,t){switch(e){case"compositionend":return Hd(t);case"keypress":return t.which!==32?null:(zu=!0,Ou);case"textInput":return e=t.data,e===Ou&&zu?null:e;default:return null}}function Dm(e,t){if(Kn)return e==="compositionend"||!Sl&&Bd(e,t)?(e=Ud(),ei=bl=Zt=null,Kn=!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 Wd&&t.locale!=="ko"?null:t.data;default:return null}}var $m={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 Au(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!$m[e.type]:t==="textarea"}function qd(e,t,n,r){bd(r),t=Ni(t,"onChange"),0<t.length&&(n=new Nl("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Kr=null,as=null;function Um(e){nf(e,0)}function Gi(e){var t=Xn(e);if(md(t))return e}function Wm(e,t){if(e==="change")return t}var Qd=!1;if(Ft){var Oa;if(Ft){var za="oninput"in document;if(!za){var Mu=document.createElement("div");Mu.setAttribute("oninput","return;"),za=typeof Mu.oninput=="function"}Oa=za}else Oa=!1;Qd=Oa&&(!document.documentMode||9<document.documentMode)}function Ru(){Kr&&(Kr.detachEvent("onpropertychange",Vd),as=Kr=null)}function Vd(e){if(e.propertyName==="value"&&Gi(as)){var t=[];qd(t,as,e,yl(e)),Cd(Um,t)}}function Bm(e,t,n){e==="focusin"?(Ru(),Kr=t,as=n,Kr.attachEvent("onpropertychange",Vd)):e==="focusout"&&Ru()}function Hm(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Gi(as)}function qm(e,t){if(e==="click")return Gi(t)}function Qm(e,t){if(e==="input"||e==="change")return Gi(t)}function Vm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wt=typeof Object.is=="function"?Object.is:Vm;function os(e,t){if(wt(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(!no.call(t,s)||!wt(e[s],t[s]))return!1}return!0}function _u(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Lu(e,t){var n=_u(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=_u(n)}}function Kd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Kd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gd(){for(var e=window,t=gi();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=gi(e.document)}return t}function Cl(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 Km(e){var t=Gd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Kd(n.ownerDocument.documentElement,n)){if(r!==null&&Cl(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=Lu(n,i);var o=Lu(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Gm=Ft&&"documentMode"in document&&11>=document.documentMode,Gn=null,bo=null,Gr=null,No=!1;function Fu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;No||Gn==null||Gn!==gi(r)||(r=Gn,"selectionStart"in r&&Cl(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}),Gr&&os(Gr,r)||(Gr=r,r=Ni(bo,"onSelect"),0<r.length&&(t=new Nl("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Gn)))}function Fs(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Yn={animationend:Fs("Animation","AnimationEnd"),animationiteration:Fs("Animation","AnimationIteration"),animationstart:Fs("Animation","AnimationStart"),transitionend:Fs("Transition","TransitionEnd")},Aa={},Yd={};Ft&&(Yd=document.createElement("div").style,"AnimationEvent"in window||(delete Yn.animationend.animation,delete Yn.animationiteration.animation,delete Yn.animationstart.animation),"TransitionEvent"in window||delete Yn.transitionend.transition);function Yi(e){if(Aa[e])return Aa[e];if(!Yn[e])return e;var t=Yn[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Yd)return Aa[e]=t[n];return e}var Xd=Yi("animationend"),Jd=Yi("animationiteration"),Zd=Yi("animationstart"),ef=Yi("transitionend"),tf=new Map,Iu="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 hn(e,t){tf.set(e,t),Fn(t,[e])}for(var Ma=0;Ma<Iu.length;Ma++){var Ra=Iu[Ma],Ym=Ra.toLowerCase(),Xm=Ra[0].toUpperCase()+Ra.slice(1);hn(Ym,"on"+Xm)}hn(Xd,"onAnimationEnd");hn(Jd,"onAnimationIteration");hn(Zd,"onAnimationStart");hn("dblclick","onDoubleClick");hn("focusin","onFocus");hn("focusout","onBlur");hn(ef,"onTransitionEnd");pr("onMouseEnter",["mouseout","mouseover"]);pr("onMouseLeave",["mouseout","mouseover"]);pr("onPointerEnter",["pointerout","pointerover"]);pr("onPointerLeave",["pointerout","pointerover"]);Fn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Fn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Fn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Fn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Fn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Br="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(" "),Jm=new Set("cancel close invalid load scroll toggle".split(" ").concat(Br));function Du(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,Yh(r,t,void 0,e),e.currentTarget=null}function nf(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var l=r[o],u=l.instance,c=l.currentTarget;if(l=l.listener,u!==i&&s.isPropagationStopped())break e;Du(s,l,c),i=u}else for(o=0;o<r.length;o++){if(l=r[o],u=l.instance,c=l.currentTarget,l=l.listener,u!==i&&s.isPropagationStopped())break e;Du(s,l,c),i=u}}}if(vi)throw e=vo,vi=!1,vo=null,e}function me(e,t){var n=t[Po];n===void 0&&(n=t[Po]=new Set);var r=e+"__bubble";n.has(r)||(rf(t,e,2,!1),n.add(r))}function _a(e,t,n){var r=0;t&&(r|=4),rf(n,e,r,t)}var Is="_reactListening"+Math.random().toString(36).slice(2);function ls(e){if(!e[Is]){e[Is]=!0,cd.forEach(function(n){n!=="selectionchange"&&(Jm.has(n)||_a(n,!1,e),_a(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Is]||(t[Is]=!0,_a("selectionchange",!1,t))}}function rf(e,t,n,r){switch($d(t)){case 1:var s=fm;break;case 4:s=pm;break;default:s=jl}n=s.bind(null,t,n,e),s=void 0,!yo||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 La(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var l=r.stateNode.containerInfo;if(l===s||l.nodeType===8&&l.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var u=o.tag;if((u===3||u===4)&&(u=o.stateNode.containerInfo,u===s||u.nodeType===8&&u.parentNode===s))return;o=o.return}for(;l!==null;){if(o=bn(l),o===null)return;if(u=o.tag,u===5||u===6){r=i=o;continue e}l=l.parentNode}}r=r.return}Cd(function(){var c=i,d=yl(n),f=[];e:{var p=tf.get(e);if(p!==void 0){var v=Nl,x=e;switch(e){case"keypress":if(ti(n)===0)break e;case"keydown":case"keyup":v=Pm;break;case"focusin":x="focus",v=Ta;break;case"focusout":x="blur",v=Ta;break;case"beforeblur":case"afterblur":v=Ta;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":v=Eu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=gm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=zm;break;case Xd:case Jd:case Zd:v=xm;break;case ef:v=Mm;break;case"scroll":v=hm;break;case"wheel":v=_m;break;case"copy":case"cut":case"paste":v=jm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Tu}var w=(t&4)!==0,N=!w&&e==="scroll",m=w?p!==null?p+"Capture":null:p;w=[];for(var h=c,y;h!==null;){y=h;var b=y.stateNode;if(y.tag===5&&b!==null&&(y=b,m!==null&&(b=ns(h,m),b!=null&&w.push(us(h,b,y)))),N)break;h=h.return}0<w.length&&(p=new v(p,x,null,n,d),f.push({event:p,listeners:w}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",p&&n!==mo&&(x=n.relatedTarget||n.fromElement)&&(bn(x)||x[It]))break e;if((v||p)&&(p=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,v?(x=n.relatedTarget||n.toElement,v=c,x=x?bn(x):null,x!==null&&(N=In(x),x!==N||x.tag!==5&&x.tag!==6)&&(x=null)):(v=null,x=c),v!==x)){if(w=Eu,b="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(w=Tu,b="onPointerLeave",m="onPointerEnter",h="pointer"),N=v==null?p:Xn(v),y=x==null?p:Xn(x),p=new w(b,h+"leave",v,n,d),p.target=N,p.relatedTarget=y,b=null,bn(d)===c&&(w=new w(m,h+"enter",x,n,d),w.target=y,w.relatedTarget=N,b=w),N=b,v&&x)t:{for(w=v,m=x,h=0,y=w;y;y=Hn(y))h++;for(y=0,b=m;b;b=Hn(b))y++;for(;0<h-y;)w=Hn(w),h--;for(;0<y-h;)m=Hn(m),y--;for(;h--;){if(w===m||m!==null&&w===m.alternate)break t;w=Hn(w),m=Hn(m)}w=null}else w=null;v!==null&&$u(f,p,v,w,!1),x!==null&&N!==null&&$u(f,N,x,w,!0)}}e:{if(p=c?Xn(c):window,v=p.nodeName&&p.nodeName.toLowerCase(),v==="select"||v==="input"&&p.type==="file")var P=Wm;else if(Au(p))if(Qd)P=Qm;else{P=Hm;var T=Bm}else(v=p.nodeName)&&v.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(P=qm);if(P&&(P=P(e,c))){qd(f,P,n,d);break e}T&&T(e,p,c),e==="focusout"&&(T=p._wrapperState)&&T.controlled&&p.type==="number"&&uo(p,"number",p.value)}switch(T=c?Xn(c):window,e){case"focusin":(Au(T)||T.contentEditable==="true")&&(Gn=T,bo=c,Gr=null);break;case"focusout":Gr=bo=Gn=null;break;case"mousedown":No=!0;break;case"contextmenu":case"mouseup":case"dragend":No=!1,Fu(f,n,d);break;case"selectionchange":if(Gm)break;case"keydown":case"keyup":Fu(f,n,d)}var C;if(Sl)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 Kn?Bd(e,n)&&(j="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(j="onCompositionStart");j&&(Wd&&n.locale!=="ko"&&(Kn||j!=="onCompositionStart"?j==="onCompositionEnd"&&Kn&&(C=Ud()):(Zt=d,bl="value"in Zt?Zt.value:Zt.textContent,Kn=!0)),T=Ni(c,j),0<T.length&&(j=new Pu(j,e,null,n,d),f.push({event:j,listeners:T}),C?j.data=C:(C=Hd(n),C!==null&&(j.data=C)))),(C=Fm?Im(e,n):Dm(e,n))&&(c=Ni(c,"onBeforeInput"),0<c.length&&(d=new Pu("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=C))}nf(f,t)})}function us(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ni(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=ns(e,n),i!=null&&r.unshift(us(e,i,s)),i=ns(e,t),i!=null&&r.push(us(e,i,s))),e=e.return}return r}function Hn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function $u(e,t,n,r,s){for(var i=t._reactName,o=[];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=ns(n,i),u!=null&&o.unshift(us(n,u,l))):s||(u=ns(n,i),u!=null&&o.push(us(n,u,l)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Zm=/\r\n?/g,eg=/\u0000|\uFFFD/g;function Uu(e){return(typeof e=="string"?e:""+e).replace(Zm,`
38
+ `).replace(eg,"")}function Ds(e,t,n){if(t=Uu(t),Uu(e)!==t&&n)throw Error(O(425))}function ki(){}var ko=null,So=null;function Co(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 Eo=typeof setTimeout=="function"?setTimeout:void 0,tg=typeof clearTimeout=="function"?clearTimeout:void 0,Wu=typeof Promise=="function"?Promise:void 0,ng=typeof queueMicrotask=="function"?queueMicrotask:typeof Wu<"u"?function(e){return Wu.resolve(null).then(e).catch(rg)}:Eo;function rg(e){setTimeout(function(){throw e})}function Fa(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),is(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);is(t)}function an(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 Bu(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 Nr=Math.random().toString(36).slice(2),Et="__reactFiber$"+Nr,cs="__reactProps$"+Nr,It="__reactContainer$"+Nr,Po="__reactEvents$"+Nr,sg="__reactListeners$"+Nr,ig="__reactHandles$"+Nr;function bn(e){var t=e[Et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[It]||n[Et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Bu(e);e!==null;){if(n=e[Et])return n;e=Bu(e)}return t}e=n,n=e.parentNode}return null}function bs(e){return e=e[Et]||e[It],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Xn(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(O(33))}function Xi(e){return e[cs]||null}var To=[],Jn=-1;function mn(e){return{current:e}}function ge(e){0>Jn||(e.current=To[Jn],To[Jn]=null,Jn--)}function pe(e,t){Jn++,To[Jn]=e.current,e.current=t}var pn={},$e=mn(pn),Ge=mn(!1),An=pn;function hr(e,t){var n=e.type.contextTypes;if(!n)return pn;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 Ye(e){return e=e.childContextTypes,e!=null}function Si(){ge(Ge),ge($e)}function Hu(e,t,n){if($e.current!==pn)throw Error(O(168));pe($e,t),pe(Ge,n)}function sf(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(O(108,Bh(e)||"Unknown",s));return we({},n,r)}function Ci(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pn,An=$e.current,pe($e,e),pe(Ge,Ge.current),!0}function qu(e,t,n){var r=e.stateNode;if(!r)throw Error(O(169));n?(e=sf(e,t,An),r.__reactInternalMemoizedMergedChildContext=e,ge(Ge),ge($e),pe($e,e)):ge(Ge),pe(Ge,n)}var At=null,Ji=!1,Ia=!1;function af(e){At===null?At=[e]:At.push(e)}function ag(e){Ji=!0,af(e)}function gn(){if(!Ia&&At!==null){Ia=!0;var e=0,t=ue;try{var n=At;for(ue=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}At=null,Ji=!1}catch(s){throw At!==null&&(At=At.slice(e+1)),Od(vl,gn),s}finally{ue=t,Ia=!1}}return null}var Zn=[],er=0,Ei=null,Pi=0,it=[],at=0,Mn=null,Rt=1,_t="";function xn(e,t){Zn[er++]=Pi,Zn[er++]=Ei,Ei=e,Pi=t}function of(e,t,n){it[at++]=Rt,it[at++]=_t,it[at++]=Mn,Mn=e;var r=Rt;e=_t;var s=32-vt(r)-1;r&=~(1<<s),n+=1;var i=32-vt(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,Rt=1<<32-vt(t)+s|n<<s|r,_t=i+e}else Rt=1<<i|n<<s|r,_t=e}function El(e){e.return!==null&&(xn(e,1),of(e,1,0))}function Pl(e){for(;e===Ei;)Ei=Zn[--er],Zn[er]=null,Pi=Zn[--er],Zn[er]=null;for(;e===Mn;)Mn=it[--at],it[at]=null,_t=it[--at],it[at]=null,Rt=it[--at],it[at]=null}var et=null,Ze=null,ye=!1,yt=null;function lf(e,t){var n=ot(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 Qu(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,et=e,Ze=an(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,et=e,Ze=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Mn!==null?{id:Rt,overflow:_t}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=ot(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,et=e,Ze=null,!0):!1;default:return!1}}function Oo(e){return(e.mode&1)!==0&&(e.flags&128)===0}function zo(e){if(ye){var t=Ze;if(t){var n=t;if(!Qu(e,t)){if(Oo(e))throw Error(O(418));t=an(n.nextSibling);var r=et;t&&Qu(e,t)?lf(r,n):(e.flags=e.flags&-4097|2,ye=!1,et=e)}}else{if(Oo(e))throw Error(O(418));e.flags=e.flags&-4097|2,ye=!1,et=e}}}function Vu(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;et=e}function $s(e){if(e!==et)return!1;if(!ye)return Vu(e),ye=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Co(e.type,e.memoizedProps)),t&&(t=Ze)){if(Oo(e))throw uf(),Error(O(418));for(;t;)lf(e,t),t=an(t.nextSibling)}if(Vu(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Ze=an(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Ze=null}}else Ze=et?an(e.stateNode.nextSibling):null;return!0}function uf(){for(var e=Ze;e;)e=an(e.nextSibling)}function mr(){Ze=et=null,ye=!1}function Tl(e){yt===null?yt=[e]:yt.push(e)}var og=Ut.ReactCurrentBatchConfig;function zr(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(O(309));var r=n.stateNode}if(!r)throw Error(O(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var l=s.refs;o===null?delete l[i]:l[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(O(284));if(!n._owner)throw Error(O(290,e))}return e}function Us(e,t){throw e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ku(e){var t=e._init;return t(e._payload)}function cf(e){function t(m,h){if(e){var y=m.deletions;y===null?(m.deletions=[h],m.flags|=16):y.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=cn(m,h),m.index=0,m.sibling=null,m}function i(m,h,y){return m.index=y,e?(y=m.alternate,y!==null?(y=y.index,y<h?(m.flags|=2,h):y):(m.flags|=2,h)):(m.flags|=1048576,h)}function o(m){return e&&m.alternate===null&&(m.flags|=2),m}function l(m,h,y,b){return h===null||h.tag!==6?(h=qa(y,m.mode,b),h.return=m,h):(h=s(h,y),h.return=m,h)}function u(m,h,y,b){var P=y.type;return P===Vn?d(m,h,y.props.children,b,y.key):h!==null&&(h.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Vt&&Ku(P)===h.type)?(b=s(h,y.props),b.ref=zr(m,h,y),b.return=m,b):(b=li(y.type,y.key,y.props,null,m.mode,b),b.ref=zr(m,h,y),b.return=m,b)}function c(m,h,y,b){return h===null||h.tag!==4||h.stateNode.containerInfo!==y.containerInfo||h.stateNode.implementation!==y.implementation?(h=Qa(y,m.mode,b),h.return=m,h):(h=s(h,y.children||[]),h.return=m,h)}function d(m,h,y,b,P){return h===null||h.tag!==7?(h=Tn(y,m.mode,b,P),h.return=m,h):(h=s(h,y),h.return=m,h)}function f(m,h,y){if(typeof h=="string"&&h!==""||typeof h=="number")return h=qa(""+h,m.mode,y),h.return=m,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Os:return y=li(h.type,h.key,h.props,null,m.mode,y),y.ref=zr(m,null,h),y.return=m,y;case Qn:return h=Qa(h,m.mode,y),h.return=m,h;case Vt:var b=h._init;return f(m,b(h._payload),y)}if(Ur(h)||Cr(h))return h=Tn(h,m.mode,y,null),h.return=m,h;Us(m,h)}return null}function p(m,h,y,b){var P=h!==null?h.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return P!==null?null:l(m,h,""+y,b);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Os:return y.key===P?u(m,h,y,b):null;case Qn:return y.key===P?c(m,h,y,b):null;case Vt:return P=y._init,p(m,h,P(y._payload),b)}if(Ur(y)||Cr(y))return P!==null?null:d(m,h,y,b,null);Us(m,y)}return null}function v(m,h,y,b,P){if(typeof b=="string"&&b!==""||typeof b=="number")return m=m.get(y)||null,l(h,m,""+b,P);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Os:return m=m.get(b.key===null?y:b.key)||null,u(h,m,b,P);case Qn:return m=m.get(b.key===null?y:b.key)||null,c(h,m,b,P);case Vt:var T=b._init;return v(m,h,y,T(b._payload),P)}if(Ur(b)||Cr(b))return m=m.get(y)||null,d(h,m,b,P,null);Us(h,b)}return null}function x(m,h,y,b){for(var P=null,T=null,C=h,j=h=0,R=null;C!==null&&j<y.length;j++){C.index>j?(R=C,C=null):R=C.sibling;var M=p(m,C,y[j],b);if(M===null){C===null&&(C=R);break}e&&C&&M.alternate===null&&t(m,C),h=i(M,h,j),T===null?P=M:T.sibling=M,T=M,C=R}if(j===y.length)return n(m,C),ye&&xn(m,j),P;if(C===null){for(;j<y.length;j++)C=f(m,y[j],b),C!==null&&(h=i(C,h,j),T===null?P=C:T.sibling=C,T=C);return ye&&xn(m,j),P}for(C=r(m,C);j<y.length;j++)R=v(C,m,j,y[j],b),R!==null&&(e&&R.alternate!==null&&C.delete(R.key===null?j:R.key),h=i(R,h,j),T===null?P=R:T.sibling=R,T=R);return e&&C.forEach(function(K){return t(m,K)}),ye&&xn(m,j),P}function w(m,h,y,b){var P=Cr(y);if(typeof P!="function")throw Error(O(150));if(y=P.call(y),y==null)throw Error(O(151));for(var T=P=null,C=h,j=h=0,R=null,M=y.next();C!==null&&!M.done;j++,M=y.next()){C.index>j?(R=C,C=null):R=C.sibling;var K=p(m,C,M.value,b);if(K===null){C===null&&(C=R);break}e&&C&&K.alternate===null&&t(m,C),h=i(K,h,j),T===null?P=K:T.sibling=K,T=K,C=R}if(M.done)return n(m,C),ye&&xn(m,j),P;if(C===null){for(;!M.done;j++,M=y.next())M=f(m,M.value,b),M!==null&&(h=i(M,h,j),T===null?P=M:T.sibling=M,T=M);return ye&&xn(m,j),P}for(C=r(m,C);!M.done;j++,M=y.next())M=v(C,m,j,M.value,b),M!==null&&(e&&M.alternate!==null&&C.delete(M.key===null?j:M.key),h=i(M,h,j),T===null?P=M:T.sibling=M,T=M);return e&&C.forEach(function(E){return t(m,E)}),ye&&xn(m,j),P}function N(m,h,y,b){if(typeof y=="object"&&y!==null&&y.type===Vn&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Os:e:{for(var P=y.key,T=h;T!==null;){if(T.key===P){if(P=y.type,P===Vn){if(T.tag===7){n(m,T.sibling),h=s(T,y.props.children),h.return=m,m=h;break e}}else if(T.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Vt&&Ku(P)===T.type){n(m,T.sibling),h=s(T,y.props),h.ref=zr(m,T,y),h.return=m,m=h;break e}n(m,T);break}else t(m,T);T=T.sibling}y.type===Vn?(h=Tn(y.props.children,m.mode,b,y.key),h.return=m,m=h):(b=li(y.type,y.key,y.props,null,m.mode,b),b.ref=zr(m,h,y),b.return=m,m=b)}return o(m);case Qn:e:{for(T=y.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===y.containerInfo&&h.stateNode.implementation===y.implementation){n(m,h.sibling),h=s(h,y.children||[]),h.return=m,m=h;break e}else{n(m,h);break}else t(m,h);h=h.sibling}h=Qa(y,m.mode,b),h.return=m,m=h}return o(m);case Vt:return T=y._init,N(m,h,T(y._payload),b)}if(Ur(y))return x(m,h,y,b);if(Cr(y))return w(m,h,y,b);Us(m,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,h!==null&&h.tag===6?(n(m,h.sibling),h=s(h,y),h.return=m,m=h):(n(m,h),h=qa(y,m.mode,b),h.return=m,m=h),o(m)):n(m,h)}return N}var gr=cf(!0),df=cf(!1),Ti=mn(null),Oi=null,tr=null,Ol=null;function zl(){Ol=tr=Oi=null}function Al(e){var t=Ti.current;ge(Ti),e._currentValue=t}function Ao(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 cr(e,t){Oi=e,Ol=tr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ke=!0),e.firstContext=null)}function ut(e){var t=e._currentValue;if(Ol!==e)if(e={context:e,memoizedValue:t,next:null},tr===null){if(Oi===null)throw Error(O(308));tr=e,Oi.dependencies={lanes:0,firstContext:e}}else tr=tr.next=e;return t}var Nn=null;function Ml(e){Nn===null?Nn=[e]:Nn.push(e)}function ff(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Ml(t)):(n.next=s.next,s.next=n),t.interleaved=n,Dt(e,r)}function Dt(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 Kt=!1;function Rl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pf(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 Lt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function on(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,se&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Dt(e,n)}return s=r.interleaved,s===null?(t.next=t,Ml(r)):(t.next=s.next,s.next=t),r.interleaved=t,Dt(e,n)}function ni(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,xl(e,n)}}function Gu(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function zi(e,t,n,r){var s=e.updateQueue;Kt=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,l=s.shared.pending;if(l!==null){s.shared.pending=null;var u=l,c=u.next;u.next=null,o===null?i=c:o.next=c,o=u;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=c:l.next=c,d.lastBaseUpdate=u))}if(i!==null){var f=s.baseState;o=0,d=c=u=null,l=i;do{var p=l.lane,v=l.eventTime;if((r&p)===p){d!==null&&(d=d.next={eventTime:v,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var x=e,w=l;switch(p=t,v=n,w.tag){case 1:if(x=w.payload,typeof x=="function"){f=x.call(v,f,p);break e}f=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=w.payload,p=typeof x=="function"?x.call(v,f,p):x,p==null)break e;f=we({},f,p);break e;case 2:Kt=!0}}l.callback!==null&&l.lane!==0&&(e.flags|=64,p=s.effects,p===null?s.effects=[l]:p.push(l))}else v={eventTime:v,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(c=d=v,u=f):d=d.next=v,o|=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 o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);_n|=o,e.lanes=o,e.memoizedState=f}}function Yu(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(O(191,s));s.call(r)}}}var Ns={},Tt=mn(Ns),ds=mn(Ns),fs=mn(Ns);function kn(e){if(e===Ns)throw Error(O(174));return e}function _l(e,t){switch(pe(fs,t),pe(ds,e),pe(Tt,Ns),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:fo(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=fo(t,e)}ge(Tt),pe(Tt,t)}function yr(){ge(Tt),ge(ds),ge(fs)}function hf(e){kn(fs.current);var t=kn(Tt.current),n=fo(t,e.type);t!==n&&(pe(ds,e),pe(Tt,n))}function Ll(e){ds.current===e&&(ge(Tt),ge(ds))}var ve=mn(0);function Ai(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 Da=[];function Fl(){for(var e=0;e<Da.length;e++)Da[e]._workInProgressVersionPrimary=null;Da.length=0}var ri=Ut.ReactCurrentDispatcher,$a=Ut.ReactCurrentBatchConfig,Rn=0,xe=null,Te=null,ze=null,Mi=!1,Yr=!1,ps=0,lg=0;function Fe(){throw Error(O(321))}function Il(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wt(e[n],t[n]))return!1;return!0}function Dl(e,t,n,r,s,i){if(Rn=i,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ri.current=e===null||e.memoizedState===null?fg:pg,e=n(r,s),Yr){i=0;do{if(Yr=!1,ps=0,25<=i)throw Error(O(301));i+=1,ze=Te=null,t.updateQueue=null,ri.current=hg,e=n(r,s)}while(Yr)}if(ri.current=Ri,t=Te!==null&&Te.next!==null,Rn=0,ze=Te=xe=null,Mi=!1,t)throw Error(O(300));return e}function $l(){var e=ps!==0;return ps=0,e}function St(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?xe.memoizedState=ze=e:ze=ze.next=e,ze}function ct(){if(Te===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Te.next;var t=ze===null?xe.memoizedState:ze.next;if(t!==null)ze=t,Te=e;else{if(e===null)throw Error(O(310));Te=e,e={memoizedState:Te.memoizedState,baseState:Te.baseState,baseQueue:Te.baseQueue,queue:Te.queue,next:null},ze===null?xe.memoizedState=ze=e:ze=ze.next=e}return ze}function hs(e,t){return typeof t=="function"?t(e):t}function Ua(e){var t=ct(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=Te,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var l=o=null,u=null,c=i;do{var d=c.lane;if((Rn&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,o=r):u=u.next=f,xe.lanes|=d,_n|=d}c=c.next}while(c!==null&&c!==i);u===null?o=r:u.next=l,wt(r,t.memoizedState)||(Ke=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,xe.lanes|=i,_n|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Wa(e){var t=ct(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);wt(i,t.memoizedState)||(Ke=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function mf(){}function gf(e,t){var n=xe,r=ct(),s=t(),i=!wt(r.memoizedState,s);if(i&&(r.memoizedState=s,Ke=!0),r=r.queue,Ul(xf.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||ze!==null&&ze.memoizedState.tag&1){if(n.flags|=2048,ms(9,vf.bind(null,n,r,s,t),void 0,null),Ae===null)throw Error(O(349));Rn&30||yf(n,t,s)}return s}function yf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function vf(e,t,n,r){t.value=n,t.getSnapshot=r,wf(t)&&jf(e)}function xf(e,t,n){return n(function(){wf(t)&&jf(e)})}function wf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wt(e,n)}catch{return!0}}function jf(e){var t=Dt(e,1);t!==null&&xt(t,e,1,-1)}function Xu(e){var t=St();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hs,lastRenderedState:e},t.queue=e,e=e.dispatch=dg.bind(null,xe,e),[t.memoizedState,e]}function ms(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=xe.updateQueue,t===null?(t={lastEffect:null,stores:null},xe.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 bf(){return ct().memoizedState}function si(e,t,n,r){var s=St();xe.flags|=e,s.memoizedState=ms(1|t,n,void 0,r===void 0?null:r)}function Zi(e,t,n,r){var s=ct();r=r===void 0?null:r;var i=void 0;if(Te!==null){var o=Te.memoizedState;if(i=o.destroy,r!==null&&Il(r,o.deps)){s.memoizedState=ms(t,n,i,r);return}}xe.flags|=e,s.memoizedState=ms(1|t,n,i,r)}function Ju(e,t){return si(8390656,8,e,t)}function Ul(e,t){return Zi(2048,8,e,t)}function Nf(e,t){return Zi(4,2,e,t)}function kf(e,t){return Zi(4,4,e,t)}function Sf(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 Cf(e,t,n){return n=n!=null?n.concat([e]):null,Zi(4,4,Sf.bind(null,t,e),n)}function Wl(){}function Ef(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Il(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Pf(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Il(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Tf(e,t,n){return Rn&21?(wt(n,t)||(n=Md(),xe.lanes|=n,_n|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ke=!0),e.memoizedState=n)}function ug(e,t){var n=ue;ue=n!==0&&4>n?n:4,e(!0);var r=$a.transition;$a.transition={};try{e(!1),t()}finally{ue=n,$a.transition=r}}function Of(){return ct().memoizedState}function cg(e,t,n){var r=un(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},zf(e))Af(t,n);else if(n=ff(e,t,n,r),n!==null){var s=Be();xt(n,e,r,s),Mf(n,t,r)}}function dg(e,t,n){var r=un(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(zf(e))Af(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(s.hasEagerState=!0,s.eagerState=l,wt(l,o)){var u=t.interleaved;u===null?(s.next=s,Ml(t)):(s.next=u.next,u.next=s),t.interleaved=s;return}}catch{}finally{}n=ff(e,t,s,r),n!==null&&(s=Be(),xt(n,e,r,s),Mf(n,t,r))}}function zf(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function Af(e,t){Yr=Mi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Mf(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xl(e,n)}}var Ri={readContext:ut,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},fg={readContext:ut,useCallback:function(e,t){return St().memoizedState=[e,t===void 0?null:t],e},useContext:ut,useEffect:Ju,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,si(4194308,4,Sf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return si(4194308,4,e,t)},useInsertionEffect:function(e,t){return si(4,2,e,t)},useMemo:function(e,t){var n=St();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=St();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=cg.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=St();return e={current:e},t.memoizedState=e},useState:Xu,useDebugValue:Wl,useDeferredValue:function(e){return St().memoizedState=e},useTransition:function(){var e=Xu(!1),t=e[0];return e=ug.bind(null,e[1]),St().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=xe,s=St();if(ye){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),Ae===null)throw Error(O(349));Rn&30||yf(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Ju(xf.bind(null,r,i,e),[e]),r.flags|=2048,ms(9,vf.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=St(),t=Ae.identifierPrefix;if(ye){var n=_t,r=Rt;n=(r&~(1<<32-vt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=ps++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=lg++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},pg={readContext:ut,useCallback:Ef,useContext:ut,useEffect:Ul,useImperativeHandle:Cf,useInsertionEffect:Nf,useLayoutEffect:kf,useMemo:Pf,useReducer:Ua,useRef:bf,useState:function(){return Ua(hs)},useDebugValue:Wl,useDeferredValue:function(e){var t=ct();return Tf(t,Te.memoizedState,e)},useTransition:function(){var e=Ua(hs)[0],t=ct().memoizedState;return[e,t]},useMutableSource:mf,useSyncExternalStore:gf,useId:Of,unstable_isNewReconciler:!1},hg={readContext:ut,useCallback:Ef,useContext:ut,useEffect:Ul,useImperativeHandle:Cf,useInsertionEffect:Nf,useLayoutEffect:kf,useMemo:Pf,useReducer:Wa,useRef:bf,useState:function(){return Wa(hs)},useDebugValue:Wl,useDeferredValue:function(e){var t=ct();return Te===null?t.memoizedState=e:Tf(t,Te.memoizedState,e)},useTransition:function(){var e=Wa(hs)[0],t=ct().memoizedState;return[e,t]},useMutableSource:mf,useSyncExternalStore:gf,useId:Of,unstable_isNewReconciler:!1};function ht(e,t){if(e&&e.defaultProps){t=we({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Mo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:we({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ea={isMounted:function(e){return(e=e._reactInternals)?In(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Be(),s=un(e),i=Lt(r,s);i.payload=t,n!=null&&(i.callback=n),t=on(e,i,s),t!==null&&(xt(t,e,s,r),ni(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Be(),s=un(e),i=Lt(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=on(e,i,s),t!==null&&(xt(t,e,s,r),ni(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Be(),r=un(e),s=Lt(n,r);s.tag=2,t!=null&&(s.callback=t),t=on(e,s,r),t!==null&&(xt(t,e,r,n),ni(t,e,r))}};function Zu(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!os(n,r)||!os(s,i):!0}function Rf(e,t,n){var r=!1,s=pn,i=t.contextType;return typeof i=="object"&&i!==null?i=ut(i):(s=Ye(t)?An:$e.current,r=t.contextTypes,i=(r=r!=null)?hr(e,s):pn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=ea,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function ec(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&&ea.enqueueReplaceState(t,t.state,null)}function Ro(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},Rl(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=ut(i):(i=Ye(t)?An:$e.current,s.context=hr(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Mo(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&&ea.enqueueReplaceState(s,s.state,null),zi(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function vr(e,t){try{var n="",r=t;do n+=Wh(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 Ba(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function _o(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var mg=typeof WeakMap=="function"?WeakMap:Map;function _f(e,t,n){n=Lt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Li||(Li=!0,qo=r),_o(e,t)},n}function Lf(e,t,n){n=Lt(-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(){_o(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){_o(e,t),typeof r!="function"&&(ln===null?ln=new Set([this]):ln.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function tc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new mg;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=Tg.bind(null,e,t,n),t.then(e,e))}function nc(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 rc(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=Lt(-1,1),t.tag=2,on(n,t,1))),n.lanes|=1),e)}var gg=Ut.ReactCurrentOwner,Ke=!1;function Ue(e,t,n,r){t.child=e===null?df(t,null,n,r):gr(t,e.child,n,r)}function sc(e,t,n,r,s){n=n.render;var i=t.ref;return cr(t,s),r=Dl(e,t,n,r,i,s),n=$l(),e!==null&&!Ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$t(e,t,s)):(ye&&n&&El(t),t.flags|=1,Ue(e,t,r,s),t.child)}function ic(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Yl(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Ff(e,t,i,r,s)):(e=li(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:os,n(o,r)&&e.ref===t.ref)return $t(e,t,s)}return t.flags|=1,e=cn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Ff(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(os(i,r)&&e.ref===t.ref)if(Ke=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ke=!0);else return t.lanes=e.lanes,$t(e,t,s)}return Lo(e,t,n,r,s)}function If(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},pe(rr,Je),Je|=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,pe(rr,Je),Je|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,pe(rr,Je),Je|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,pe(rr,Je),Je|=r;return Ue(e,t,s,n),t.child}function Df(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Lo(e,t,n,r,s){var i=Ye(n)?An:$e.current;return i=hr(t,i),cr(t,s),n=Dl(e,t,n,r,i,s),r=$l(),e!==null&&!Ke?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,$t(e,t,s)):(ye&&r&&El(t),t.flags|=1,Ue(e,t,n,s),t.child)}function ac(e,t,n,r,s){if(Ye(n)){var i=!0;Ci(t)}else i=!1;if(cr(t,s),t.stateNode===null)ii(e,t),Rf(t,n,r),Ro(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,l=t.memoizedProps;o.props=l;var u=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=ut(c):(c=Ye(n)?An:$e.current,c=hr(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==r||u!==c)&&ec(t,o,r,c),Kt=!1;var p=t.memoizedState;o.state=p,zi(t,r,o,s),u=t.memoizedState,l!==r||p!==u||Ge.current||Kt?(typeof d=="function"&&(Mo(t,n,d,r),u=t.memoizedState),(l=Kt||Zu(t,n,l,r,p,u,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=c,r=l):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,pf(e,t),l=t.memoizedProps,c=t.type===t.elementType?l:ht(t.type,l),o.props=c,f=t.pendingProps,p=o.context,u=n.contextType,typeof u=="object"&&u!==null?u=ut(u):(u=Ye(n)?An:$e.current,u=hr(t,u));var v=n.getDerivedStateFromProps;(d=typeof v=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l!==f||p!==u)&&ec(t,o,r,u),Kt=!1,p=t.memoizedState,o.state=p,zi(t,r,o,s);var x=t.memoizedState;l!==f||p!==x||Ge.current||Kt?(typeof v=="function"&&(Mo(t,n,v,r),x=t.memoizedState),(c=Kt||Zu(t,n,c,r,p,x,u)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,x,u),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,x,u)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=x),o.props=r,o.state=x,o.context=u,r=c):(typeof o.componentDidUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Fo(e,t,n,r,i,s)}function Fo(e,t,n,r,s,i){Df(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&qu(t,n,!1),$t(e,t,i);r=t.stateNode,gg.current=t;var l=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=gr(t,e.child,null,i),t.child=gr(t,null,l,i)):Ue(e,t,l,i),t.memoizedState=r.state,s&&qu(t,n,!0),t.child}function $f(e){var t=e.stateNode;t.pendingContext?Hu(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Hu(e,t.context,!1),_l(e,t.containerInfo)}function oc(e,t,n,r,s){return mr(),Tl(s),t.flags|=256,Ue(e,t,n,r),t.child}var Io={dehydrated:null,treeContext:null,retryLane:0};function Do(e){return{baseLanes:e,cachePool:null,transitions:null}}function Uf(e,t,n){var r=t.pendingProps,s=ve.current,i=!1,o=(t.flags&128)!==0,l;if((l=o)||(l=e!==null&&e.memoizedState===null?!1:(s&2)!==0),l?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),pe(ve,s&1),e===null)return zo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=ra(o,r,0,null),e=Tn(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Do(n),t.memoizedState=Io,e):Bl(t,o));if(s=e.memoizedState,s!==null&&(l=s.dehydrated,l!==null))return yg(e,t,o,r,l,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,l=s.sibling;var u={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=u,t.deletions=null):(r=cn(s,u),r.subtreeFlags=s.subtreeFlags&14680064),l!==null?i=cn(l,i):(i=Tn(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Do(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Io,r}return i=e.child,e=i.sibling,r=cn(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 Bl(e,t){return t=ra({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Ws(e,t,n,r){return r!==null&&Tl(r),gr(t,e.child,null,n),e=Bl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yg(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Ba(Error(O(422))),Ws(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=ra({mode:"visible",children:r.children},s,0,null),i=Tn(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&gr(t,e.child,null,o),t.child.memoizedState=Do(o),t.memoizedState=Io,i);if(!(t.mode&1))return Ws(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var l=r.dgst;return r=l,i=Error(O(419)),r=Ba(i,r,void 0),Ws(e,t,o,r)}if(l=(o&e.childLanes)!==0,Ke||l){if(r=Ae,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Dt(e,s),xt(r,e,s,-1))}return Gl(),r=Ba(Error(O(421))),Ws(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=Og.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Ze=an(s.nextSibling),et=t,ye=!0,yt=null,e!==null&&(it[at++]=Rt,it[at++]=_t,it[at++]=Mn,Rt=e.id,_t=e.overflow,Mn=t),t=Bl(t,r.children),t.flags|=4096,t)}function lc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ao(e.return,t,n)}function Ha(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 Wf(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ue(e,t,r.children,n),r=ve.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&&lc(e,n,t);else if(e.tag===19)lc(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(pe(ve,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&&Ai(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ha(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&&Ai(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ha(t,!0,n,null,i);break;case"together":Ha(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ii(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),_n|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,n=cn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=cn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function vg(e,t,n){switch(t.tag){case 3:$f(t),mr();break;case 5:hf(t);break;case 1:Ye(t.type)&&Ci(t);break;case 4:_l(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;pe(Ti,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(pe(ve,ve.current&1),t.flags|=128,null):n&t.child.childLanes?Uf(e,t,n):(pe(ve,ve.current&1),e=$t(e,t,n),e!==null?e.sibling:null);pe(ve,ve.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Wf(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),pe(ve,ve.current),r)break;return null;case 22:case 23:return t.lanes=0,If(e,t,n)}return $t(e,t,n)}var Bf,$o,Hf,qf;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}};$o=function(){};Hf=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,kn(Tt.current);var i=null;switch(n){case"input":s=oo(e,s),r=oo(e,r),i=[];break;case"select":s=we({},s,{value:void 0}),r=we({},r,{value:void 0}),i=[];break;case"textarea":s=co(e,s),r=co(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=ki)}po(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var l=s[c];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(es.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(o in l)!l.hasOwnProperty(o)||u&&u.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in u)u.hasOwnProperty(o)&&l[o]!==u[o]&&(n||(n={}),n[o]=u[o])}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"&&(es.hasOwnProperty(c)?(u!=null&&c==="onScroll"&&me("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)}};qf=function(e,t,n,r){n!==r&&(t.flags|=4)};function Ar(e,t){if(!ye)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 Ie(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 xg(e,t,n){var r=t.pendingProps;switch(Pl(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(t),null;case 1:return Ye(t.type)&&Si(),Ie(t),null;case 3:return r=t.stateNode,yr(),ge(Ge),ge($e),Fl(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&($s(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yt!==null&&(Ko(yt),yt=null))),$o(e,t),Ie(t),null;case 5:Ll(t);var s=kn(fs.current);if(n=t.type,e!==null&&t.stateNode!=null)Hf(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(O(166));return Ie(t),null}if(e=kn(Tt.current),$s(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Et]=t,r[cs]=i,e=(t.mode&1)!==0,n){case"dialog":me("cancel",r),me("close",r);break;case"iframe":case"object":case"embed":me("load",r);break;case"video":case"audio":for(s=0;s<Br.length;s++)me(Br[s],r);break;case"source":me("error",r);break;case"img":case"image":case"link":me("error",r),me("load",r);break;case"details":me("toggle",r);break;case"input":yu(r,i),me("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},me("invalid",r);break;case"textarea":xu(r,i),me("invalid",r)}po(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var l=i[o];o==="children"?typeof l=="string"?r.textContent!==l&&(i.suppressHydrationWarning!==!0&&Ds(r.textContent,l,e),s=["children",l]):typeof l=="number"&&r.textContent!==""+l&&(i.suppressHydrationWarning!==!0&&Ds(r.textContent,l,e),s=["children",""+l]):es.hasOwnProperty(o)&&l!=null&&o==="onScroll"&&me("scroll",r)}switch(n){case"input":zs(r),vu(r,i,!0);break;case"textarea":zs(r),wu(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=ki)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=vd(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Et]=t,e[cs]=r,Bf(e,t,!1,!1),t.stateNode=e;e:{switch(o=ho(n,r),n){case"dialog":me("cancel",e),me("close",e),s=r;break;case"iframe":case"object":case"embed":me("load",e),s=r;break;case"video":case"audio":for(s=0;s<Br.length;s++)me(Br[s],e);s=r;break;case"source":me("error",e),s=r;break;case"img":case"image":case"link":me("error",e),me("load",e),s=r;break;case"details":me("toggle",e),s=r;break;case"input":yu(e,r),s=oo(e,r),me("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=we({},r,{value:void 0}),me("invalid",e);break;case"textarea":xu(e,r),s=co(e,r),me("invalid",e);break;default:s=r}po(n,s),l=s;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];i==="style"?jd(e,u):i==="dangerouslySetInnerHTML"?(u=u?u.__html:void 0,u!=null&&xd(e,u)):i==="children"?typeof u=="string"?(n!=="textarea"||u!=="")&&ts(e,u):typeof u=="number"&&ts(e,""+u):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(es.hasOwnProperty(i)?u!=null&&i==="onScroll"&&me("scroll",e):u!=null&&pl(e,i,u,o))}switch(n){case"input":zs(e),vu(e,r,!1);break;case"textarea":zs(e),wu(e);break;case"option":r.value!=null&&e.setAttribute("value",""+fn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?ar(e,!!r.multiple,i,!1):r.defaultValue!=null&&ar(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=ki)}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 Ie(t),null;case 6:if(e&&t.stateNode!=null)qf(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(n=kn(fs.current),kn(Tt.current),$s(t)){if(r=t.stateNode,n=t.memoizedProps,r[Et]=t,(i=r.nodeValue!==n)&&(e=et,e!==null))switch(e.tag){case 3:Ds(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ds(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Et]=t,t.stateNode=r}return Ie(t),null;case 13:if(ge(ve),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(ye&&Ze!==null&&t.mode&1&&!(t.flags&128))uf(),mr(),t.flags|=98560,i=!1;else if(i=$s(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(O(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(O(317));i[Et]=t}else mr(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ie(t),i=!1}else yt!==null&&(Ko(yt),yt=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||ve.current&1?Oe===0&&(Oe=3):Gl())),t.updateQueue!==null&&(t.flags|=4),Ie(t),null);case 4:return yr(),$o(e,t),e===null&&ls(t.stateNode.containerInfo),Ie(t),null;case 10:return Al(t.type._context),Ie(t),null;case 17:return Ye(t.type)&&Si(),Ie(t),null;case 19:if(ge(ve),i=t.memoizedState,i===null)return Ie(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Ar(i,!1);else{if(Oe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Ai(e),o!==null){for(t.flags|=128,Ar(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return pe(ve,ve.current&1|2),t.child}e=e.sibling}i.tail!==null&&ke()>xr&&(t.flags|=128,r=!0,Ar(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ai(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Ar(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!ye)return Ie(t),null}else 2*ke()-i.renderingStartTime>xr&&n!==1073741824&&(t.flags|=128,r=!0,Ar(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=ke(),t.sibling=null,n=ve.current,pe(ve,r?n&1|2:n&1),t):(Ie(t),null);case 22:case 23:return Kl(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Je&1073741824&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),null;case 24:return null;case 25:return null}throw Error(O(156,t.tag))}function wg(e,t){switch(Pl(t),t.tag){case 1:return Ye(t.type)&&Si(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yr(),ge(Ge),ge($e),Fl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ll(t),null;case 13:if(ge(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));mr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ge(ve),null;case 4:return yr(),null;case 10:return Al(t.type._context),null;case 22:case 23:return Kl(),null;case 24:return null;default:return null}}var Bs=!1,De=!1,jg=typeof WeakSet=="function"?WeakSet:Set,F=null;function nr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Uo(e,t,n){try{n()}catch(r){je(e,t,r)}}var uc=!1;function bg(e,t){if(ko=ji,e=Gd(),Cl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,l=-1,u=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var v;f!==n||s!==0&&f.nodeType!==3||(l=o+s),f!==i||r!==0&&f.nodeType!==3||(u=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(v=f.firstChild)!==null;)p=f,f=v;for(;;){if(f===e)break t;if(p===n&&++c===s&&(l=o),p===i&&++d===r&&(u=o),(v=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=v}n=l===-1||u===-1?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(So={focusedElem:e,selectionRange:n},ji=!1,F=t;F!==null;)if(t=F,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,F=e;else for(;F!==null;){t=F;try{var x=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(x!==null){var w=x.memoizedProps,N=x.memoizedState,m=t.stateNode,h=m.getSnapshotBeforeUpdate(t.elementType===t.type?w:ht(t.type,w),N);m.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(O(163))}}catch(b){je(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,F=e;break}F=t.return}return x=uc,uc=!1,x}function Xr(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&&Uo(t,n,i)}s=s.next}while(s!==r)}}function ta(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 Wo(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 Qf(e){var t=e.alternate;t!==null&&(e.alternate=null,Qf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Et],delete t[cs],delete t[Po],delete t[sg],delete t[ig])),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 Vf(e){return e.tag===5||e.tag===3||e.tag===4}function cc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Vf(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 Bo(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=ki));else if(r!==4&&(e=e.child,e!==null))for(Bo(e,t,n),e=e.sibling;e!==null;)Bo(e,t,n),e=e.sibling}function Ho(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(Ho(e,t,n),e=e.sibling;e!==null;)Ho(e,t,n),e=e.sibling}var Me=null,gt=!1;function qt(e,t,n){for(n=n.child;n!==null;)Kf(e,t,n),n=n.sibling}function Kf(e,t,n){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(Vi,n)}catch{}switch(n.tag){case 5:De||nr(n,t);case 6:var r=Me,s=gt;Me=null,qt(e,t,n),Me=r,gt=s,Me!==null&&(gt?(e=Me,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Me.removeChild(n.stateNode));break;case 18:Me!==null&&(gt?(e=Me,n=n.stateNode,e.nodeType===8?Fa(e.parentNode,n):e.nodeType===1&&Fa(e,n),is(e)):Fa(Me,n.stateNode));break;case 4:r=Me,s=gt,Me=n.stateNode.containerInfo,gt=!0,qt(e,t,n),Me=r,gt=s;break;case 0:case 11:case 14:case 15:if(!De&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Uo(n,t,o),s=s.next}while(s!==r)}qt(e,t,n);break;case 1:if(!De&&(nr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(l){je(n,t,l)}qt(e,t,n);break;case 21:qt(e,t,n);break;case 22:n.mode&1?(De=(r=De)||n.memoizedState!==null,qt(e,t,n),De=r):qt(e,t,n);break;default:qt(e,t,n)}}function dc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new jg),t.forEach(function(r){var s=zg.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function ft(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 5:Me=l.stateNode,gt=!1;break e;case 3:Me=l.stateNode.containerInfo,gt=!0;break e;case 4:Me=l.stateNode.containerInfo,gt=!0;break e}l=l.return}if(Me===null)throw Error(O(160));Kf(i,o,s),Me=null,gt=!1;var u=s.alternate;u!==null&&(u.return=null),s.return=null}catch(c){je(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Gf(t,e),t=t.sibling}function Gf(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ft(t,e),kt(e),r&4){try{Xr(3,e,e.return),ta(3,e)}catch(w){je(e,e.return,w)}try{Xr(5,e,e.return)}catch(w){je(e,e.return,w)}}break;case 1:ft(t,e),kt(e),r&512&&n!==null&&nr(n,n.return);break;case 5:if(ft(t,e),kt(e),r&512&&n!==null&&nr(n,n.return),e.flags&32){var s=e.stateNode;try{ts(s,"")}catch(w){je(e,e.return,w)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=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&&gd(s,i),ho(l,o);var c=ho(l,i);for(o=0;o<u.length;o+=2){var d=u[o],f=u[o+1];d==="style"?jd(s,f):d==="dangerouslySetInnerHTML"?xd(s,f):d==="children"?ts(s,f):pl(s,d,f,c)}switch(l){case"input":lo(s,i);break;case"textarea":yd(s,i);break;case"select":var p=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var v=i.value;v!=null?ar(s,!!i.multiple,v,!1):p!==!!i.multiple&&(i.defaultValue!=null?ar(s,!!i.multiple,i.defaultValue,!0):ar(s,!!i.multiple,i.multiple?[]:"",!1))}s[cs]=i}catch(w){je(e,e.return,w)}}break;case 6:if(ft(t,e),kt(e),r&4){if(e.stateNode===null)throw Error(O(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(w){je(e,e.return,w)}}break;case 3:if(ft(t,e),kt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{is(t.containerInfo)}catch(w){je(e,e.return,w)}break;case 4:ft(t,e),kt(e);break;case 13:ft(t,e),kt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(Ql=ke())),r&4&&dc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(De=(c=De)||d,ft(t,e),De=c):ft(t,e),kt(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(F=e,d=e.child;d!==null;){for(f=F=d;F!==null;){switch(p=F,v=p.child,p.tag){case 0:case 11:case 14:case 15:Xr(4,p,p.return);break;case 1:nr(p,p.return);var x=p.stateNode;if(typeof x.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,x.props=t.memoizedProps,x.state=t.memoizedState,x.componentWillUnmount()}catch(w){je(r,n,w)}}break;case 5:nr(p,p.return);break;case 22:if(p.memoizedState!==null){pc(f);continue}}v!==null?(v.return=p,F=v):pc(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,o=u!=null&&u.hasOwnProperty("display")?u.display:null,l.style.display=wd("display",o))}catch(w){je(e,e.return,w)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(w){je(e,e.return,w)}}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:ft(t,e),kt(e),r&4&&dc(e);break;case 21:break;default:ft(t,e),kt(e)}}function kt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Vf(n)){var r=n;break e}n=n.return}throw Error(O(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ts(s,""),r.flags&=-33);var i=cc(e);Ho(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,l=cc(e);Bo(e,l,o);break;default:throw Error(O(161))}}catch(u){je(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ng(e,t,n){F=e,Yf(e)}function Yf(e,t,n){for(var r=(e.mode&1)!==0;F!==null;){var s=F,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||Bs;if(!o){var l=s.alternate,u=l!==null&&l.memoizedState!==null||De;l=Bs;var c=De;if(Bs=o,(De=u)&&!c)for(F=s;F!==null;)o=F,u=o.child,o.tag===22&&o.memoizedState!==null?hc(s):u!==null?(u.return=o,F=u):hc(s);for(;i!==null;)F=i,Yf(i),i=i.sibling;F=s,Bs=l,De=c}fc(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,F=i):fc(e)}}function fc(e){for(;F!==null;){var t=F;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:De||ta(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!De)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:ht(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Yu(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Yu(t,o,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&&is(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(O(163))}De||t.flags&512&&Wo(t)}catch(p){je(t,t.return,p)}}if(t===e){F=null;break}if(n=t.sibling,n!==null){n.return=t.return,F=n;break}F=t.return}}function pc(e){for(;F!==null;){var t=F;if(t===e){F=null;break}var n=t.sibling;if(n!==null){n.return=t.return,F=n;break}F=t.return}}function hc(e){for(;F!==null;){var t=F;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{ta(4,t)}catch(u){je(t,n,u)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(u){je(t,s,u)}}var i=t.return;try{Wo(t)}catch(u){je(t,i,u)}break;case 5:var o=t.return;try{Wo(t)}catch(u){je(t,o,u)}}}catch(u){je(t,t.return,u)}if(t===e){F=null;break}var l=t.sibling;if(l!==null){l.return=t.return,F=l;break}F=t.return}}var kg=Math.ceil,_i=Ut.ReactCurrentDispatcher,Hl=Ut.ReactCurrentOwner,lt=Ut.ReactCurrentBatchConfig,se=0,Ae=null,Se=null,Re=0,Je=0,rr=mn(0),Oe=0,gs=null,_n=0,na=0,ql=0,Jr=null,Ve=null,Ql=0,xr=1/0,zt=null,Li=!1,qo=null,ln=null,Hs=!1,en=null,Fi=0,Zr=0,Qo=null,ai=-1,oi=0;function Be(){return se&6?ke():ai!==-1?ai:ai=ke()}function un(e){return e.mode&1?se&2&&Re!==0?Re&-Re:og.transition!==null?(oi===0&&(oi=Md()),oi):(e=ue,e!==0||(e=window.event,e=e===void 0?16:$d(e.type)),e):1}function xt(e,t,n,r){if(50<Zr)throw Zr=0,Qo=null,Error(O(185));ws(e,n,r),(!(se&2)||e!==Ae)&&(e===Ae&&(!(se&2)&&(na|=n),Oe===4&&Jt(e,Re)),Xe(e,r),n===1&&se===0&&!(t.mode&1)&&(xr=ke()+500,Ji&&gn()))}function Xe(e,t){var n=e.callbackNode;om(e,t);var r=wi(e,e===Ae?Re:0);if(r===0)n!==null&&Nu(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&Nu(n),t===1)e.tag===0?ag(mc.bind(null,e)):af(mc.bind(null,e)),ng(function(){!(se&6)&&gn()}),n=null;else{switch(Rd(r)){case 1:n=vl;break;case 4:n=zd;break;case 16:n=xi;break;case 536870912:n=Ad;break;default:n=xi}n=sp(n,Xf.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Xf(e,t){if(ai=-1,oi=0,se&6)throw Error(O(327));var n=e.callbackNode;if(dr()&&e.callbackNode!==n)return null;var r=wi(e,e===Ae?Re:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=Ii(e,r);else{t=r;var s=se;se|=2;var i=Zf();(Ae!==e||Re!==t)&&(zt=null,xr=ke()+500,Pn(e,t));do try{Eg();break}catch(l){Jf(e,l)}while(1);zl(),_i.current=i,se=s,Se!==null?t=0:(Ae=null,Re=0,t=Oe)}if(t!==0){if(t===2&&(s=xo(e),s!==0&&(r=s,t=Vo(e,s))),t===1)throw n=gs,Pn(e,0),Jt(e,r),Xe(e,ke()),n;if(t===6)Jt(e,r);else{if(s=e.current.alternate,!(r&30)&&!Sg(s)&&(t=Ii(e,r),t===2&&(i=xo(e),i!==0&&(r=i,t=Vo(e,i))),t===1))throw n=gs,Pn(e,0),Jt(e,r),Xe(e,ke()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(O(345));case 2:wn(e,Ve,zt);break;case 3:if(Jt(e,r),(r&130023424)===r&&(t=Ql+500-ke(),10<t)){if(wi(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Be(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Eo(wn.bind(null,e,Ve,zt),t);break}wn(e,Ve,zt);break;case 4:if(Jt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-vt(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*kg(r/1960))-r,10<r){e.timeoutHandle=Eo(wn.bind(null,e,Ve,zt),r);break}wn(e,Ve,zt);break;case 5:wn(e,Ve,zt);break;default:throw Error(O(329))}}}return Xe(e,ke()),e.callbackNode===n?Xf.bind(null,e):null}function Vo(e,t){var n=Jr;return e.current.memoizedState.isDehydrated&&(Pn(e,t).flags|=256),e=Ii(e,t),e!==2&&(t=Ve,Ve=n,t!==null&&Ko(t)),e}function Ko(e){Ve===null?Ve=e:Ve.push.apply(Ve,e)}function Sg(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(!wt(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 Jt(e,t){for(t&=~ql,t&=~na,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-vt(t),r=1<<n;e[n]=-1,t&=~r}}function mc(e){if(se&6)throw Error(O(327));dr();var t=wi(e,0);if(!(t&1))return Xe(e,ke()),null;var n=Ii(e,t);if(e.tag!==0&&n===2){var r=xo(e);r!==0&&(t=r,n=Vo(e,r))}if(n===1)throw n=gs,Pn(e,0),Jt(e,t),Xe(e,ke()),n;if(n===6)throw Error(O(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,wn(e,Ve,zt),Xe(e,ke()),null}function Vl(e,t){var n=se;se|=1;try{return e(t)}finally{se=n,se===0&&(xr=ke()+500,Ji&&gn())}}function Ln(e){en!==null&&en.tag===0&&!(se&6)&&dr();var t=se;se|=1;var n=lt.transition,r=ue;try{if(lt.transition=null,ue=1,e)return e()}finally{ue=r,lt.transition=n,se=t,!(se&6)&&gn()}}function Kl(){Je=rr.current,ge(rr)}function Pn(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,tg(n)),Se!==null)for(n=Se.return;n!==null;){var r=n;switch(Pl(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Si();break;case 3:yr(),ge(Ge),ge($e),Fl();break;case 5:Ll(r);break;case 4:yr();break;case 13:ge(ve);break;case 19:ge(ve);break;case 10:Al(r.type._context);break;case 22:case 23:Kl()}n=n.return}if(Ae=e,Se=e=cn(e.current,null),Re=Je=t,Oe=0,gs=null,ql=na=_n=0,Ve=Jr=null,Nn!==null){for(t=0;t<Nn.length;t++)if(n=Nn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Nn=null}return e}function Jf(e,t){do{var n=Se;try{if(zl(),ri.current=Ri,Mi){for(var r=xe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}Mi=!1}if(Rn=0,ze=Te=xe=null,Yr=!1,ps=0,Hl.current=null,n===null||n.return===null){Oe=1,gs=t,Se=null;break}e:{var i=e,o=n.return,l=n,u=t;if(t=Re,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 v=nc(o);if(v!==null){v.flags&=-257,rc(v,o,l,i,t),v.mode&1&&tc(i,c,t),t=v,u=c;var x=t.updateQueue;if(x===null){var w=new Set;w.add(u),t.updateQueue=w}else x.add(u);break e}else{if(!(t&1)){tc(i,c,t),Gl();break e}u=Error(O(426))}}else if(ye&&l.mode&1){var N=nc(o);if(N!==null){!(N.flags&65536)&&(N.flags|=256),rc(N,o,l,i,t),Tl(vr(u,l));break e}}i=u=vr(u,l),Oe!==4&&(Oe=2),Jr===null?Jr=[i]:Jr.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var m=_f(i,u,t);Gu(i,m);break e;case 1:l=u;var h=i.type,y=i.stateNode;if(!(i.flags&128)&&(typeof h.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(ln===null||!ln.has(y)))){i.flags|=65536,t&=-t,i.lanes|=t;var b=Lf(i,l,t);Gu(i,b);break e}}i=i.return}while(i!==null)}tp(n)}catch(P){t=P,Se===n&&n!==null&&(Se=n=n.return);continue}break}while(1)}function Zf(){var e=_i.current;return _i.current=Ri,e===null?Ri:e}function Gl(){(Oe===0||Oe===3||Oe===2)&&(Oe=4),Ae===null||!(_n&268435455)&&!(na&268435455)||Jt(Ae,Re)}function Ii(e,t){var n=se;se|=2;var r=Zf();(Ae!==e||Re!==t)&&(zt=null,Pn(e,t));do try{Cg();break}catch(s){Jf(e,s)}while(1);if(zl(),se=n,_i.current=r,Se!==null)throw Error(O(261));return Ae=null,Re=0,Oe}function Cg(){for(;Se!==null;)ep(Se)}function Eg(){for(;Se!==null&&!Jh();)ep(Se)}function ep(e){var t=rp(e.alternate,e,Je);e.memoizedProps=e.pendingProps,t===null?tp(e):Se=t,Hl.current=null}function tp(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=wg(n,t),n!==null){n.flags&=32767,Se=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Oe=6,Se=null;return}}else if(n=xg(n,t,Je),n!==null){Se=n;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);Oe===0&&(Oe=5)}function wn(e,t,n){var r=ue,s=lt.transition;try{lt.transition=null,ue=1,Pg(e,t,n,r)}finally{lt.transition=s,ue=r}return null}function Pg(e,t,n,r){do dr();while(en!==null);if(se&6)throw Error(O(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(O(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(lm(e,i),e===Ae&&(Se=Ae=null,Re=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Hs||(Hs=!0,sp(xi,function(){return dr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=lt.transition,lt.transition=null;var o=ue;ue=1;var l=se;se|=4,Hl.current=null,bg(e,n),Gf(n,e),Km(So),ji=!!ko,So=ko=null,e.current=n,Ng(n),Zh(),se=l,ue=o,lt.transition=i}else e.current=n;if(Hs&&(Hs=!1,en=e,Fi=s),i=e.pendingLanes,i===0&&(ln=null),nm(n.stateNode),Xe(e,ke()),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(Li)throw Li=!1,e=qo,qo=null,e;return Fi&1&&e.tag!==0&&dr(),i=e.pendingLanes,i&1?e===Qo?Zr++:(Zr=0,Qo=e):Zr=0,gn(),null}function dr(){if(en!==null){var e=Rd(Fi),t=lt.transition,n=ue;try{if(lt.transition=null,ue=16>e?16:e,en===null)var r=!1;else{if(e=en,en=null,Fi=0,se&6)throw Error(O(331));var s=se;for(se|=4,F=e.current;F!==null;){var i=F,o=i.child;if(F.flags&16){var l=i.deletions;if(l!==null){for(var u=0;u<l.length;u++){var c=l[u];for(F=c;F!==null;){var d=F;switch(d.tag){case 0:case 11:case 15:Xr(8,d,i)}var f=d.child;if(f!==null)f.return=d,F=f;else for(;F!==null;){d=F;var p=d.sibling,v=d.return;if(Qf(d),d===c){F=null;break}if(p!==null){p.return=v,F=p;break}F=v}}}var x=i.alternate;if(x!==null){var w=x.child;if(w!==null){x.child=null;do{var N=w.sibling;w.sibling=null,w=N}while(w!==null)}}F=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,F=o;else e:for(;F!==null;){if(i=F,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Xr(9,i,i.return)}var m=i.sibling;if(m!==null){m.return=i.return,F=m;break e}F=i.return}}var h=e.current;for(F=h;F!==null;){o=F;var y=o.child;if(o.subtreeFlags&2064&&y!==null)y.return=o,F=y;else e:for(o=h;F!==null;){if(l=F,l.flags&2048)try{switch(l.tag){case 0:case 11:case 15:ta(9,l)}}catch(P){je(l,l.return,P)}if(l===o){F=null;break e}var b=l.sibling;if(b!==null){b.return=l.return,F=b;break e}F=l.return}}if(se=s,gn(),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(Vi,e)}catch{}r=!0}return r}finally{ue=n,lt.transition=t}}return!1}function gc(e,t,n){t=vr(n,t),t=_f(e,t,1),e=on(e,t,1),t=Be(),e!==null&&(ws(e,1,t),Xe(e,t))}function je(e,t,n){if(e.tag===3)gc(e,e,n);else for(;t!==null;){if(t.tag===3){gc(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ln===null||!ln.has(r))){e=vr(n,e),e=Lf(t,e,1),t=on(t,e,1),e=Be(),t!==null&&(ws(t,1,e),Xe(t,e));break}}t=t.return}}function Tg(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Be(),e.pingedLanes|=e.suspendedLanes&n,Ae===e&&(Re&n)===n&&(Oe===4||Oe===3&&(Re&130023424)===Re&&500>ke()-Ql?Pn(e,0):ql|=n),Xe(e,t)}function np(e,t){t===0&&(e.mode&1?(t=Rs,Rs<<=1,!(Rs&130023424)&&(Rs=4194304)):t=1);var n=Be();e=Dt(e,t),e!==null&&(ws(e,t,n),Xe(e,n))}function Og(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),np(e,n)}function zg(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(O(314))}r!==null&&r.delete(t),np(e,n)}var rp;rp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ge.current)Ke=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ke=!1,vg(e,t,n);Ke=!!(e.flags&131072)}else Ke=!1,ye&&t.flags&1048576&&of(t,Pi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;ii(e,t),e=t.pendingProps;var s=hr(t,$e.current);cr(t,n),s=Dl(null,t,r,e,s,n);var i=$l();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,Ye(r)?(i=!0,Ci(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Rl(t),s.updater=ea,t.stateNode=s,s._reactInternals=t,Ro(t,r,e,n),t=Fo(null,t,r,!0,i,n)):(t.tag=0,ye&&i&&El(t),Ue(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(ii(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=Mg(r),e=ht(r,e),s){case 0:t=Lo(null,t,r,e,n);break e;case 1:t=ac(null,t,r,e,n);break e;case 11:t=sc(null,t,r,e,n);break e;case 14:t=ic(null,t,r,ht(r.type,e),n);break e}throw Error(O(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ht(r,s),Lo(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ht(r,s),ac(e,t,r,s,n);case 3:e:{if($f(t),e===null)throw Error(O(387));r=t.pendingProps,i=t.memoizedState,s=i.element,pf(e,t),zi(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=vr(Error(O(423)),t),t=oc(e,t,r,n,s);break e}else if(r!==s){s=vr(Error(O(424)),t),t=oc(e,t,r,n,s);break e}else for(Ze=an(t.stateNode.containerInfo.firstChild),et=t,ye=!0,yt=null,n=df(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(mr(),r===s){t=$t(e,t,n);break e}Ue(e,t,r,n)}t=t.child}return t;case 5:return hf(t),e===null&&zo(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Co(r,s)?o=null:i!==null&&Co(r,i)&&(t.flags|=32),Df(e,t),Ue(e,t,o,n),t.child;case 6:return e===null&&zo(t),null;case 13:return Uf(e,t,n);case 4:return _l(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=gr(t,null,r,n):Ue(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ht(r,s),sc(e,t,r,s,n);case 7:return Ue(e,t,t.pendingProps,n),t.child;case 8:return Ue(e,t,t.pendingProps.children,n),t.child;case 12:return Ue(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,pe(Ti,r._currentValue),r._currentValue=o,i!==null)if(wt(i.value,o)){if(i.children===s.children&&!Ge.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){o=i.child;for(var u=l.firstContext;u!==null;){if(u.context===r){if(i.tag===1){u=Lt(-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),Ao(i.return,n,t),l.lanes|=n;break}u=u.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(O(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Ao(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ue(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,cr(t,n),s=ut(s),r=r(s),t.flags|=1,Ue(e,t,r,n),t.child;case 14:return r=t.type,s=ht(r,t.pendingProps),s=ht(r.type,s),ic(e,t,r,s,n);case 15:return Ff(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ht(r,s),ii(e,t),t.tag=1,Ye(r)?(e=!0,Ci(t)):e=!1,cr(t,n),Rf(t,r,s),Ro(t,r,s,n),Fo(null,t,r,!0,e,n);case 19:return Wf(e,t,n);case 22:return If(e,t,n)}throw Error(O(156,t.tag))};function sp(e,t){return Od(e,t)}function Ag(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 ot(e,t,n,r){return new Ag(e,t,n,r)}function Yl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Mg(e){if(typeof e=="function")return Yl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ml)return 11;if(e===gl)return 14}return 2}function cn(e,t){var n=e.alternate;return n===null?(n=ot(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 li(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Yl(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Vn:return Tn(n.children,s,i,t);case hl:o=8,s|=8;break;case ro:return e=ot(12,n,t,s|2),e.elementType=ro,e.lanes=i,e;case so:return e=ot(13,n,t,s),e.elementType=so,e.lanes=i,e;case io:return e=ot(19,n,t,s),e.elementType=io,e.lanes=i,e;case pd:return ra(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case dd:o=10;break e;case fd:o=9;break e;case ml:o=11;break e;case gl:o=14;break e;case Vt:o=16,r=null;break e}throw Error(O(130,e==null?e:typeof e,""))}return t=ot(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Tn(e,t,n,r){return e=ot(7,e,r,t),e.lanes=n,e}function ra(e,t,n,r){return e=ot(22,e,r,t),e.elementType=pd,e.lanes=n,e.stateNode={isHidden:!1},e}function qa(e,t,n){return e=ot(6,e,null,t),e.lanes=n,e}function Qa(e,t,n){return t=ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Rg(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=Ca(0),this.expirationTimes=Ca(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ca(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function Xl(e,t,n,r,s,i,o,l,u){return e=new Rg(e,t,n,l,u),t===1?(t=1,i===!0&&(t|=8)):t=0,i=ot(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Rl(i),e}function _g(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Qn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function ip(e){if(!e)return pn;e=e._reactInternals;e:{if(In(e)!==e||e.tag!==1)throw Error(O(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ye(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(O(171))}if(e.tag===1){var n=e.type;if(Ye(n))return sf(e,n,t)}return t}function ap(e,t,n,r,s,i,o,l,u){return e=Xl(n,r,!0,e,s,i,o,l,u),e.context=ip(null),n=e.current,r=Be(),s=un(n),i=Lt(r,s),i.callback=t??null,on(n,i,s),e.current.lanes=s,ws(e,s,r),Xe(e,r),e}function sa(e,t,n,r){var s=t.current,i=Be(),o=un(s);return n=ip(n),t.context===null?t.context=n:t.pendingContext=n,t=Lt(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=on(s,t,o),e!==null&&(xt(e,s,o,i),ni(e,s,o)),o}function Di(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 yc(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Jl(e,t){yc(e,t),(e=e.alternate)&&yc(e,t)}function Lg(){return null}var op=typeof reportError=="function"?reportError:function(e){console.error(e)};function Zl(e){this._internalRoot=e}ia.prototype.render=Zl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));sa(e,t,null,null)};ia.prototype.unmount=Zl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ln(function(){sa(null,e,null,null)}),t[It]=null}};function ia(e){this._internalRoot=e}ia.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Xt.length&&t!==0&&t<Xt[n].priority;n++);Xt.splice(n,0,e),n===0&&Dd(e)}};function eu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function aa(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function vc(){}function Fg(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=Di(o);i.call(c)}}var o=ap(t,r,e,0,null,!1,!1,"",vc);return e._reactRootContainer=o,e[It]=o.current,ls(e.nodeType===8?e.parentNode:e),Ln(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var l=r;r=function(){var c=Di(u);l.call(c)}}var u=Xl(e,0,!1,null,null,!1,!1,"",vc);return e._reactRootContainer=u,e[It]=u.current,ls(e.nodeType===8?e.parentNode:e),Ln(function(){sa(t,u,n,r)}),u}function oa(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var l=s;s=function(){var u=Di(o);l.call(u)}}sa(t,o,e,s)}else o=Fg(n,t,e,s,r);return Di(o)}_d=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Wr(t.pendingLanes);n!==0&&(xl(t,n|1),Xe(t,ke()),!(se&6)&&(xr=ke()+500,gn()))}break;case 13:Ln(function(){var r=Dt(e,1);if(r!==null){var s=Be();xt(r,e,1,s)}}),Jl(e,1)}};wl=function(e){if(e.tag===13){var t=Dt(e,134217728);if(t!==null){var n=Be();xt(t,e,134217728,n)}Jl(e,134217728)}};Ld=function(e){if(e.tag===13){var t=un(e),n=Dt(e,t);if(n!==null){var r=Be();xt(n,e,t,r)}Jl(e,t)}};Fd=function(){return ue};Id=function(e,t){var n=ue;try{return ue=e,t()}finally{ue=n}};go=function(e,t,n){switch(t){case"input":if(lo(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=Xi(r);if(!s)throw Error(O(90));md(r),lo(r,s)}}}break;case"textarea":yd(e,n);break;case"select":t=n.value,t!=null&&ar(e,!!n.multiple,t,!1)}};kd=Vl;Sd=Ln;var Ig={usingClientEntryPoint:!1,Events:[bs,Xn,Xi,bd,Nd,Vl]},Mr={findFiberByHostInstance:bn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Dg={bundleType:Mr.bundleType,version:Mr.version,rendererPackageName:Mr.rendererPackageName,rendererConfig:Mr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ut.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Pd(e),e===null?null:e.stateNode},findFiberByHostInstance:Mr.findFiberByHostInstance||Lg,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 qs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!qs.isDisabled&&qs.supportsFiber)try{Vi=qs.inject(Dg),Pt=qs}catch{}}nt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ig;nt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!eu(t))throw Error(O(200));return _g(e,t,null,n)};nt.createRoot=function(e,t){if(!eu(e))throw Error(O(299));var n=!1,r="",s=op;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=Xl(e,1,!1,null,null,n,!1,r,s),e[It]=t.current,ls(e.nodeType===8?e.parentNode:e),new Zl(t)};nt.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(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=Pd(t),e=e===null?null:e.stateNode,e};nt.flushSync=function(e){return Ln(e)};nt.hydrate=function(e,t,n){if(!aa(t))throw Error(O(200));return oa(null,e,t,!0,n)};nt.hydrateRoot=function(e,t,n){if(!eu(e))throw Error(O(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=op;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=ap(t,null,e,1,n??null,s,!1,i,o),e[It]=t.current,ls(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 ia(t)};nt.render=function(e,t,n){if(!aa(t))throw Error(O(200));return oa(null,e,t,!1,n)};nt.unmountComponentAtNode=function(e){if(!aa(e))throw Error(O(40));return e._reactRootContainer?(Ln(function(){oa(null,null,e,!1,function(){e._reactRootContainer=null,e[It]=null})}),!0):!1};nt.unstable_batchedUpdates=Vl;nt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!aa(n))throw Error(O(200));if(e==null||e._reactInternals===void 0)throw Error(O(38));return oa(e,t,n,!1,r)};nt.version="18.3.1-next-f1338f8080-20240426";function lp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(lp)}catch(e){console.error(e)}}lp(),od.exports=nt;var up=od.exports;const $g=wr(up);var xc=up;to.createRoot=xc.createRoot,to.hydrateRoot=xc.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 ys(){return ys=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},ys.apply(this,arguments)}var tn;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(tn||(tn={}));const wc="popstate";function Ug(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:l}=r.location;return Go("",{pathname:i,search:o,hash:l},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:$i(s)}return Bg(t,n,null,e)}function Ce(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function cp(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Wg(){return Math.random().toString(36).substr(2,8)}function jc(e,t){return{usr:e.state,key:e.key,idx:t}}function Go(e,t,n,r){return n===void 0&&(n=null),ys({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?kr(t):t,{state:n,key:t&&t.key||r||Wg()})}function $i(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 kr(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 Bg(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,l=tn.Pop,u=null,c=d();c==null&&(c=0,o.replaceState(ys({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){l=tn.Pop;let N=d(),m=N==null?null:N-c;c=N,u&&u({action:l,location:w.location,delta:m})}function p(N,m){l=tn.Push;let h=Go(w.location,N,m);n&&n(h,N),c=d()+1;let y=jc(h,c),b=w.createHref(h);try{o.pushState(y,"",b)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;s.location.assign(b)}i&&u&&u({action:l,location:w.location,delta:1})}function v(N,m){l=tn.Replace;let h=Go(w.location,N,m);n&&n(h,N),c=d();let y=jc(h,c),b=w.createHref(h);o.replaceState(y,"",b),i&&u&&u({action:l,location:w.location,delta:0})}function x(N){let m=s.location.origin!=="null"?s.location.origin:s.location.href,h=typeof N=="string"?N:$i(N);return h=h.replace(/ $/,"%20"),Ce(m,"No window.location.(origin|href) available to create URL for href: "+h),new URL(h,m)}let w={get action(){return l},get location(){return e(s,o)},listen(N){if(u)throw new Error("A history only accepts one active listener");return s.addEventListener(wc,f),u=N,()=>{s.removeEventListener(wc,f),u=null}},createHref(N){return t(s,N)},createURL:x,encodeLocation(N){let m=x(N);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:p,replace:v,go(N){return o.go(N)}};return w}var bc;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(bc||(bc={}));function Hg(e,t,n){return n===void 0&&(n="/"),qg(e,t,n,!1)}function qg(e,t,n,r){let s=typeof t=="string"?kr(t):t,i=tu(s.pathname||"/",n);if(i==null)return null;let o=dp(e);Qg(o);let l=null;for(let u=0;l==null&&u<o.length;++u){let c=r0(i);l=t0(o[u],c,r)}return l}function dp(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,l)=>{let u={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};u.relativePath.startsWith("/")&&(Ce(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=dn([r,u.relativePath]),d=n.concat(u);i.children&&i.children.length>0&&(Ce(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),dp(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:Zg(c,i.index),routesMeta:d})};return e.forEach((i,o)=>{var l;if(i.path===""||!((l=i.path)!=null&&l.includes("?")))s(i,o);else for(let u of fp(i.path))s(i,o,u)}),t}function fp(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=fp(r.join("/")),l=[];return l.push(...o.map(u=>u===""?i:[i,u].join("/"))),s&&l.push(...o),l.map(u=>e.startsWith("/")&&u===""?"/":u)}function Qg(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:e0(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Vg=/^:[\w-]+$/,Kg=3,Gg=2,Yg=1,Xg=10,Jg=-2,Nc=e=>e==="*";function Zg(e,t){let n=e.split("/"),r=n.length;return n.some(Nc)&&(r+=Jg),t&&(r+=Gg),n.filter(s=>!Nc(s)).reduce((s,i)=>s+(Vg.test(i)?Kg:i===""?Yg:Xg),r)}function e0(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 t0(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},i="/",o=[];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=kc({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),p=u.route;if(!f&&c&&n&&!r[r.length-1].route.index&&(f=kc({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},d)),!f)return null;Object.assign(s,f.params),o.push({params:s,pathname:dn([i,f.pathname]),pathnameBase:o0(dn([i,f.pathnameBase])),route:p}),f.pathnameBase!=="/"&&(i=dn([i,f.pathnameBase]))}return o}function kc(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=n0(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),l=s.slice(1);return{params:r.reduce((c,d,f)=>{let{paramName:p,isOptional:v}=d;if(p==="*"){let w=l[f]||"";o=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const x=l[f];return v&&!x?c[p]=void 0:c[p]=(x||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function n0(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),cp(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,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 r0(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return cp(!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 tu(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 s0(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?kr(e):e;return{pathname:n?n.startsWith("/")?n:i0(n,t):t,search:l0(r),hash:u0(s)}}function i0(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 Va(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 a0(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function pp(e,t){let n=a0(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function hp(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=kr(e):(s=ys({},e),Ce(!s.pathname||!s.pathname.includes("?"),Va("?","pathname","search",s)),Ce(!s.pathname||!s.pathname.includes("#"),Va("#","pathname","hash",s)),Ce(!s.search||!s.search.includes("#"),Va("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,l;if(o==null)l=n;else{let f=t.length-1;if(!r&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),f-=1;s.pathname=p.join("/")}l=f>=0?t[f]:"/"}let u=s0(s,l),c=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}const dn=e=>e.join("/").replace(/\/\/+/g,"/"),o0=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),l0=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,u0=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function c0(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const mp=["post","put","patch","delete"];new Set(mp);const d0=["get",...mp];new Set(d0);/**
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 vs(){return vs=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},vs.apply(this,arguments)}const nu=k.createContext(null),f0=k.createContext(null),Dn=k.createContext(null),la=k.createContext(null),$n=k.createContext({outlet:null,matches:[],isDataRoute:!1}),gp=k.createContext(null);function p0(e,t){let{relative:n}=t===void 0?{}:t;ks()||Ce(!1);let{basename:r,navigator:s}=k.useContext(Dn),{hash:i,pathname:o,search:l}=vp(e,{relative:n}),u=o;return r!=="/"&&(u=o==="/"?r:dn([r,o])),s.createHref({pathname:u,search:l,hash:i})}function ks(){return k.useContext(la)!=null}function Ss(){return ks()||Ce(!1),k.useContext(la).location}function yp(e){k.useContext(Dn).static||k.useLayoutEffect(e)}function h0(){let{isDataRoute:e}=k.useContext($n);return e?E0():m0()}function m0(){ks()||Ce(!1);let e=k.useContext(nu),{basename:t,future:n,navigator:r}=k.useContext(Dn),{matches:s}=k.useContext($n),{pathname:i}=Ss(),o=JSON.stringify(pp(s,n.v7_relativeSplatPath)),l=k.useRef(!1);return yp(()=>{l.current=!0}),k.useCallback(function(c,d){if(d===void 0&&(d={}),!l.current)return;if(typeof c=="number"){r.go(c);return}let f=hp(c,JSON.parse(o),i,d.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:dn([t,f.pathname])),(d.replace?r.replace:r.push)(f,d.state,d)},[t,r,o,i,e])}function vp(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=k.useContext(Dn),{matches:s}=k.useContext($n),{pathname:i}=Ss(),o=JSON.stringify(pp(s,r.v7_relativeSplatPath));return k.useMemo(()=>hp(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function g0(e,t){return y0(e,t)}function y0(e,t,n,r){ks()||Ce(!1);let{navigator:s}=k.useContext(Dn),{matches:i}=k.useContext($n),o=i[i.length-1],l=o?o.params:{};o&&o.pathname;let u=o?o.pathnameBase:"/";o&&o.route;let c=Ss(),d;if(t){var f;let N=typeof t=="string"?kr(t):t;u==="/"||(f=N.pathname)!=null&&f.startsWith(u)||Ce(!1),d=N}else d=c;let p=d.pathname||"/",v=p;if(u!=="/"){let N=u.replace(/^\//,"").split("/");v="/"+p.replace(/^\//,"").split("/").slice(N.length).join("/")}let x=Hg(e,{pathname:v}),w=b0(x&&x.map(N=>Object.assign({},N,{params:Object.assign({},l,N.params),pathname:dn([u,s.encodeLocation?s.encodeLocation(N.pathname).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?u:dn([u,s.encodeLocation?s.encodeLocation(N.pathnameBase).pathname:N.pathnameBase])})),i,n,r);return t&&w?k.createElement(la.Provider,{value:{location:vs({pathname:"/",search:"",hash:"",state:null,key:"default"},d),navigationType:tn.Pop}},w):w}function v0(){let e=C0(),t=c0(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 k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},t),n?k.createElement("pre",{style:s},n):null,i)}const x0=k.createElement(v0,null);class w0 extends k.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?k.createElement($n.Provider,{value:this.props.routeContext},k.createElement(gp.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function j0(e){let{routeContext:t,match:n,children:r}=e,s=k.useContext(nu);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),k.createElement($n.Provider,{value:t},r)}function b0(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,l=(s=n)==null?void 0:s.errors;if(l!=null){let d=o.findIndex(f=>f.route.id&&(l==null?void 0:l[f.route.id])!==void 0);d>=0||Ce(!1),o=o.slice(0,Math.min(o.length,d+1))}let u=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let d=0;d<o.length;d++){let f=o[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(c=d),f.route.id){let{loaderData:p,errors:v}=n,x=f.route.loader&&p[f.route.id]===void 0&&(!v||v[f.route.id]===void 0);if(f.route.lazy||x){u=!0,c>=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((d,f,p)=>{let v,x=!1,w=null,N=null;n&&(v=l&&f.route.id?l[f.route.id]:void 0,w=f.route.errorElement||x0,u&&(c<0&&p===0?(P0("route-fallback",!1),x=!0,N=null):c===p&&(x=!0,N=f.route.hydrateFallbackElement||null)));let m=t.concat(o.slice(0,p+1)),h=()=>{let y;return v?y=w:x?y=N:f.route.Component?y=k.createElement(f.route.Component,null):f.route.element?y=f.route.element:y=d,k.createElement(j0,{match:f,routeContext:{outlet:d,matches:m,isDataRoute:n!=null},children:y})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?k.createElement(w0,{location:n.location,revalidation:n.revalidation,component:w,error:v,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0}}):h()},null)}var xp=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(xp||{}),Ui=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}(Ui||{});function N0(e){let t=k.useContext(nu);return t||Ce(!1),t}function k0(e){let t=k.useContext(f0);return t||Ce(!1),t}function S0(e){let t=k.useContext($n);return t||Ce(!1),t}function wp(e){let t=S0(),n=t.matches[t.matches.length-1];return n.route.id||Ce(!1),n.route.id}function C0(){var e;let t=k.useContext(gp),n=k0(Ui.UseRouteError),r=wp(Ui.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function E0(){let{router:e}=N0(xp.UseNavigateStable),t=wp(Ui.UseNavigateStable),n=k.useRef(!1);return yp(()=>{n.current=!0}),k.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,vs({fromRouteId:t},i)))},[e,t])}const Sc={};function P0(e,t,n){!t&&!Sc[e]&&(Sc[e]=!0)}function T0(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 ui(e){Ce(!1)}function O0(e){let{basename:t="/",children:n=null,location:r,navigationType:s=tn.Pop,navigator:i,static:o=!1,future:l}=e;ks()&&Ce(!1);let u=t.replace(/^\/*/,"/"),c=k.useMemo(()=>({basename:u,navigator:i,static:o,future:vs({v7_relativeSplatPath:!1},l)}),[u,l,i,o]);typeof r=="string"&&(r=kr(r));let{pathname:d="/",search:f="",hash:p="",state:v=null,key:x="default"}=r,w=k.useMemo(()=>{let N=tu(d,u);return N==null?null:{location:{pathname:N,search:f,hash:p,state:v,key:x},navigationType:s}},[u,d,f,p,v,x,s]);return w==null?null:k.createElement(Dn.Provider,{value:c},k.createElement(la.Provider,{children:n,value:w}))}function z0(e){let{children:t,location:n}=e;return g0(Yo(t),n)}new Promise(()=>{});function Yo(e,t){t===void 0&&(t=[]);let n=[];return k.Children.forEach(e,(r,s)=>{if(!k.isValidElement(r))return;let i=[...t,s];if(r.type===k.Fragment){n.push.apply(n,Yo(r.props.children,i));return}r.type!==ui&&Ce(!1),!r.props.index||!r.props.children||Ce(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Yo(r.props.children,i)),n.push(o)}),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 Xo(){return Xo=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},Xo.apply(this,arguments)}function A0(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 M0(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function R0(e,t){return e.button===0&&(!t||t==="_self")&&!M0(e)}const _0=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],L0="6";try{window.__reactRouterVersion=L0}catch{}const F0="startTransition",Cc=Th[F0];function I0(e){let{basename:t,children:n,future:r,window:s}=e,i=k.useRef();i.current==null&&(i.current=Ug({window:s,v5Compat:!0}));let o=i.current,[l,u]=k.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},d=k.useCallback(f=>{c&&Cc?Cc(()=>u(f)):u(f)},[u,c]);return k.useLayoutEffect(()=>o.listen(d),[o,d]),k.useEffect(()=>T0(r),[r]),k.createElement(O0,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,future:r})}const D0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,jp=k.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:l,target:u,to:c,preventScrollReset:d,viewTransition:f}=t,p=A0(t,_0),{basename:v}=k.useContext(Dn),x,w=!1;if(typeof c=="string"&&$0.test(c)&&(x=c,D0))try{let y=new URL(window.location.href),b=c.startsWith("//")?new URL(y.protocol+c):new URL(c),P=tu(b.pathname,v);b.origin===y.origin&&P!=null?c=P+b.search+b.hash:w=!0}catch{}let N=p0(c,{relative:s}),m=U0(c,{replace:o,state:l,target:u,preventScrollReset:d,relative:s,viewTransition:f});function h(y){r&&r(y),y.defaultPrevented||m(y)}return k.createElement("a",Xo({},p,{href:x||N,onClick:w||i?r:h,ref:n,target:u}))});var Ec;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Ec||(Ec={}));var Pc;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Pc||(Pc={}));function U0(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:l}=t===void 0?{}:t,u=h0(),c=Ss(),d=vp(e,{relative:o});return k.useCallback(f=>{if(R0(f,n)){f.preventDefault();let p=r!==void 0?r:$i(c)===$i(d);u(e,{replace:p,state:s,preventScrollReset:i,relative:o,viewTransition:l})}},[c,u,d,r,s,n,e,i,o,l])}class ua{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 ru=typeof window>"u"||"Deno"in window;function mt(){}function W0(e,t){return typeof e=="function"?e(t):e}function B0(e){return typeof e=="number"&&e>=0&&e!==1/0}function H0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Qs(e,t,n){return ca(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function Gt(e,t,n){return ca(e)?[{...t,queryKey:e},n]:[e||{},t]}function Tc(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:l}=e;if(ca(o)){if(r){if(t.queryHash!==su(o,t.options))return!1}else if(!Wi(t.queryKey,o))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 Oc(e,t){const{exact:n,fetching:r,predicate:s,mutationKey:i}=e;if(ca(i)){if(!t.options.mutationKey)return!1;if(n){if(Sn(t.options.mutationKey)!==Sn(i))return!1}else if(!Wi(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||s&&!s(t))}function su(e,t){return((t==null?void 0:t.queryKeyHashFn)||Sn)(e)}function Sn(e){return JSON.stringify(e,(t,n)=>Jo(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Wi(e,t){return bp(e,t)}function bp(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!bp(e[n],t[n])):!1}function Np(e,t){if(e===t)return e;const n=zc(e)&&zc(t);if(n||Jo(e)&&Jo(t)){const r=n?e.length:Object.keys(e).length,s=n?t:Object.keys(t),i=s.length,o=n?[]:{};let l=0;for(let u=0;u<i;u++){const c=n?u:s[u];o[c]=Np(e[c],t[c]),o[c]===e[c]&&l++}return r===i&&l===r?e:o}return t}function zc(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Jo(e){if(!Ac(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!Ac(n)||!n.hasOwnProperty("isPrototypeOf"))}function Ac(e){return Object.prototype.toString.call(e)==="[object Object]"}function ca(e){return Array.isArray(e)}function kp(e){return new Promise(t=>{setTimeout(t,e)})}function Mc(e){kp(0).then(e)}function q0(){if(typeof AbortController=="function")return new AbortController}function Q0(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 V0 extends ua{constructor(){super(),this.setup=t=>{if(!ru&&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 Zo=new V0,Rc=["online","offline"];class K0 extends ua{constructor(){super(),this.setup=t=>{if(!ru&&window.addEventListener){const n=()=>t();return Rc.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{Rc.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 Bi=new K0;function G0(e){return Math.min(1e3*2**e,3e4)}function iu(e){return(e??"online")==="online"?Bi.isOnline():!0}class Sp{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Ka(e){return e instanceof Sp}function Cp(e){let t=!1,n=0,r=!1,s,i,o;const l=new Promise((N,m)=>{i=N,o=m}),u=N=>{r||(v(new Sp(N)),e.abort==null||e.abort())},c=()=>{t=!0},d=()=>{t=!1},f=()=>!Zo.isFocused()||e.networkMode!=="always"&&!Bi.isOnline(),p=N=>{r||(r=!0,e.onSuccess==null||e.onSuccess(N),s==null||s(),i(N))},v=N=>{r||(r=!0,e.onError==null||e.onError(N),s==null||s(),o(N))},x=()=>new Promise(N=>{s=m=>{const h=r||!f();return h&&N(m),h},e.onPause==null||e.onPause()}).then(()=>{s=void 0,r||e.onContinue==null||e.onContinue()}),w=()=>{if(r)return;let N;try{N=e.fn()}catch(m){N=Promise.reject(m)}Promise.resolve(N).then(p).catch(m=>{var h,y;if(r)return;const b=(h=e.retry)!=null?h:3,P=(y=e.retryDelay)!=null?y:G0,T=typeof P=="function"?P(n,m):P,C=b===!0||typeof b=="number"&&n<b||typeof b=="function"&&b(n,m);if(t||!C){v(m);return}n++,e.onFail==null||e.onFail(n,m),kp(T).then(()=>{if(f())return x()}).then(()=>{t?v(m):w()})})};return iu(e.networkMode)?w():x().then(w),{promise:l,cancel:u,continue:()=>(s==null?void 0:s())?l:Promise.resolve(),cancelRetry:c,continueRetry:d}}const au=console;function Y0(){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):Mc(()=>{n(d)})},o=d=>(...f)=>{i(()=>{d(...f)})},l=()=>{const d=e;e=[],d.length&&Mc(()=>{r(()=>{d.forEach(f=>{n(f)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{r=d}}}const We=Y0();class Ep{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),B0(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(ru?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class X0 extends Ep{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||au,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||J0(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=Q0(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(mt).catch(mt):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||!H0(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 v=this.observers.find(x=>x.options.queryFn);v&&this.setOptions(v.options)}const o=q0(),l={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},u=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.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=v=>{if(Ka(v)&&v.silent||this.dispatch({type:"error",error:v}),!Ka(v)){var x,w,N,m;(x=(w=this.cache.config).onError)==null||x.call(w,v,this),(N=(m=this.cache.config).onSettled)==null||N.call(m,this.state.data,v,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=Cp({fn:d.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:v=>{var x,w,N,m;if(typeof v>"u"){p(new Error(this.queryHash+" data is undefined"));return}this.setData(v),(x=(w=this.cache.config).onSuccess)==null||x.call(w,v,this),(N=(m=this.cache.config).onSettled)==null||N.call(m,v,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:p,onFail:(v,x)=>{this.dispatch({type:"failed",failureCount:v,error:x})},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:iu(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 o=t.error;return Ka(o)&&o.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),We.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function J0(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 Z0 extends ua{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var s;const i=n.queryKey,o=(s=n.queryHash)!=null?s:su(i,n);let l=this.get(o);return l||(l=new X0({cache:this,logger:t.getLogger(),queryKey:i,queryHash:o,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(){We.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Gt(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(s=>Tc(r,s))}findAll(t,n){const[r]=Gt(t,n);return Object.keys(r).length>0?this.queries.filter(s=>Tc(r,s)):this.queries}notify(t){We.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){We.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){We.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class ey extends Ep{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||au,this.observers=[],this.state=t.state||ty(),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 C;return this.retryer=Cp({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(j,R)=>{this.dispatch({type:"failed",failureCount:j,error:R})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,s,i,o,l,u,c,d;if(!n){var f,p,v,x;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((v=(x=this.options).onMutate)==null?void 0:v.call(x,this.state.variables));j!==this.state.context&&this.dispatch({type:"loading",context:j,variables:this.state.variables})}const C=await t();return await((r=(s=this.mutationCache.config).onSuccess)==null?void 0:r.call(s,C,this.state.variables,this.state.context,this)),await((i=(o=this.options).onSuccess)==null?void 0:i.call(o,C,this.state.variables,this.state.context)),await((l=(u=this.mutationCache.config).onSettled)==null?void 0:l.call(u,C,null,this.state.variables,this.state.context,this)),await((c=(d=this.options).onSettled)==null?void 0:c.call(d,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var w,N,m,h,y,b,P,T;throw await((w=(N=this.mutationCache.config).onError)==null?void 0:w.call(N,C,this.state.variables,this.state.context,this)),await((m=(h=this.options).onError)==null?void 0:m.call(h,C,this.state.variables,this.state.context)),await((y=(b=this.mutationCache.config).onSettled)==null?void 0:y.call(b,void 0,C,this.state.variables,this.state.context,this)),await((P=(T=this.options).onSettled)==null?void 0:P.call(T,void 0,C,this.state.variables,this.state.context)),C}finally{this.dispatch({type:"error",error:C})}}}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:!iu(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),We.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function ty(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ny extends ua{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const s=new ey({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(){We.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=>Oc(t,n))}findAll(t){return this.mutations.filter(n=>Oc(t,n))}notify(t){We.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 We.batch(()=>n.reduce((r,s)=>r.then(()=>s.continue().catch(mt)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function ry(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,s,i,o;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)||[],v=((o=e.state.data)==null?void 0:o.pageParams)||[];let x=v,w=!1;const N=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>{var C;if((C=e.signal)!=null&&C.aborted)w=!0;else{var j;(j=e.signal)==null||j.addEventListener("abort",()=>{w=!0})}return e.signal}})},m=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),h=(T,C,j,R)=>(x=R?[C,...x]:[...x,C],R?[j,...T]:[...T,j]),y=(T,C,j,R)=>{if(w)return Promise.reject("Cancelled");if(typeof j>"u"&&!C&&T.length)return Promise.resolve(T);const M={queryKey:e.queryKey,pageParam:j,meta:e.options.meta};N(M);const K=m(M);return Promise.resolve(K).then(re=>h(T,j,re,R))};let b;if(!p.length)b=y([]);else if(d){const T=typeof c<"u",C=T?c:_c(e.options,p);b=y(p,T,C)}else if(f){const T=typeof c<"u",C=T?c:sy(e.options,p);b=y(p,T,C,!0)}else{x=[];const T=typeof e.options.getNextPageParam>"u";b=(l&&p[0]?l(p[0],0,p):!0)?y([],T,v[0]):Promise.resolve(h([],v[0],p[0]));for(let j=1;j<p.length;j++)b=b.then(R=>{if(l&&p[j]?l(p[j],j,p):!0){const K=T?v[j]:_c(e.options,R);return y(R,T,K)}return Promise.resolve(h(R,v[j],p[j]))})}return b.then(T=>({pages:T,pageParams:x}))}}}}function _c(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function sy(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class iy{constructor(t={}){this.queryCache=t.queryCache||new Z0,this.mutationCache=t.mutationCache||new ny,this.logger=t.logger||au,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Zo.subscribe(()=>{Zo.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Bi.subscribe(()=>{Bi.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]=Gt(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=Qs(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,o=W0(n,i);if(typeof o>"u")return;const l=Qs(t),u=this.defaultQueryOptions(l);return this.queryCache.build(this,u).setData(o,{...r,manual:!0})}setQueriesData(t,n,r){return We.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]=Gt(t,n),s=this.queryCache;We.batch(()=>{s.findAll(r).forEach(i=>{s.remove(i)})})}resetQueries(t,n,r){const[s,i]=Gt(t,n,r),o=this.queryCache,l={type:"active",...s};return We.batch(()=>(o.findAll(s).forEach(u=>{u.reset()}),this.refetchQueries(l,i)))}cancelQueries(t,n,r){const[s,i={}]=Gt(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const o=We.batch(()=>this.queryCache.findAll(s).map(l=>l.cancel(i)));return Promise.all(o).then(mt).catch(mt)}invalidateQueries(t,n,r){const[s,i]=Gt(t,n,r);return We.batch(()=>{var o,l;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const u={...s,type:(o=(l=s.refetchType)!=null?l:s.type)!=null?o:"active"};return this.refetchQueries(u,i)})}refetchQueries(t,n,r){const[s,i]=Gt(t,n,r),o=We.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(o).then(mt);return i!=null&&i.throwOnError||(l=l.catch(mt)),l}fetchQuery(t,n,r){const s=Qs(t,n,r),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(mt).catch(mt)}fetchInfiniteQuery(t,n,r){const s=Qs(t,n,r);return s.behavior=ry(),this.fetchQuery(s)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(mt).catch(mt)}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=>Sn(t)===Sn(s.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Wi(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(s=>Sn(t)===Sn(s.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Wi(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=su(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 Lc=k.createContext(void 0),ay=k.createContext(!1);function oy(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Lc),window.ReactQueryClientContext):Lc)}const ly=({client:e,children:t,context:n,contextSharing:r=!1})=>{k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const s=oy(n,r);return k.createElement(ay.Provider,{value:!n&&r},k.createElement(s.Provider,{value:e},t))};var Pp={exports:{}},uy="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",cy=uy,dy=cy;function Tp(){}function Op(){}Op.resetWarningCache=Tp;var fy=function(){function e(r,s,i,o,l,u){if(u!==dy){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:Op,resetWarningCache:Tp};return n.PropTypes=n,n};Pp.exports=fy();var py=Pp.exports;const te=wr(py);var hy=typeof Element<"u",my=typeof Map=="function",gy=typeof Set=="function",yy=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ci(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(!ci(e[r],t[r]))return!1;return!0}var i;if(my&&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(!ci(r.value[1],t.get(r.value[0])))return!1;return!0}if(gy&&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(yy&&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(hy&&e instanceof Element)return!1;for(r=n;r--!==0;)if(!((s[r]==="_owner"||s[r]==="__v"||s[r]==="__o")&&e.$$typeof)&&!ci(e[s[r]],t[s[r]]))return!1;return!0}return e!==e&&t!==t}var vy=function(t,n){try{return ci(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 xy=wr(vy);var wy=function(e,t,n,r,s,i,o,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,o,l],d=0;u=new Error(t.replace(/%s/g,function(){return c[d++]})),u.name="Invariant Violation"}throw u.framesToPop=1,u}},jy=wy;const Fc=wr(jy);var by=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 o=Object.keys(t),l=Object.keys(n);if(o.length!==l.length)return!1;for(var u=Object.prototype.hasOwnProperty.bind(n),c=0;c<o.length;c++){var d=o[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 Ny=wr(by);function Ne(){return Ne=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},Ne.apply(this,arguments)}function ou(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,el(e,t)}function el(e,t){return el=Object.setPrototypeOf||function(n,r){return n.__proto__=r,n},el(e,t)}function Ic(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 B={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title",FRAGMENT:"Symbol(react.fragment)"},ky={rel:["amphtml","canonical","alternate"]},Sy={type:["application/ld+json"]},Cy={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"]},Dc=Object.keys(B).map(function(e){return B[e]}),Hi={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Ey=Object.keys(Hi).reduce(function(e,t){return e[Hi[t]]=t,e},{}),fr=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},Py=function(e){var t=fr(e,B.TITLE),n=fr(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,function(){return t});var r=fr(e,"defaultTitle");return t||r||void 0},Ty=function(e){return fr(e,"onChangeClientState")||function(){}},Ga=function(e,t){return t.filter(function(n){return n[e]!==void 0}).map(function(n){return n[e]}).reduce(function(n,r){return Ne({},n,r)},{})},Oy=function(e,t){return t.filter(function(n){return n[B.BASE]!==void 0}).map(function(n){return n[B.BASE]}).reverse().reduce(function(n,r){if(!n.length)for(var s=Object.keys(r),i=0;i<s.length;i+=1){var o=s[i].toLowerCase();if(e.indexOf(o)!==-1&&r[o])return n.concat(r)}return n},[])},Rr=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 o={};i.filter(function(f){for(var p,v=Object.keys(f),x=0;x<v.length;x+=1){var w=v[x],N=w.toLowerCase();t.indexOf(N)===-1||p==="rel"&&f[p].toLowerCase()==="canonical"||N==="rel"&&f[N].toLowerCase()==="stylesheet"||(p=N),t.indexOf(w)===-1||w!=="innerHTML"&&w!=="cssText"&&w!=="itemprop"||(p=w)}if(!p||!f[p])return!1;var m=f[p].toLowerCase();return r[p]||(r[p]={}),o[p]||(o[p]={}),!r[p][m]&&(o[p][m]=!0,!0)}).reverse().forEach(function(f){return s.push(f)});for(var l=Object.keys(o),u=0;u<l.length;u+=1){var c=l[u],d=Ne({},r[c],o[c]);r[c]=d}return s},[]).reverse()},zy=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},zp=function(e){return Array.isArray(e)?e.join(""):e},Ya=function(e,t){return Array.isArray(e)?e.reduce(function(n,r){return function(s,i){for(var o=Object.keys(s),l=0;l<o.length;l+=1)if(i[o[l]]&&i[o[l]].includes(s[o[l]]))return!0;return!1}(r,t)?n.priority.push(r):n.default.push(r),n},{priority:[],default:[]}):{default:e}},$c=function(e,t){var n;return Ne({},e,((n={})[t]=void 0,n))},Ay=[B.NOSCRIPT,B.SCRIPT,B.STYLE],Xa=function(e,t){return t===void 0&&(t=!0),t===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},Uc=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[Hi[r]||r]=e[r],n},t)},di=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(o){var l=Hi[o]||o;l==="innerHTML"||l==="cssText"?i.dangerouslySetInnerHTML={__html:n.innerHTML||n.cssText}:i[l]=n[o]}),L.createElement(e,i)})},st=function(e,t,n){switch(e){case B.TITLE:return{toComponent:function(){return s=t.titleAttributes,(i={key:r=t.title})["data-rh"]=!0,o=Wc(s,i),[L.createElement(B.TITLE,o,r)];var r,s,i,o},toString:function(){return function(r,s,i,o){var l=Uc(i),u=zp(s);return l?"<"+r+' data-rh="true" '+l+">"+Xa(u,o)+"</"+r+">":"<"+r+' data-rh="true">'+Xa(u,o)+"</"+r+">"}(e,t.title,t.titleAttributes,n)}};case"bodyAttributes":case"htmlAttributes":return{toComponent:function(){return Wc(t)},toString:function(){return Uc(t)}};default:return{toComponent:function(){return di(e,t)},toString:function(){return function(r,s,i){return s.reduce(function(o,l){var u=Object.keys(l).filter(function(f){return!(f==="innerHTML"||f==="cssText")}).reduce(function(f,p){var v=l[p]===void 0?p:p+'="'+Xa(l[p],i)+'"';return f?f+" "+v:v},""),c=l.innerHTML||l.cssText||"",d=Ay.indexOf(r)===-1;return o+"<"+r+' data-rh="true" '+u+(d?"/>":">"+c+"</"+r+">")},"")}(e,t,n)}}}},tl=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,s=e.htmlAttributes,i=e.noscriptTags,o=e.styleTags,l=e.title,u=l===void 0?"":l,c=e.titleAttributes,d=e.linkTags,f=e.metaTags,p=e.scriptTags,v={toComponent:function(){},toString:function(){return""}};if(e.prioritizeSeoTags){var x=function(w){var N=w.linkTags,m=w.scriptTags,h=w.encode,y=Ya(w.metaTags,Cy),b=Ya(N,ky),P=Ya(m,Sy);return{priorityMethods:{toComponent:function(){return[].concat(di(B.META,y.priority),di(B.LINK,b.priority),di(B.SCRIPT,P.priority))},toString:function(){return st(B.META,y.priority,h)+" "+st(B.LINK,b.priority,h)+" "+st(B.SCRIPT,P.priority,h)}},metaTags:y.default,linkTags:b.default,scriptTags:P.default}}(e);v=x.priorityMethods,d=x.linkTags,f=x.metaTags,p=x.scriptTags}return{priority:v,base:st(B.BASE,t,r),bodyAttributes:st("bodyAttributes",n,r),htmlAttributes:st("htmlAttributes",s,r),link:st(B.LINK,d,r),meta:st(B.META,f,r),noscript:st(B.NOSCRIPT,i,r),script:st(B.SCRIPT,p,r),style:st(B.STYLE,o,r),title:st(B.TITLE,{title:u,titleAttributes:c},r)}},Vs=[],nl=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?Vs:n.instances},add:function(r){(n.canUseDOM?Vs:n.instances).push(r)},remove:function(r){var s=(n.canUseDOM?Vs:n.instances).indexOf(r);(n.canUseDOM?Vs:n.instances).splice(s,1)}}},this.context=e,this.canUseDOM=t,t||(e.helmet=tl({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))},Ap=L.createContext({}),My=te.shape({setHelmet:te.func,helmetInstances:te.shape({get:te.func,add:te.func,remove:te.func})}),Ry=typeof document<"u",sr=function(e){function t(n){var r;return(r=e.call(this,n)||this).helmetData=new nl(r.props.context,t.canUseDOM),r}return ou(t,e),t.prototype.render=function(){return L.createElement(Ap.Provider,{value:this.helmetData.value},this.props.children)},t}(k.Component);sr.canUseDOM=Ry,sr.propTypes={context:te.shape({helmet:te.shape()}),children:te.node.isRequired},sr.defaultProps={context:{}},sr.displayName="HelmetProvider";var qn=function(e,t){var n,r=document.head||document.querySelector(B.HEAD),s=r.querySelectorAll(e+"[data-rh]"),i=[].slice.call(s),o=[];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):o.push(u)}),i.forEach(function(l){return l.parentNode.removeChild(l)}),o.forEach(function(l){return r.appendChild(l)}),{oldTags:i,newTags:o}},Ja=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),o=Object.keys(t),l=0;l<o.length;l+=1){var u=o[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")!==o.join(",")&&n.setAttribute("data-rh",o.join(","))}},Bc=function(e,t){var n=e.baseTag,r=e.htmlAttributes,s=e.linkTags,i=e.metaTags,o=e.noscriptTags,l=e.onChangeClientState,u=e.scriptTags,c=e.styleTags,d=e.title,f=e.titleAttributes;Ja(B.BODY,e.bodyAttributes),Ja(B.HTML,r),function(w,N){w!==void 0&&document.title!==w&&(document.title=zp(w)),Ja(B.TITLE,N)}(d,f);var p={baseTag:qn(B.BASE,n),linkTags:qn(B.LINK,s),metaTags:qn(B.META,i),noscriptTags:qn(B.NOSCRIPT,o),scriptTags:qn(B.SCRIPT,u),styleTags:qn(B.STYLE,c)},v={},x={};Object.keys(p).forEach(function(w){var N=p[w],m=N.newTags,h=N.oldTags;m.length&&(v[w]=m),h.length&&(x[w]=p[w].oldTags)}),t&&t(),l(e,v,x)},_r=null,qi=function(e){function t(){for(var r,s=arguments.length,i=new Array(s),o=0;o<s;o++)i[o]=arguments[o];return(r=e.call.apply(e,[this].concat(i))||this).rendered=!1,r}ou(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(r){return!Ny(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,o=i.setHelmet,l=null,u=(r=i.helmetInstances.get().map(function(c){var d=Ne({},c.props);return delete d.context,d}),{baseTag:Oy(["href"],r),bodyAttributes:Ga("bodyAttributes",r),defer:fr(r,"defer"),encode:fr(r,"encodeSpecialCharacters"),htmlAttributes:Ga("htmlAttributes",r),linkTags:Rr(B.LINK,["rel","href"],r),metaTags:Rr(B.META,["name","charset","http-equiv","property","itemprop"],r),noscriptTags:Rr(B.NOSCRIPT,["innerHTML"],r),onChangeClientState:Ty(r),scriptTags:Rr(B.SCRIPT,["src","innerHTML"],r),styleTags:Rr(B.STYLE,["cssText"],r),title:Py(r),titleAttributes:Ga("titleAttributes",r),prioritizeSeoTags:zy(r,"prioritizeSeoTags")});sr.canUseDOM?(s=u,_r&&cancelAnimationFrame(_r),s.defer?_r=requestAnimationFrame(function(){Bc(s,function(){_r=null})}):(Bc(s),_r=null)):tl&&(l=tl(u)),o(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}(k.Component);qi.propTypes={context:My.isRequired},qi.displayName="HelmetDispatcher";var _y=["children"],Ly=["children"],On=function(e){function t(){return e.apply(this,arguments)||this}ou(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(r){return!xy($c(this.props,"helmetData"),$c(r,"helmetData"))},n.mapNestedChildrenToProps=function(r,s){if(!s)return null;switch(r.type){case B.SCRIPT:case B.NOSCRIPT:return{innerHTML:s};case B.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,o=r.arrayTypeChildren;return Ne({},o,((s={})[i.type]=[].concat(o[i.type]||[],[Ne({},r.newChildProps,this.mapNestedChildrenToProps(i,r.nestedChildren))]),s))},n.mapObjectTypeChildren=function(r){var s,i,o=r.child,l=r.newProps,u=r.newChildProps,c=r.nestedChildren;switch(o.type){case B.TITLE:return Ne({},l,((s={})[o.type]=c,s.titleAttributes=Ne({},u),s));case B.BODY:return Ne({},l,{bodyAttributes:Ne({},u)});case B.HTML:return Ne({},l,{htmlAttributes:Ne({},u)});default:return Ne({},l,((i={})[o.type]=Ne({},u),i))}},n.mapArrayTypeChildrenToProps=function(r,s){var i=Ne({},s);return Object.keys(r).forEach(function(o){var l;i=Ne({},i,((l={})[o]=r[o],l))}),i},n.warnOnInvalidChildren=function(r,s){return Fc(Dc.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 "+Dc.join(", ")+" are allowed. Helmet does not support rendering <"+r.type+"> elements. Refer to our API for more information."),Fc(!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,o={};return L.Children.forEach(r,function(l){if(l&&l.props){var u=l.props,c=u.children,d=Ic(u,_y),f=Object.keys(d).reduce(function(v,x){return v[Ey[x]||x]=d[x],v},{}),p=l.type;switch(typeof p=="symbol"?p=p.toString():i.warnOnInvalidChildren(l,c),p){case B.FRAGMENT:s=i.mapChildrenToProps(c,s);break;case B.LINK:case B.META:case B.NOSCRIPT:case B.SCRIPT:case B.STYLE:o=i.flattenArrayTypeChildren({child:l,arrayTypeChildren:o,newChildProps:f,nestedChildren:c});break;default:s=i.mapObjectTypeChildren({child:l,newProps:s,newChildProps:f,nestedChildren:c})}}}),this.mapArrayTypeChildrenToProps(o,s)},n.render=function(){var r=this.props,s=r.children,i=Ic(r,Ly),o=Ne({},i),l=i.helmetData;return s&&(o=this.mapChildrenToProps(s,o)),!l||l instanceof nl||(l=new nl(l.context,l.instances)),l?L.createElement(qi,Ne({},o,{context:l.value,helmetData:void 0})):L.createElement(Ap.Consumer,null,function(u){return L.createElement(qi,Ne({},o,{context:u}))})},t}(k.Component);On.propTypes={base:te.object,bodyAttributes:te.object,children:te.oneOfType([te.arrayOf(te.node),te.node]),defaultTitle:te.string,defer:te.bool,encodeSpecialCharacters:te.bool,htmlAttributes:te.object,link:te.arrayOf(te.object),meta:te.arrayOf(te.object),noscript:te.arrayOf(te.object),onChangeClientState:te.func,script:te.arrayOf(te.object),style:te.arrayOf(te.object),title:te.string,titleAttributes:te.object,titleTemplate:te.string,prioritizeSeoTags:te.bool,helmetData:te.object},On.defaultProps={defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1},On.displayName="Helmet";function Fy(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))}Fy(`[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 Iy=e=>{switch(e){case"success":return Uy;case"error":return Wy;default:return null}},Dy=Array(12).fill(0),$y=({visible:e})=>L.createElement("div",{className:"sonner-loading-wrapper","data-visible":e},L.createElement("div",{className:"sonner-spinner"},Dy.map((t,n)=>L.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),Uy=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),Wy=L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},L.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),rl=0,By=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:rl++;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)||rl++;this.publish({jsx:e(n),id:n,...t})},this.subscribers=[],this.toasts=[]}},Yt=new By,Hy=(e,t)=>{let n=(t==null?void 0:t.id)||rl++;return Yt.addToast({title:e,...t,id:n}),n},qy=Hy;Object.assign(qy,{success:Yt.success,error:Yt.error,custom:Yt.custom,message:Yt.message,promise:Yt.promise,dismiss:Yt.dismiss});var Qy=3,Vy="32px",Ky=4e3,Gy=356,Mp=14,Yy=20,Xy=200,Jy=e=>{let{invert:t,toast:n,interacting:r,setHeights:s,visibleToasts:i,heights:o,index:l,toasts:u,expanded:c,removeToast:d,closeButton:f,style:p,className:v="",descriptionClassName:x="",duration:w,position:N,expandByDefault:m}=e,[h,y]=L.useState(!1),[b,P]=L.useState(!1),[T,C]=L.useState(!1),[j,R]=L.useState(!1),[M,K]=L.useState(0),[E,re]=L.useState(0),q=L.useRef(null),ae=l===0,Z=l+1<=i,oe=n.type,A=n.className||"",$=n.descriptionClassName||"",U=L.useMemo(()=>o.findIndex(Q=>Q.toastId===n.id)||0,[o,n.id]),ne=L.useMemo(()=>n.duration||w||Ky,[n.duration,w]),V=L.useRef(0),ee=L.useRef(0),be=L.useRef(ne),Qe=L.useRef(0),Ee=L.useRef(null),[jt,Cs]=N.split("-"),Ot=L.useMemo(()=>o.reduce((Q,ce,Pe)=>Pe>=U?Q:Q+ce.height,0),[o,U]),bt=n.invert||t,Sr=oe==="loading";ee.current=L.useMemo(()=>U*Mp+Ot,[U,Ot]),L.useEffect(()=>{y(!0)},[]),L.useLayoutEffect(()=>{if(!h)return;let Q=q.current,ce=Q.style.height;Q.style.height="auto";let Pe=Q.getBoundingClientRect().height;Q.style.height=ce,re(Pe),s(dt=>dt.find(Nt=>Nt.toastId===n.id)?dt.map(Nt=>Nt.toastId===n.id?{...Nt,height:Pe}:Nt):[{toastId:n.id,height:Pe},...dt])},[h,n.title,n.description,s,n.id]);let fe=L.useCallback(()=>{P(!0),K(ee.current),s(Q=>Q.filter(ce=>ce.toastId!==n.id)),setTimeout(()=>{d(n)},Xy)},[n,d,s,ee]);return L.useEffect(()=>{if(n.promise&&oe==="loading"||n.duration===1/0)return;let Q;return c||r?(()=>{if(Qe.current<V.current){let ce=new Date().getTime()-V.current;be.current=be.current-ce}Qe.current=new Date().getTime()})():(V.current=new Date().getTime(),Q=setTimeout(()=>{var ce;(ce=n.onAutoClose)==null||ce.call(n,n),fe()},be.current)),()=>clearTimeout(Q)},[c,r,m,n,ne,fe,n.promise,oe]),L.useEffect(()=>{let Q=q.current;if(Q){let ce=Q.getBoundingClientRect().height;return re(ce),s(Pe=>[{toastId:n.id,height:ce},...Pe]),()=>s(Pe=>Pe.filter(dt=>dt.toastId!==n.id))}},[s,n.id]),L.useEffect(()=>{n.delete&&fe()},[fe,n.delete]),L.createElement("li",{"aria-live":n.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:q,className:v+" "+A,"data-sonner-toast":"","data-styled":!n.jsx,"data-mounted":h,"data-promise":!!n.promise,"data-removed":b,"data-visible":Z,"data-y-position":jt,"data-x-position":Cs,"data-index":l,"data-front":ae,"data-swiping":T,"data-type":oe,"data-invert":bt,"data-swipe-out":j,"data-expanded":!!(c||m&&h),style:{"--index":l,"--toasts-before":l,"--z-index":u.length-l,"--offset":`${b?M:ee.current}px`,"--initial-height":m?"auto":`${E}px`,...p,...n.style},onPointerDown:Q=>{Sr||(K(ee.current),Q.target.setPointerCapture(Q.pointerId),Q.target.tagName!=="BUTTON"&&(C(!0),Ee.current={x:Q.clientX,y:Q.clientY}))},onPointerUp:()=>{var Q,ce,Pe;if(j)return;Ee.current=null;let dt=Number(((Q=q.current)==null?void 0:Q.style.getPropertyValue("--swipe-amount").replace("px",""))||0);if(Math.abs(dt)>=Yy){K(ee.current),(ce=n.onDismiss)==null||ce.call(n,n),fe(),R(!0);return}(Pe=q.current)==null||Pe.style.setProperty("--swipe-amount","0px"),C(!1)},onPointerMove:Q=>{var ce;if(!Ee.current)return;let Pe=Q.clientY-Ee.current.y,dt=Q.clientX-Ee.current.x,Nt=(jt==="top"?Math.min:Math.max)(0,Pe),Wn=Q.pointerType==="touch"?10:2;Math.abs(Nt)>Wn?(ce=q.current)==null||ce.style.setProperty("--swipe-amount",`${Pe}px`):Math.abs(dt)>Wn&&(Ee.current=null)}},f&&!n.jsx?L.createElement("button",{"aria-label":"Close toast","data-disabled":Sr,"data-close-button":!0,onClick:Sr?void 0:()=>{var Q;fe(),(Q=n.onDismiss)==null||Q.call(n,n)}},L.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},L.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),L.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,n.jsx||L.isValidElement(n.title)?n.jsx||n.title:L.createElement(L.Fragment,null,oe||n.icon||n.promise?L.createElement("div",{"data-icon":""},n.promise?L.createElement($y,{visible:oe==="loading"}):null,n.icon||Iy(oe)):null,L.createElement("div",{"data-content":""},L.createElement("div",{"data-title":""},n.title),n.description?L.createElement("div",{"data-description":"",className:x+$},n.description):null),n.cancel?L.createElement("button",{"data-button":!0,"data-cancel":!0,onClick:()=>{var Q;fe(),(Q=n.cancel)!=null&&Q.onClick&&n.cancel.onClick()}},n.cancel.label):null,n.action?L.createElement("button",{"data-button":"",onClick:Q=>{var ce;(ce=n.action)==null||ce.onClick(Q),!Q.defaultPrevented&&fe()}},n.action.label):null))},Zy=e=>{var t;let{invert:n,position:r="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:o,className:l,offset:u,theme:c="light",richColors:d,duration:f,style:p,visibleToasts:v=Qy,toastOptions:x}=e,[w,N]=L.useState([]),[m,h]=L.useState([]),[y,b]=L.useState(!1),[P,T]=L.useState(!1),[C,j]=L.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[R,M]=r.split("-"),K=L.useRef(null),E=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),re=L.useCallback(q=>N(ae=>ae.filter(({id:Z})=>Z!==q.id)),[]);return L.useEffect(()=>Yt.subscribe(q=>{if(q.dismiss){N(ae=>ae.map(Z=>Z.id===q.id?{...Z,delete:!0}:Z));return}setTimeout(()=>{$g.flushSync(()=>{N(ae=>{let Z=ae.findIndex(oe=>oe.id===q.id);return Z!==-1?[...ae.slice(0,Z),{...ae[Z],...q},...ae.slice(Z+1)]:[q,...ae]})})})}),[]),L.useEffect(()=>{if(c!=="system"){j(c);return}typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:q})=>{j(q?"dark":"light")})},[c]),L.useEffect(()=>{w.length<=1&&b(!1)},[w]),L.useEffect(()=>{let q=ae=>{var Z,oe;s.every(A=>ae[A]||ae.code===A)&&(b(!0),(Z=K.current)==null||Z.focus()),ae.code==="Escape"&&(document.activeElement===K.current||(oe=K.current)!=null&&oe.contains(document.activeElement))&&b(!1)};return document.addEventListener("keydown",q),()=>document.removeEventListener("keydown",q)},[s]),w.length?L.createElement("section",{"aria-label":`Notifications ${E}`,tabIndex:-1},L.createElement("ol",{tabIndex:-1,ref:K,className:l,"data-sonner-toaster":!0,"data-theme":C,"data-rich-colors":d,"data-y-position":R,"data-x-position":M,style:{"--front-toast-height":`${(t=m[0])==null?void 0:t.height}px`,"--offset":typeof u=="number"?`${u}px`:u||Vy,"--width":`${Gy}px`,"--gap":`${Mp}px`,...p},onMouseEnter:()=>b(!0),onMouseMove:()=>b(!0),onMouseLeave:()=>{P||b(!1)},onPointerDown:()=>{T(!0)},onPointerUp:()=>T(!1)},w.map((q,ae)=>L.createElement(Jy,{key:q.id,index:ae,toast:q,duration:f,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:n,visibleToasts:v,closeButton:o,interacting:P,position:r,style:x==null?void 0:x.style,removeToast:re,toasts:w,heights:m,setHeights:h,expandByDefault:i,expanded:y})))):null},ev={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 tv=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ie=(e,t)=>{const n=k.forwardRef(({color:r="currentColor",size:s=24,strokeWidth:i=2,absoluteStrokeWidth:o,children:l,...u},c)=>k.createElement("svg",{ref:c,...ev,width:s,height:s,stroke:r,strokeWidth:o?Number(i)*24/Number(s):i,className:`lucide lucide-${tv(e)}`,...u},[...t.map(([d,f])=>k.createElement(d,f)),...(Array.isArray(l)?l:[l])||[]]));return n.displayName=`${e}`,n},Za=ie("Activity",[["path",{d:"M22 12h-4l-3 9L9 3l-3 9H2",key:"d5dnw9"}]]),Ct=ie("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"}]]),sl=ie("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"}]]),nv=ie("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]),rv=ie("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"}]]),zn=ie("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"}]]),Lr=ie("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Fr=ie("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),Mt=ie("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),sv=ie("FileCode",[["path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z",key:"1nnpy2"}],["polyline",{points:"14 2 14 8 20 8",key:"1ew0cm"}],["path",{d:"m10 13-2 2 2 2",key:"17smn8"}],["path",{d:"m14 17 2-2-2-2",key:"14mezr"}]]),iv=ie("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"}]]),Rp=ie("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"}]]),Cn=ie("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),eo=ie("MapPin",[["path",{d:"M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z",key:"2oe9fu"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]),av=ie("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"}]]),Hc=ie("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"}]]),fi=ie("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"}]]),qc=ie("PlayCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]),pi=ie("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),jn=ie("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"}]]),hi=ie("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"}]]),Hr=ie("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"}]]),ov=ie("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"}]]),lv=ie("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"}]]),uv=ie("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"}]]),mi=ie("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"}]]),cv=ie("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"}]]),dv=ie("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"}]]),fv=ie("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"}]]),Qc=ie("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"}]]),ir=ie("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),_p=ie("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]);function Lp(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=Lp(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function pv(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=Lp(e))&&(r&&(r+=" "),r+=t);return r}function hv(){for(var e=0,t,n,r="";e<arguments.length;)(t=arguments[e++])&&(n=Fp(t))&&(r&&(r+=" "),r+=n);return r}function Fp(e){if(typeof e=="string")return e;for(var t,n="",r=0;r<e.length;r++)e[r]&&(t=Fp(e[r]))&&(n&&(n+=" "),n+=t);return n}var lu="-";function mv(e){var t=yv(e),n=e.conflictingClassGroups,r=e.conflictingClassGroupModifiers,s=r===void 0?{}:r;function i(l){var u=l.split(lu);return u[0]===""&&u.length!==1&&u.shift(),Ip(u,t)||gv(l)}function o(l,u){var c=n[l]||[];return u&&s[l]?[].concat(c,s[l]):c}return{getClassGroupId:i,getConflictingClassGroupIds:o}}function Ip(e,t){var o;if(e.length===0)return t.classGroupId;var n=e[0],r=t.nextPart.get(n),s=r?Ip(e.slice(1),r):void 0;if(s)return s;if(t.validators.length!==0){var i=e.join(lu);return(o=t.validators.find(function(l){var u=l.validator;return u(i)}))==null?void 0:o.classGroupId}}var Vc=/^\[(.+)\]$/;function gv(e){if(Vc.test(e)){var t=Vc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}}function yv(e){var t=e.theme,n=e.prefix,r={nextPart:new Map,validators:[]},s=xv(Object.entries(e.classGroups),n);return s.forEach(function(i){var o=i[0],l=i[1];il(l,r,o,t)}),r}function il(e,t,n,r){e.forEach(function(s){if(typeof s=="string"){var i=s===""?t:Kc(t,s);i.classGroupId=n;return}if(typeof s=="function"){if(vv(s)){il(s(r),t,n,r);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(function(o){var l=o[0],u=o[1];il(u,Kc(t,l),n,r)})})}function Kc(e,t){var n=e;return t.split(lu).forEach(function(r){n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n}function vv(e){return e.isThemeGetter}function xv(e,t){return t?e.map(function(n){var r=n[0],s=n[1],i=s.map(function(o){return typeof o=="string"?t+o:typeof o=="object"?Object.fromEntries(Object.entries(o).map(function(l){var u=l[0],c=l[1];return[t+u,c]})):o});return[r,i]}):e}function wv(e){if(e<1)return{get:function(){},set:function(){}};var t=0,n=new Map,r=new Map;function s(i,o){n.set(i,o),t++,t>e&&(t=0,r=n,n=new Map)}return{get:function(o){var l=n.get(o);if(l!==void 0)return l;if((l=r.get(o))!==void 0)return s(o,l),l},set:function(o,l){n.has(o)?n.set(o,l):s(o,l)}}}var Dp="!";function jv(e){var t=e.separator||":",n=t.length===1,r=t[0],s=t.length;return function(o){for(var l=[],u=0,c=0,d,f=0;f<o.length;f++){var p=o[f];if(u===0){if(p===r&&(n||o.slice(f,f+s)===t)){l.push(o.slice(c,f)),c=f+s;continue}if(p==="/"){d=f;continue}}p==="["?u++:p==="]"&&u--}var v=l.length===0?o:o.substring(c),x=v.startsWith(Dp),w=x?v.substring(1):v,N=d&&d>c?d-c:void 0;return{modifiers:l,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:N}}}function bv(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 Nv(e){return{cache:wv(e.cacheSize),splitModifiers:jv(e),...mv(e)}}var kv=/\s+/;function Sv(e,t){var n=t.splitModifiers,r=t.getClassGroupId,s=t.getConflictingClassGroupIds,i=new Set;return e.trim().split(kv).map(function(o){var l=n(o),u=l.modifiers,c=l.hasImportantModifier,d=l.baseClassName,f=l.maybePostfixModifierPosition,p=r(f?d.substring(0,f):d),v=!!f;if(!p){if(!f)return{isTailwindClass:!1,originalClassName:o};if(p=r(d),!p)return{isTailwindClass:!1,originalClassName:o};v=!1}var x=bv(u).join(":"),w=c?x+Dp:x;return{isTailwindClass:!0,modifierId:w,classGroupId:p,originalClassName:o,hasPostfixModifier:v}}).reverse().filter(function(o){if(!o.isTailwindClass)return!0;var l=o.modifierId,u=o.classGroupId,c=o.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(o){return o.originalClassName}).join(" ")}function Cv(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,s,i,o=l;function l(c){var d=t[0],f=t.slice(1),p=f.reduce(function(v,x){return x(v)},d());return r=Nv(p),s=r.cache.get,i=r.cache.set,o=u,u(c)}function u(c){var d=s(c);if(d)return d;var f=Sv(c,r);return i(c,f),f}return function(){return o(hv.apply(null,arguments))}}function he(e){var t=function(r){return r[e]||[]};return t.isThemeGetter=!0,t}var $p=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ev=/^\d+\/\d+$/,Pv=new Set(["px","full","screen"]),Tv=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ov=/\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$/,zv=/^-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/;function pt(e){return En(e)||Pv.has(e)||Ev.test(e)||al(e)}function al(e){return Un(e,"length",Fv)}function Av(e){return Un(e,"size",Up)}function Mv(e){return Un(e,"position",Up)}function Rv(e){return Un(e,"url",Iv)}function Ks(e){return Un(e,"number",En)}function En(e){return!Number.isNaN(Number(e))}function _v(e){return e.endsWith("%")&&En(e.slice(0,-1))}function Ir(e){return Gc(e)||Un(e,"number",Gc)}function J(e){return $p.test(e)}function Dr(){return!0}function Qt(e){return Tv.test(e)}function Lv(e){return Un(e,"",Dv)}function Un(e,t,n){var r=$p.exec(e);return r?r[1]?r[1]===t:n(r[2]):!1}function Fv(e){return Ov.test(e)}function Up(){return!1}function Iv(e){return e.startsWith("url(")}function Gc(e){return Number.isInteger(Number(e))}function Dv(e){return zv.test(e)}function $v(){var e=he("colors"),t=he("spacing"),n=he("blur"),r=he("brightness"),s=he("borderColor"),i=he("borderRadius"),o=he("borderSpacing"),l=he("borderWidth"),u=he("contrast"),c=he("grayscale"),d=he("hueRotate"),f=he("invert"),p=he("gap"),v=he("gradientColorStops"),x=he("gradientColorStopPositions"),w=he("inset"),N=he("margin"),m=he("opacity"),h=he("padding"),y=he("saturate"),b=he("scale"),P=he("sepia"),T=he("skew"),C=he("space"),j=he("translate"),R=function(){return["auto","contain","none"]},M=function(){return["auto","hidden","clip","visible","scroll"]},K=function(){return["auto",J,t]},E=function(){return[J,t]},re=function(){return["",pt]},q=function(){return["auto",En,J]},ae=function(){return["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"]},Z=function(){return["solid","dashed","dotted","double","none"]},oe=function(){return["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter"]},A=function(){return["start","end","center","between","around","evenly","stretch"]},$=function(){return["","0",J]},U=function(){return["auto","avoid","all","avoid-page","page","left","right","column"]},ne=function(){return[En,Ks]},V=function(){return[En,J]};return{cacheSize:500,theme:{colors:[Dr],spacing:[pt],blur:["none","",Qt,J],brightness:ne(),borderColor:[e],borderRadius:["none","","full",Qt,J],borderSpacing:E(),borderWidth:re(),contrast:ne(),grayscale:$(),hueRotate:V(),invert:$(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[_v,al],inset:K(),margin:K(),opacity:ne(),padding:E(),saturate:ne(),scale:ne(),sepia:$(),skew:V(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",J]}],container:["container"],columns:[{columns:[Qt]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"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(ae(),[J])}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:R()}],"overscroll-x":[{"overscroll-x":R()}],"overscroll-y":[{"overscroll-y":R()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ir]}],basis:[{basis:K()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",J]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",Ir]}],"grid-cols":[{"grid-cols":[Dr]}],"col-start-end":[{col:["auto",{span:["full",Ir]},J]}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":[Dr]}],"row-start-end":[{row:["auto",{span:[Ir]},J]}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",J]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",J]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal"].concat(A())}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal"].concat(A(),["baseline"])}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[].concat(A(),["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:[N]}],mx:[{mx:[N]}],my:[{my:[N]}],ms:[{ms:[N]}],me:[{me:[N]}],mt:[{mt:[N]}],mr:[{mr:[N]}],mb:[{mb:[N]}],ml:[{ml:[N]}],"space-x":[{"space-x":[C]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[C]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit",J,t]}],"min-w":[{"min-w":["min","max","fit",J,pt]}],"max-w":[{"max-w":["0","none","full","min","max","fit","prose",{screen:[Qt]},Qt,J]}],h:[{h:[J,t,"auto","min","max","fit"]}],"min-h":[{"min-h":["min","max","fit",J,pt]}],"max-h":[{"max-h":[J,t,"min","max","fit"]}],"font-size":[{text:["base",Qt,al]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ks]}],"font-family":[{font:[Dr]}],"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",J]}],"line-clamp":[{"line-clamp":["none",En,Ks]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",J,pt]}],"list-image":[{"list-image":["none",J]}],"list-style-type":[{list:["none","disc","decimal",J]}],"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(Z(),["wavy"])}],"text-decoration-thickness":[{decoration:["auto","from-font",pt]}],"underline-offset":[{"underline-offset":["auto",J,pt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",J]}],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",J]}],"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(ae(),[Mv])}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Av]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Rv]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],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(Z(),["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:Z()}],"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(Z())}],"outline-offset":[{"outline-offset":[J,pt]}],"outline-w":[{outline:[pt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[pt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Qt,Lv]}],"shadow-color":[{shadow:[Dr]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":oe()}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Qt,J]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[y]}],sepia:[{sepia:[P]}],"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":[y]}],"backdrop-sepia":[{"backdrop-sepia":[P]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",J]}],duration:[{duration:V()}],ease:[{ease:["linear","in","out","in-out",J]}],delay:[{delay:V()}],animate:[{animate:["none","spin","ping","pulse","bounce",J]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[b]}],"scale-x":[{"scale-x":[b]}],"scale-y":[{"scale-y":[b]}],rotate:[{rotate:[Ir,J]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",J]}],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",J]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",J]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[pt,Ks]}],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 Uv=Cv($v);function Wv(...e){return Uv(pv(e))}const Bv=[{name:"Dashboard",href:"/",icon:Rp},{name:"Organizations",href:"/organizations",icon:Hr}];function Hv({children:e}){const t=Ss(),[n,r]=k.useState(null);return k.useEffect(()=>{fetch("/api/health").then(s=>s.json()).then(s=>r({version:s.version,environment:s.environment})).catch(()=>r(null))},[]),a.jsxs("div",{className:"min-h-screen bg-background",style:{minHeight:"100vh",backgroundColor:"#ffffff"},children:[a.jsx("header",{className:"border-b border-border bg-card",style:{backgroundColor:"#f8f9fa",borderBottom:"1px solid #e0e0e0"},children:a.jsx("div",{className:"flex h-16 items-center px-6",children:a.jsxs("div",{className:"flex items-center space-x-4",children:[a.jsx(av,{className:"h-6 w-6 md:hidden"}),a.jsx("h1",{className:"text-xl font-semibold text-foreground",style:{color:"#000000",fontSize:"1.25rem",fontWeight:"600"},children:"AI Agent Service"})]})})}),a.jsxs("div",{className:"flex",children:[a.jsx("aside",{className:"hidden w-64 border-r border-border bg-card md:block",children:a.jsx("nav",{className:"space-y-1 p-4",children:Bv.map(s=>{const i=t.pathname===s.href||s.href!=="/"&&t.pathname.startsWith(s.href);return a.jsxs(jp,{to:s.href,className:Wv("flex items-center space-x-3 rounded-lg px-3 py-2 text-sm font-medium transition-colors",i?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:[a.jsx(s.icon,{className:"h-5 w-5"}),a.jsx("span",{children:s.name})]},s.name)})})}),a.jsx("main",{className:"flex-1 p-6",children:a.jsx("div",{className:"mx-auto max-w-7xl",children:e})})]}),a.jsx("footer",{className:"border-t border-border bg-card px-6 py-3",style:{backgroundColor:"#f8f9fa",borderTop:"1px solid #e0e0e0"},children:a.jsxs("div",{className:"flex justify-between items-center text-xs text-gray-500",children:[a.jsx("span",{children:"AI Agent Service"}),n&&a.jsxs("span",{children:["v",n.version]})]})})]})}const qv={}.VITE_API_URL||"/api";function Qv(e){const t=e.startsWith("/")?e.slice(1):e;return`${qv}/${t}`}async function Gs(e,t){const n=Qv(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 Ys={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 Vv(){var j,R,M,K;const[e,t]=k.useState(null),[n,r]=k.useState(null),[s,i]=k.useState(null),[o,l]=k.useState(null),[u,c]=k.useState(!0),[d,f]=k.useState(null),[p,v]=k.useState("queued"),[x,w]=k.useState(null);k.useEffect(()=>{const E=async()=>{try{c(!0),f(null);const[q,ae,Z,oe]=await Promise.allSettled([Gs(Ys.queueQueued),Gs(Ys.queueInProgress),Gs(Ys.queueCompleted+"?limit=10"),Gs(Ys.queueFailed+"?limit=10")]);if(q.status==="fulfilled"&&q.value.ok){const A=await q.value.json();t(A.data)}if(ae.status==="fulfilled"&&ae.value.ok){const A=await ae.value.json();r(A.data)}if(Z.status==="fulfilled"&&Z.value.ok){const A=await Z.value.json();i(A.data)}if(oe.status==="fulfilled"&&oe.value.ok){const A=await oe.value.json();l(A.data)}}catch(q){f(q instanceof Error?q.message:"Failed to fetch work queue data")}finally{c(!1)}};E();const re=setInterval(E,1e4);return()=>clearInterval(re)},[]);const N=E=>{const re=Math.floor(E/60),q=Math.floor(re/60);return q>0?`${q}h ${re%60}m`:re>0?`${re}m`:`${E}s`},m=E=>{const re=new Date,q=new Date(E),ae=re.getTime()-q.getTime(),Z=Math.floor(ae/(1e3*60));if(Z<1)return"Just now";if(Z<60)return`${Z}m ago`;const oe=Math.floor(Z/60);return oe<24?`${oe}h ago`:`${Math.floor(oe/24)}d ago`},h=E=>{switch(E){case"project_review":return"📋";case"code_review":return"🔍";case"story_implementation":return"⚡";case"development_planning":return"📊";default:return"📄"}},y=E=>E>=9?"text-red-600 bg-red-50":E>=7?"text-orange-600 bg-orange-50":E>=5?"text-yellow-600 bg-yellow-50":"text-green-600 bg-green-50",b=E=>E>=9?"Critical":E>=7?"High":E>=5?"Medium":"Low",P=E=>{switch(E){case"completed":return a.jsx(zn,{className:"w-4 h-4 text-green-600"});case"failed":return a.jsx(Ct,{className:"w-4 h-4 text-red-600"});case"in_progress":return a.jsx(Cn,{className:"w-4 h-4 text-blue-600 animate-spin"});case"queued":return a.jsx(Mt,{className:"w-4 h-4 text-yellow-600"});default:return a.jsx(Mt,{className:"w-4 h-4 text-gray-400"})}},T=E=>{switch(E){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"}},C=(E,re)=>{var q;return a.jsxs("div",{className:"border rounded-lg p-4 hover:bg-gray-50 transition-colors",children:[a.jsxs("div",{className:"flex items-start justify-between mb-2",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("span",{className:"text-lg",children:h(E.type)}),a.jsxs("div",{children:[a.jsx("h4",{className:"font-medium text-sm",children:E.title}),a.jsx("p",{className:"text-xs text-gray-600",children:E.projectName})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[re==="completed"&&a.jsxs("span",{className:`px-2 py-1 rounded border text-xs font-medium flex items-center gap-1 ${T(E.status)}`,children:[P(E.status),E.status==="completed"?"Success":E.status==="failed"?"Failed":E.status]}),a.jsx("span",{className:`px-2 py-1 rounded-full text-xs font-medium ${y(E.priority)}`,children:b(E.priority)}),E.estimatedDuration&&a.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[a.jsx(Mt,{className:"w-3 h-3"}),N(E.estimatedDuration)]}),E.actualDuration&&re==="completed"&&a.jsxs("span",{className:"text-xs text-gray-500 flex items-center gap-1",children:[a.jsx(Mt,{className:"w-3 h-3"}),N(Math.round(E.actualDuration/1e3))," actual"]})]})]}),E.description&&a.jsx("p",{className:"text-xs text-gray-600 mb-2 line-clamp-2",children:E.description}),E.progress&&E.status==="in_progress"&&a.jsxs("div",{className:"mb-2",children:[a.jsxs("div",{className:"flex justify-between text-xs text-gray-600 mb-1",children:[a.jsx("span",{children:E.progress.currentStep}),a.jsxs("span",{children:[E.progress.percentage,"%"]})]}),a.jsx("div",{className:"w-full bg-gray-200 rounded-full h-2",children:a.jsx("div",{className:"bg-blue-600 h-2 rounded-full transition-all duration-300",style:{width:`${E.progress.percentage}%`}})})]}),E.status==="failed"&&a.jsxs("div",{className:"mb-2 p-2 bg-red-50 rounded border border-red-200 flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Ct,{className:"w-4 h-4 text-red-600"}),a.jsx("span",{className:"text-xs text-red-800 font-medium",children:"Work item failed"}),((q=E.metadata)==null?void 0:q.failedAt)&&a.jsxs("span",{className:"text-xs text-red-600",children:["• Failed: ",m(E.metadata.failedAt)]})]}),a.jsx("button",{onClick:ae=>{ae.stopPropagation(),w(E)},className:"px-2 py-1 text-xs bg-red-100 text-red-700 hover:bg-red-200 rounded transition-colors",children:"View Details"})]}),a.jsxs("div",{className:"flex justify-between items-center text-xs text-gray-500",children:[a.jsxs("span",{children:["Created ",m(E.createdAt)]}),E.assignedTo&&a.jsx("span",{className:"bg-blue-100 text-blue-800 px-2 py-1 rounded",children:E.assignedTo}),E.completedAt&&a.jsxs("span",{className:"text-green-600",children:["Completed ",m(E.completedAt)]})]})]},`${re}-${E.id}`)};return u?a.jsx("div",{className:"rounded-lg border bg-card p-6",children:a.jsxs("div",{className:"flex items-center justify-center py-8",children:[a.jsx(Cn,{className:"h-8 w-8 animate-spin text-blue-600"}),a.jsx("span",{className:"ml-2 text-sm text-gray-600",children:"Loading work queue..."})]})}):d?a.jsx("div",{className:"rounded-lg border bg-card p-6",children:a.jsxs("div",{className:"flex items-center justify-center py-8 text-red-600",children:[a.jsx(Ct,{className:"h-6 w-6 mr-2"}),a.jsx("span",{className:"text-sm",children:d})]})}):a.jsxs("div",{className:"rounded-lg border bg-card",children:[a.jsxs("div",{className:"p-6 border-b",children:[a.jsx("h3",{className:"text-lg font-medium mb-4",children:"Work Queue Status"}),a.jsxs("div",{className:"flex space-x-1 bg-gray-100 rounded-lg p-1",children:[a.jsxs("button",{onClick:()=>v("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:[a.jsx(Hc,{className:"w-4 h-4"}),"Queued (",(e==null?void 0:e.total)||0,")"]}),a.jsxs("button",{onClick:()=>v("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:[a.jsx(qc,{className:"w-4 h-4"}),"In Progress (",(n==null?void 0:n.total)||0,")"]}),a.jsxs("button",{onClick:()=>v("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:[a.jsx(zn,{className:"w-4 h-4"}),"Recent (",(s==null?void 0:s.total)||0,")"]}),a.jsxs("button",{onClick:()=>v("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:[a.jsx(Ct,{className:"w-4 h-4"}),"Failed (",(o==null?void 0:o.total)||0,")"]})]})]}),a.jsxs("div",{className:"p-6",children:[p==="queued"&&(e==null?void 0:e.estimatedWaitTime)&&a.jsx("div",{className:"mb-4 p-3 bg-yellow-50 rounded-lg border border-yellow-200",children:a.jsxs("p",{className:"text-sm text-yellow-800",children:[a.jsx(Mt,{className:"w-4 h-4 inline mr-1"}),"Estimated wait time: ",N(e.estimatedWaitTime)]})}),p==="progress"&&(n==null?void 0:n.totalEstimatedRemaining)&&a.jsx("div",{className:"mb-4 p-3 bg-blue-50 rounded-lg border border-blue-200",children:a.jsxs("p",{className:"text-sm text-blue-800",children:[a.jsx(Cn,{className:"w-4 h-4 inline mr-1"}),"Estimated remaining time: ",N(n.totalEstimatedRemaining)]})}),a.jsxs("div",{className:"space-y-3",children:[p==="queued"&&a.jsx(a.Fragment,{children:(e==null?void 0:e.items.length)===0?a.jsxs("div",{className:"text-center py-8 text-gray-500",children:[a.jsx(Hc,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),a.jsx("p",{children:"No items in queue"})]}):e==null?void 0:e.items.map(E=>C(E,"queued"))}),p==="progress"&&a.jsx(a.Fragment,{children:(n==null?void 0:n.items.length)===0?a.jsxs("div",{className:"text-center py-8 text-gray-500",children:[a.jsx(qc,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),a.jsx("p",{children:"No items in progress"})]}):n==null?void 0:n.items.map(E=>C(E,"progress"))}),p==="completed"&&a.jsx(a.Fragment,{children:(s==null?void 0:s.items.length)===0?a.jsxs("div",{className:"text-center py-8 text-gray-500",children:[a.jsx(zn,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),a.jsx("p",{children:"No completed items"})]}):s==null?void 0:s.items.map(E=>C(E,"completed"))}),p==="failed"&&a.jsx(a.Fragment,{children:(o==null?void 0:o.items.length)===0?a.jsxs("div",{className:"text-center py-8 text-gray-500",children:[a.jsx(Ct,{className:"w-12 h-12 mx-auto mb-2 opacity-50"}),a.jsx("p",{children:"No failed items"})]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"mb-4 p-3 bg-red-50 rounded-lg border border-red-200",children:a.jsxs("p",{className:"text-sm text-red-800",children:[a.jsx(Ct,{className:"w-4 h-4 inline mr-1"}),(o==null?void 0:o.total)||0," work items have failed and may need attention"]})}),o==null?void 0:o.items.map(E=>C(E,"failed"))]})})]}),p==="completed"&&(s==null?void 0:s.hasMore)&&a.jsx("div",{className:"mt-4 text-center",children:a.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"})})]}),x&&a.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:a.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-2xl w-full mx-4 max-h-[80vh] overflow-y-auto",children:[a.jsxs("div",{className:"flex items-center justify-between mb-4",children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Ct,{className:"w-5 h-5 text-red-600"}),a.jsx("h2",{className:"text-lg font-semibold text-gray-900",children:"Error Details"})]}),a.jsx("button",{onClick:()=>w(null),className:"text-gray-400 hover:text-gray-600 transition-colors",children:a.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"border rounded-lg p-4 bg-gray-50",children:[a.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:"Work Item Information"}),a.jsxs("div",{className:"grid grid-cols-2 gap-4 text-sm",children:[a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-gray-600",children:"Type:"}),a.jsx("span",{className:"ml-2",children:x.type})]}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-gray-600",children:"Status:"}),a.jsx("span",{className:"ml-2 text-red-600",children:"Failed"})]}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-gray-600",children:"Project:"}),a.jsx("span",{className:"ml-2",children:x.projectName})]}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-gray-600",children:"Created:"}),a.jsxs("span",{className:"ml-2",children:[m(x.createdAt)," ago"]})]}),x.completedAt&&a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-gray-600",children:"Failed:"}),a.jsxs("span",{className:"ml-2",children:[m(x.completedAt)," ago"]})]}),x.assignedTo&&a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-gray-600",children:"Assigned to:"}),a.jsx("span",{className:"ml-2",children:x.assignedTo})]})]})]}),a.jsxs("div",{className:"border rounded-lg p-4 bg-red-50 border-red-200",children:[a.jsxs("h3",{className:"font-medium text-red-900 mb-2 flex items-center gap-2",children:[a.jsx(Ct,{className:"w-4 h-4"}),"Error Message"]}),a.jsx("p",{className:"text-red-800 text-sm",children:((j=x.metadata)==null?void 0:j.reason)||((R=x.metadata)==null?void 0:R.failureReason)||((M=x.metadata)==null?void 0:M.error)||"No specific error message available"})]}),((K=x.metadata)==null?void 0:K.errorHistory)&&x.metadata.errorHistory.length>0&&a.jsxs("div",{className:"border rounded-lg p-4",children:[a.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:"Attempt History"}),a.jsxs("div",{className:"text-sm text-gray-600",children:[a.jsxs("p",{className:"mb-2",children:["This work item failed after ",x.metadata.errorHistory.length," attempt",x.metadata.errorHistory.length>1?"s":"",":"]}),a.jsx("div",{className:"space-y-2",children:x.metadata.errorHistory.map((E,re)=>a.jsxs("div",{className:"flex items-center justify-between p-2 bg-gray-50 rounded",children:[a.jsxs("span",{children:["Attempt #",E.attemptNumber||re+1]}),a.jsx("span",{className:"text-xs text-gray-500",children:E.timestamp&&m(E.timestamp)})]},re))})]})]}),x.metadata&&Object.keys(x.metadata).length>0&&a.jsxs("div",{className:"border rounded-lg p-4",children:[a.jsx("h3",{className:"font-medium text-gray-900 mb-2",children:"Additional Information"}),a.jsxs("details",{className:"text-sm",children:[a.jsx("summary",{className:"cursor-pointer text-gray-600 hover:text-gray-800",children:"View raw metadata"}),a.jsx("pre",{className:"mt-2 text-xs bg-gray-50 p-2 rounded overflow-x-auto",children:JSON.stringify(x.metadata,null,2)})]})]})]}),a.jsx("div",{className:"flex justify-end mt-6",children:a.jsx("button",{onClick:()=>w(null),className:"px-4 py-2 bg-gray-100 text-gray-700 rounded hover:bg-gray-200 transition-colors",children:"Close"})})]})})]})}function Kv(){const[e,t]=k.useState(null),[n,r]=k.useState(!0),[s,i]=k.useState(!1);k.useEffect(()=>{const d=async()=>{try{const p=await fetch("/api/smart-polling/metrics");if(p.ok){const v=await p.json();t(v.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 o=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),v=new Date().getTime()-f.getTime();return v<6e4?`${Math.round(v/1e3)}s ago`:v<36e5?`${Math.round(v/6e4)}m ago`:f.toLocaleTimeString()},c=d=>d.isPolling?d.consecutiveErrors>=3?a.jsx(sl,{className:"h-4 w-4 text-red-500"}):d.consecutiveErrors>0?a.jsx(Mt,{className:"h-4 w-4 text-yellow-500"}):a.jsx(zn,{className:"h-4 w-4 text-green-500"}):a.jsx(ov,{className:"h-4 w-4 text-gray-500"});return n||!e?a.jsxs("div",{className:"rounded-lg border bg-card",children:[a.jsx("div",{className:"border-b border-border p-4",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Za,{className:"h-5 w-5"}),a.jsx("h3",{className:"text-lg font-medium",children:"Smart Polling Status"})]})}),a.jsx("div",{className:"p-6",children:a.jsx("div",{className:"animate-pulse",children:a.jsxs("div",{className:"space-y-3",children:[a.jsx("div",{className:"h-4 bg-muted rounded"}),a.jsx("div",{className:"h-4 bg-muted rounded w-3/4"}),a.jsx("div",{className:"h-4 bg-muted rounded w-1/2"})]})})})]}):a.jsxs("div",{className:"rounded-lg border bg-card",children:[a.jsx("div",{className:"border-b border-border p-4",children:a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx(Za,{className:"h-5 w-5"}),a.jsx("h3",{className:"text-lg font-medium",children:"Smart Polling Status"}),a.jsxs("div",{className:"ml-auto flex items-center gap-4 text-sm text-muted-foreground",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"w-2 h-2 rounded-full bg-green-500"}),"Active: ",e.activePolling,"/",e.totalOrganizations]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(_p,{className:"h-3 w-3"}),"Avg: ",l(e.averageInterval)]}),a.jsxs("button",{onClick:o,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:[a.jsx(jn,{className:`h-3 w-3 ${s?"animate-spin":""}`}),s?"Polling...":"Force Poll"]})]})]})}),a.jsxs("div",{className:"p-6",children:[a.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mb-6",children:[a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-blue-600",children:e.totalPolls}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Polls"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-green-600",children:e.totalClaimedWork}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Work Claimed"})]}),a.jsxs("div",{className:"text-center",children:[a.jsx("div",{className:"text-2xl font-bold text-red-600",children:e.totalErrors}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Total Errors"})]}),a.jsxs("div",{className:"text-center",children:[a.jsxs("div",{className:"text-2xl font-bold text-purple-600",children:[(e.errorRate*100).toFixed(1),"%"]}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"Error Rate"})]})]}),a.jsxs("div",{className:"space-y-3",children:[a.jsx("h4",{className:"text-sm font-medium text-muted-foreground mb-3",children:"Organization Status"}),e.organizationStats.length===0?a.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[a.jsx(Za,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),a.jsx("p",{children:"No organizations configured"})]}):e.organizationStats.map(d=>a.jsxs("div",{className:"flex items-center gap-3 p-3 rounded-lg bg-muted/50",children:[a.jsx("div",{className:"flex-shrink-0",children:c(d)}),a.jsxs("div",{className:"flex-1 min-w-0",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[a.jsx("p",{className:"font-medium truncate",children:d.organizationName}),a.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"})]}),a.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-2 text-xs text-muted-foreground",children:[a.jsxs("div",{children:[a.jsx("span",{className:"font-medium",children:"Interval:"})," ",l(d.currentInterval)]}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium",children:"Last Poll:"})," ",u(d.lastPollAt)]}),a.jsxs("div",{children:[a.jsx("span",{className:"font-medium",children:"Work Claimed:"})," ",d.claimedWorkCount]}),a.jsxs("div",{className:d.consecutiveErrors>0?"text-red-600":"",children:[a.jsx("span",{className:"font-medium",children:"Errors:"})," ",d.totalErrors,d.consecutiveErrors>0&&` (${d.consecutiveErrors} consecutive)`]})]})]}),a.jsxs("div",{className:"flex-shrink-0 text-right",children:[a.jsx("div",{className:"text-sm font-medium",children:d.totalPolls}),a.jsx("div",{className:"text-xs text-muted-foreground",children:"polls"})]})]},d.organizationId))]}),a.jsxs("div",{className:"mt-6 p-3 bg-muted/30 rounded-lg",children:[a.jsx("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:"Status Indicators"}),a.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2 text-xs",children:[a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(zn,{className:"h-3 w-3 text-green-500"}),a.jsx("span",{children:"Healthy polling"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(Mt,{className:"h-3 w-3 text-yellow-500"}),a.jsx("span",{children:"Some errors"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx(sl,{className:"h-3 w-3 text-red-500"}),a.jsx("span",{children:"Multiple failures"})]})]})]})]})]})}function Gv(){const[e,t]=k.useState(null),[n,r]=k.useState(!0);k.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 o=setInterval(i,3e4);return()=>clearInterval(o)},[]);const s=i=>i<1e3?`${i}ms`:i<6e4?`${(i/1e3).toFixed(1)}s`:`${(i/6e4).toFixed(1)}m`;return a.jsxs(a.Fragment,{children:[a.jsx(On,{children:a.jsx("title",{children:"Dashboard - AI Agent Service"})}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Dashboard"}),a.jsx("p",{className:"text-muted-foreground",children:"Overview of your AI Agent Service performance"})]}),a.jsxs("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-4",children:[a.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Total Tasks"}),a.jsx("div",{className:"text-2xl font-bold text-blue-600",children:n?"-":(e==null?void 0:e.totalProcessed)||0})]}),a.jsx(rv,{className:"h-8 w-8 text-blue-600"})]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"All time"})]}),a.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Success Rate"}),a.jsx("div",{className:"text-2xl font-bold text-green-600",children:n?"-":`${Math.round(((e==null?void 0:e.successRate)||0)*100)}%`})]}),a.jsx(cv,{className:"h-8 w-8 text-green-600"})]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Overall performance"})]}),a.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Avg Completion Time"}),a.jsx("div",{className:"text-2xl font-bold text-purple-600",children:n?"-":s((e==null?void 0:e.averageCompletionTime)||0)})]}),a.jsx(Mt,{className:"h-8 w-8 text-purple-600"})]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Per task"})]}),a.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Active Agents"}),a.jsx("div",{className:"text-2xl font-bold text-orange-600",children:n?"-":(e==null?void 0:e.activeAgents)||0})]}),a.jsx(fv,{className:"h-8 w-8 text-orange-600"})]}),a.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Currently active"})]})]}),a.jsx(Kv,{}),a.jsx(Vv,{}),a.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[a.jsx("h3",{className:"text-lg font-medium mb-4",children:"Welcome to AI Agent Service"}),a.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 Yv=({organizationId:e,onComplete:t,onCancel:n})=>{const[r,s]=k.useState({id:"",name:"",description:""}),[i,o]=k.useState(!1),[l,u]=k.useState(null),c=async f=>{f.preventDefault(),u(null),o(!0);try{const p=await fetch(`/api/organizations/${e}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...r,services:[]})});if(!p.ok){const x=await p.json();throw new Error(x.error||"Failed to create workspace")}const v=await p.json();if(v.success)t(v.data);else throw new Error(v.error||"Failed to create workspace")}catch(p){console.error("Failed to create workspace:",p),u(p instanceof Error?p.message:"Failed to create workspace")}finally{o(!1)}},d=r.id.trim()&&r.name.trim();return a.jsxs("div",{className:"max-w-2xl mx-auto bg-white rounded-lg shadow-lg",children:[a.jsx("div",{className:"px-6 py-4 border-b border-gray-200",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Register Workspace"}),a.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600",children:a.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:a.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),a.jsxs("form",{onSubmit:c,className:"p-6 space-y-6",children:[l&&a.jsx("div",{className:"bg-red-50 border border-red-200 rounded-lg p-4",children:a.jsx("p",{className:"text-sm text-red-700",children:l})}),a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"id",className:"block text-sm font-medium text-gray-700 mb-1",children:["Workspace ID ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{type:"text",id:"id",value:r.id,onChange:f=>s({...r,id:f.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:"my-workspace",required:!0}),a.jsx("p",{className:"mt-1 text-sm text-gray-500",children:'A unique identifier for this workspace (e.g., "my-app", "project-name")'})]}),a.jsxs("div",{children:[a.jsxs("label",{htmlFor:"name",className:"block text-sm font-medium text-gray-700 mb-1",children:["Workspace Name ",a.jsx("span",{className:"text-red-500",children:"*"})]}),a.jsx("input",{type:"text",id:"name",value:r.name,onChange:f=>s({...r,name:f.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:"My Workspace",required:!0}),a.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"A human-readable name for the workspace"})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"description",className:"block text-sm font-medium text-gray-700 mb-1",children:"Description"}),a.jsx("textarea",{id:"description",value:r.description,onChange:f=>s({...r,description:f.target.value}),rows:3,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:"Optional description of this workspace"}),a.jsx("p",{className:"mt-1 text-sm text-gray-500",children:"Optional description of what this workspace contains"})]}),a.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[a.jsx("h3",{className:"text-sm font-medium text-blue-800 mb-2",children:"Note"}),a.jsx("p",{className:"text-sm text-blue-700",children:"The agent will handle mapping this workspace to a local path. You can manage services and additional workspace configuration through the main Task Shepherd UI after registration."})]}),a.jsxs("div",{className:"flex justify-end space-x-3 pt-4 border-t border-gray-200",children:[a.jsx("button",{type:"button",onClick:n,className:"px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50",children:"Cancel"}),a.jsx("button",{type:"submit",disabled:!d||i,className:"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:i?"Creating...":"Register Workspace"})]})]})]})},Xv=({organizationId:e,workspace:t,onClose:n,onApplyChanges:r})=>{var C;const[s,i]=k.useState(!1),[o,l]=k.useState(null),[u,c]=k.useState(new Set),[d,f]=k.useState(null),[p,v]=k.useState({}),x=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 R=await j.json();if(R.success)l(R.data);else throw new Error(R.error||"Analysis failed")}catch(j){console.error("Workspace analysis failed:",j),alert(j instanceof Error?j.message:"Failed to analyze workspace")}finally{i(!1)}},w=j=>{switch(j){case"found":return a.jsx(zn,{className:"w-4 h-4 text-green-500"});case"outdated":return a.jsx(sl,{className:"w-4 h-4 text-yellow-500"});case"missing":return a.jsx(Qc,{className:"w-4 h-4 text-red-500"});default:return null}},N=j=>{switch(j){case"add_service":return a.jsx(pi,{className:"w-4 h-4 text-green-500"});case"update_service":return a.jsx(jn,{className:"w-4 h-4 text-blue-500"});case"remove_service":return a.jsx(Qc,{className:"w-4 h-4 text-red-500"});default:return a.jsx(nv,{className:"w-4 h-4 text-gray-500"})}},m=j=>{const R=new Set(u);R.has(j)?R.delete(j):R.add(j),c(R)},h=()=>{if(!o||u.size===0)return;const j=Array.from(u).map(R=>o.improvements[R]);r==null||r(j),n()},y=j=>{f(j.name),v({name:j.name,type:j.type,technology:j.technology,port:j.port,description:j.description})},b=()=>{f(null),v({})},P=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)}),R=await j.json();if(j.ok&&R.success)f(null),v({}),await x();else throw new Error(R.error||"Failed to update service")}catch(j){console.error("Failed to update service:",j),alert(j instanceof Error?j.message:"Failed to update service")}},T=async j=>{if(confirm(`Are you sure you want to remove the service "${j}"? This action cannot be undone.`))try{const R=await fetch(`/api/organizations/${e}/workspaces/${t.id}/services/${j}`,{method:"DELETE"}),M=await R.json();if(R.ok&&M.success)await x();else throw new Error(M.error||"Failed to remove service")}catch(R){console.error("Failed to remove service:",R),alert(R instanceof Error?R.message:"Failed to remove service")}};return a.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:a.jsxs("div",{className:"bg-white rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden",children:[a.jsxs("div",{className:"px-6 py-4 border-b border-gray-200",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("h1",{className:"text-2xl font-bold text-gray-900",children:["Analyze Workspace: ",t.name]}),a.jsx("button",{onClick:n,className:"text-gray-400 hover:text-gray-600",children:a.jsx(ir,{className:"w-6 h-6"})})]}),a.jsx("p",{className:"mt-2 text-sm text-gray-600",children:"Analyze the current workspace configuration and discover improvements"})]}),a.jsxs("div",{className:"p-6 overflow-y-auto max-h-[calc(90vh-140px)]",children:[!o&&a.jsxs("div",{className:"text-center py-12",children:[a.jsxs("div",{className:"mb-6",children:[a.jsx("div",{className:"w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mx-auto mb-4",children:a.jsx(jn,{className:"w-8 h-8 text-blue-600"})}),a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-2",children:"Ready to Analyze Workspace"}),a.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."}),a.jsx("div",{className:"bg-gray-50 rounded-lg p-4 mb-6",children:a.jsxs("div",{className:"text-sm text-gray-700",children:[a.jsxs("div",{children:[a.jsx("strong",{children:"Workspace:"})," ",t.name]}),a.jsxs("div",{children:[a.jsx("strong",{children:"Path:"})," ",a.jsx("code",{className:"font-mono text-xs",children:t.path})]}),a.jsxs("div",{children:[a.jsx("strong",{children:"Current services:"})," ",((C=t.services)==null?void 0:C.length)||0]})]})})]}),a.jsx("button",{onClick:x,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?a.jsxs(a.Fragment,{children:[a.jsx(jn,{className:"w-4 h-4 mr-2 animate-spin"}),"Analyzing..."]}):a.jsxs(a.Fragment,{children:[a.jsx(jn,{className:"w-4 h-4 mr-2"}),"Start Analysis"]})})]}),o&&a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-4",children:[a.jsx("h3",{className:"text-lg font-medium text-blue-900 mb-2",children:"Analysis Summary"}),a.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4 text-sm",children:[a.jsxs("div",{children:[a.jsx("div",{className:"text-blue-800 font-medium",children:"Current Services"}),a.jsxs("div",{className:"text-blue-600",children:[o.currentServices.length," configured"]})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-blue-800 font-medium",children:"Discovered Services"}),a.jsxs("div",{className:"text-blue-600",children:[o.discoveredServices.length," found"]})]}),a.jsxs("div",{children:[a.jsx("div",{className:"text-blue-800 font-medium",children:"Improvements"}),a.jsxs("div",{className:"text-blue-600",children:[o.improvements.length," suggested"]})]})]})]}),a.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[a.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Current Services Status"}),o.currentServices.length>0?a.jsx("div",{className:"space-y-2",children:o.currentServices.map((j,R)=>a.jsx("div",{className:"p-3 bg-gray-50 rounded-lg border",children:d===j.name?a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Name"}),a.jsx("input",{type:"text",value:p.name||"",onChange:M=>v({...p,name: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"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Type"}),a.jsxs("select",{value:p.type||"backend",onChange:M=>v({...p,type: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",children:[a.jsx("option",{value:"backend",children:"Backend"}),a.jsx("option",{value:"frontend",children:"Frontend"}),a.jsx("option",{value:"database",children:"Database"}),a.jsx("option",{value:"cache",children:"Cache"}),a.jsx("option",{value:"queue",children:"Queue"}),a.jsx("option",{value:"api",children:"API"}),a.jsx("option",{value:"service",children:"Service"}),a.jsx("option",{value:"other",children:"Other"})]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Technology"}),a.jsx("input",{type:"text",value:p.technology||"",onChange:M=>v({...p,technology: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",placeholder:"e.g., Node.js, Python"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Port"}),a.jsx("input",{type:"number",value:p.port||"",onChange:M=>v({...p,port:M.target.value?parseInt(M.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"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Description"}),a.jsx("input",{type:"text",value:p.description||"",onChange:M=>v({...p,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",placeholder:"Optional description"})]}),a.jsxs("div",{className:"flex items-center justify-end gap-2 pt-2",children:[a.jsxs("button",{onClick:P,className:"inline-flex items-center px-3 py-1 text-xs bg-green-600 text-white rounded hover:bg-green-700",children:[a.jsx(hi,{className:"h-3 w-3 mr-1"}),"Save"]}),a.jsxs("button",{onClick:b,className:"inline-flex items-center px-3 py-1 text-xs bg-gray-600 text-white rounded hover:bg-gray-700",children:[a.jsx(ir,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-3",children:[w(j.status),a.jsxs("div",{children:[a.jsx("div",{className:"font-medium",children:j.name}),a.jsxs("div",{className:"text-sm text-gray-600",children:[j.type," ",j.technology&&`• ${j.technology}`," ",j.port&&`• Port ${j.port}`,j.description&&` • ${j.description}`]})]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{onClick:()=>y(j),className:"p-1 text-gray-500 hover:text-orange-600 transition-colors",title:"Edit service",children:a.jsx(fi,{className:"h-3 w-3"})}),a.jsx("button",{onClick:()=>T(j.name),className:"p-1 text-gray-500 hover:text-red-600 transition-colors",title:"Remove service",children:a.jsx(mi,{className:"h-3 w-3"})}),a.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})]})]})},R))}):a.jsx("p",{className:"text-gray-600",children:"No services currently configured"})]}),o.improvements.length>0&&a.jsxs("div",{className:"bg-white border border-gray-200 rounded-lg p-4",children:[a.jsxs("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:["Suggested Improvements (",o.improvements.length,")"]}),a.jsx("div",{className:"space-y-3",children:o.improvements.map((j,R)=>a.jsxs("div",{className:"flex items-start gap-3 p-3 border border-gray-200 rounded-lg hover:bg-gray-50",children:[a.jsx("input",{type:"checkbox",id:`improvement-${R}`,checked:u.has(R),onChange:()=>m(R),className:"mt-1 h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[N(j.type),a.jsx("span",{className:"font-medium",children:j.service}),a.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("_"," ")})]}),a.jsx("p",{className:"text-sm text-gray-700 mb-1",children:j.description}),a.jsx("p",{className:"text-xs text-gray-500",children:j.action})]})]},R))}),u.size>0&&a.jsx("div",{className:"mt-4 p-3 bg-blue-50 border border-blue-200 rounded-lg",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("span",{className:"text-sm text-blue-800",children:[u.size," improvement(s) selected"]}),a.jsx("button",{onClick:h,className:"px-3 py-1 text-sm bg-blue-600 text-white rounded hover:bg-blue-700",children:"Apply Selected"})]})})]}),o.recommendations.length>0&&a.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-lg p-4",children:[a.jsx("h3",{className:"text-sm font-medium text-green-800 mb-2",children:"Recommendations"}),a.jsx("ul",{className:"space-y-1",children:o.recommendations.map((j,R)=>a.jsxs("li",{className:"text-sm text-green-700",children:["• ",j]},R))})]}),o.warnings.length>0&&a.jsxs("div",{className:"bg-yellow-50 border border-yellow-200 rounded-lg p-4",children:[a.jsx("h3",{className:"text-sm font-medium text-yellow-800 mb-2",children:"Warnings"}),a.jsx("ul",{className:"space-y-1",children:o.warnings.map((j,R)=>a.jsxs("li",{className:"text-sm text-yellow-700",children:["• ",j]},R))})]}),a.jsx("div",{className:"text-center pt-4 border-t border-gray-200",children:a.jsxs("button",{onClick:x,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:[a.jsx(jn,{className:`w-4 h-4 mr-2 ${s?"animate-spin":""}`}),"Re-analyze"]})})]})]})]})})};function Jv(){const[e,t]=k.useState(null),[n,r]=k.useState(!0),[s,i]=k.useState(!1),[o,l]=k.useState({name:"",basePath:"",apiKey:""}),[u,c]=k.useState([]),[d,f]=k.useState(new Set),[p,v]=k.useState(new Set),[x,w]=k.useState(null),[N,m]=k.useState(null),[h,y]=k.useState(null),[b,P]=k.useState({name:"",id:"",path:"",description:""}),[T,C]=k.useState(new Set),[j,R]=k.useState(null),[M,K]=k.useState({name:"",type:"backend",port:"",url:"",technology:"",description:""}),[E,re]=k.useState(Date.now()),[q,ae]=k.useState(null),[Z,oe]=k.useState(null),[A,$]=k.useState(null),[U,ne]=k.useState({}),[V,ee]=k.useState({}),[be,Qe]=k.useState({}),[Ee,jt]=k.useState(!1),[Cs,Ot]=k.useState(null),[bt,Sr]=k.useState([]),[fe,Q]=k.useState(new Set),[ce,Pe]=k.useState({}),[dt,Nt]=k.useState(!1),[Wn,da]=k.useState(!1),[Wp,fa]=k.useState([]),[pa,Bp]=k.useState(new Set),[Hp,ha]=k.useState(null),[ma,Es]=k.useState(""),[uu,cu]=k.useState(!1),[yn,ga]=k.useState({}),[Bn,ya]=k.useState(new Set);k.useEffect(()=>{Ps()},[]);const G=(g,S,_)=>{const I={id:Date.now().toString(),type:g,title:S,message:_,timestamp:Date.now()};c(W=>[...W,I]),g==="success"&&setTimeout(()=>{c(W=>W.filter(Y=>Y.id!==I.id))},5e3)},qp=g=>{c(S=>S.filter(_=>_.id!==g))},Ps=async()=>{try{const g=await fetch("/api/organizations");if(g.ok){const S=await g.json();t(S.data),re(Date.now())}}catch(g){console.error("Failed to fetch organizations:",g)}finally{r(!1)}},vn=async()=>{await Ps()},va=()=>{},xa=()=>{},wa=()=>{},Qp=async g=>{try{const S=await fetch(`/api/project-mappings/organization/${g}`);if(S.ok){const _=await S.json();fa(_.mappings||[])}}catch(S){console.error("Failed to fetch project mappings:",S)}},Vp=async(g,S,_)=>{if(!ma.trim()){G("error","Invalid Path","Please enter a valid local path");return}cu(!0);try{const I=await fetch("/api/project-mappings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:g,projectId:S,localPath:ma,projectName:_})}),W=await I.json();I.ok&&W.success?(fa(Y=>{const de=Y.findIndex(le=>le.projectId===S);if(de>=0){const le=[...Y];return le[de]=W.mapping,le}return[...Y,W.mapping]}),ha(null),Es(""),G("success","Mapping Saved",`Successfully mapped "${_}" to local path`)):G("error","Failed to Save Mapping",W.error||"Unknown error")}catch(I){console.error("Failed to save project mapping:",I),G("error","Network Error","Failed to save project mapping")}finally{cu(!1)}},Kp=async(g,S)=>{try{const _=await fetch(`/api/project-mappings/${g}/${S}`,{method:"DELETE"});if(_.ok)fa(I=>I.filter(W=>W.projectId!==S)),G("success","Mapping Removed","Project path mapping has been removed");else{const I=await _.json();G("error","Failed to Remove Mapping",I.error||"Unknown error")}}catch(_){console.error("Failed to remove project mapping:",_),G("error","Network Error","Failed to remove project mapping")}},Gp=g=>Wp.find(S=>S.projectId===g),Yp=async g=>{const S=new Set(d);S.has(g)?S.delete(g):(S.add(g),await Qp(g)),f(S)},Xp=async(g,S)=>{g.preventDefault();try{const _=await fetch(`/api/organizations/${S}/workspaces`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(b)}),I=await _.json();if(_.ok&&I.success&&I.data){if(e){const W=e.organizations.map(Y=>{if(Y.id===S){const de=Y.workspaces||[];return{...Y,workspaces:[...de,I.data],workspaceCount:(Y.workspaceCount||0)+1}}return Y});t({...e,organizations:W})}w(null),P({name:"",id:"",path:"",description:""}),va(),G("success","Workspace Added",`Successfully added workspace "${b.name}"`)}else G("error","Failed to Add Workspace",I.message||I.error)}catch(_){console.error("Failed to add workspace:",_),G("error","Network Error","Failed to add workspace. Please try again.")}},Jp=async(g,S,_)=>{console.log("🔄 handleUpdateWorkspace called:",{orgId:g,workspaceId:S,updates:_});try{console.log("📡 Making PATCH request to:",`/api/organizations/${g}/workspaces/${S}`);const I=await fetch(`/api/organizations/${g}/workspaces/${S}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(_)});console.log("📨 Response status:",I.status,I.statusText);const W=await I.json();I.ok?(await vn(),G("success","Workspace Updated","Workspace settings updated successfully")):G("error","Failed to Update Workspace",W.message||W.error)}catch(I){console.error("Failed to update workspace:",I),G("error","Network Error","Failed to update workspace. Please try again.")}},Zp=g=>{oe(g.id),ee({name:g.name,type:g.type,technology:g.technology,port:g.port,url:g.url,description:g.description})},eh=()=>{oe(null),ee({})},th=async(g,S,_)=>{try{const I=await fetch(`/api/organizations/${g}/workspaces/${S}/services/${_}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(V)}),W=await I.json();if(I.ok&&W.success)await vn(),oe(null),ee({}),G("success","Service Updated","Service details updated successfully");else throw new Error(W.error||"Failed to update service")}catch(I){console.error("Failed to update service:",I),G("error","Update Failed",I instanceof Error?I.message:"Failed to update service")}},nh=async(g,S,_,I)=>{if(confirm(`Are you sure you want to remove the service "${I}"? This action cannot be undone.`))try{const W=await fetch(`/api/organizations/${g}/workspaces/${S}/services/${_}`,{method:"DELETE"}),Y=await W.json();if(W.ok&&Y.success)await vn(),G("success","Service Removed",`Service "${I}" has been removed`);else throw new Error(Y.error||"Failed to remove service")}catch(W){console.error("Failed to remove service:",W),G("error","Removal Failed",W instanceof Error?W.message:"Failed to remove service")}},rh=async(g,S,_)=>{g.preventDefault();try{const I={...M,port:M.port?parseInt(M.port):void 0,isActive:!0},W=await fetch(`/api/organizations/${S}/workspaces/${_}/services`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(I)}),Y=await W.json();if(W.ok&&Y.success){if(e){const de=e.organizations.map(le=>{var z;if(le.id===S){const D=(z=le.workspaces)==null?void 0:z.map(H=>{if(H.id===_){const Le=H.services||[];return{...H,services:[...Le,Y.data]}}return H});return{...le,workspaces:D}}return le});t({...e,organizations:de})}R(null),K({name:"",type:"backend",port:"",url:"",technology:"",description:""}),va(),G("success","Service Added",`Successfully added service "${I.name}"`)}else G("error","Failed to Add Service",Y.message||Y.error)}catch(I){console.error("Failed to add service:",I),G("error","Network Error","Failed to add service. Please try again.")}},sh=async(g,S,_,I)=>{try{const W=await fetch(`/api/organizations/${g}/workspaces/${S}/services/${_}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:I})}),Y=await W.json();if(W.ok&&Y.success){if(e){const de=e.organizations.map(le=>{var z;if(le.id===g){const D=(z=le.workspaces)==null?void 0:z.map(H=>{var Le;if(H.id===S){const Wt=(Le=H.services)==null?void 0:Le.map(Bt=>Bt.id===_?{...Bt,isActive:I}:Bt);return{...H,services:Wt}}return H});return{...le,workspaces:D}}return le});t({...e,organizations:de})}G("success","Service Updated",`Service ${I?"activated":"deactivated"} successfully`)}else G("error","Failed to Update Service",Y.message||Y.error)}catch(W){console.error("Failed to update service:",W),G("error","Network Error","Failed to update service. Please try again.")}},ih=g=>{$(g.id),Qe({name:g.name,apiUrl:g.apiUrl,apiKey:"",enabled:g.enabled})},ah=()=>{$(null),Qe({})},oh=async g=>{jt(!0);try{const S=await fetch(`/api/organizations/${g}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(be)}),_=await S.json();if(S.ok&&_.success)await vn(),$(null),Qe({}),G("success","Organization Updated","Organization details updated successfully");else throw new Error(_.error||"Failed to update organization")}catch(S){console.error("Failed to update organization:",S),G("error","Update Failed",S instanceof Error?S.message:"Failed to update organization")}finally{jt(!1)}},lh=async g=>{Ot(g),Nt(!0);try{const[S,_]=await Promise.all([fetch(`/api/organizations/${g}/workspaces/available`),fetch(`/api/service-mappings/organization/${g}`)]),I=await S.json();if(S.ok&&I.success){Sr(I.workspaces||[]);const W=new Set,Y={};if(I.workspaces.forEach(de=>{de.syncedLocally&&de.isActive!==!1?(W.add(de.id),Y[de.id]=de.localPath||de.path||""):Y[de.id]=de.path||""}),Q(W),Pe(Y),_.ok){const le=(await _.json()).mappings||[],z={};le.forEach(D=>{z[`${D.workspaceId}:${D.serviceId}`]=D.localPath}),ga(z)}}else G("error","Failed to Fetch Workspaces",I.error||"Could not fetch available workspaces"),Ot(null)}catch(S){console.error("Failed to fetch available workspaces:",S),G("error","Network Error","Failed to fetch available workspaces. Please try again."),Ot(null)}finally{Nt(!1)}},uh=async g=>{da(!0);try{if(fe.size>0){const le=await fetch(`/api/organizations/${g}/workspaces/sync`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspaceIds:Array.from(fe)})}),z=await le.json();if(!le.ok){G("error","Failed to Sync Workspaces",z.message||z.error),da(!1);return}for(const D of fe){const H=bt.find(Wt=>Wt.id===D),Le=ce[D];H&&Le&&Le!==H.path&&await fetch(`/api/organizations/${g}/workspaces/${D}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:Le})})}}const S=new Set(fe),_=bt.filter(le=>le.syncedLocally&&!S.has(le.id));for(const le of _)await fetch(`/api/organizations/${g}/workspaces/${le.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:!1})});let I=0;for(const[le,z]of Object.entries(yn))if(z&&z.trim()){const[D,H]=le.split(":");if(!D||!H)continue;let Le="",Wt="";const Bt=bt.find(Ht=>Ht.id===D);if(Bt!=null&&Bt.services){const Ht=Bt.services.find(fh=>fh.id===H);Ht&&(Le=Ht.name,Wt=Ht.technology||"")}try{(await fetch("/api/service-mappings",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationId:g,workspaceId:D,serviceId:H,localPath:z.trim(),serviceName:Le,technology:Wt})})).ok&&I++}catch(Ht){console.error("Failed to save service mapping:",Ht)}}await vn();const W=fe.size,Y=_.length;let de="";W>0&&Y>0?de=`Saved ${W} workspace(s) and disabled ${Y} workspace(s)`:W>0?de=`Saved ${W} workspace(s)`:Y>0?de=`Disabled ${Y} workspace(s)`:de="No changes made",I>0&&(de+=`, ${I} service path(s) mapped`),G("success","Workspaces Updated",de),Ot(null),ya(new Set)}catch(S){console.error("Failed to save workspaces:",S),G("error","Network Error","Failed to save workspaces. Please try again.")}finally{da(!1)}},ch=async g=>{g.preventDefault();try{const S=o.basePath.endsWith("/")?`${o.basePath}graphql`:`${o.basePath}/graphql`,_={name:o.name,apiUrl:S,apiKey:o.apiKey},I=await fetch("/api/organizations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(_)}),W=await I.json();I.ok?(await Ps(),i(!1),l({name:"",basePath:"",apiKey:""}),va(),G("success","Organization Added",`Successfully added "${o.name}"`)):G("error","Failed to Add Organization",W.message||W.error)}catch(S){console.error("Failed to add organization:",S),G("error","Network Error","Failed to connect to server. Please try again.")}},dh=async g=>{if(confirm("Are you sure you want to delete this organization?"))try{const S=await fetch(`/api/organizations/${g}`,{method:"DELETE"}),_=await S.json();S.ok?(await Ps(),G("success","Organization Deleted",_.message||"Organization deleted successfully")):G("error","Failed to Delete Organization",_.message||_.error)}catch(S){console.error("Failed to delete organization:",S),G("error","Network Error","Failed to delete organization. Please try again.")}};return a.jsxs(a.Fragment,{children:[a.jsx(On,{children:a.jsx("title",{children:"Organizations - AI Agent Service"})}),a.jsxs("div",{className:"space-y-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{children:[a.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Organizations"}),a.jsx("p",{className:"text-muted-foreground",children:"Manage Task Shepherd organizations and API connections"})]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[a.jsx(Mt,{className:"h-4 w-4"}),a.jsxs("span",{children:["Last updated: ",new Date(E).toLocaleTimeString()]})]}),a.jsxs("button",{onClick:vn,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:[a.jsx(jn,{className:`h-4 w-4 mr-2 ${n?"animate-spin":""}`}),"Refresh"]}),a.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:[a.jsx(pi,{className:"h-4 w-4 mr-2"}),"Add Organization"]})]})]}),u.filter(g=>!(g.type==="success"&&g.title==="Connection Test")).length>0&&a.jsx("div",{className:"space-y-2",children:u.filter(g=>!(g.type==="success"&&g.title==="Connection Test")).map(g=>a.jsxs("div",{className:`flex items-start justify-between p-3 rounded-md border text-sm ${g.type==="error"?"border-red-200 bg-red-50 text-red-800":"border-green-200 bg-green-50 text-green-800"}`,children:[a.jsxs("div",{className:"flex items-start space-x-2",children:[g.type==="error"?a.jsx(Ct,{className:"h-4 w-4 text-red-600 mt-0.5 flex-shrink-0"}):a.jsx(zn,{className:"h-4 w-4 text-green-600 mt-0.5 flex-shrink-0"}),a.jsxs("div",{children:[a.jsx("p",{className:"font-medium",children:g.title}),a.jsx("p",{className:"opacity-90",children:g.message}),g.type==="error"&&a.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."})]})]}),a.jsx("button",{onClick:()=>qp(g.id),className:"text-current opacity-60 hover:opacity-100 transition-opacity ml-2",children:a.jsx(ir,{className:"h-3 w-3"})})]},g.id))}),!n&&e&&a.jsx("div",{className:"rounded-lg border bg-card p-6",children:a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx(Ct,{className:`h-5 w-5 ${e.setupCompleted?"text-green-600":"text-yellow-600"}`}),a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium",children:e.setupCompleted?"Setup Complete":"Setup Required"}),a.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&&a.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[a.jsx("h3",{className:"text-lg font-medium mb-4",children:"Add New Organization"}),a.jsxs("form",{onSubmit:ch,className:"space-y-4",children:[a.jsxs("div",{children:[a.jsx("label",{htmlFor:"name",className:"block text-sm font-medium mb-2",children:"Organization Name"}),a.jsx("input",{type:"text",id:"name",value:o.name,onChange:g=>l({...o,name:g.target.value}),onFocus:xa,onBlur:wa,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}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"A friendly name to identify this Task Shepherd instance"})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"basePath",className:"block text-sm font-medium mb-2",children:"API Base Path"}),a.jsx("input",{type:"url",id:"basePath",value:o.basePath,onChange:g=>l({...o,basePath:g.target.value}),onFocus:xa,onBlur:wa,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}),a.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Base API path (GraphQL will be appended automatically: /api → /api/graphql)"}),o.basePath&&a.jsxs("p",{className:"text-xs text-blue-600 mt-1",children:["GraphQL URL will be: ",a.jsx("code",{children:o.basePath.endsWith("/")?`${o.basePath}graphql`:`${o.basePath}/graphql`})]})]}),a.jsxs("div",{children:[a.jsx("label",{htmlFor:"apiKey",className:"block text-sm font-medium mb-2",children:"Agent API Key"}),a.jsx("input",{type:"password",id:"apiKey",value:o.apiKey,onChange:g=>l({...o,apiKey:g.target.value}),onFocus:xa,onBlur:wa,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}),a.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Generate an ",a.jsx("strong",{children:"Agent API key"})," from your Task Shepherd organization settings → API Keys → Create Agent Key"]})]}),a.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[a.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"}),a.jsx("button",{type:"submit",className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700",children:"Add Organization"})]})]})]}),n?a.jsx("div",{className:"text-center py-12",children:a.jsx("div",{className:"text-muted-foreground",children:"Loading organizations..."})}):(e==null?void 0:e.organizations.length)===0?a.jsxs("div",{className:"text-center py-12",children:[a.jsx(Hr,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),a.jsx("h3",{className:"text-lg font-medium mb-2",children:"No Organizations Configured"}),a.jsx("p",{className:"text-muted-foreground mb-4",children:"Add your first organization to start using the AI Agent Service with Task Shepherd."}),a.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:[a.jsx(pi,{className:"h-4 w-4 mr-2"}),"Add Organization"]})]}):a.jsx("div",{className:"grid gap-4",children:e==null?void 0:e.organizations.map(g=>{var W,Y,de,le;const S=((W=g.workerRegistration)==null?void 0:W.registered)||!1,_=((Y=g.workerRegistration)==null?void 0:Y.lastHeartbeat)||g.createdAt,I=(de=g.workerRegistration)!=null&&de.lastHeartbeat?"Last heartbeat":"Created";return a.jsxs("div",{className:"rounded-lg border bg-card p-6",children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsx("div",{className:"flex-1",children:A===g.id?a.jsxs("div",{className:"space-y-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Name"}),a.jsx("input",{type:"text",value:be.name||"",onChange:z=>Qe({...be,name:z.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"API URL"}),a.jsx("input",{type:"text",value:be.apiUrl||"",onChange:z=>Qe({...be,apiUrl:z.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"API Key"}),a.jsx("input",{type:"password",value:be.apiKey||"",onChange:z=>Qe({...be,apiKey:z.target.value}),className:"w-full px-3 py-2 border border-gray-300 rounded focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"Leave empty to keep current key"})]}),a.jsxs("div",{className:"flex items-center",children:[a.jsx("input",{type:"checkbox",id:`enabled-${g.id}`,checked:be.enabled??g.enabled,onChange:z=>Qe({...be,enabled:z.target.checked}),className:"h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded"}),a.jsx("label",{htmlFor:`enabled-${g.id}`,className:"ml-2 block text-sm text-gray-700",children:"Enabled"})]}),a.jsxs("div",{className:"flex gap-2",children:[a.jsxs("button",{onClick:()=>oh(g.id),disabled:Ee,className:"inline-flex items-center gap-2 px-3 py-1.5 bg-blue-600 text-white text-sm rounded hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed",children:[Ee&&a.jsx(Cn,{className:"h-4 w-4 animate-spin"}),Ee?"Saving...":"Save"]}),a.jsx("button",{onClick:ah,disabled:Ee,className:"px-3 py-1.5 bg-gray-200 text-gray-700 text-sm rounded hover:bg-gray-300 disabled:opacity-50 disabled:cursor-not-allowed",children:"Cancel"})]})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("h3",{className:"font-medium",children:g.name}),a.jsxs("div",{className:`flex items-center gap-1 text-sm ${S?"text-green-600":"text-yellow-600"}`,children:[a.jsx("div",{className:`w-2 h-2 rounded-full ${S?"bg-green-600 animate-pulse":"bg-yellow-600"}`}),S?"Connected":"Not Connected"]})]}),a.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:g.apiUrl}),_&&a.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[I,": ",new Date(_).toLocaleString()]})]})}),A!==g.id&&a.jsx("div",{className:"flex items-start",children:a.jsx("button",{onClick:()=>ih(g),className:"p-2 text-gray-500 hover:text-blue-600 transition-colors",title:"Edit organization",children:a.jsx(fi,{className:"h-5 w-5"})})})]}),a.jsx("div",{className:"mt-4",children:!A&&a.jsxs(a.Fragment,{children:[S&&g.workerRegistration&&a.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[a.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[a.jsx(dv,{className:"h-4 w-4 text-gray-500"}),a.jsx("span",{className:"text-sm font-medium",children:"Worker Details"})]}),a.jsxs("div",{className:"space-y-1",children:[g.workerRegistration.workerId&&a.jsxs("p",{className:"text-xs text-gray-600",children:["Worker ID: ",a.jsx("code",{className:"text-xs font-mono bg-gray-100 px-1 rounded",children:g.workerRegistration.workerId})]}),g.workerRegistration.capabilities&&g.workerRegistration.capabilities.length>0&&a.jsx("div",{className:"flex flex-wrap gap-1 mt-1",children:g.workerRegistration.capabilities.map(z=>a.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:[a.jsx(_p,{className:"h-3 w-3"}),z.replace("_"," ").toLowerCase()]},z))})]})]}),S&&a.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-100",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsxs("button",{onClick:()=>Yp(g.id),className:"flex items-center gap-2 hover:text-blue-600 transition-colors",children:[d.has(g.id)?a.jsx(Lr,{className:"h-4 w-4"}):a.jsx(Fr,{className:"h-4 w-4"}),a.jsx(iv,{className:"h-4 w-4 text-gray-500"}),a.jsxs("span",{className:"text-sm font-medium",children:["Workspaces ",g.workspaceCount!==void 0&&`(${g.workspaceCount})`]})]}),a.jsx("div",{className:"flex items-center gap-2",children:a.jsxs("button",{onClick:()=>lh(g.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",children:[a.jsx(Hr,{className:"h-3 w-3 mr-1"}),"Manage"]})})]}),d.has(g.id)&&a.jsxs("div",{className:"mt-2 space-y-2",children:[p.has(g.id)?a.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:"Loading workspaces..."}):g.workspaces&&g.workspaces.length>0?g.workspaces.map(z=>a.jsxs("div",{className:"bg-gray-50 p-3 rounded-md",children:[a.jsxs("div",{className:"flex items-start justify-between",children:[a.jsx("div",{className:"flex-1",children:q===z.id?a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Name"}),a.jsx("input",{type:"text",value:U.name||"",onChange:D=>ne({...U,name:D.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"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Path"}),a.jsx("input",{type:"text",value:U.path||"",onChange:D=>ne({...U,path:D.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"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Description"}),a.jsx("input",{type:"text",value:U.description||"",onChange:D=>ne({...U,description:D.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"})]}),a.jsxs("p",{className:"text-xs text-gray-500",children:["ID: ",a.jsx("code",{className:"font-mono",children:z.id})]})]}):a.jsxs("div",{children:[a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("h4",{className:"text-sm font-medium",children:z.name}),a.jsx("span",{className:`px-1.5 py-0.5 text-xs rounded ${z.isActive?"bg-green-100 text-green-700":"bg-gray-200 text-gray-600"}`,children:z.isActive?"Active":"Inactive"})]}),z.description&&a.jsx("p",{className:"text-xs text-gray-600 mt-1",children:z.description}),a.jsxs("div",{className:"mt-1 space-y-0.5",children:[a.jsxs("p",{className:"text-xs text-gray-500",children:["ID: ",a.jsx("code",{className:"font-mono",children:z.id})]}),a.jsxs("p",{className:"text-xs text-gray-500",children:["Path: ",a.jsx("code",{className:"font-mono",children:z.path})]}),z.projectCount!==void 0&&a.jsxs("p",{className:"text-xs text-gray-500",children:["Projects: ",z.projectCount]})]})]})}),a.jsx("div",{className:"flex items-center gap-1",children:a.jsx("button",{onClick:()=>Jp(g.id,z.id,{isActive:!z.isActive}),className:`p-1 transition-colors ${z.isActive?"text-green-500 hover:text-red-600":"text-gray-400 hover:text-green-600"}`,title:z.isActive?"Deactivate workspace":"Activate workspace",children:z.isActive?a.jsx(uv,{className:"h-3 w-3"}):a.jsx(lv,{className:"h-3 w-3"})})})]}),a.jsxs("div",{className:"mt-2 pt-2 border-t border-gray-200",children:[a.jsxs("div",{className:"flex items-center justify-between mb-1",children:[a.jsxs("button",{onClick:()=>{const D=`${g.id}-${z.id}`,H=new Set(T);H.has(D)?H.delete(D):H.add(D),C(H)},className:"flex items-center gap-1 text-xs text-gray-600 hover:text-blue-600",children:[T.has(`${g.id}-${z.id}`)?a.jsx(Lr,{className:"h-3 w-3"}):a.jsx(Fr,{className:"h-3 w-3"}),"Services ",z.services?`(${z.services.length})`:"(0)"]}),a.jsx("button",{onClick:()=>{R({orgId:g.id,workspaceId:z.id})},className:"text-xs text-green-600 hover:text-green-700",children:a.jsx(pi,{className:"h-3 w-3"})})]}),T.has(`${g.id}-${z.id}`)&&a.jsx("div",{className:"space-y-1 ml-4",children:z.services&&z.services.length>0?z.services.map(D=>a.jsx("div",{className:"bg-white p-2 rounded border",children:Z===D.id?a.jsxs("div",{className:"space-y-2",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Name"}),a.jsx("input",{type:"text",value:V.name||"",onChange:H=>ee({...V,name:H.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"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Type"}),a.jsxs("select",{value:V.type||"backend",onChange:H=>ee({...V,type:H.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:[a.jsx("option",{value:"backend",children:"Backend"}),a.jsx("option",{value:"frontend",children:"Frontend"}),a.jsx("option",{value:"database",children:"Database"}),a.jsx("option",{value:"cache",children:"Cache"}),a.jsx("option",{value:"queue",children:"Queue"}),a.jsx("option",{value:"api",children:"API"}),a.jsx("option",{value:"service",children:"Service"}),a.jsx("option",{value:"other",children:"Other"})]})]})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Technology"}),a.jsx("input",{type:"text",value:V.technology||"",onChange:H=>ee({...V,technology:H.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"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Port"}),a.jsx("input",{type:"number",value:V.port||"",onChange:H=>ee({...V,port:H.target.value?parseInt(H.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"})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"URL"}),a.jsx("input",{type:"url",value:V.url||"",onChange:H=>ee({...V,url:H.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"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"block text-xs font-medium text-gray-700 mb-1",children:"Description"}),a.jsx("input",{type:"text",value:V.description||"",onChange:H=>ee({...V,description:H.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"})]}),a.jsxs("div",{className:"flex items-center justify-end gap-1 pt-1",children:[a.jsx("button",{onClick:()=>th(g.id,z.id,D.id),className:"px-2 py-1 text-xs bg-green-600 text-white rounded hover:bg-green-700",children:a.jsx(hi,{className:"h-3 w-3"})}),a.jsx("button",{onClick:eh,className:"px-2 py-1 text-xs bg-gray-600 text-white rounded hover:bg-gray-700",children:a.jsx(ir,{className:"h-3 w-3"})})]})]}):a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[a.jsx("span",{className:"font-medium",children:D.name}),a.jsxs("span",{className:"text-gray-500",children:["(",D.type,")"]}),D.port&&a.jsxs("span",{className:"text-gray-400",children:[":",D.port]}),D.technology&&a.jsx("span",{className:"px-1 py-0.5 bg-blue-100 text-blue-700 rounded text-xs",children:D.technology}),D.description&&a.jsxs("span",{className:"text-gray-400 italic",children:["- ",D.description]})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("button",{onClick:()=>Zp(D),className:"p-1 text-gray-500 hover:text-orange-600 transition-colors",title:"Edit service",children:a.jsx(fi,{className:"h-3 w-3"})}),a.jsx("button",{onClick:()=>nh(g.id,z.id,D.id,D.name),className:"p-1 text-gray-500 hover:text-red-600 transition-colors",title:"Remove service",children:a.jsx(mi,{className:"h-3 w-3"})}),a.jsx("button",{onClick:()=>sh(g.id,z.id,D.id,!D.isActive),className:`px-1.5 py-0.5 rounded text-xs ${D.isActive?"bg-green-100 text-green-700":"bg-gray-100 text-gray-600"}`,children:D.isActive?"Active":"Inactive"})]})]})},D.id)):a.jsx("div",{className:"text-xs text-gray-500",children:"No services configured"})})]}),z.projects&&z.projects.length>0&&a.jsxs("div",{className:"mt-2 pt-2 border-t border-gray-200",children:[a.jsx("div",{className:"flex items-center justify-between mb-1",children:a.jsxs("button",{onClick:()=>{const D=`proj-${g.id}-${z.id}`,H=new Set(pa);H.has(D)?H.delete(D):H.add(D),Bp(H)},className:"flex items-center gap-1 text-xs text-gray-600 hover:text-purple-600",children:[pa.has(`proj-${g.id}-${z.id}`)?a.jsx(Lr,{className:"h-3 w-3"}):a.jsx(Fr,{className:"h-3 w-3"}),a.jsx(eo,{className:"h-3 w-3 text-purple-500"}),"Projects (",z.projects.length,")"]})}),pa.has(`proj-${g.id}-${z.id}`)&&a.jsx("div",{className:"space-y-1 ml-4",children:z.projects.map(D=>{const H=Gp(D.id),Le=Hp===D.id;return a.jsxs("div",{className:`bg-white p-2 rounded border ${H?"border-purple-300":"border-gray-200"}`,children:[a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[a.jsx(sv,{className:"h-3 w-3 text-gray-400"}),a.jsx("span",{className:"font-medium",children:D.name}),D.stage&&a.jsx("span",{className:"px-1 py-0.5 bg-gray-100 text-gray-600 rounded text-xs",children:D.stage}),H&&a.jsx("span",{className:"px-1 py-0.5 bg-purple-100 text-purple-700 rounded text-xs",children:"Mapped"})]}),a.jsxs("div",{className:"flex items-center gap-1",children:[H&&!Le&&a.jsx("button",{onClick:()=>Kp(g.id,D.id),className:"p-1 text-gray-500 hover:text-red-600 transition-colors",title:"Remove mapping",children:a.jsx(mi,{className:"h-3 w-3"})}),!Le&&a.jsx("button",{onClick:()=>{ha(D.id),Es((H==null?void 0:H.localPath)||"")},className:"p-1 text-gray-500 hover:text-purple-600 transition-colors",title:H?"Edit path":"Set local path",children:a.jsx(fi,{className:"h-3 w-3"})})]})]}),H&&!Le&&a.jsx("div",{className:"mt-1 text-xs text-purple-600",children:a.jsx("code",{className:"bg-purple-50 px-1 rounded",children:H.localPath})}),Le&&a.jsxs("div",{className:"mt-2 flex gap-1",children:[a.jsx("input",{type:"text",value:ma,onChange:Wt=>Es(Wt.target.value),placeholder:"/path/to/local/project",className:"flex-1 text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-purple-500"}),a.jsx("button",{onClick:()=>Vp(g.id,D.id,D.name),disabled:uu,className:"px-2 py-1 text-xs bg-purple-600 text-white rounded hover:bg-purple-700 disabled:opacity-50",children:uu?a.jsx(Cn,{className:"h-3 w-3 animate-spin"}):a.jsx(hi,{className:"h-3 w-3"})}),a.jsx("button",{onClick:()=>{ha(null),Es("")},className:"px-2 py-1 text-xs bg-gray-200 text-gray-700 rounded hover:bg-gray-300",children:a.jsx(ir,{className:"h-3 w-3"})})]})]},D.id)})})]})]},z.id)):a.jsx("div",{className:"text-sm text-gray-500 text-center py-2",children:'No workspaces configured. Click "Manage" to import from Task Shepherd.'}),(j==null?void 0:j.orgId)===g.id&&((le=g.workspaces)==null?void 0:le.some(z=>z.id===j.workspaceId))&&a.jsxs("div",{className:"bg-green-50 p-3 rounded-md border border-green-200",children:[a.jsx("h5",{className:"text-sm font-medium mb-2",children:"Add New Service"}),a.jsxs("form",{onSubmit:z=>rh(z,j.orgId,j.workspaceId),className:"space-y-2",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a.jsx("input",{type:"text",placeholder:"Service Name",value:M.name,onChange:z=>K({...M,name:z.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}),a.jsxs("select",{value:M.type,onChange:z=>K({...M,type:z.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:[a.jsx("option",{value:"backend",children:"Backend"}),a.jsx("option",{value:"frontend",children:"Frontend"}),a.jsx("option",{value:"database",children:"Database"}),a.jsx("option",{value:"cache",children:"Cache"}),a.jsx("option",{value:"queue",children:"Queue"}),a.jsx("option",{value:"api",children:"API"}),a.jsx("option",{value:"service",children:"Service"}),a.jsx("option",{value:"other",children:"Other"})]})]}),a.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[a.jsx("input",{type:"number",placeholder:"Port",value:M.port,onChange:z=>K({...M,port:z.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500"}),a.jsx("input",{type:"text",placeholder:"Technology (e.g., Node.js)",value:M.technology,onChange:z=>K({...M,technology:z.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500"}),a.jsx("input",{type:"url",placeholder:"URL (optional)",value:M.url,onChange:z=>K({...M,url:z.target.value}),className:"text-xs px-2 py-1 border border-gray-300 rounded focus:outline-none focus:ring-1 focus:ring-green-500"})]}),a.jsx("input",{type:"text",placeholder:"Description (optional)",value:M.description,onChange:z=>K({...M,description:z.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"}),a.jsxs("div",{className:"flex justify-end gap-1",children:[a.jsx("button",{type:"button",onClick:()=>{R(null),K({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"}),a.jsx("button",{type:"submit",className:"px-2 py-1 text-xs bg-green-600 text-white rounded hover:bg-green-700",children:"Add Service"})]})]})]}),x===g.id&&a.jsxs("div",{className:"bg-blue-50 p-3 rounded-md border border-blue-200",children:[a.jsx("h5",{className:"text-sm font-medium mb-2",children:"Add New Workspace"}),a.jsxs("form",{onSubmit:z=>Xp(z,g.id),className:"space-y-2",children:[a.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[a.jsx("input",{type:"text",placeholder:"Workspace Name",value:b.name,onChange:z=>P({...b,name:z.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}),a.jsx("input",{type:"text",placeholder:"Workspace ID",value:b.id,onChange:z=>P({...b,id:z.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})]}),a.jsx("input",{type:"text",placeholder:"Path (e.g., /home/user/projects/workspace)",value:b.path,onChange:z=>P({...b,path:z.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}),a.jsx("input",{type:"text",placeholder:"Description (optional)",value:b.description,onChange:z=>P({...b,description:z.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"}),a.jsxs("div",{className:"flex justify-end gap-1",children:[a.jsx("button",{type:"button",onClick:()=>{w(null),P({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"}),a.jsx("button",{type:"submit",className:"px-2 py-1 text-xs bg-blue-600 text-white rounded hover:bg-blue-700",children:"Add Workspace"})]})]})]})]})]})]})}),a.jsx("div",{className:"flex items-center gap-2 mt-4",children:g.id!=="default"&&a.jsxs("button",{onClick:()=>dh(g.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:[a.jsx(mi,{className:"h-3 w-3 mr-1"}),"Delete"]})})]},g.id)})}),N&&a.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center p-4 z-50",children:a.jsx("div",{className:"bg-white rounded-lg shadow-xl max-w-6xl w-full max-h-[90vh] overflow-hidden",children:a.jsx(Yv,{organizationId:N,onComplete:g=>{var _;if(e){const I=e.organizations.map(W=>{if(W.id===N){const Y=[...W.workspaces||[],g];return{...W,workspaces:Y,workspaceCount:Y.length}}return W});t({...e,organizations:I})}m(null);const S=((_=g.services)==null?void 0:_.length)||0;G("success","Workspace Created",`Successfully created workspace "${g.name}" with ${S} service(s) using wizard`)},onCancel:()=>{m(null)}})})}),h&&a.jsx(Xv,{organizationId:h.orgId,workspace:h.workspace,onClose:()=>{y(null)},onApplyChanges:async g=>{console.log("🔧 Applying workspace analysis changes:",g);try{const S=await fetch(`/api/organizations/${h.orgId}/workspaces/${h.workspace.id}/apply-improvements`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({improvements:g})}),_=await S.json();if(S.ok&&_.success)G("success","Changes Applied",`Applied ${g.length} improvement(s) to workspace "${h.workspace.name}"`),await vn();else throw new Error(_.error||"Failed to apply changes")}catch(S){console.error("Failed to apply workspace changes:",S),G("error","Failed to Apply Changes",S instanceof Error?S.message:"Failed to apply workspace improvements")}}}),a.jsxs("div",{className:"space-y-4",children:[a.jsxs("div",{className:"rounded-lg border bg-green-50 p-6",children:[a.jsx("h3",{className:"text-lg font-medium mb-4",children:"Getting Your Task Shepherd API Information"}),a.jsxs("div",{className:"space-y-3 text-sm text-green-900",children:[a.jsxs("p",{children:[a.jsx("strong",{children:"Step 1:"})," Open your Task Shepherd frontend in a browser"]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Step 2:"})," Copy the URL up to ",a.jsx("code",{children:"/api"})]}),a.jsxs("div",{className:"bg-green-100 p-3 rounded-md font-mono text-xs",children:[a.jsx("p",{children:a.jsx("strong",{children:"Example:"})}),a.jsxs("p",{children:["• Frontend URL: ",a.jsx("code",{children:"https://myorg.taskshepherd.com"})]}),a.jsxs("p",{children:["• API Base Path: ",a.jsx("code",{children:"https://myorg.taskshepherd.com/api"})]})]}),a.jsxs("p",{children:[a.jsx("strong",{children:"Step 3:"})," Generate an ",a.jsx("strong",{children:"Agent API key"})," from Organization Settings → API Keys → Create Agent Key"]})]})]}),Cs&&a.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:a.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-4xl w-full max-h-[90vh] overflow-y-auto m-4",children:[a.jsxs("div",{className:"flex justify-between items-center mb-4",children:[a.jsx("h2",{className:"text-xl font-semibold",children:"Manage Workspaces"}),a.jsx("button",{onClick:()=>Ot(null),className:"text-gray-500 hover:text-gray-700",children:a.jsx(ir,{className:"h-5 w-5"})})]}),dt?a.jsxs("div",{className:"flex items-center justify-center py-12",children:[a.jsx(Cn,{className:"h-8 w-8 animate-spin text-blue-600"}),a.jsx("span",{className:"ml-2 text-gray-600",children:"Loading available workspaces..."})]}):a.jsxs("div",{className:"space-y-4",children:[a.jsx("p",{className:"text-sm text-gray-600",children:"Select workspaces to sync from Task Shepherd and configure local paths for each."}),bt.length===0?a.jsx("div",{className:"text-center py-8 text-gray-500",children:"No workspaces available in this organization"}):a.jsxs("div",{className:"space-y-4",children:[bt.filter(g=>g.isActive!==!1).length>0&&a.jsx("div",{className:"space-y-2",children:bt.filter(g=>g.isActive!==!1).map(g=>a.jsx("div",{className:`border rounded-lg p-4 ${fe.has(g.id)?"border-blue-500 bg-blue-50":"border-gray-200"}`,children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("input",{type:"checkbox",checked:fe.has(g.id),onChange:S=>{const _=new Set(fe);S.target.checked?_.add(g.id):_.delete(g.id),Q(_)},className:"mt-1"}),a.jsxs("div",{className:"flex-1",children:[a.jsxs("div",{className:"flex items-center justify-between mb-2",children:[a.jsxs("div",{children:[a.jsx("h3",{className:"font-medium",children:g.name}),g.description&&a.jsx("p",{className:"text-sm text-gray-600",children:g.description})]}),g.syncedLocally&&a.jsx("span",{className:"text-xs px-2 py-1 bg-green-100 text-green-700 rounded",children:"Already Synced"})]}),a.jsxs("div",{className:"mt-2",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Local Path"}),a.jsx("input",{type:"text",value:ce[g.id]||"",onChange:S=>{Pe({...ce,[g.id]:S.target.value})},placeholder:g.path||"Enter local directory path",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm",disabled:!fe.has(g.id)}),a.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Suggested path: ",g.path||"Not specified"]})]}),g.services&&g.services.length>0&&a.jsxs("div",{className:"mt-3 border-t pt-3",children:[a.jsxs("button",{type:"button",onClick:()=>{const S=new Set(Bn);S.has(g.id)?S.delete(g.id):S.add(g.id),ya(S)},className:"flex items-center gap-2 text-sm font-medium text-gray-700 hover:text-gray-900",disabled:!fe.has(g.id),children:[Bn.has(g.id)?a.jsx(Lr,{className:"h-4 w-4"}):a.jsx(Fr,{className:"h-4 w-4"}),a.jsx(Hr,{className:"h-4 w-4"}),g.services.length," Service",g.services.length!==1?"s":""]}),Bn.has(g.id)&&a.jsx("div",{className:"mt-2 space-y-2 pl-6",children:g.services.map(S=>{const _=`${g.id}:${S.id}`;return a.jsxs("div",{className:"border rounded p-2 bg-gray-50",children:[a.jsxs("div",{className:"flex items-start justify-between mb-1",children:[a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-sm",children:S.name}),S.technology&&a.jsx("span",{className:"ml-2 text-xs px-1.5 py-0.5 bg-purple-100 text-purple-700 rounded",children:S.technology})]}),yn[_]&&a.jsx(eo,{className:"h-3 w-3 text-green-500"})]}),S.description&&a.jsx("p",{className:"text-xs text-gray-500 mb-2",children:S.description}),a.jsx("input",{type:"text",value:yn[_]||"",onChange:I=>{ga({...yn,[_]:I.target.value})},placeholder:"Service local path (optional, inherits from workspace)",className:"w-full px-2 py-1 border border-gray-300 rounded text-xs focus:outline-none focus:ring-1 focus:ring-blue-500",disabled:!fe.has(g.id)}),a.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Leave empty to use workspace path"})]},S.id)})})]}),(!g.services||g.services.length===0)&&a.jsx("p",{className:"text-sm text-gray-500 mt-2 italic",children:"No services defined"})]})]})},g.id))}),bt.filter(g=>g.isActive===!1).length>0&&a.jsxs("div",{className:"space-y-2",children:[a.jsx("h4",{className:"text-sm font-medium text-gray-500",children:"Inactive Workspaces"}),bt.filter(g=>g.isActive===!1).map(g=>a.jsx("div",{className:`border rounded-lg p-4 opacity-60 ${fe.has(g.id)?"border-blue-500 bg-blue-50":"border-gray-200"}`,children:a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("input",{type:"checkbox",checked:fe.has(g.id),onChange:S=>{const _=new Set(fe);S.target.checked?_.add(g.id):_.delete(g.id),Q(_)},className:"mt-1"}),a.jsxs("div",{className:"flex-1",children:[a.jsx("div",{className:"flex items-center justify-between mb-2",children:a.jsxs("div",{children:[a.jsxs("h3",{className:"font-medium flex items-center gap-2",children:[g.name,a.jsx("span",{className:"text-xs px-2 py-1 bg-gray-100 text-gray-600 rounded",children:"Inactive"})]}),g.description&&a.jsx("p",{className:"text-sm text-gray-600",children:g.description})]})}),a.jsxs("div",{className:"mt-2",children:[a.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Local Path"}),a.jsx("input",{type:"text",value:ce[g.id]||"",onChange:S=>{Pe({...ce,[g.id]:S.target.value})},placeholder:g.path||"Enter local directory path",className:"w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-1 focus:ring-blue-500 text-sm",disabled:!fe.has(g.id)}),a.jsxs("p",{className:"text-xs text-gray-500 mt-1",children:["Suggested path: ",g.path||"Not specified"]})]}),g.services&&g.services.length>0&&a.jsxs("div",{className:"mt-3 border-t pt-3",children:[a.jsxs("button",{type:"button",onClick:()=>{const S=new Set(Bn);S.has(g.id)?S.delete(g.id):S.add(g.id),ya(S)},className:"flex items-center gap-2 text-sm font-medium text-gray-700 hover:text-gray-900",disabled:!fe.has(g.id),children:[Bn.has(g.id)?a.jsx(Lr,{className:"h-4 w-4"}):a.jsx(Fr,{className:"h-4 w-4"}),a.jsx(Hr,{className:"h-4 w-4"}),g.services.length," Service",g.services.length!==1?"s":""]}),Bn.has(g.id)&&a.jsx("div",{className:"mt-2 space-y-2 pl-6",children:g.services.map(S=>{const _=`${g.id}:${S.id}`;return a.jsxs("div",{className:"border rounded p-2 bg-gray-50",children:[a.jsxs("div",{className:"flex items-start justify-between mb-1",children:[a.jsxs("div",{children:[a.jsx("span",{className:"font-medium text-sm",children:S.name}),S.technology&&a.jsx("span",{className:"ml-2 text-xs px-1.5 py-0.5 bg-purple-100 text-purple-700 rounded",children:S.technology})]}),yn[_]&&a.jsx(eo,{className:"h-3 w-3 text-green-500"})]}),S.description&&a.jsx("p",{className:"text-xs text-gray-500 mb-2",children:S.description}),a.jsx("input",{type:"text",value:yn[_]||"",onChange:I=>{ga({...yn,[_]:I.target.value})},placeholder:"Service local path (optional, inherits from workspace)",className:"w-full px-2 py-1 border border-gray-300 rounded text-xs focus:outline-none focus:ring-1 focus:ring-blue-500",disabled:!fe.has(g.id)}),a.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Leave empty to use workspace path"})]},S.id)})})]}),(!g.services||g.services.length===0)&&a.jsx("p",{className:"text-sm text-gray-500 mt-2 italic",children:"No services defined"})]})]})},g.id))]})]}),a.jsxs("div",{className:"flex justify-end gap-2 mt-6 pt-4 border-t",children:[a.jsx("button",{onClick:()=>Ot(null),className:"px-4 py-2 text-gray-600 hover:text-gray-800",disabled:Wn,children:"Cancel"}),a.jsx("button",{onClick:()=>uh(Cs),disabled:Wn,className:"px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2",children:Wn?a.jsxs(a.Fragment,{children:[a.jsx(Cn,{className:"h-4 w-4 animate-spin"}),"Saving..."]}):a.jsxs(a.Fragment,{children:[a.jsx(hi,{className:"h-4 w-4"}),"Save"]})})]})]})]})}),a.jsxs("div",{className:"rounded-lg border bg-blue-50 p-6",children:[a.jsx("h3",{className:"text-lg font-medium mb-4",children:"About Organization & Workspace Management"}),a.jsxs("div",{className:"space-y-2 text-sm text-blue-900",children:[a.jsxs("p",{children:["• ",a.jsx("strong",{children:"Organizations"})," represent different Task Shepherd instances you want to connect to"]}),a.jsxs("p",{children:["• Each organization needs an ",a.jsx("strong",{children:"Agent API key"})," (not a user API key) generated from the Task Shepherd organization settings"]}),a.jsxs("p",{children:["• ",a.jsx("strong",{children:"Workspaces"})," are collections of related projects within an organization"]}),a.jsxs("p",{children:["• Click ",a.jsx("strong",{children:"Manage"})," to select and sync workspaces from Task Shepherd with custom local paths"]}),a.jsx("p",{children:"• You can activate/deactivate workspaces to control which ones the agent works with"}),a.jsx("p",{children:"• The agent will automatically sync workspaces and accept work assignments from configured organizations"})]})]})]})]})]})}function Zv(){return a.jsxs(a.Fragment,{children:[a.jsx(On,{children:a.jsx("title",{children:"404 - Page Not Found"})}),a.jsx("div",{className:"flex flex-col items-center justify-center min-h-[400px] text-center",children:a.jsxs("div",{className:"space-y-4",children:[a.jsx("h1",{className:"text-4xl font-bold",children:"404"}),a.jsx("h2",{className:"text-xl text-muted-foreground",children:"Page Not Found"}),a.jsx("p",{className:"text-muted-foreground max-w-md",children:"The page you're looking for doesn't exist or has been moved."}),a.jsxs(jp,{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:[a.jsx(Rp,{className:"h-4 w-4"}),a.jsx("span",{children:"Go Home"})]})]})})]})}function ex(){return a.jsxs(a.Fragment,{children:[a.jsxs(On,{children:[a.jsx("title",{children:"AI Agent Service Dashboard"}),a.jsx("meta",{name:"description",content:"Analytics dashboard for AI agent service monitoring"})]}),a.jsx(Hv,{children:a.jsxs(z0,{children:[a.jsx(ui,{path:"/",element:a.jsx(Gv,{})}),a.jsx(ui,{path:"/organizations",element:a.jsx(Jv,{})}),a.jsx(ui,{path:"*",element:a.jsx(Zv,{})})]})})]})}const tx=new iy({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1,staleTime:1e3*60*5}}});to.createRoot(document.getElementById("root")).render(a.jsx(L.StrictMode,{children:a.jsx(sr,{children:a.jsx(ly,{client:tx,children:a.jsxs(I0,{children:[a.jsx(ex,{}),a.jsx(Zy,{position:"top-right"})]})})})}));
69
+ //# sourceMappingURL=index-f64daf60.js.map