better-auth-studio 1.0.23-beta.3 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/cli.js +1 -1
- package/dist/cli.js.map +1 -1
- package/dist/routes.d.ts.map +1 -1
- package/dist/routes.js +632 -0
- package/dist/routes.js.map +1 -1
- package/package.json +1 -1
- package/public/assets/main-BHWGrokH.js +405 -0
- package/public/assets/main-Ba9FD9p1.css +1 -0
- package/public/index.html +2 -2
- package/public/assets/main-DBAg_Mbk.css +0 -1
- package/public/assets/main-jcB2p8Xw.js +0 -363
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
function Nx(e,t){for(var r=0;r<t.length;r++){const s=t[r];if(typeof s!="string"&&!Array.isArray(s)){for(const a in s)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(s,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>s[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))s(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function r(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(a){if(a.ep)return;a.ep=!0;const i=r(a);fetch(a.href,i)}})();function Zu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var eh={exports:{}},Ui={},th={exports:{}},ce={};/**
|
|
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 ya=Symbol.for("react.element"),kx=Symbol.for("react.portal"),Sx=Symbol.for("react.fragment"),Cx=Symbol.for("react.strict_mode"),Ex=Symbol.for("react.profiler"),Tx=Symbol.for("react.provider"),Px=Symbol.for("react.context"),zx=Symbol.for("react.forward_ref"),Dx=Symbol.for("react.suspense"),Rx=Symbol.for("react.memo"),Mx=Symbol.for("react.lazy"),od=Symbol.iterator;function Ix(e){return e===null||typeof e!="object"?null:(e=od&&e[od]||e["@@iterator"],typeof e=="function"?e:null)}var rh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},nh=Object.assign,sh={};function ps(e,t,r){this.props=e,this.context=t,this.refs=sh,this.updater=r||rh}ps.prototype.isReactComponent={};ps.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")};ps.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ah(){}ah.prototype=ps.prototype;function qo(e,t,r){this.props=e,this.context=t,this.refs=sh,this.updater=r||rh}var Zo=qo.prototype=new ah;Zo.constructor=qo;nh(Zo,ps.prototype);Zo.isPureReactComponent=!0;var cd=Array.isArray,ih=Object.prototype.hasOwnProperty,ec={current:null},lh={key:!0,ref:!0,__self:!0,__source:!0};function oh(e,t,r){var s,a={},i=null,l=null;if(t!=null)for(s in t.ref!==void 0&&(l=t.ref),t.key!==void 0&&(i=""+t.key),t)ih.call(t,s)&&!lh.hasOwnProperty(s)&&(a[s]=t[s]);var o=arguments.length-2;if(o===1)a.children=r;else if(1<o){for(var c=Array(o),d=0;d<o;d++)c[d]=arguments[d+2];a.children=c}if(e&&e.defaultProps)for(s in o=e.defaultProps,o)a[s]===void 0&&(a[s]=o[s]);return{$$typeof:ya,type:e,key:i,ref:l,props:a,_owner:ec.current}}function Lx(e,t){return{$$typeof:ya,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function tc(e){return typeof e=="object"&&e!==null&&e.$$typeof===ya}function Ox(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var dd=/\/+/g;function cl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Ox(""+e.key):t.toString(36)}function Za(e,t,r,s,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case ya:case kx:l=!0}}if(l)return l=e,a=a(l),e=s===""?"."+cl(l,0):s,cd(a)?(r="",e!=null&&(r=e.replace(dd,"$&/")+"/"),Za(a,t,r,"",function(d){return d})):a!=null&&(tc(a)&&(a=Lx(a,r+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(dd,"$&/")+"/")+e)),t.push(a)),1;if(l=0,s=s===""?".":s+":",cd(e))for(var o=0;o<e.length;o++){i=e[o];var c=s+cl(i,o);l+=Za(i,t,r,c,a)}else if(c=Ix(e),typeof c=="function")for(e=c.call(e),o=0;!(i=e.next()).done;)i=i.value,c=s+cl(i,o++),l+=Za(i,t,r,c,a);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 l}function za(e,t,r){if(e==null)return e;var s=[],a=0;return Za(e,s,"","",function(i){return t.call(r,i,a++)}),s}function Ax(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ut={current:null},ei={transition:null},_x={ReactCurrentDispatcher:ut,ReactCurrentBatchConfig:ei,ReactCurrentOwner:ec};function ch(){throw Error("act(...) is not supported in production builds of React.")}ce.Children={map:za,forEach:function(e,t,r){za(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return za(e,function(){t++}),t},toArray:function(e){return za(e,function(t){return t})||[]},only:function(e){if(!tc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ce.Component=ps;ce.Fragment=Sx;ce.Profiler=Ex;ce.PureComponent=qo;ce.StrictMode=Cx;ce.Suspense=Dx;ce.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=_x;ce.act=ch;ce.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var s=nh({},e.props),a=e.key,i=e.ref,l=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,l=ec.current),t.key!==void 0&&(a=""+t.key),e.type&&e.type.defaultProps)var o=e.type.defaultProps;for(c in t)ih.call(t,c)&&!lh.hasOwnProperty(c)&&(s[c]=t[c]===void 0&&o!==void 0?o[c]:t[c])}var c=arguments.length-2;if(c===1)s.children=r;else if(1<c){o=Array(c);for(var d=0;d<c;d++)o[d]=arguments[d+2];s.children=o}return{$$typeof:ya,type:e.type,key:a,ref:i,props:s,_owner:l}};ce.createContext=function(e){return e={$$typeof:Px,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:Tx,_context:e},e.Consumer=e};ce.createElement=oh;ce.createFactory=function(e){var t=oh.bind(null,e);return t.type=e,t};ce.createRef=function(){return{current:null}};ce.forwardRef=function(e){return{$$typeof:zx,render:e}};ce.isValidElement=tc;ce.lazy=function(e){return{$$typeof:Mx,_payload:{_status:-1,_result:e},_init:Ax}};ce.memo=function(e,t){return{$$typeof:Rx,type:e,compare:t===void 0?null:t}};ce.startTransition=function(e){var t=ei.transition;ei.transition={};try{e()}finally{ei.transition=t}};ce.unstable_act=ch;ce.useCallback=function(e,t){return ut.current.useCallback(e,t)};ce.useContext=function(e){return ut.current.useContext(e)};ce.useDebugValue=function(){};ce.useDeferredValue=function(e){return ut.current.useDeferredValue(e)};ce.useEffect=function(e,t){return ut.current.useEffect(e,t)};ce.useId=function(){return ut.current.useId()};ce.useImperativeHandle=function(e,t,r){return ut.current.useImperativeHandle(e,t,r)};ce.useInsertionEffect=function(e,t){return ut.current.useInsertionEffect(e,t)};ce.useLayoutEffect=function(e,t){return ut.current.useLayoutEffect(e,t)};ce.useMemo=function(e,t){return ut.current.useMemo(e,t)};ce.useReducer=function(e,t,r){return ut.current.useReducer(e,t,r)};ce.useRef=function(e){return ut.current.useRef(e)};ce.useState=function(e){return ut.current.useState(e)};ce.useSyncExternalStore=function(e,t,r){return ut.current.useSyncExternalStore(e,t,r)};ce.useTransition=function(){return ut.current.useTransition()};ce.version="18.3.1";th.exports=ce;var h=th.exports;const V=Zu(h),rc=Nx({__proto__:null,default:V},[h]);/**
|
|
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 $x=h,Fx=Symbol.for("react.element"),Ux=Symbol.for("react.fragment"),Bx=Object.prototype.hasOwnProperty,Vx=$x.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Wx={key:!0,ref:!0,__self:!0,__source:!0};function dh(e,t,r){var s,a={},i=null,l=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(l=t.ref);for(s in t)Bx.call(t,s)&&!Wx.hasOwnProperty(s)&&(a[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)a[s]===void 0&&(a[s]=t[s]);return{$$typeof:Fx,type:e,key:i,ref:l,props:a,_owner:Vx.current}}Ui.Fragment=Ux;Ui.jsx=dh;Ui.jsxs=dh;eh.exports=Ui;var n=eh.exports,Yl={},uh={exports:{}},kt={},hh={exports:{}},mh={};/**
|
|
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(S,O){var B=S.length;S.push(O);e:for(;0<B;){var z=B-1>>>1,b=S[z];if(0<a(b,O))S[z]=O,S[B]=b,B=z;else break e}}function r(S){return S.length===0?null:S[0]}function s(S){if(S.length===0)return null;var O=S[0],B=S.pop();if(B!==O){S[0]=B;e:for(var z=0,b=S.length,E=b>>>1;z<E;){var L=2*(z+1)-1,M=S[L],A=L+1,K=S[A];if(0>a(M,B))A<b&&0>a(K,M)?(S[z]=K,S[A]=B,z=A):(S[z]=M,S[L]=B,z=L);else if(A<b&&0>a(K,B))S[z]=K,S[A]=B,z=A;else break e}}return O}function a(S,O){var B=S.sortIndex-O.sortIndex;return B!==0?B:S.id-O.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var c=[],d=[],m=1,u=null,p=3,y=!1,w=!1,v=!1,j=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,f=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function g(S){for(var O=r(d);O!==null;){if(O.callback===null)s(d);else if(O.startTime<=S)s(d),O.sortIndex=O.expirationTime,t(c,O);else break;O=r(d)}}function N(S){if(v=!1,g(S),!w)if(r(c)!==null)w=!0,X(C);else{var O=r(d);O!==null&&_(N,O.startTime-S)}}function C(S,O){w=!1,v&&(v=!1,x(R),R=-1),y=!0;var B=p;try{for(g(O),u=r(c);u!==null&&(!(u.expirationTime>O)||S&&!q());){var z=u.callback;if(typeof z=="function"){u.callback=null,p=u.priorityLevel;var b=z(u.expirationTime<=O);O=e.unstable_now(),typeof b=="function"?u.callback=b:u===r(c)&&s(c),g(O)}else s(c);u=r(c)}if(u!==null)var E=!0;else{var L=r(d);L!==null&&_(N,L.startTime-O),E=!1}return E}finally{u=null,p=B,y=!1}}var P=!1,k=null,R=-1,J=5,W=-1;function q(){return!(e.unstable_now()-W<J)}function Y(){if(k!==null){var S=e.unstable_now();W=S;var O=!0;try{O=k(!0,S)}finally{O?te():(P=!1,k=null)}}else P=!1}var te;if(typeof f=="function")te=function(){f(Y)};else if(typeof MessageChannel<"u"){var ee=new MessageChannel,ie=ee.port2;ee.port1.onmessage=Y,te=function(){ie.postMessage(null)}}else te=function(){j(Y,0)};function X(S){k=S,P||(P=!0,te())}function _(S,O){R=j(function(){S(e.unstable_now())},O)}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(S){S.callback=null},e.unstable_continueExecution=function(){w||y||(w=!0,X(C))},e.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<S?Math.floor(1e3/S):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(S){switch(p){case 1:case 2:case 3:var O=3;break;default:O=p}var B=p;p=O;try{return S()}finally{p=B}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(S,O){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var B=p;p=S;try{return O()}finally{p=B}},e.unstable_scheduleCallback=function(S,O,B){var z=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?z+B:z):B=z,S){case 1:var b=-1;break;case 2:b=250;break;case 5:b=1073741823;break;case 4:b=1e4;break;default:b=5e3}return b=B+b,S={id:m++,callback:O,priorityLevel:S,startTime:B,expirationTime:b,sortIndex:-1},B>z?(S.sortIndex=B,t(d,S),r(c)===null&&S===r(d)&&(v?(x(R),R=-1):v=!0,_(N,B-z))):(S.sortIndex=b,t(c,S),w||y||(w=!0,X(C))),S},e.unstable_shouldYield=q,e.unstable_wrapCallback=function(S){var O=p;return function(){var B=p;p=O;try{return S.apply(this,arguments)}finally{p=B}}}})(mh);hh.exports=mh;var Hx=hh.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 Kx=h,Nt=Hx;function U(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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 fh=new Set,Js={};function kn(e,t){ss(e,t),ss(e+"Capture",t)}function ss(e,t){for(Js[e]=t,e=0;e<t.length;e++)fh.add(t[e])}var yr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Gl=Object.prototype.hasOwnProperty,Qx=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,ud={},hd={};function Yx(e){return Gl.call(hd,e)?!0:Gl.call(ud,e)?!1:Qx.test(e)?hd[e]=!0:(ud[e]=!0,!1)}function Gx(e,t,r,s){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Xx(e,t,r,s){if(t===null||typeof t>"u"||Gx(e,t,r,s))return!0;if(s)return!1;if(r!==null)switch(r.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 ht(e,t,r,s,a,i,l){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=l}var qe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){qe[e]=new ht(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];qe[t]=new ht(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){qe[e]=new ht(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){qe[e]=new ht(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){qe[e]=new ht(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){qe[e]=new ht(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){qe[e]=new ht(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){qe[e]=new ht(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){qe[e]=new ht(e,5,!1,e.toLowerCase(),null,!1,!1)});var nc=/[\-:]([a-z])/g;function sc(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(nc,sc);qe[t]=new ht(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(nc,sc);qe[t]=new ht(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(nc,sc);qe[t]=new ht(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){qe[e]=new ht(e,1,!1,e.toLowerCase(),null,!1,!1)});qe.xlinkHref=new ht("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){qe[e]=new ht(e,1,!1,e.toLowerCase(),null,!0,!0)});function ac(e,t,r,s){var a=qe.hasOwnProperty(t)?qe[t]:null;(a!==null?a.type!==0:s||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Xx(t,r,a,s)&&(r=null),s||a===null?Yx(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,s=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,s?e.setAttributeNS(s,t,r):e.setAttribute(t,r))))}var Nr=Kx.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Da=Symbol.for("react.element"),On=Symbol.for("react.portal"),An=Symbol.for("react.fragment"),ic=Symbol.for("react.strict_mode"),Xl=Symbol.for("react.profiler"),xh=Symbol.for("react.provider"),ph=Symbol.for("react.context"),lc=Symbol.for("react.forward_ref"),Jl=Symbol.for("react.suspense"),ql=Symbol.for("react.suspense_list"),oc=Symbol.for("react.memo"),Tr=Symbol.for("react.lazy"),gh=Symbol.for("react.offscreen"),md=Symbol.iterator;function ks(e){return e===null||typeof e!="object"?null:(e=md&&e[md]||e["@@iterator"],typeof e=="function"?e:null)}var Re=Object.assign,dl;function As(e){if(dl===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);dl=t&&t[1]||""}return`
|
|
34
|
-
`+dl+e}var ul=!1;function hl(e,t){if(!e||ul)return"";ul=!0;var r=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(d){var s=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){s=d}e.call(t.prototype)}else{try{throw Error()}catch(d){s=d}e()}}catch(d){if(d&&s&&typeof d.stack=="string"){for(var a=d.stack.split(`
|
|
35
|
-
`),i=s.stack.split(`
|
|
36
|
-
`),l=a.length-1,o=i.length-1;1<=l&&0<=o&&a[l]!==i[o];)o--;for(;1<=l&&0<=o;l--,o--)if(a[l]!==i[o]){if(l!==1||o!==1)do if(l--,o--,0>o||a[l]!==i[o]){var c=`
|
|
37
|
-
`+a[l].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=l&&0<=o);break}}}finally{ul=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?As(e):""}function Jx(e){switch(e.tag){case 5:return As(e.type);case 16:return As("Lazy");case 13:return As("Suspense");case 19:return As("SuspenseList");case 0:case 2:case 15:return e=hl(e.type,!1),e;case 11:return e=hl(e.type.render,!1),e;case 1:return e=hl(e.type,!0),e;default:return""}}function Zl(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 An:return"Fragment";case On:return"Portal";case Xl:return"Profiler";case ic:return"StrictMode";case Jl:return"Suspense";case ql:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ph:return(e.displayName||"Context")+".Consumer";case xh:return(e._context.displayName||"Context")+".Provider";case lc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case oc:return t=e.displayName||null,t!==null?t:Zl(e.type)||"Memo";case Tr:t=e._payload,e=e._init;try{return Zl(e(t))}catch{}}return null}function qx(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Zl(t);case 8:return t===ic?"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 Qr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zx(e){var t=vh(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(l){s=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return s},setValue:function(l){s=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ra(e){e._valueTracker||(e._valueTracker=Zx(e))}function yh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),s="";return e&&(s=vh(e)?e.checked?"true":"false":e.value),e=s,e!==r?(t.setValue(e),!0):!1}function fi(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 eo(e,t){var r=t.checked;return Re({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function fd(e,t){var r=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;r=Qr(t.value!=null?t.value:r),e._wrapperState={initialChecked:s,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function wh(e,t){t=t.checked,t!=null&&ac(e,"checked",t,!1)}function to(e,t){wh(e,t);var r=Qr(t.value),s=t.type;if(r!=null)s==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ro(e,t.type,r):t.hasOwnProperty("defaultValue")&&ro(e,t.type,Qr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function xd(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function ro(e,t,r){(t!=="number"||fi(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var _s=Array.isArray;function Yn(e,t,r,s){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&s&&(e[r].defaultSelected=!0)}else{for(r=""+Qr(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,s&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function no(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return Re({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function pd(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(U(92));if(_s(r)){if(1<r.length)throw Error(U(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Qr(r)}}function bh(e,t){var r=Qr(t.value),s=Qr(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),s!=null&&(e.defaultValue=""+s)}function gd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function jh(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 so(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?jh(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ma,Nh=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,s,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,s,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ma=Ma||document.createElement("div"),Ma.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ma.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qs(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Us={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},ep=["Webkit","ms","Moz","O"];Object.keys(Us).forEach(function(e){ep.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Us[t]=Us[e]})});function kh(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Us.hasOwnProperty(e)&&Us[e]?(""+t).trim():t+"px"}function Sh(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var s=r.indexOf("--")===0,a=kh(r,t[r],s);r==="float"&&(r="cssFloat"),s?e.setProperty(r,a):e[r]=a}}var tp=Re({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 ao(e,t){if(t){if(tp[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function io(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 lo=null;function cc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var oo=null,Gn=null,Xn=null;function vd(e){if(e=ja(e)){if(typeof oo!="function")throw Error(U(280));var t=e.stateNode;t&&(t=Ki(t),oo(e.stateNode,e.type,t))}}function Ch(e){Gn?Xn?Xn.push(e):Xn=[e]:Gn=e}function Eh(){if(Gn){var e=Gn,t=Xn;if(Xn=Gn=null,vd(e),t)for(e=0;e<t.length;e++)vd(t[e])}}function Th(e,t){return e(t)}function Ph(){}var ml=!1;function zh(e,t,r){if(ml)return e(t,r);ml=!0;try{return Th(e,t,r)}finally{ml=!1,(Gn!==null||Xn!==null)&&(Ph(),Eh())}}function Zs(e,t){var r=e.stateNode;if(r===null)return null;var s=Ki(r);if(s===null)return null;r=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(U(231,t,typeof r));return r}var co=!1;if(yr)try{var Ss={};Object.defineProperty(Ss,"passive",{get:function(){co=!0}}),window.addEventListener("test",Ss,Ss),window.removeEventListener("test",Ss,Ss)}catch{co=!1}function rp(e,t,r,s,a,i,l,o,c){var d=Array.prototype.slice.call(arguments,3);try{t.apply(r,d)}catch(m){this.onError(m)}}var Bs=!1,xi=null,pi=!1,uo=null,np={onError:function(e){Bs=!0,xi=e}};function sp(e,t,r,s,a,i,l,o,c){Bs=!1,xi=null,rp.apply(np,arguments)}function ap(e,t,r,s,a,i,l,o,c){if(sp.apply(this,arguments),Bs){if(Bs){var d=xi;Bs=!1,xi=null}else throw Error(U(198));pi||(pi=!0,uo=d)}}function Sn(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Dh(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 yd(e){if(Sn(e)!==e)throw Error(U(188))}function ip(e){var t=e.alternate;if(!t){if(t=Sn(e),t===null)throw Error(U(188));return t!==e?null:e}for(var r=e,s=t;;){var a=r.return;if(a===null)break;var i=a.alternate;if(i===null){if(s=a.return,s!==null){r=s;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===r)return yd(a),e;if(i===s)return yd(a),t;i=i.sibling}throw Error(U(188))}if(r.return!==s.return)r=a,s=i;else{for(var l=!1,o=a.child;o;){if(o===r){l=!0,r=a,s=i;break}if(o===s){l=!0,s=a,r=i;break}o=o.sibling}if(!l){for(o=i.child;o;){if(o===r){l=!0,r=i,s=a;break}if(o===s){l=!0,s=i,r=a;break}o=o.sibling}if(!l)throw Error(U(189))}}if(r.alternate!==s)throw Error(U(190))}if(r.tag!==3)throw Error(U(188));return r.stateNode.current===r?e:t}function Rh(e){return e=ip(e),e!==null?Mh(e):null}function Mh(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Mh(e);if(t!==null)return t;e=e.sibling}return null}var Ih=Nt.unstable_scheduleCallback,wd=Nt.unstable_cancelCallback,lp=Nt.unstable_shouldYield,op=Nt.unstable_requestPaint,Oe=Nt.unstable_now,cp=Nt.unstable_getCurrentPriorityLevel,dc=Nt.unstable_ImmediatePriority,Lh=Nt.unstable_UserBlockingPriority,gi=Nt.unstable_NormalPriority,dp=Nt.unstable_LowPriority,Oh=Nt.unstable_IdlePriority,Bi=null,sr=null;function up(e){if(sr&&typeof sr.onCommitFiberRoot=="function")try{sr.onCommitFiberRoot(Bi,e,void 0,(e.current.flags&128)===128)}catch{}}var Ht=Math.clz32?Math.clz32:fp,hp=Math.log,mp=Math.LN2;function fp(e){return e>>>=0,e===0?32:31-(hp(e)/mp|0)|0}var Ia=64,La=4194304;function $s(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 vi(e,t){var r=e.pendingLanes;if(r===0)return 0;var s=0,a=e.suspendedLanes,i=e.pingedLanes,l=r&268435455;if(l!==0){var o=l&~a;o!==0?s=$s(o):(i&=l,i!==0&&(s=$s(i)))}else l=r&~a,l!==0?s=$s(l):i!==0&&(s=$s(i));if(s===0)return 0;if(t!==0&&t!==s&&!(t&a)&&(a=s&-s,i=t&-t,a>=i||a===16&&(i&4194240)!==0))return t;if(s&4&&(s|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0<t;)r=31-Ht(t),a=1<<r,s|=e[r],t&=~a;return s}function xp(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 pp(e,t){for(var r=e.suspendedLanes,s=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes;0<i;){var l=31-Ht(i),o=1<<l,c=a[l];c===-1?(!(o&r)||o&s)&&(a[l]=xp(o,t)):c<=t&&(e.expiredLanes|=o),i&=~o}}function ho(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Ah(){var e=Ia;return Ia<<=1,!(Ia&4194240)&&(Ia=64),e}function fl(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function wa(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Ht(t),e[t]=r}function gp(e,t){var r=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 s=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-Ht(r),i=1<<a;t[a]=0,s[a]=-1,e[a]=-1,r&=~i}}function uc(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var s=31-Ht(r),a=1<<s;a&t|e[s]&t&&(e[s]|=t),r&=~a}}var pe=0;function _h(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var $h,hc,Fh,Uh,Bh,mo=!1,Oa=[],Or=null,Ar=null,_r=null,ea=new Map,ta=new Map,zr=[],vp="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 bd(e,t){switch(e){case"focusin":case"focusout":Or=null;break;case"dragenter":case"dragleave":Ar=null;break;case"mouseover":case"mouseout":_r=null;break;case"pointerover":case"pointerout":ea.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ta.delete(t.pointerId)}}function Cs(e,t,r,s,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:r,eventSystemFlags:s,nativeEvent:i,targetContainers:[a]},t!==null&&(t=ja(t),t!==null&&hc(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function yp(e,t,r,s,a){switch(t){case"focusin":return Or=Cs(Or,e,t,r,s,a),!0;case"dragenter":return Ar=Cs(Ar,e,t,r,s,a),!0;case"mouseover":return _r=Cs(_r,e,t,r,s,a),!0;case"pointerover":var i=a.pointerId;return ea.set(i,Cs(ea.get(i)||null,e,t,r,s,a)),!0;case"gotpointercapture":return i=a.pointerId,ta.set(i,Cs(ta.get(i)||null,e,t,r,s,a)),!0}return!1}function Vh(e){var t=cn(e.target);if(t!==null){var r=Sn(t);if(r!==null){if(t=r.tag,t===13){if(t=Dh(r),t!==null){e.blockedOn=t,Bh(e.priority,function(){Fh(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ti(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=fo(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var s=new r.constructor(r.type,r);lo=s,r.target.dispatchEvent(s),lo=null}else return t=ja(r),t!==null&&hc(t),e.blockedOn=r,!1;t.shift()}return!0}function jd(e,t,r){ti(e)&&r.delete(t)}function wp(){mo=!1,Or!==null&&ti(Or)&&(Or=null),Ar!==null&&ti(Ar)&&(Ar=null),_r!==null&&ti(_r)&&(_r=null),ea.forEach(jd),ta.forEach(jd)}function Es(e,t){e.blockedOn===t&&(e.blockedOn=null,mo||(mo=!0,Nt.unstable_scheduleCallback(Nt.unstable_NormalPriority,wp)))}function ra(e){function t(a){return Es(a,e)}if(0<Oa.length){Es(Oa[0],e);for(var r=1;r<Oa.length;r++){var s=Oa[r];s.blockedOn===e&&(s.blockedOn=null)}}for(Or!==null&&Es(Or,e),Ar!==null&&Es(Ar,e),_r!==null&&Es(_r,e),ea.forEach(t),ta.forEach(t),r=0;r<zr.length;r++)s=zr[r],s.blockedOn===e&&(s.blockedOn=null);for(;0<zr.length&&(r=zr[0],r.blockedOn===null);)Vh(r),r.blockedOn===null&&zr.shift()}var Jn=Nr.ReactCurrentBatchConfig,yi=!0;function bp(e,t,r,s){var a=pe,i=Jn.transition;Jn.transition=null;try{pe=1,mc(e,t,r,s)}finally{pe=a,Jn.transition=i}}function jp(e,t,r,s){var a=pe,i=Jn.transition;Jn.transition=null;try{pe=4,mc(e,t,r,s)}finally{pe=a,Jn.transition=i}}function mc(e,t,r,s){if(yi){var a=fo(e,t,r,s);if(a===null)kl(e,t,s,wi,r),bd(e,s);else if(yp(a,e,t,r,s))s.stopPropagation();else if(bd(e,s),t&4&&-1<vp.indexOf(e)){for(;a!==null;){var i=ja(a);if(i!==null&&$h(i),i=fo(e,t,r,s),i===null&&kl(e,t,s,wi,r),i===a)break;a=i}a!==null&&s.stopPropagation()}else kl(e,t,s,null,r)}}var wi=null;function fo(e,t,r,s){if(wi=null,e=cc(s),e=cn(e),e!==null)if(t=Sn(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Dh(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return wi=e,null}function Wh(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(cp()){case dc:return 1;case Lh:return 4;case gi:case dp:return 16;case Oh:return 536870912;default:return 16}default:return 16}}var Rr=null,fc=null,ri=null;function Hh(){if(ri)return ri;var e,t=fc,r=t.length,s,a="value"in Rr?Rr.value:Rr.textContent,i=a.length;for(e=0;e<r&&t[e]===a[e];e++);var l=r-e;for(s=1;s<=l&&t[r-s]===a[i-s];s++);return ri=a.slice(e,1<s?1-s:void 0)}function ni(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 Aa(){return!0}function Nd(){return!1}function St(e){function t(r,s,a,i,l){this._reactName=r,this._targetInst=a,this.type=s,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Aa:Nd,this.isPropagationStopped=Nd,this}return Re(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Aa)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Aa)},persist:function(){},isPersistent:Aa}),t}var gs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xc=St(gs),ba=Re({},gs,{view:0,detail:0}),Np=St(ba),xl,pl,Ts,Vi=Re({},ba,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pc,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!==Ts&&(Ts&&e.type==="mousemove"?(xl=e.screenX-Ts.screenX,pl=e.screenY-Ts.screenY):pl=xl=0,Ts=e),xl)},movementY:function(e){return"movementY"in e?e.movementY:pl}}),kd=St(Vi),kp=Re({},Vi,{dataTransfer:0}),Sp=St(kp),Cp=Re({},ba,{relatedTarget:0}),gl=St(Cp),Ep=Re({},gs,{animationName:0,elapsedTime:0,pseudoElement:0}),Tp=St(Ep),Pp=Re({},gs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zp=St(Pp),Dp=Re({},gs,{data:0}),Sd=St(Dp),Rp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Mp={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"},Ip={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ip[e])?!!t[e]:!1}function pc(){return Lp}var Op=Re({},ba,{key:function(e){if(e.key){var t=Rp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ni(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Mp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pc,charCode:function(e){return e.type==="keypress"?ni(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ni(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ap=St(Op),_p=Re({},Vi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Cd=St(_p),$p=Re({},ba,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pc}),Fp=St($p),Up=Re({},gs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bp=St(Up),Vp=Re({},Vi,{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}),Wp=St(Vp),Hp=[9,13,27,32],gc=yr&&"CompositionEvent"in window,Vs=null;yr&&"documentMode"in document&&(Vs=document.documentMode);var Kp=yr&&"TextEvent"in window&&!Vs,Kh=yr&&(!gc||Vs&&8<Vs&&11>=Vs),Ed=" ",Td=!1;function Qh(e,t){switch(e){case"keyup":return Hp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _n=!1;function Qp(e,t){switch(e){case"compositionend":return Yh(t);case"keypress":return t.which!==32?null:(Td=!0,Ed);case"textInput":return e=t.data,e===Ed&&Td?null:e;default:return null}}function Yp(e,t){if(_n)return e==="compositionend"||!gc&&Qh(e,t)?(e=Hh(),ri=fc=Rr=null,_n=!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 Kh&&t.locale!=="ko"?null:t.data;default:return null}}var Gp={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 Pd(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Gp[e.type]:t==="textarea"}function Gh(e,t,r,s){Ch(s),t=bi(t,"onChange"),0<t.length&&(r=new xc("onChange","change",null,r,s),e.push({event:r,listeners:t}))}var Ws=null,na=null;function Xp(e){im(e,0)}function Wi(e){var t=Un(e);if(yh(t))return e}function Jp(e,t){if(e==="change")return t}var Xh=!1;if(yr){var vl;if(yr){var yl="oninput"in document;if(!yl){var zd=document.createElement("div");zd.setAttribute("oninput","return;"),yl=typeof zd.oninput=="function"}vl=yl}else vl=!1;Xh=vl&&(!document.documentMode||9<document.documentMode)}function Dd(){Ws&&(Ws.detachEvent("onpropertychange",Jh),na=Ws=null)}function Jh(e){if(e.propertyName==="value"&&Wi(na)){var t=[];Gh(t,na,e,cc(e)),zh(Xp,t)}}function qp(e,t,r){e==="focusin"?(Dd(),Ws=t,na=r,Ws.attachEvent("onpropertychange",Jh)):e==="focusout"&&Dd()}function Zp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Wi(na)}function eg(e,t){if(e==="click")return Wi(t)}function tg(e,t){if(e==="input"||e==="change")return Wi(t)}function rg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qt=typeof Object.is=="function"?Object.is:rg;function sa(e,t){if(Qt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;for(s=0;s<r.length;s++){var a=r[s];if(!Gl.call(t,a)||!Qt(e[a],t[a]))return!1}return!0}function Rd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Md(e,t){var r=Rd(e);e=0;for(var s;r;){if(r.nodeType===3){if(s=e+r.textContent.length,e<=t&&s>=t)return{node:r,offset:t-e};e=s}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Rd(r)}}function qh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qh(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zh(){for(var e=window,t=fi();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=fi(e.document)}return t}function vc(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 ng(e){var t=Zh(),r=e.focusedElem,s=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&qh(r.ownerDocument.documentElement,r)){if(s!==null&&vc(r)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,i=Math.min(s.start,a);s=s.end===void 0?i:Math.min(s.end,a),!e.extend&&i>s&&(a=s,s=i,i=a),a=Md(r,i);var l=Md(r,s);a&&l&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==l.node||e.focusOffset!==l.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),i>s?(e.addRange(t),e.extend(l.node,l.offset)):(t.setEnd(l.node,l.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var sg=yr&&"documentMode"in document&&11>=document.documentMode,$n=null,xo=null,Hs=null,po=!1;function Id(e,t,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;po||$n==null||$n!==fi(s)||(s=$n,"selectionStart"in s&&vc(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Hs&&sa(Hs,s)||(Hs=s,s=bi(xo,"onSelect"),0<s.length&&(t=new xc("onSelect","select",null,t,r),e.push({event:t,listeners:s}),t.target=$n)))}function _a(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Fn={animationend:_a("Animation","AnimationEnd"),animationiteration:_a("Animation","AnimationIteration"),animationstart:_a("Animation","AnimationStart"),transitionend:_a("Transition","TransitionEnd")},wl={},em={};yr&&(em=document.createElement("div").style,"AnimationEvent"in window||(delete Fn.animationend.animation,delete Fn.animationiteration.animation,delete Fn.animationstart.animation),"TransitionEvent"in window||delete Fn.transitionend.transition);function Hi(e){if(wl[e])return wl[e];if(!Fn[e])return e;var t=Fn[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in em)return wl[e]=t[r];return e}var tm=Hi("animationend"),rm=Hi("animationiteration"),nm=Hi("animationstart"),sm=Hi("transitionend"),am=new Map,Ld="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 Jr(e,t){am.set(e,t),kn(t,[e])}for(var bl=0;bl<Ld.length;bl++){var jl=Ld[bl],ag=jl.toLowerCase(),ig=jl[0].toUpperCase()+jl.slice(1);Jr(ag,"on"+ig)}Jr(tm,"onAnimationEnd");Jr(rm,"onAnimationIteration");Jr(nm,"onAnimationStart");Jr("dblclick","onDoubleClick");Jr("focusin","onFocus");Jr("focusout","onBlur");Jr(sm,"onTransitionEnd");ss("onMouseEnter",["mouseout","mouseover"]);ss("onMouseLeave",["mouseout","mouseover"]);ss("onPointerEnter",["pointerout","pointerover"]);ss("onPointerLeave",["pointerout","pointerover"]);kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));kn("onBeforeInput",["compositionend","keypress","textInput","paste"]);kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fs="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(" "),lg=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fs));function Od(e,t,r){var s=e.type||"unknown-event";e.currentTarget=r,ap(s,t,void 0,e),e.currentTarget=null}function im(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var s=e[r],a=s.event;s=s.listeners;e:{var i=void 0;if(t)for(var l=s.length-1;0<=l;l--){var o=s[l],c=o.instance,d=o.currentTarget;if(o=o.listener,c!==i&&a.isPropagationStopped())break e;Od(a,o,d),i=c}else for(l=0;l<s.length;l++){if(o=s[l],c=o.instance,d=o.currentTarget,o=o.listener,c!==i&&a.isPropagationStopped())break e;Od(a,o,d),i=c}}}if(pi)throw e=uo,pi=!1,uo=null,e}function Se(e,t){var r=t[bo];r===void 0&&(r=t[bo]=new Set);var s=e+"__bubble";r.has(s)||(lm(t,e,2,!1),r.add(s))}function Nl(e,t,r){var s=0;t&&(s|=4),lm(r,e,s,t)}var $a="_reactListening"+Math.random().toString(36).slice(2);function aa(e){if(!e[$a]){e[$a]=!0,fh.forEach(function(r){r!=="selectionchange"&&(lg.has(r)||Nl(r,!1,e),Nl(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$a]||(t[$a]=!0,Nl("selectionchange",!1,t))}}function lm(e,t,r,s){switch(Wh(t)){case 1:var a=bp;break;case 4:a=jp;break;default:a=mc}r=a.bind(null,t,r,e),a=void 0,!co||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),s?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function kl(e,t,r,s,a){var i=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var l=s.tag;if(l===3||l===4){var o=s.stateNode.containerInfo;if(o===a||o.nodeType===8&&o.parentNode===a)break;if(l===4)for(l=s.return;l!==null;){var c=l.tag;if((c===3||c===4)&&(c=l.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;l=l.return}for(;o!==null;){if(l=cn(o),l===null)return;if(c=l.tag,c===5||c===6){s=i=l;continue e}o=o.parentNode}}s=s.return}zh(function(){var d=i,m=cc(r),u=[];e:{var p=am.get(e);if(p!==void 0){var y=xc,w=e;switch(e){case"keypress":if(ni(r)===0)break e;case"keydown":case"keyup":y=Ap;break;case"focusin":w="focus",y=gl;break;case"focusout":w="blur",y=gl;break;case"beforeblur":case"afterblur":y=gl;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=kd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Sp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=Fp;break;case tm:case rm:case nm:y=Tp;break;case sm:y=Bp;break;case"scroll":y=Np;break;case"wheel":y=Wp;break;case"copy":case"cut":case"paste":y=zp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=Cd}var v=(t&4)!==0,j=!v&&e==="scroll",x=v?p!==null?p+"Capture":null:p;v=[];for(var f=d,g;f!==null;){g=f;var N=g.stateNode;if(g.tag===5&&N!==null&&(g=N,x!==null&&(N=Zs(f,x),N!=null&&v.push(ia(f,N,g)))),j)break;f=f.return}0<v.length&&(p=new y(p,w,null,r,m),u.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",p&&r!==lo&&(w=r.relatedTarget||r.fromElement)&&(cn(w)||w[wr]))break e;if((y||p)&&(p=m.window===m?m:(p=m.ownerDocument)?p.defaultView||p.parentWindow:window,y?(w=r.relatedTarget||r.toElement,y=d,w=w?cn(w):null,w!==null&&(j=Sn(w),w!==j||w.tag!==5&&w.tag!==6)&&(w=null)):(y=null,w=d),y!==w)){if(v=kd,N="onMouseLeave",x="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(v=Cd,N="onPointerLeave",x="onPointerEnter",f="pointer"),j=y==null?p:Un(y),g=w==null?p:Un(w),p=new v(N,f+"leave",y,r,m),p.target=j,p.relatedTarget=g,N=null,cn(m)===d&&(v=new v(x,f+"enter",w,r,m),v.target=g,v.relatedTarget=j,N=v),j=N,y&&w)t:{for(v=y,x=w,f=0,g=v;g;g=Pn(g))f++;for(g=0,N=x;N;N=Pn(N))g++;for(;0<f-g;)v=Pn(v),f--;for(;0<g-f;)x=Pn(x),g--;for(;f--;){if(v===x||x!==null&&v===x.alternate)break t;v=Pn(v),x=Pn(x)}v=null}else v=null;y!==null&&Ad(u,p,y,v,!1),w!==null&&j!==null&&Ad(u,j,w,v,!0)}}e:{if(p=d?Un(d):window,y=p.nodeName&&p.nodeName.toLowerCase(),y==="select"||y==="input"&&p.type==="file")var C=Jp;else if(Pd(p))if(Xh)C=tg;else{C=Zp;var P=qp}else(y=p.nodeName)&&y.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=eg);if(C&&(C=C(e,d))){Gh(u,C,r,m);break e}P&&P(e,p,d),e==="focusout"&&(P=p._wrapperState)&&P.controlled&&p.type==="number"&&ro(p,"number",p.value)}switch(P=d?Un(d):window,e){case"focusin":(Pd(P)||P.contentEditable==="true")&&($n=P,xo=d,Hs=null);break;case"focusout":Hs=xo=$n=null;break;case"mousedown":po=!0;break;case"contextmenu":case"mouseup":case"dragend":po=!1,Id(u,r,m);break;case"selectionchange":if(sg)break;case"keydown":case"keyup":Id(u,r,m)}var k;if(gc)e:{switch(e){case"compositionstart":var R="onCompositionStart";break e;case"compositionend":R="onCompositionEnd";break e;case"compositionupdate":R="onCompositionUpdate";break e}R=void 0}else _n?Qh(e,r)&&(R="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(R="onCompositionStart");R&&(Kh&&r.locale!=="ko"&&(_n||R!=="onCompositionStart"?R==="onCompositionEnd"&&_n&&(k=Hh()):(Rr=m,fc="value"in Rr?Rr.value:Rr.textContent,_n=!0)),P=bi(d,R),0<P.length&&(R=new Sd(R,e,null,r,m),u.push({event:R,listeners:P}),k?R.data=k:(k=Yh(r),k!==null&&(R.data=k)))),(k=Kp?Qp(e,r):Yp(e,r))&&(d=bi(d,"onBeforeInput"),0<d.length&&(m=new Sd("onBeforeInput","beforeinput",null,r,m),u.push({event:m,listeners:d}),m.data=k))}im(u,t)})}function ia(e,t,r){return{instance:e,listener:t,currentTarget:r}}function bi(e,t){for(var r=t+"Capture",s=[];e!==null;){var a=e,i=a.stateNode;a.tag===5&&i!==null&&(a=i,i=Zs(e,r),i!=null&&s.unshift(ia(e,i,a)),i=Zs(e,t),i!=null&&s.push(ia(e,i,a))),e=e.return}return s}function Pn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ad(e,t,r,s,a){for(var i=t._reactName,l=[];r!==null&&r!==s;){var o=r,c=o.alternate,d=o.stateNode;if(c!==null&&c===s)break;o.tag===5&&d!==null&&(o=d,a?(c=Zs(r,i),c!=null&&l.unshift(ia(r,c,o))):a||(c=Zs(r,i),c!=null&&l.push(ia(r,c,o)))),r=r.return}l.length!==0&&e.push({event:t,listeners:l})}var og=/\r\n?/g,cg=/\u0000|\uFFFD/g;function _d(e){return(typeof e=="string"?e:""+e).replace(og,`
|
|
38
|
-
`).replace(cg,"")}function Fa(e,t,r){if(t=_d(t),_d(e)!==t&&r)throw Error(U(425))}function ji(){}var go=null,vo=null;function yo(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 wo=typeof setTimeout=="function"?setTimeout:void 0,dg=typeof clearTimeout=="function"?clearTimeout:void 0,$d=typeof Promise=="function"?Promise:void 0,ug=typeof queueMicrotask=="function"?queueMicrotask:typeof $d<"u"?function(e){return $d.resolve(null).then(e).catch(hg)}:wo;function hg(e){setTimeout(function(){throw e})}function Sl(e,t){var r=t,s=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(s===0){e.removeChild(a),ra(t);return}s--}else r!=="$"&&r!=="$?"&&r!=="$!"||s++;r=a}while(r);ra(t)}function $r(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 Fd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var vs=Math.random().toString(36).slice(2),rr="__reactFiber$"+vs,la="__reactProps$"+vs,wr="__reactContainer$"+vs,bo="__reactEvents$"+vs,mg="__reactListeners$"+vs,fg="__reactHandles$"+vs;function cn(e){var t=e[rr];if(t)return t;for(var r=e.parentNode;r;){if(t=r[wr]||r[rr]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Fd(e);e!==null;){if(r=e[rr])return r;e=Fd(e)}return t}e=r,r=e.parentNode}return null}function ja(e){return e=e[rr]||e[wr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Un(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function Ki(e){return e[la]||null}var jo=[],Bn=-1;function qr(e){return{current:e}}function Ce(e){0>Bn||(e.current=jo[Bn],jo[Bn]=null,Bn--)}function je(e,t){Bn++,jo[Bn]=e.current,e.current=t}var Yr={},at=qr(Yr),pt=qr(!1),xn=Yr;function as(e,t){var r=e.type.contextTypes;if(!r)return Yr;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var a={},i;for(i in r)a[i]=t[i];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function gt(e){return e=e.childContextTypes,e!=null}function Ni(){Ce(pt),Ce(at)}function Ud(e,t,r){if(at.current!==Yr)throw Error(U(168));je(at,t),je(pt,r)}function om(e,t,r){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return r;s=s.getChildContext();for(var a in s)if(!(a in t))throw Error(U(108,qx(e)||"Unknown",a));return Re({},r,s)}function ki(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Yr,xn=at.current,je(at,e),je(pt,pt.current),!0}function Bd(e,t,r){var s=e.stateNode;if(!s)throw Error(U(169));r?(e=om(e,t,xn),s.__reactInternalMemoizedMergedChildContext=e,Ce(pt),Ce(at),je(at,e)):Ce(pt),je(pt,r)}var mr=null,Qi=!1,Cl=!1;function cm(e){mr===null?mr=[e]:mr.push(e)}function xg(e){Qi=!0,cm(e)}function Zr(){if(!Cl&&mr!==null){Cl=!0;var e=0,t=pe;try{var r=mr;for(pe=1;e<r.length;e++){var s=r[e];do s=s(!0);while(s!==null)}mr=null,Qi=!1}catch(a){throw mr!==null&&(mr=mr.slice(e+1)),Ih(dc,Zr),a}finally{pe=t,Cl=!1}}return null}var Vn=[],Wn=0,Si=null,Ci=0,Tt=[],Pt=0,pn=null,fr=1,xr="";function sn(e,t){Vn[Wn++]=Ci,Vn[Wn++]=Si,Si=e,Ci=t}function dm(e,t,r){Tt[Pt++]=fr,Tt[Pt++]=xr,Tt[Pt++]=pn,pn=e;var s=fr;e=xr;var a=32-Ht(s)-1;s&=~(1<<a),r+=1;var i=32-Ht(t)+a;if(30<i){var l=a-a%5;i=(s&(1<<l)-1).toString(32),s>>=l,a-=l,fr=1<<32-Ht(t)+a|r<<a|s,xr=i+e}else fr=1<<i|r<<a|s,xr=e}function yc(e){e.return!==null&&(sn(e,1),dm(e,1,0))}function wc(e){for(;e===Si;)Si=Vn[--Wn],Vn[Wn]=null,Ci=Vn[--Wn],Vn[Wn]=null;for(;e===pn;)pn=Tt[--Pt],Tt[Pt]=null,xr=Tt[--Pt],Tt[Pt]=null,fr=Tt[--Pt],Tt[Pt]=null}var jt=null,bt=null,Pe=!1,Wt=null;function um(e,t){var r=zt(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function Vd(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,jt=e,bt=$r(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,jt=e,bt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=pn!==null?{id:fr,overflow:xr}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=zt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,jt=e,bt=null,!0):!1;default:return!1}}function No(e){return(e.mode&1)!==0&&(e.flags&128)===0}function ko(e){if(Pe){var t=bt;if(t){var r=t;if(!Vd(e,t)){if(No(e))throw Error(U(418));t=$r(r.nextSibling);var s=jt;t&&Vd(e,t)?um(s,r):(e.flags=e.flags&-4097|2,Pe=!1,jt=e)}}else{if(No(e))throw Error(U(418));e.flags=e.flags&-4097|2,Pe=!1,jt=e}}}function Wd(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;jt=e}function Ua(e){if(e!==jt)return!1;if(!Pe)return Wd(e),Pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!yo(e.type,e.memoizedProps)),t&&(t=bt)){if(No(e))throw hm(),Error(U(418));for(;t;)um(e,t),t=$r(t.nextSibling)}if(Wd(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){bt=$r(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}bt=null}}else bt=jt?$r(e.stateNode.nextSibling):null;return!0}function hm(){for(var e=bt;e;)e=$r(e.nextSibling)}function is(){bt=jt=null,Pe=!1}function bc(e){Wt===null?Wt=[e]:Wt.push(e)}var pg=Nr.ReactCurrentBatchConfig;function Ps(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(U(309));var s=r.stateNode}if(!s)throw Error(U(147,e));var a=s,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(l){var o=a.refs;l===null?delete o[i]:o[i]=l},t._stringRef=i,t)}if(typeof e!="string")throw Error(U(284));if(!r._owner)throw Error(U(290,e))}return e}function Ba(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Hd(e){var t=e._init;return t(e._payload)}function mm(e){function t(x,f){if(e){var g=x.deletions;g===null?(x.deletions=[f],x.flags|=16):g.push(f)}}function r(x,f){if(!e)return null;for(;f!==null;)t(x,f),f=f.sibling;return null}function s(x,f){for(x=new Map;f!==null;)f.key!==null?x.set(f.key,f):x.set(f.index,f),f=f.sibling;return x}function a(x,f){return x=Vr(x,f),x.index=0,x.sibling=null,x}function i(x,f,g){return x.index=g,e?(g=x.alternate,g!==null?(g=g.index,g<f?(x.flags|=2,f):g):(x.flags|=2,f)):(x.flags|=1048576,f)}function l(x){return e&&x.alternate===null&&(x.flags|=2),x}function o(x,f,g,N){return f===null||f.tag!==6?(f=Ml(g,x.mode,N),f.return=x,f):(f=a(f,g),f.return=x,f)}function c(x,f,g,N){var C=g.type;return C===An?m(x,f,g.props.children,N,g.key):f!==null&&(f.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Tr&&Hd(C)===f.type)?(N=a(f,g.props),N.ref=Ps(x,f,g),N.return=x,N):(N=di(g.type,g.key,g.props,null,x.mode,N),N.ref=Ps(x,f,g),N.return=x,N)}function d(x,f,g,N){return f===null||f.tag!==4||f.stateNode.containerInfo!==g.containerInfo||f.stateNode.implementation!==g.implementation?(f=Il(g,x.mode,N),f.return=x,f):(f=a(f,g.children||[]),f.return=x,f)}function m(x,f,g,N,C){return f===null||f.tag!==7?(f=mn(g,x.mode,N,C),f.return=x,f):(f=a(f,g),f.return=x,f)}function u(x,f,g){if(typeof f=="string"&&f!==""||typeof f=="number")return f=Ml(""+f,x.mode,g),f.return=x,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Da:return g=di(f.type,f.key,f.props,null,x.mode,g),g.ref=Ps(x,null,f),g.return=x,g;case On:return f=Il(f,x.mode,g),f.return=x,f;case Tr:var N=f._init;return u(x,N(f._payload),g)}if(_s(f)||ks(f))return f=mn(f,x.mode,g,null),f.return=x,f;Ba(x,f)}return null}function p(x,f,g,N){var C=f!==null?f.key:null;if(typeof g=="string"&&g!==""||typeof g=="number")return C!==null?null:o(x,f,""+g,N);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Da:return g.key===C?c(x,f,g,N):null;case On:return g.key===C?d(x,f,g,N):null;case Tr:return C=g._init,p(x,f,C(g._payload),N)}if(_s(g)||ks(g))return C!==null?null:m(x,f,g,N,null);Ba(x,g)}return null}function y(x,f,g,N,C){if(typeof N=="string"&&N!==""||typeof N=="number")return x=x.get(g)||null,o(f,x,""+N,C);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Da:return x=x.get(N.key===null?g:N.key)||null,c(f,x,N,C);case On:return x=x.get(N.key===null?g:N.key)||null,d(f,x,N,C);case Tr:var P=N._init;return y(x,f,g,P(N._payload),C)}if(_s(N)||ks(N))return x=x.get(g)||null,m(f,x,N,C,null);Ba(f,N)}return null}function w(x,f,g,N){for(var C=null,P=null,k=f,R=f=0,J=null;k!==null&&R<g.length;R++){k.index>R?(J=k,k=null):J=k.sibling;var W=p(x,k,g[R],N);if(W===null){k===null&&(k=J);break}e&&k&&W.alternate===null&&t(x,k),f=i(W,f,R),P===null?C=W:P.sibling=W,P=W,k=J}if(R===g.length)return r(x,k),Pe&&sn(x,R),C;if(k===null){for(;R<g.length;R++)k=u(x,g[R],N),k!==null&&(f=i(k,f,R),P===null?C=k:P.sibling=k,P=k);return Pe&&sn(x,R),C}for(k=s(x,k);R<g.length;R++)J=y(k,x,R,g[R],N),J!==null&&(e&&J.alternate!==null&&k.delete(J.key===null?R:J.key),f=i(J,f,R),P===null?C=J:P.sibling=J,P=J);return e&&k.forEach(function(q){return t(x,q)}),Pe&&sn(x,R),C}function v(x,f,g,N){var C=ks(g);if(typeof C!="function")throw Error(U(150));if(g=C.call(g),g==null)throw Error(U(151));for(var P=C=null,k=f,R=f=0,J=null,W=g.next();k!==null&&!W.done;R++,W=g.next()){k.index>R?(J=k,k=null):J=k.sibling;var q=p(x,k,W.value,N);if(q===null){k===null&&(k=J);break}e&&k&&q.alternate===null&&t(x,k),f=i(q,f,R),P===null?C=q:P.sibling=q,P=q,k=J}if(W.done)return r(x,k),Pe&&sn(x,R),C;if(k===null){for(;!W.done;R++,W=g.next())W=u(x,W.value,N),W!==null&&(f=i(W,f,R),P===null?C=W:P.sibling=W,P=W);return Pe&&sn(x,R),C}for(k=s(x,k);!W.done;R++,W=g.next())W=y(k,x,R,W.value,N),W!==null&&(e&&W.alternate!==null&&k.delete(W.key===null?R:W.key),f=i(W,f,R),P===null?C=W:P.sibling=W,P=W);return e&&k.forEach(function(Y){return t(x,Y)}),Pe&&sn(x,R),C}function j(x,f,g,N){if(typeof g=="object"&&g!==null&&g.type===An&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Da:e:{for(var C=g.key,P=f;P!==null;){if(P.key===C){if(C=g.type,C===An){if(P.tag===7){r(x,P.sibling),f=a(P,g.props.children),f.return=x,x=f;break e}}else if(P.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Tr&&Hd(C)===P.type){r(x,P.sibling),f=a(P,g.props),f.ref=Ps(x,P,g),f.return=x,x=f;break e}r(x,P);break}else t(x,P);P=P.sibling}g.type===An?(f=mn(g.props.children,x.mode,N,g.key),f.return=x,x=f):(N=di(g.type,g.key,g.props,null,x.mode,N),N.ref=Ps(x,f,g),N.return=x,x=N)}return l(x);case On:e:{for(P=g.key;f!==null;){if(f.key===P)if(f.tag===4&&f.stateNode.containerInfo===g.containerInfo&&f.stateNode.implementation===g.implementation){r(x,f.sibling),f=a(f,g.children||[]),f.return=x,x=f;break e}else{r(x,f);break}else t(x,f);f=f.sibling}f=Il(g,x.mode,N),f.return=x,x=f}return l(x);case Tr:return P=g._init,j(x,f,P(g._payload),N)}if(_s(g))return w(x,f,g,N);if(ks(g))return v(x,f,g,N);Ba(x,g)}return typeof g=="string"&&g!==""||typeof g=="number"?(g=""+g,f!==null&&f.tag===6?(r(x,f.sibling),f=a(f,g),f.return=x,x=f):(r(x,f),f=Ml(g,x.mode,N),f.return=x,x=f),l(x)):r(x,f)}return j}var ls=mm(!0),fm=mm(!1),Ei=qr(null),Ti=null,Hn=null,jc=null;function Nc(){jc=Hn=Ti=null}function kc(e){var t=Ei.current;Ce(Ei),e._currentValue=t}function So(e,t,r){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===r)break;e=e.return}}function qn(e,t){Ti=e,jc=Hn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(xt=!0),e.firstContext=null)}function Mt(e){var t=e._currentValue;if(jc!==e)if(e={context:e,memoizedValue:t,next:null},Hn===null){if(Ti===null)throw Error(U(308));Hn=e,Ti.dependencies={lanes:0,firstContext:e}}else Hn=Hn.next=e;return t}var dn=null;function Sc(e){dn===null?dn=[e]:dn.push(e)}function xm(e,t,r,s){var a=t.interleaved;return a===null?(r.next=r,Sc(t)):(r.next=a.next,a.next=r),t.interleaved=r,br(e,s)}function br(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var Pr=!1;function Cc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function pm(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 gr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Fr(e,t,r){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,ue&2){var a=s.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),s.pending=t,br(e,r)}return a=s.interleaved,a===null?(t.next=t,Sc(s)):(t.next=a.next,a.next=t),s.interleaved=t,br(e,r)}function si(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,uc(e,r)}}function Kd(e,t){var r=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,r===s)){var a=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var l={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?a=i=l:i=i.next=l,r=r.next}while(r!==null);i===null?a=i=t:i=i.next=t}else a=i=t;r={baseState:s.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:s.shared,effects:s.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Pi(e,t,r,s){var a=e.updateQueue;Pr=!1;var i=a.firstBaseUpdate,l=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var c=o,d=c.next;c.next=null,l===null?i=d:l.next=d,l=c;var m=e.alternate;m!==null&&(m=m.updateQueue,o=m.lastBaseUpdate,o!==l&&(o===null?m.firstBaseUpdate=d:o.next=d,m.lastBaseUpdate=c))}if(i!==null){var u=a.baseState;l=0,m=d=c=null,o=i;do{var p=o.lane,y=o.eventTime;if((s&p)===p){m!==null&&(m=m.next={eventTime:y,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var w=e,v=o;switch(p=t,y=r,v.tag){case 1:if(w=v.payload,typeof w=="function"){u=w.call(y,u,p);break e}u=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,p=typeof w=="function"?w.call(y,u,p):w,p==null)break e;u=Re({},u,p);break e;case 2:Pr=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=a.effects,p===null?a.effects=[o]:p.push(o))}else y={eventTime:y,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},m===null?(d=m=y,c=u):m=m.next=y,l|=p;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);if(m===null&&(c=u),a.baseState=c,a.firstBaseUpdate=d,a.lastBaseUpdate=m,t=a.shared.interleaved,t!==null){a=t;do l|=a.lane,a=a.next;while(a!==t)}else i===null&&(a.shared.lanes=0);vn|=l,e.lanes=l,e.memoizedState=u}}function Qd(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var s=e[t],a=s.callback;if(a!==null){if(s.callback=null,s=r,typeof a!="function")throw Error(U(191,a));a.call(s)}}}var Na={},ar=qr(Na),oa=qr(Na),ca=qr(Na);function un(e){if(e===Na)throw Error(U(174));return e}function Ec(e,t){switch(je(ca,t),je(oa,e),je(ar,Na),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:so(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=so(t,e)}Ce(ar),je(ar,t)}function os(){Ce(ar),Ce(oa),Ce(ca)}function gm(e){un(ca.current);var t=un(ar.current),r=so(t,e.type);t!==r&&(je(oa,e),je(ar,r))}function Tc(e){oa.current===e&&(Ce(ar),Ce(oa))}var ze=qr(0);function zi(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.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 El=[];function Pc(){for(var e=0;e<El.length;e++)El[e]._workInProgressVersionPrimary=null;El.length=0}var ai=Nr.ReactCurrentDispatcher,Tl=Nr.ReactCurrentBatchConfig,gn=0,De=null,Be=null,Ke=null,Di=!1,Ks=!1,da=0,gg=0;function tt(){throw Error(U(321))}function zc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Qt(e[r],t[r]))return!1;return!0}function Dc(e,t,r,s,a,i){if(gn=i,De=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ai.current=e===null||e.memoizedState===null?bg:jg,e=r(s,a),Ks){i=0;do{if(Ks=!1,da=0,25<=i)throw Error(U(301));i+=1,Ke=Be=null,t.updateQueue=null,ai.current=Ng,e=r(s,a)}while(Ks)}if(ai.current=Ri,t=Be!==null&&Be.next!==null,gn=0,Ke=Be=De=null,Di=!1,t)throw Error(U(300));return e}function Rc(){var e=da!==0;return da=0,e}function tr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?De.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function It(){if(Be===null){var e=De.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=Ke===null?De.memoizedState:Ke.next;if(t!==null)Ke=t,Be=e;else{if(e===null)throw Error(U(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},Ke===null?De.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function ua(e,t){return typeof t=="function"?t(e):t}function Pl(e){var t=It(),r=t.queue;if(r===null)throw Error(U(311));r.lastRenderedReducer=e;var s=Be,a=s.baseQueue,i=r.pending;if(i!==null){if(a!==null){var l=a.next;a.next=i.next,i.next=l}s.baseQueue=a=i,r.pending=null}if(a!==null){i=a.next,s=s.baseState;var o=l=null,c=null,d=i;do{var m=d.lane;if((gn&m)===m)c!==null&&(c=c.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),s=d.hasEagerState?d.eagerState:e(s,d.action);else{var u={lane:m,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};c===null?(o=c=u,l=s):c=c.next=u,De.lanes|=m,vn|=m}d=d.next}while(d!==null&&d!==i);c===null?l=s:c.next=o,Qt(s,t.memoizedState)||(xt=!0),t.memoizedState=s,t.baseState=l,t.baseQueue=c,r.lastRenderedState=s}if(e=r.interleaved,e!==null){a=e;do i=a.lane,De.lanes|=i,vn|=i,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function zl(e){var t=It(),r=t.queue;if(r===null)throw Error(U(311));r.lastRenderedReducer=e;var s=r.dispatch,a=r.pending,i=t.memoizedState;if(a!==null){r.pending=null;var l=a=a.next;do i=e(i,l.action),l=l.next;while(l!==a);Qt(i,t.memoizedState)||(xt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),r.lastRenderedState=i}return[i,s]}function vm(){}function ym(e,t){var r=De,s=It(),a=t(),i=!Qt(s.memoizedState,a);if(i&&(s.memoizedState=a,xt=!0),s=s.queue,Mc(jm.bind(null,r,s,e),[e]),s.getSnapshot!==t||i||Ke!==null&&Ke.memoizedState.tag&1){if(r.flags|=2048,ha(9,bm.bind(null,r,s,a,t),void 0,null),Qe===null)throw Error(U(349));gn&30||wm(r,t,a)}return a}function wm(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=De.updateQueue,t===null?(t={lastEffect:null,stores:null},De.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function bm(e,t,r,s){t.value=r,t.getSnapshot=s,Nm(t)&&km(e)}function jm(e,t,r){return r(function(){Nm(t)&&km(e)})}function Nm(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Qt(e,r)}catch{return!0}}function km(e){var t=br(e,1);t!==null&&Kt(t,e,1,-1)}function Yd(e){var t=tr();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:ua,lastRenderedState:e},t.queue=e,e=e.dispatch=wg.bind(null,De,e),[t.memoizedState,e]}function ha(e,t,r,s){return e={tag:e,create:t,destroy:r,deps:s,next:null},t=De.updateQueue,t===null?(t={lastEffect:null,stores:null},De.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(s=r.next,r.next=e,e.next=s,t.lastEffect=e)),e}function Sm(){return It().memoizedState}function ii(e,t,r,s){var a=tr();De.flags|=e,a.memoizedState=ha(1|t,r,void 0,s===void 0?null:s)}function Yi(e,t,r,s){var a=It();s=s===void 0?null:s;var i=void 0;if(Be!==null){var l=Be.memoizedState;if(i=l.destroy,s!==null&&zc(s,l.deps)){a.memoizedState=ha(t,r,i,s);return}}De.flags|=e,a.memoizedState=ha(1|t,r,i,s)}function Gd(e,t){return ii(8390656,8,e,t)}function Mc(e,t){return Yi(2048,8,e,t)}function Cm(e,t){return Yi(4,2,e,t)}function Em(e,t){return Yi(4,4,e,t)}function Tm(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 Pm(e,t,r){return r=r!=null?r.concat([e]):null,Yi(4,4,Tm.bind(null,t,e),r)}function Ic(){}function zm(e,t){var r=It();t=t===void 0?null:t;var s=r.memoizedState;return s!==null&&t!==null&&zc(t,s[1])?s[0]:(r.memoizedState=[e,t],e)}function Dm(e,t){var r=It();t=t===void 0?null:t;var s=r.memoizedState;return s!==null&&t!==null&&zc(t,s[1])?s[0]:(e=e(),r.memoizedState=[e,t],e)}function Rm(e,t,r){return gn&21?(Qt(r,t)||(r=Ah(),De.lanes|=r,vn|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,xt=!0),e.memoizedState=r)}function vg(e,t){var r=pe;pe=r!==0&&4>r?r:4,e(!0);var s=Tl.transition;Tl.transition={};try{e(!1),t()}finally{pe=r,Tl.transition=s}}function Mm(){return It().memoizedState}function yg(e,t,r){var s=Br(e);if(r={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null},Im(e))Lm(t,r);else if(r=xm(e,t,r,s),r!==null){var a=dt();Kt(r,e,s,a),Om(r,t,s)}}function wg(e,t,r){var s=Br(e),a={lane:s,action:r,hasEagerState:!1,eagerState:null,next:null};if(Im(e))Lm(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,r);if(a.hasEagerState=!0,a.eagerState=o,Qt(o,l)){var c=t.interleaved;c===null?(a.next=a,Sc(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}r=xm(e,t,a,s),r!==null&&(a=dt(),Kt(r,e,s,a),Om(r,t,s))}}function Im(e){var t=e.alternate;return e===De||t!==null&&t===De}function Lm(e,t){Ks=Di=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Om(e,t,r){if(r&4194240){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,uc(e,r)}}var Ri={readContext:Mt,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useInsertionEffect:tt,useLayoutEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useMutableSource:tt,useSyncExternalStore:tt,useId:tt,unstable_isNewReconciler:!1},bg={readContext:Mt,useCallback:function(e,t){return tr().memoizedState=[e,t===void 0?null:t],e},useContext:Mt,useEffect:Gd,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,ii(4194308,4,Tm.bind(null,t,e),r)},useLayoutEffect:function(e,t){return ii(4194308,4,e,t)},useInsertionEffect:function(e,t){return ii(4,2,e,t)},useMemo:function(e,t){var r=tr();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var s=tr();return t=r!==void 0?r(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=yg.bind(null,De,e),[s.memoizedState,e]},useRef:function(e){var t=tr();return e={current:e},t.memoizedState=e},useState:Yd,useDebugValue:Ic,useDeferredValue:function(e){return tr().memoizedState=e},useTransition:function(){var e=Yd(!1),t=e[0];return e=vg.bind(null,e[1]),tr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var s=De,a=tr();if(Pe){if(r===void 0)throw Error(U(407));r=r()}else{if(r=t(),Qe===null)throw Error(U(349));gn&30||wm(s,t,r)}a.memoizedState=r;var i={value:r,getSnapshot:t};return a.queue=i,Gd(jm.bind(null,s,i,e),[e]),s.flags|=2048,ha(9,bm.bind(null,s,i,r,t),void 0,null),r},useId:function(){var e=tr(),t=Qe.identifierPrefix;if(Pe){var r=xr,s=fr;r=(s&~(1<<32-Ht(s)-1)).toString(32)+r,t=":"+t+"R"+r,r=da++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=gg++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},jg={readContext:Mt,useCallback:zm,useContext:Mt,useEffect:Mc,useImperativeHandle:Pm,useInsertionEffect:Cm,useLayoutEffect:Em,useMemo:Dm,useReducer:Pl,useRef:Sm,useState:function(){return Pl(ua)},useDebugValue:Ic,useDeferredValue:function(e){var t=It();return Rm(t,Be.memoizedState,e)},useTransition:function(){var e=Pl(ua)[0],t=It().memoizedState;return[e,t]},useMutableSource:vm,useSyncExternalStore:ym,useId:Mm,unstable_isNewReconciler:!1},Ng={readContext:Mt,useCallback:zm,useContext:Mt,useEffect:Mc,useImperativeHandle:Pm,useInsertionEffect:Cm,useLayoutEffect:Em,useMemo:Dm,useReducer:zl,useRef:Sm,useState:function(){return zl(ua)},useDebugValue:Ic,useDeferredValue:function(e){var t=It();return Be===null?t.memoizedState=e:Rm(t,Be.memoizedState,e)},useTransition:function(){var e=zl(ua)[0],t=It().memoizedState;return[e,t]},useMutableSource:vm,useSyncExternalStore:ym,useId:Mm,unstable_isNewReconciler:!1};function Bt(e,t){if(e&&e.defaultProps){t=Re({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Co(e,t,r,s){t=e.memoizedState,r=r(s,t),r=r==null?t:Re({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Gi={isMounted:function(e){return(e=e._reactInternals)?Sn(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var s=dt(),a=Br(e),i=gr(s,a);i.payload=t,r!=null&&(i.callback=r),t=Fr(e,i,a),t!==null&&(Kt(t,e,a,s),si(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var s=dt(),a=Br(e),i=gr(s,a);i.tag=1,i.payload=t,r!=null&&(i.callback=r),t=Fr(e,i,a),t!==null&&(Kt(t,e,a,s),si(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=dt(),s=Br(e),a=gr(r,s);a.tag=2,t!=null&&(a.callback=t),t=Fr(e,a,s),t!==null&&(Kt(t,e,s,r),si(t,e,s))}};function Xd(e,t,r,s,a,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,i,l):t.prototype&&t.prototype.isPureReactComponent?!sa(r,s)||!sa(a,i):!0}function Am(e,t,r){var s=!1,a=Yr,i=t.contextType;return typeof i=="object"&&i!==null?i=Mt(i):(a=gt(t)?xn:at.current,s=t.contextTypes,i=(s=s!=null)?as(e,a):Yr),t=new t(r,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Gi,e.stateNode=t,t._reactInternals=e,s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=i),t}function Jd(e,t,r,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,s),t.state!==e&&Gi.enqueueReplaceState(t,t.state,null)}function Eo(e,t,r,s){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},Cc(e);var i=t.contextType;typeof i=="object"&&i!==null?a.context=Mt(i):(i=gt(t)?xn:at.current,a.context=as(e,i)),a.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Co(e,t,i,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Gi.enqueueReplaceState(a,a.state,null),Pi(e,r,a,s),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function cs(e,t){try{var r="",s=t;do r+=Jx(s),s=s.return;while(s);var a=r}catch(i){a=`
|
|
39
|
-
Error generating stack: `+i.message+`
|
|
40
|
-
`+i.stack}return{value:e,source:t,stack:a,digest:null}}function Dl(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function To(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var kg=typeof WeakMap=="function"?WeakMap:Map;function _m(e,t,r){r=gr(-1,r),r.tag=3,r.payload={element:null};var s=t.value;return r.callback=function(){Ii||(Ii=!0,_o=s),To(e,t)},r}function $m(e,t,r){r=gr(-1,r),r.tag=3;var s=e.type.getDerivedStateFromError;if(typeof s=="function"){var a=t.value;r.payload=function(){return s(a)},r.callback=function(){To(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(r.callback=function(){To(e,t),typeof s!="function"&&(Ur===null?Ur=new Set([this]):Ur.add(this));var l=t.stack;this.componentDidCatch(t.value,{componentStack:l!==null?l:""})}),r}function qd(e,t,r){var s=e.pingCache;if(s===null){s=e.pingCache=new kg;var a=new Set;s.set(t,a)}else a=s.get(t),a===void 0&&(a=new Set,s.set(t,a));a.has(r)||(a.add(r),e=_g.bind(null,e,t,r),t.then(e,e))}function Zd(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 eu(e,t,r,s,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=gr(-1,1),t.tag=2,Fr(r,t,1))),r.lanes|=1),e)}var Sg=Nr.ReactCurrentOwner,xt=!1;function lt(e,t,r,s){t.child=e===null?fm(t,null,r,s):ls(t,e.child,r,s)}function tu(e,t,r,s,a){r=r.render;var i=t.ref;return qn(t,a),s=Dc(e,t,r,s,i,a),r=Rc(),e!==null&&!xt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,jr(e,t,a)):(Pe&&r&&yc(t),t.flags|=1,lt(e,t,s,a),t.child)}function ru(e,t,r,s,a){if(e===null){var i=r.type;return typeof i=="function"&&!Bc(i)&&i.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=i,Fm(e,t,i,s,a)):(e=di(r.type,null,s,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&a)){var l=i.memoizedProps;if(r=r.compare,r=r!==null?r:sa,r(l,s)&&e.ref===t.ref)return jr(e,t,a)}return t.flags|=1,e=Vr(i,s),e.ref=t.ref,e.return=t,t.child=e}function Fm(e,t,r,s,a){if(e!==null){var i=e.memoizedProps;if(sa(i,s)&&e.ref===t.ref)if(xt=!1,t.pendingProps=s=i,(e.lanes&a)!==0)e.flags&131072&&(xt=!0);else return t.lanes=e.lanes,jr(e,t,a)}return Po(e,t,r,s,a)}function Um(e,t,r){var s=t.pendingProps,a=s.children,i=e!==null?e.memoizedState:null;if(s.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},je(Qn,wt),wt|=r;else{if(!(r&1073741824))return e=i!==null?i.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,je(Qn,wt),wt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},s=i!==null?i.baseLanes:r,je(Qn,wt),wt|=s}else i!==null?(s=i.baseLanes|r,t.memoizedState=null):s=r,je(Qn,wt),wt|=s;return lt(e,t,a,r),t.child}function Bm(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Po(e,t,r,s,a){var i=gt(r)?xn:at.current;return i=as(t,i),qn(t,a),r=Dc(e,t,r,s,i,a),s=Rc(),e!==null&&!xt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,jr(e,t,a)):(Pe&&s&&yc(t),t.flags|=1,lt(e,t,r,a),t.child)}function nu(e,t,r,s,a){if(gt(r)){var i=!0;ki(t)}else i=!1;if(qn(t,a),t.stateNode===null)li(e,t),Am(t,r,s),Eo(t,r,s,a),s=!0;else if(e===null){var l=t.stateNode,o=t.memoizedProps;l.props=o;var c=l.context,d=r.contextType;typeof d=="object"&&d!==null?d=Mt(d):(d=gt(r)?xn:at.current,d=as(t,d));var m=r.getDerivedStateFromProps,u=typeof m=="function"||typeof l.getSnapshotBeforeUpdate=="function";u||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==s||c!==d)&&Jd(t,l,s,d),Pr=!1;var p=t.memoizedState;l.state=p,Pi(t,s,l,a),c=t.memoizedState,o!==s||p!==c||pt.current||Pr?(typeof m=="function"&&(Co(t,r,m,s),c=t.memoizedState),(o=Pr||Xd(t,r,o,s,p,c,d))?(u||typeof l.UNSAFE_componentWillMount!="function"&&typeof l.componentWillMount!="function"||(typeof l.componentWillMount=="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount=="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount=="function"&&(t.flags|=4194308)):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=c),l.props=s,l.state=c,l.context=d,s=o):(typeof l.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{l=t.stateNode,pm(e,t),o=t.memoizedProps,d=t.type===t.elementType?o:Bt(t.type,o),l.props=d,u=t.pendingProps,p=l.context,c=r.contextType,typeof c=="object"&&c!==null?c=Mt(c):(c=gt(r)?xn:at.current,c=as(t,c));var y=r.getDerivedStateFromProps;(m=typeof y=="function"||typeof l.getSnapshotBeforeUpdate=="function")||typeof l.UNSAFE_componentWillReceiveProps!="function"&&typeof l.componentWillReceiveProps!="function"||(o!==u||p!==c)&&Jd(t,l,s,c),Pr=!1,p=t.memoizedState,l.state=p,Pi(t,s,l,a);var w=t.memoizedState;o!==u||p!==w||pt.current||Pr?(typeof y=="function"&&(Co(t,r,y,s),w=t.memoizedState),(d=Pr||Xd(t,r,d,s,p,w,c)||!1)?(m||typeof l.UNSAFE_componentWillUpdate!="function"&&typeof l.componentWillUpdate!="function"||(typeof l.componentWillUpdate=="function"&&l.componentWillUpdate(s,w,c),typeof l.UNSAFE_componentWillUpdate=="function"&&l.UNSAFE_componentWillUpdate(s,w,c)),typeof l.componentDidUpdate=="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=w),l.props=s,l.state=w,l.context=c,s=d):(typeof l.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),s=!1)}return zo(e,t,r,s,i,a)}function zo(e,t,r,s,a,i){Bm(e,t);var l=(t.flags&128)!==0;if(!s&&!l)return a&&Bd(t,r,!1),jr(e,t,i);s=t.stateNode,Sg.current=t;var o=l&&typeof r.getDerivedStateFromError!="function"?null:s.render();return t.flags|=1,e!==null&&l?(t.child=ls(t,e.child,null,i),t.child=ls(t,null,o,i)):lt(e,t,o,i),t.memoizedState=s.state,a&&Bd(t,r,!0),t.child}function Vm(e){var t=e.stateNode;t.pendingContext?Ud(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ud(e,t.context,!1),Ec(e,t.containerInfo)}function su(e,t,r,s,a){return is(),bc(a),t.flags|=256,lt(e,t,r,s),t.child}var Do={dehydrated:null,treeContext:null,retryLane:0};function Ro(e){return{baseLanes:e,cachePool:null,transitions:null}}function Wm(e,t,r){var s=t.pendingProps,a=ze.current,i=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(a&2)!==0),o?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),je(ze,a&1),e===null)return ko(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):(l=s.children,e=s.fallback,i?(s=t.mode,i=t.child,l={mode:"hidden",children:l},!(s&1)&&i!==null?(i.childLanes=0,i.pendingProps=l):i=qi(l,s,0,null),e=mn(e,s,r,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Ro(r),t.memoizedState=Do,e):Lc(t,l));if(a=e.memoizedState,a!==null&&(o=a.dehydrated,o!==null))return Cg(e,t,l,s,o,a,r);if(i){i=s.fallback,l=t.mode,a=e.child,o=a.sibling;var c={mode:"hidden",children:s.children};return!(l&1)&&t.child!==a?(s=t.child,s.childLanes=0,s.pendingProps=c,t.deletions=null):(s=Vr(a,c),s.subtreeFlags=a.subtreeFlags&14680064),o!==null?i=Vr(o,i):(i=mn(i,l,r,null),i.flags|=2),i.return=t,s.return=t,s.sibling=i,t.child=s,s=i,i=t.child,l=e.child.memoizedState,l=l===null?Ro(r):{baseLanes:l.baseLanes|r,cachePool:null,transitions:l.transitions},i.memoizedState=l,i.childLanes=e.childLanes&~r,t.memoizedState=Do,s}return i=e.child,e=i.sibling,s=Vr(i,{mode:"visible",children:s.children}),!(t.mode&1)&&(s.lanes=r),s.return=t,s.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=s,t.memoizedState=null,s}function Lc(e,t){return t=qi({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Va(e,t,r,s){return s!==null&&bc(s),ls(t,e.child,null,r),e=Lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cg(e,t,r,s,a,i,l){if(r)return t.flags&256?(t.flags&=-257,s=Dl(Error(U(422))),Va(e,t,l,s)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=s.fallback,a=t.mode,s=qi({mode:"visible",children:s.children},a,0,null),i=mn(i,a,l,null),i.flags|=2,s.return=t,i.return=t,s.sibling=i,t.child=s,t.mode&1&&ls(t,e.child,null,l),t.child.memoizedState=Ro(l),t.memoizedState=Do,i);if(!(t.mode&1))return Va(e,t,l,null);if(a.data==="$!"){if(s=a.nextSibling&&a.nextSibling.dataset,s)var o=s.dgst;return s=o,i=Error(U(419)),s=Dl(i,s,void 0),Va(e,t,l,s)}if(o=(l&e.childLanes)!==0,xt||o){if(s=Qe,s!==null){switch(l&-l){case 4:a=2;break;case 16:a=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:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(s.suspendedLanes|l)?0:a,a!==0&&a!==i.retryLane&&(i.retryLane=a,br(e,a),Kt(s,e,a,-1))}return Uc(),s=Dl(Error(U(421))),Va(e,t,l,s)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=$g.bind(null,e),a._reactRetry=t,null):(e=i.treeContext,bt=$r(a.nextSibling),jt=t,Pe=!0,Wt=null,e!==null&&(Tt[Pt++]=fr,Tt[Pt++]=xr,Tt[Pt++]=pn,fr=e.id,xr=e.overflow,pn=t),t=Lc(t,s.children),t.flags|=4096,t)}function au(e,t,r){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),So(e.return,t,r)}function Rl(e,t,r,s,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:r,tailMode:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=s,i.tail=r,i.tailMode=a)}function Hm(e,t,r){var s=t.pendingProps,a=s.revealOrder,i=s.tail;if(lt(e,t,s.children,r),s=ze.current,s&2)s=s&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&&au(e,r,t);else if(e.tag===19)au(e,r,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}s&=1}if(je(ze,s),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&zi(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),Rl(t,!1,a,r,i);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&zi(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}Rl(t,!0,r,null,i);break;case"together":Rl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function li(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function jr(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),vn|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,r=Vr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Vr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Eg(e,t,r){switch(t.tag){case 3:Vm(t),is();break;case 5:gm(t);break;case 1:gt(t.type)&&ki(t);break;case 4:Ec(t,t.stateNode.containerInfo);break;case 10:var s=t.type._context,a=t.memoizedProps.value;je(Ei,s._currentValue),s._currentValue=a;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(je(ze,ze.current&1),t.flags|=128,null):r&t.child.childLanes?Wm(e,t,r):(je(ze,ze.current&1),e=jr(e,t,r),e!==null?e.sibling:null);je(ze,ze.current&1);break;case 19:if(s=(r&t.childLanes)!==0,e.flags&128){if(s)return Hm(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),je(ze,ze.current),s)break;return null;case 22:case 23:return t.lanes=0,Um(e,t,r)}return jr(e,t,r)}var Km,Mo,Qm,Ym;Km=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};Mo=function(){};Qm=function(e,t,r,s){var a=e.memoizedProps;if(a!==s){e=t.stateNode,un(ar.current);var i=null;switch(r){case"input":a=eo(e,a),s=eo(e,s),i=[];break;case"select":a=Re({},a,{value:void 0}),s=Re({},s,{value:void 0}),i=[];break;case"textarea":a=no(e,a),s=no(e,s),i=[];break;default:typeof a.onClick!="function"&&typeof s.onClick=="function"&&(e.onclick=ji)}ao(r,s);var l;r=null;for(d in a)if(!s.hasOwnProperty(d)&&a.hasOwnProperty(d)&&a[d]!=null)if(d==="style"){var o=a[d];for(l in o)o.hasOwnProperty(l)&&(r||(r={}),r[l]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(Js.hasOwnProperty(d)?i||(i=[]):(i=i||[]).push(d,null));for(d in s){var c=s[d];if(o=a!=null?a[d]:void 0,s.hasOwnProperty(d)&&c!==o&&(c!=null||o!=null))if(d==="style")if(o){for(l in o)!o.hasOwnProperty(l)||c&&c.hasOwnProperty(l)||(r||(r={}),r[l]="");for(l in c)c.hasOwnProperty(l)&&o[l]!==c[l]&&(r||(r={}),r[l]=c[l])}else r||(i||(i=[]),i.push(d,r)),r=c;else d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(i=i||[]).push(d,c)):d==="children"?typeof c!="string"&&typeof c!="number"||(i=i||[]).push(d,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(Js.hasOwnProperty(d)?(c!=null&&d==="onScroll"&&Se("scroll",e),i||o===c||(i=[])):(i=i||[]).push(d,c))}r&&(i=i||[]).push("style",r);var d=i;(t.updateQueue=d)&&(t.flags|=4)}};Ym=function(e,t,r,s){r!==s&&(t.flags|=4)};function zs(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,s=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,s|=a.subtreeFlags&14680064,s|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,s|=a.subtreeFlags,s|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=s,e.childLanes=r,t}function Tg(e,t,r){var s=t.pendingProps;switch(wc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return gt(t.type)&&Ni(),rt(t),null;case 3:return s=t.stateNode,os(),Ce(pt),Ce(at),Pc(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Ua(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wt!==null&&(Uo(Wt),Wt=null))),Mo(e,t),rt(t),null;case 5:Tc(t);var a=un(ca.current);if(r=t.type,e!==null&&t.stateNode!=null)Qm(e,t,r,s,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!s){if(t.stateNode===null)throw Error(U(166));return rt(t),null}if(e=un(ar.current),Ua(t)){s=t.stateNode,r=t.type;var i=t.memoizedProps;switch(s[rr]=t,s[la]=i,e=(t.mode&1)!==0,r){case"dialog":Se("cancel",s),Se("close",s);break;case"iframe":case"object":case"embed":Se("load",s);break;case"video":case"audio":for(a=0;a<Fs.length;a++)Se(Fs[a],s);break;case"source":Se("error",s);break;case"img":case"image":case"link":Se("error",s),Se("load",s);break;case"details":Se("toggle",s);break;case"input":fd(s,i),Se("invalid",s);break;case"select":s._wrapperState={wasMultiple:!!i.multiple},Se("invalid",s);break;case"textarea":pd(s,i),Se("invalid",s)}ao(r,i),a=null;for(var l in i)if(i.hasOwnProperty(l)){var o=i[l];l==="children"?typeof o=="string"?s.textContent!==o&&(i.suppressHydrationWarning!==!0&&Fa(s.textContent,o,e),a=["children",o]):typeof o=="number"&&s.textContent!==""+o&&(i.suppressHydrationWarning!==!0&&Fa(s.textContent,o,e),a=["children",""+o]):Js.hasOwnProperty(l)&&o!=null&&l==="onScroll"&&Se("scroll",s)}switch(r){case"input":Ra(s),xd(s,i,!0);break;case"textarea":Ra(s),gd(s);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(s.onclick=ji)}s=a,t.updateQueue=s,s!==null&&(t.flags|=4)}else{l=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=jh(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=l.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=l.createElement(r,{is:s.is}):(e=l.createElement(r),r==="select"&&(l=e,s.multiple?l.multiple=!0:s.size&&(l.size=s.size))):e=l.createElementNS(e,r),e[rr]=t,e[la]=s,Km(e,t,!1,!1),t.stateNode=e;e:{switch(l=io(r,s),r){case"dialog":Se("cancel",e),Se("close",e),a=s;break;case"iframe":case"object":case"embed":Se("load",e),a=s;break;case"video":case"audio":for(a=0;a<Fs.length;a++)Se(Fs[a],e);a=s;break;case"source":Se("error",e),a=s;break;case"img":case"image":case"link":Se("error",e),Se("load",e),a=s;break;case"details":Se("toggle",e),a=s;break;case"input":fd(e,s),a=eo(e,s),Se("invalid",e);break;case"option":a=s;break;case"select":e._wrapperState={wasMultiple:!!s.multiple},a=Re({},s,{value:void 0}),Se("invalid",e);break;case"textarea":pd(e,s),a=no(e,s),Se("invalid",e);break;default:a=s}ao(r,a),o=a;for(i in o)if(o.hasOwnProperty(i)){var c=o[i];i==="style"?Sh(e,c):i==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Nh(e,c)):i==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&qs(e,c):typeof c=="number"&&qs(e,""+c):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(Js.hasOwnProperty(i)?c!=null&&i==="onScroll"&&Se("scroll",e):c!=null&&ac(e,i,c,l))}switch(r){case"input":Ra(e),xd(e,s,!1);break;case"textarea":Ra(e),gd(e);break;case"option":s.value!=null&&e.setAttribute("value",""+Qr(s.value));break;case"select":e.multiple=!!s.multiple,i=s.value,i!=null?Yn(e,!!s.multiple,i,!1):s.defaultValue!=null&&Yn(e,!!s.multiple,s.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=ji)}switch(r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}}s&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return rt(t),null;case 6:if(e&&t.stateNode!=null)Ym(e,t,e.memoizedProps,s);else{if(typeof s!="string"&&t.stateNode===null)throw Error(U(166));if(r=un(ca.current),un(ar.current),Ua(t)){if(s=t.stateNode,r=t.memoizedProps,s[rr]=t,(i=s.nodeValue!==r)&&(e=jt,e!==null))switch(e.tag){case 3:Fa(s.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Fa(s.nodeValue,r,(e.mode&1)!==0)}i&&(t.flags|=4)}else s=(r.nodeType===9?r:r.ownerDocument).createTextNode(s),s[rr]=t,t.stateNode=s}return rt(t),null;case 13:if(Ce(ze),s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pe&&bt!==null&&t.mode&1&&!(t.flags&128))hm(),is(),t.flags|=98560,i=!1;else if(i=Ua(t),s!==null&&s.dehydrated!==null){if(e===null){if(!i)throw Error(U(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(U(317));i[rr]=t}else is(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;rt(t),i=!1}else Wt!==null&&(Uo(Wt),Wt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(s=s!==null,s!==(e!==null&&e.memoizedState!==null)&&s&&(t.child.flags|=8192,t.mode&1&&(e===null||ze.current&1?Ve===0&&(Ve=3):Uc())),t.updateQueue!==null&&(t.flags|=4),rt(t),null);case 4:return os(),Mo(e,t),e===null&&aa(t.stateNode.containerInfo),rt(t),null;case 10:return kc(t.type._context),rt(t),null;case 17:return gt(t.type)&&Ni(),rt(t),null;case 19:if(Ce(ze),i=t.memoizedState,i===null)return rt(t),null;if(s=(t.flags&128)!==0,l=i.rendering,l===null)if(s)zs(i,!1);else{if(Ve!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(l=zi(e),l!==null){for(t.flags|=128,zs(i,!1),s=l.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),t.subtreeFlags=0,s=r,r=t.child;r!==null;)i=r,e=s,i.flags&=14680066,l=i.alternate,l===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=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,e=l.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return je(ze,ze.current&1|2),t.child}e=e.sibling}i.tail!==null&&Oe()>ds&&(t.flags|=128,s=!0,zs(i,!1),t.lanes=4194304)}else{if(!s)if(e=zi(l),e!==null){if(t.flags|=128,s=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),zs(i,!0),i.tail===null&&i.tailMode==="hidden"&&!l.alternate&&!Pe)return rt(t),null}else 2*Oe()-i.renderingStartTime>ds&&r!==1073741824&&(t.flags|=128,s=!0,zs(i,!1),t.lanes=4194304);i.isBackwards?(l.sibling=t.child,t.child=l):(r=i.last,r!==null?r.sibling=l:t.child=l,i.last=l)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Oe(),t.sibling=null,r=ze.current,je(ze,s?r&1|2:r&1),t):(rt(t),null);case 22:case 23:return Fc(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&t.mode&1?wt&1073741824&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function Pg(e,t){switch(wc(t),t.tag){case 1:return gt(t.type)&&Ni(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return os(),Ce(pt),Ce(at),Pc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Tc(t),null;case 13:if(Ce(ze),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));is()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(ze),null;case 4:return os(),null;case 10:return kc(t.type._context),null;case 22:case 23:return Fc(),null;case 24:return null;default:return null}}var Wa=!1,nt=!1,zg=typeof WeakSet=="function"?WeakSet:Set,H=null;function Kn(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(s){Me(e,t,s)}else r.current=null}function Io(e,t,r){try{r()}catch(s){Me(e,t,s)}}var iu=!1;function Dg(e,t){if(go=yi,e=Zh(),vc(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var a=s.anchorOffset,i=s.focusNode;s=s.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var l=0,o=-1,c=-1,d=0,m=0,u=e,p=null;t:for(;;){for(var y;u!==r||a!==0&&u.nodeType!==3||(o=l+a),u!==i||s!==0&&u.nodeType!==3||(c=l+s),u.nodeType===3&&(l+=u.nodeValue.length),(y=u.firstChild)!==null;)p=u,u=y;for(;;){if(u===e)break t;if(p===r&&++d===a&&(o=l),p===i&&++m===s&&(c=l),(y=u.nextSibling)!==null)break;u=p,p=u.parentNode}u=y}r=o===-1||c===-1?null:{start:o,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(vo={focusedElem:e,selectionRange:r},yi=!1,H=t;H!==null;)if(t=H,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,H=e;else for(;H!==null;){t=H;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,j=w.memoizedState,x=t.stateNode,f=x.getSnapshotBeforeUpdate(t.elementType===t.type?v:Bt(t.type,v),j);x.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var g=t.stateNode.containerInfo;g.nodeType===1?g.textContent="":g.nodeType===9&&g.documentElement&&g.removeChild(g.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(N){Me(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,H=e;break}H=t.return}return w=iu,iu=!1,w}function Qs(e,t,r){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var a=s=s.next;do{if((a.tag&e)===e){var i=a.destroy;a.destroy=void 0,i!==void 0&&Io(t,r,i)}a=a.next}while(a!==s)}}function Xi(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var s=r.create;r.destroy=s()}r=r.next}while(r!==t)}}function Lo(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Gm(e){var t=e.alternate;t!==null&&(e.alternate=null,Gm(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[rr],delete t[la],delete t[bo],delete t[mg],delete t[fg])),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 Xm(e){return e.tag===5||e.tag===3||e.tag===4}function lu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xm(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 Oo(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=ji));else if(s!==4&&(e=e.child,e!==null))for(Oo(e,t,r),e=e.sibling;e!==null;)Oo(e,t,r),e=e.sibling}function Ao(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Ao(e,t,r),e=e.sibling;e!==null;)Ao(e,t,r),e=e.sibling}var Xe=null,Vt=!1;function kr(e,t,r){for(r=r.child;r!==null;)Jm(e,t,r),r=r.sibling}function Jm(e,t,r){if(sr&&typeof sr.onCommitFiberUnmount=="function")try{sr.onCommitFiberUnmount(Bi,r)}catch{}switch(r.tag){case 5:nt||Kn(r,t);case 6:var s=Xe,a=Vt;Xe=null,kr(e,t,r),Xe=s,Vt=a,Xe!==null&&(Vt?(e=Xe,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Xe.removeChild(r.stateNode));break;case 18:Xe!==null&&(Vt?(e=Xe,r=r.stateNode,e.nodeType===8?Sl(e.parentNode,r):e.nodeType===1&&Sl(e,r),ra(e)):Sl(Xe,r.stateNode));break;case 4:s=Xe,a=Vt,Xe=r.stateNode.containerInfo,Vt=!0,kr(e,t,r),Xe=s,Vt=a;break;case 0:case 11:case 14:case 15:if(!nt&&(s=r.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){a=s=s.next;do{var i=a,l=i.destroy;i=i.tag,l!==void 0&&(i&2||i&4)&&Io(r,t,l),a=a.next}while(a!==s)}kr(e,t,r);break;case 1:if(!nt&&(Kn(r,t),s=r.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=r.memoizedProps,s.state=r.memoizedState,s.componentWillUnmount()}catch(o){Me(r,t,o)}kr(e,t,r);break;case 21:kr(e,t,r);break;case 22:r.mode&1?(nt=(s=nt)||r.memoizedState!==null,kr(e,t,r),nt=s):kr(e,t,r);break;default:kr(e,t,r)}}function ou(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new zg),t.forEach(function(s){var a=Fg.bind(null,e,s);r.has(s)||(r.add(s),s.then(a,a))})}}function Ft(e,t){var r=t.deletions;if(r!==null)for(var s=0;s<r.length;s++){var a=r[s];try{var i=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 5:Xe=o.stateNode,Vt=!1;break e;case 3:Xe=o.stateNode.containerInfo,Vt=!0;break e;case 4:Xe=o.stateNode.containerInfo,Vt=!0;break e}o=o.return}if(Xe===null)throw Error(U(160));Jm(i,l,a),Xe=null,Vt=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(d){Me(a,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)qm(t,e),t=t.sibling}function qm(e,t){var r=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ft(t,e),Xt(e),s&4){try{Qs(3,e,e.return),Xi(3,e)}catch(v){Me(e,e.return,v)}try{Qs(5,e,e.return)}catch(v){Me(e,e.return,v)}}break;case 1:Ft(t,e),Xt(e),s&512&&r!==null&&Kn(r,r.return);break;case 5:if(Ft(t,e),Xt(e),s&512&&r!==null&&Kn(r,r.return),e.flags&32){var a=e.stateNode;try{qs(a,"")}catch(v){Me(e,e.return,v)}}if(s&4&&(a=e.stateNode,a!=null)){var i=e.memoizedProps,l=r!==null?r.memoizedProps:i,o=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{o==="input"&&i.type==="radio"&&i.name!=null&&wh(a,i),io(o,l);var d=io(o,i);for(l=0;l<c.length;l+=2){var m=c[l],u=c[l+1];m==="style"?Sh(a,u):m==="dangerouslySetInnerHTML"?Nh(a,u):m==="children"?qs(a,u):ac(a,m,u,d)}switch(o){case"input":to(a,i);break;case"textarea":bh(a,i);break;case"select":var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!i.multiple;var y=i.value;y!=null?Yn(a,!!i.multiple,y,!1):p!==!!i.multiple&&(i.defaultValue!=null?Yn(a,!!i.multiple,i.defaultValue,!0):Yn(a,!!i.multiple,i.multiple?[]:"",!1))}a[la]=i}catch(v){Me(e,e.return,v)}}break;case 6:if(Ft(t,e),Xt(e),s&4){if(e.stateNode===null)throw Error(U(162));a=e.stateNode,i=e.memoizedProps;try{a.nodeValue=i}catch(v){Me(e,e.return,v)}}break;case 3:if(Ft(t,e),Xt(e),s&4&&r!==null&&r.memoizedState.isDehydrated)try{ra(t.containerInfo)}catch(v){Me(e,e.return,v)}break;case 4:Ft(t,e),Xt(e);break;case 13:Ft(t,e),Xt(e),a=e.child,a.flags&8192&&(i=a.memoizedState!==null,a.stateNode.isHidden=i,!i||a.alternate!==null&&a.alternate.memoizedState!==null||(_c=Oe())),s&4&&ou(e);break;case 22:if(m=r!==null&&r.memoizedState!==null,e.mode&1?(nt=(d=nt)||m,Ft(t,e),nt=d):Ft(t,e),Xt(e),s&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!m&&e.mode&1)for(H=e,m=e.child;m!==null;){for(u=H=m;H!==null;){switch(p=H,y=p.child,p.tag){case 0:case 11:case 14:case 15:Qs(4,p,p.return);break;case 1:Kn(p,p.return);var w=p.stateNode;if(typeof w.componentWillUnmount=="function"){s=p,r=p.return;try{t=s,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(v){Me(s,r,v)}}break;case 5:Kn(p,p.return);break;case 22:if(p.memoizedState!==null){du(u);continue}}y!==null?(y.return=p,H=y):du(u)}m=m.sibling}e:for(m=null,u=e;;){if(u.tag===5){if(m===null){m=u;try{a=u.stateNode,d?(i=a.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(o=u.stateNode,c=u.memoizedProps.style,l=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=kh("display",l))}catch(v){Me(e,e.return,v)}}}else if(u.tag===6){if(m===null)try{u.stateNode.nodeValue=d?"":u.memoizedProps}catch(v){Me(e,e.return,v)}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===e)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break e;for(;u.sibling===null;){if(u.return===null||u.return===e)break e;m===u&&(m=null),u=u.return}m===u&&(m=null),u.sibling.return=u.return,u=u.sibling}}break;case 19:Ft(t,e),Xt(e),s&4&&ou(e);break;case 21:break;default:Ft(t,e),Xt(e)}}function Xt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Xm(r)){var s=r;break e}r=r.return}throw Error(U(160))}switch(s.tag){case 5:var a=s.stateNode;s.flags&32&&(qs(a,""),s.flags&=-33);var i=lu(e);Ao(e,i,a);break;case 3:case 4:var l=s.stateNode.containerInfo,o=lu(e);Oo(e,o,l);break;default:throw Error(U(161))}}catch(c){Me(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Rg(e,t,r){H=e,Zm(e)}function Zm(e,t,r){for(var s=(e.mode&1)!==0;H!==null;){var a=H,i=a.child;if(a.tag===22&&s){var l=a.memoizedState!==null||Wa;if(!l){var o=a.alternate,c=o!==null&&o.memoizedState!==null||nt;o=Wa;var d=nt;if(Wa=l,(nt=c)&&!d)for(H=a;H!==null;)l=H,c=l.child,l.tag===22&&l.memoizedState!==null?uu(a):c!==null?(c.return=l,H=c):uu(a);for(;i!==null;)H=i,Zm(i),i=i.sibling;H=a,Wa=o,nt=d}cu(e)}else a.subtreeFlags&8772&&i!==null?(i.return=a,H=i):cu(e)}}function cu(e){for(;H!==null;){var t=H;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:nt||Xi(5,t);break;case 1:var s=t.stateNode;if(t.flags&4&&!nt)if(r===null)s.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:Bt(t.type,r.memoizedProps);s.componentDidUpdate(a,r.memoizedState,s.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Qd(t,i,s);break;case 3:var l=t.updateQueue;if(l!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Qd(t,l,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var m=d.memoizedState;if(m!==null){var u=m.dehydrated;u!==null&&ra(u)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}nt||t.flags&512&&Lo(t)}catch(p){Me(t,t.return,p)}}if(t===e){H=null;break}if(r=t.sibling,r!==null){r.return=t.return,H=r;break}H=t.return}}function du(e){for(;H!==null;){var t=H;if(t===e){H=null;break}var r=t.sibling;if(r!==null){r.return=t.return,H=r;break}H=t.return}}function uu(e){for(;H!==null;){var t=H;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Xi(4,t)}catch(c){Me(t,r,c)}break;case 1:var s=t.stateNode;if(typeof s.componentDidMount=="function"){var a=t.return;try{s.componentDidMount()}catch(c){Me(t,a,c)}}var i=t.return;try{Lo(t)}catch(c){Me(t,i,c)}break;case 5:var l=t.return;try{Lo(t)}catch(c){Me(t,l,c)}}}catch(c){Me(t,t.return,c)}if(t===e){H=null;break}var o=t.sibling;if(o!==null){o.return=t.return,H=o;break}H=t.return}}var Mg=Math.ceil,Mi=Nr.ReactCurrentDispatcher,Oc=Nr.ReactCurrentOwner,Rt=Nr.ReactCurrentBatchConfig,ue=0,Qe=null,Ae=null,Je=0,wt=0,Qn=qr(0),Ve=0,ma=null,vn=0,Ji=0,Ac=0,Ys=null,ft=null,_c=0,ds=1/0,hr=null,Ii=!1,_o=null,Ur=null,Ha=!1,Mr=null,Li=0,Gs=0,$o=null,oi=-1,ci=0;function dt(){return ue&6?Oe():oi!==-1?oi:oi=Oe()}function Br(e){return e.mode&1?ue&2&&Je!==0?Je&-Je:pg.transition!==null?(ci===0&&(ci=Ah()),ci):(e=pe,e!==0||(e=window.event,e=e===void 0?16:Wh(e.type)),e):1}function Kt(e,t,r,s){if(50<Gs)throw Gs=0,$o=null,Error(U(185));wa(e,r,s),(!(ue&2)||e!==Qe)&&(e===Qe&&(!(ue&2)&&(Ji|=r),Ve===4&&Dr(e,Je)),vt(e,s),r===1&&ue===0&&!(t.mode&1)&&(ds=Oe()+500,Qi&&Zr()))}function vt(e,t){var r=e.callbackNode;pp(e,t);var s=vi(e,e===Qe?Je:0);if(s===0)r!==null&&wd(r),e.callbackNode=null,e.callbackPriority=0;else if(t=s&-s,e.callbackPriority!==t){if(r!=null&&wd(r),t===1)e.tag===0?xg(hu.bind(null,e)):cm(hu.bind(null,e)),ug(function(){!(ue&6)&&Zr()}),r=null;else{switch(_h(s)){case 1:r=dc;break;case 4:r=Lh;break;case 16:r=gi;break;case 536870912:r=Oh;break;default:r=gi}r=of(r,ef.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function ef(e,t){if(oi=-1,ci=0,ue&6)throw Error(U(327));var r=e.callbackNode;if(Zn()&&e.callbackNode!==r)return null;var s=vi(e,e===Qe?Je:0);if(s===0)return null;if(s&30||s&e.expiredLanes||t)t=Oi(e,s);else{t=s;var a=ue;ue|=2;var i=rf();(Qe!==e||Je!==t)&&(hr=null,ds=Oe()+500,hn(e,t));do try{Og();break}catch(o){tf(e,o)}while(!0);Nc(),Mi.current=i,ue=a,Ae!==null?t=0:(Qe=null,Je=0,t=Ve)}if(t!==0){if(t===2&&(a=ho(e),a!==0&&(s=a,t=Fo(e,a))),t===1)throw r=ma,hn(e,0),Dr(e,s),vt(e,Oe()),r;if(t===6)Dr(e,s);else{if(a=e.current.alternate,!(s&30)&&!Ig(a)&&(t=Oi(e,s),t===2&&(i=ho(e),i!==0&&(s=i,t=Fo(e,i))),t===1))throw r=ma,hn(e,0),Dr(e,s),vt(e,Oe()),r;switch(e.finishedWork=a,e.finishedLanes=s,t){case 0:case 1:throw Error(U(345));case 2:an(e,ft,hr);break;case 3:if(Dr(e,s),(s&130023424)===s&&(t=_c+500-Oe(),10<t)){if(vi(e,0)!==0)break;if(a=e.suspendedLanes,(a&s)!==s){dt(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=wo(an.bind(null,e,ft,hr),t);break}an(e,ft,hr);break;case 4:if(Dr(e,s),(s&4194240)===s)break;for(t=e.eventTimes,a=-1;0<s;){var l=31-Ht(s);i=1<<l,l=t[l],l>a&&(a=l),s&=~i}if(s=a,s=Oe()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*Mg(s/1960))-s,10<s){e.timeoutHandle=wo(an.bind(null,e,ft,hr),s);break}an(e,ft,hr);break;case 5:an(e,ft,hr);break;default:throw Error(U(329))}}}return vt(e,Oe()),e.callbackNode===r?ef.bind(null,e):null}function Fo(e,t){var r=Ys;return e.current.memoizedState.isDehydrated&&(hn(e,t).flags|=256),e=Oi(e,t),e!==2&&(t=ft,ft=r,t!==null&&Uo(t)),e}function Uo(e){ft===null?ft=e:ft.push.apply(ft,e)}function Ig(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var s=0;s<r.length;s++){var a=r[s],i=a.getSnapshot;a=a.value;try{if(!Qt(i(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 Dr(e,t){for(t&=~Ac,t&=~Ji,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Ht(t),s=1<<r;e[r]=-1,t&=~s}}function hu(e){if(ue&6)throw Error(U(327));Zn();var t=vi(e,0);if(!(t&1))return vt(e,Oe()),null;var r=Oi(e,t);if(e.tag!==0&&r===2){var s=ho(e);s!==0&&(t=s,r=Fo(e,s))}if(r===1)throw r=ma,hn(e,0),Dr(e,t),vt(e,Oe()),r;if(r===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,an(e,ft,hr),vt(e,Oe()),null}function $c(e,t){var r=ue;ue|=1;try{return e(t)}finally{ue=r,ue===0&&(ds=Oe()+500,Qi&&Zr())}}function yn(e){Mr!==null&&Mr.tag===0&&!(ue&6)&&Zn();var t=ue;ue|=1;var r=Rt.transition,s=pe;try{if(Rt.transition=null,pe=1,e)return e()}finally{pe=s,Rt.transition=r,ue=t,!(ue&6)&&Zr()}}function Fc(){wt=Qn.current,Ce(Qn)}function hn(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,dg(r)),Ae!==null)for(r=Ae.return;r!==null;){var s=r;switch(wc(s),s.tag){case 1:s=s.type.childContextTypes,s!=null&&Ni();break;case 3:os(),Ce(pt),Ce(at),Pc();break;case 5:Tc(s);break;case 4:os();break;case 13:Ce(ze);break;case 19:Ce(ze);break;case 10:kc(s.type._context);break;case 22:case 23:Fc()}r=r.return}if(Qe=e,Ae=e=Vr(e.current,null),Je=wt=t,Ve=0,ma=null,Ac=Ji=vn=0,ft=Ys=null,dn!==null){for(t=0;t<dn.length;t++)if(r=dn[t],s=r.interleaved,s!==null){r.interleaved=null;var a=s.next,i=r.pending;if(i!==null){var l=i.next;i.next=a,s.next=l}r.pending=s}dn=null}return e}function tf(e,t){do{var r=Ae;try{if(Nc(),ai.current=Ri,Di){for(var s=De.memoizedState;s!==null;){var a=s.queue;a!==null&&(a.pending=null),s=s.next}Di=!1}if(gn=0,Ke=Be=De=null,Ks=!1,da=0,Oc.current=null,r===null||r.return===null){Ve=1,ma=t,Ae=null;break}e:{var i=e,l=r.return,o=r,c=t;if(t=Je,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=c,m=o,u=m.tag;if(!(m.mode&1)&&(u===0||u===11||u===15)){var p=m.alternate;p?(m.updateQueue=p.updateQueue,m.memoizedState=p.memoizedState,m.lanes=p.lanes):(m.updateQueue=null,m.memoizedState=null)}var y=Zd(l);if(y!==null){y.flags&=-257,eu(y,l,o,i,t),y.mode&1&&qd(i,d,t),t=y,c=d;var w=t.updateQueue;if(w===null){var v=new Set;v.add(c),t.updateQueue=v}else w.add(c);break e}else{if(!(t&1)){qd(i,d,t),Uc();break e}c=Error(U(426))}}else if(Pe&&o.mode&1){var j=Zd(l);if(j!==null){!(j.flags&65536)&&(j.flags|=256),eu(j,l,o,i,t),bc(cs(c,o));break e}}i=c=cs(c,o),Ve!==4&&(Ve=2),Ys===null?Ys=[i]:Ys.push(i),i=l;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var x=_m(i,c,t);Kd(i,x);break e;case 1:o=c;var f=i.type,g=i.stateNode;if(!(i.flags&128)&&(typeof f.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Ur===null||!Ur.has(g)))){i.flags|=65536,t&=-t,i.lanes|=t;var N=$m(i,o,t);Kd(i,N);break e}}i=i.return}while(i!==null)}sf(r)}catch(C){t=C,Ae===r&&r!==null&&(Ae=r=r.return);continue}break}while(!0)}function rf(){var e=Mi.current;return Mi.current=Ri,e===null?Ri:e}function Uc(){(Ve===0||Ve===3||Ve===2)&&(Ve=4),Qe===null||!(vn&268435455)&&!(Ji&268435455)||Dr(Qe,Je)}function Oi(e,t){var r=ue;ue|=2;var s=rf();(Qe!==e||Je!==t)&&(hr=null,hn(e,t));do try{Lg();break}catch(a){tf(e,a)}while(!0);if(Nc(),ue=r,Mi.current=s,Ae!==null)throw Error(U(261));return Qe=null,Je=0,Ve}function Lg(){for(;Ae!==null;)nf(Ae)}function Og(){for(;Ae!==null&&!lp();)nf(Ae)}function nf(e){var t=lf(e.alternate,e,wt);e.memoizedProps=e.pendingProps,t===null?sf(e):Ae=t,Oc.current=null}function sf(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Pg(r,t),r!==null){r.flags&=32767,Ae=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ve=6,Ae=null;return}}else if(r=Tg(r,t,wt),r!==null){Ae=r;return}if(t=t.sibling,t!==null){Ae=t;return}Ae=t=e}while(t!==null);Ve===0&&(Ve=5)}function an(e,t,r){var s=pe,a=Rt.transition;try{Rt.transition=null,pe=1,Ag(e,t,r,s)}finally{Rt.transition=a,pe=s}return null}function Ag(e,t,r,s){do Zn();while(Mr!==null);if(ue&6)throw Error(U(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var i=r.lanes|r.childLanes;if(gp(e,i),e===Qe&&(Ae=Qe=null,Je=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||Ha||(Ha=!0,of(gi,function(){return Zn(),null})),i=(r.flags&15990)!==0,r.subtreeFlags&15990||i){i=Rt.transition,Rt.transition=null;var l=pe;pe=1;var o=ue;ue|=4,Oc.current=null,Dg(e,r),qm(r,e),ng(vo),yi=!!go,vo=go=null,e.current=r,Rg(r),op(),ue=o,pe=l,Rt.transition=i}else e.current=r;if(Ha&&(Ha=!1,Mr=e,Li=a),i=e.pendingLanes,i===0&&(Ur=null),up(r.stateNode),vt(e,Oe()),t!==null)for(s=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],s(a.value,{componentStack:a.stack,digest:a.digest});if(Ii)throw Ii=!1,e=_o,_o=null,e;return Li&1&&e.tag!==0&&Zn(),i=e.pendingLanes,i&1?e===$o?Gs++:(Gs=0,$o=e):Gs=0,Zr(),null}function Zn(){if(Mr!==null){var e=_h(Li),t=Rt.transition,r=pe;try{if(Rt.transition=null,pe=16>e?16:e,Mr===null)var s=!1;else{if(e=Mr,Mr=null,Li=0,ue&6)throw Error(U(331));var a=ue;for(ue|=4,H=e.current;H!==null;){var i=H,l=i.child;if(H.flags&16){var o=i.deletions;if(o!==null){for(var c=0;c<o.length;c++){var d=o[c];for(H=d;H!==null;){var m=H;switch(m.tag){case 0:case 11:case 15:Qs(8,m,i)}var u=m.child;if(u!==null)u.return=m,H=u;else for(;H!==null;){m=H;var p=m.sibling,y=m.return;if(Gm(m),m===d){H=null;break}if(p!==null){p.return=y,H=p;break}H=y}}}var w=i.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var j=v.sibling;v.sibling=null,v=j}while(v!==null)}}H=i}}if(i.subtreeFlags&2064&&l!==null)l.return=i,H=l;else e:for(;H!==null;){if(i=H,i.flags&2048)switch(i.tag){case 0:case 11:case 15:Qs(9,i,i.return)}var x=i.sibling;if(x!==null){x.return=i.return,H=x;break e}H=i.return}}var f=e.current;for(H=f;H!==null;){l=H;var g=l.child;if(l.subtreeFlags&2064&&g!==null)g.return=l,H=g;else e:for(l=f;H!==null;){if(o=H,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:Xi(9,o)}}catch(C){Me(o,o.return,C)}if(o===l){H=null;break e}var N=o.sibling;if(N!==null){N.return=o.return,H=N;break e}H=o.return}}if(ue=a,Zr(),sr&&typeof sr.onPostCommitFiberRoot=="function")try{sr.onPostCommitFiberRoot(Bi,e)}catch{}s=!0}return s}finally{pe=r,Rt.transition=t}}return!1}function mu(e,t,r){t=cs(r,t),t=_m(e,t,1),e=Fr(e,t,1),t=dt(),e!==null&&(wa(e,1,t),vt(e,t))}function Me(e,t,r){if(e.tag===3)mu(e,e,r);else for(;t!==null;){if(t.tag===3){mu(t,e,r);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ur===null||!Ur.has(s))){e=cs(r,e),e=$m(t,e,1),t=Fr(t,e,1),e=dt(),t!==null&&(wa(t,1,e),vt(t,e));break}}t=t.return}}function _g(e,t,r){var s=e.pingCache;s!==null&&s.delete(t),t=dt(),e.pingedLanes|=e.suspendedLanes&r,Qe===e&&(Je&r)===r&&(Ve===4||Ve===3&&(Je&130023424)===Je&&500>Oe()-_c?hn(e,0):Ac|=r),vt(e,t)}function af(e,t){t===0&&(e.mode&1?(t=La,La<<=1,!(La&130023424)&&(La=4194304)):t=1);var r=dt();e=br(e,t),e!==null&&(wa(e,t,r),vt(e,r))}function $g(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),af(e,r)}function Fg(e,t){var r=0;switch(e.tag){case 13:var s=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(U(314))}s!==null&&s.delete(t),af(e,r)}var lf;lf=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||pt.current)xt=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return xt=!1,Eg(e,t,r);xt=!!(e.flags&131072)}else xt=!1,Pe&&t.flags&1048576&&dm(t,Ci,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;li(e,t),e=t.pendingProps;var a=as(t,at.current);qn(t,r),a=Dc(null,t,s,e,a,r);var i=Rc();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,gt(s)?(i=!0,ki(t)):i=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Cc(t),a.updater=Gi,t.stateNode=a,a._reactInternals=t,Eo(t,s,e,r),t=zo(null,t,s,!0,i,r)):(t.tag=0,Pe&&i&&yc(t),lt(null,t,a,r),t=t.child),t;case 16:s=t.elementType;e:{switch(li(e,t),e=t.pendingProps,a=s._init,s=a(s._payload),t.type=s,a=t.tag=Bg(s),e=Bt(s,e),a){case 0:t=Po(null,t,s,e,r);break e;case 1:t=nu(null,t,s,e,r);break e;case 11:t=tu(null,t,s,e,r);break e;case 14:t=ru(null,t,s,Bt(s.type,e),r);break e}throw Error(U(306,s,""))}return t;case 0:return s=t.type,a=t.pendingProps,a=t.elementType===s?a:Bt(s,a),Po(e,t,s,a,r);case 1:return s=t.type,a=t.pendingProps,a=t.elementType===s?a:Bt(s,a),nu(e,t,s,a,r);case 3:e:{if(Vm(t),e===null)throw Error(U(387));s=t.pendingProps,i=t.memoizedState,a=i.element,pm(e,t),Pi(t,s,null,r);var l=t.memoizedState;if(s=l.element,i.isDehydrated)if(i={element:s,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){a=cs(Error(U(423)),t),t=su(e,t,s,r,a);break e}else if(s!==a){a=cs(Error(U(424)),t),t=su(e,t,s,r,a);break e}else for(bt=$r(t.stateNode.containerInfo.firstChild),jt=t,Pe=!0,Wt=null,r=fm(t,null,s,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(is(),s===a){t=jr(e,t,r);break e}lt(e,t,s,r)}t=t.child}return t;case 5:return gm(t),e===null&&ko(t),s=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,l=a.children,yo(s,a)?l=null:i!==null&&yo(s,i)&&(t.flags|=32),Bm(e,t),lt(e,t,l,r),t.child;case 6:return e===null&&ko(t),null;case 13:return Wm(e,t,r);case 4:return Ec(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ls(t,null,s,r):lt(e,t,s,r),t.child;case 11:return s=t.type,a=t.pendingProps,a=t.elementType===s?a:Bt(s,a),tu(e,t,s,a,r);case 7:return lt(e,t,t.pendingProps,r),t.child;case 8:return lt(e,t,t.pendingProps.children,r),t.child;case 12:return lt(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(s=t.type._context,a=t.pendingProps,i=t.memoizedProps,l=a.value,je(Ei,s._currentValue),s._currentValue=l,i!==null)if(Qt(i.value,l)){if(i.children===a.children&&!pt.current){t=jr(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var o=i.dependencies;if(o!==null){l=i.child;for(var c=o.firstContext;c!==null;){if(c.context===s){if(i.tag===1){c=gr(-1,r&-r),c.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var m=d.pending;m===null?c.next=c:(c.next=m.next,m.next=c),d.pending=c}}i.lanes|=r,c=i.alternate,c!==null&&(c.lanes|=r),So(i.return,r,t),o.lanes|=r;break}c=c.next}}else if(i.tag===10)l=i.type===t.type?null:i.child;else if(i.tag===18){if(l=i.return,l===null)throw Error(U(341));l.lanes|=r,o=l.alternate,o!==null&&(o.lanes|=r),So(l,r,t),l=i.sibling}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===t){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}lt(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,s=t.pendingProps.children,qn(t,r),a=Mt(a),s=s(a),t.flags|=1,lt(e,t,s,r),t.child;case 14:return s=t.type,a=Bt(s,t.pendingProps),a=Bt(s.type,a),ru(e,t,s,a,r);case 15:return Fm(e,t,t.type,t.pendingProps,r);case 17:return s=t.type,a=t.pendingProps,a=t.elementType===s?a:Bt(s,a),li(e,t),t.tag=1,gt(s)?(e=!0,ki(t)):e=!1,qn(t,r),Am(t,s,a),Eo(t,s,a,r),zo(null,t,s,!0,e,r);case 19:return Hm(e,t,r);case 22:return Um(e,t,r)}throw Error(U(156,t.tag))};function of(e,t){return Ih(e,t)}function Ug(e,t,r,s){this.tag=e,this.key=r,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(e,t,r,s){return new Ug(e,t,r,s)}function Bc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bg(e){if(typeof e=="function")return Bc(e)?1:0;if(e!=null){if(e=e.$$typeof,e===lc)return 11;if(e===oc)return 14}return 2}function Vr(e,t){var r=e.alternate;return r===null?(r=zt(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function di(e,t,r,s,a,i){var l=2;if(s=e,typeof e=="function")Bc(e)&&(l=1);else if(typeof e=="string")l=5;else e:switch(e){case An:return mn(r.children,a,i,t);case ic:l=8,a|=8;break;case Xl:return e=zt(12,r,t,a|2),e.elementType=Xl,e.lanes=i,e;case Jl:return e=zt(13,r,t,a),e.elementType=Jl,e.lanes=i,e;case ql:return e=zt(19,r,t,a),e.elementType=ql,e.lanes=i,e;case gh:return qi(r,a,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xh:l=10;break e;case ph:l=9;break e;case lc:l=11;break e;case oc:l=14;break e;case Tr:l=16,s=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=zt(l,r,t,a),t.elementType=e,t.type=s,t.lanes=i,t}function mn(e,t,r,s){return e=zt(7,e,s,t),e.lanes=r,e}function qi(e,t,r,s){return e=zt(22,e,s,t),e.elementType=gh,e.lanes=r,e.stateNode={isHidden:!1},e}function Ml(e,t,r){return e=zt(6,e,null,t),e.lanes=r,e}function Il(e,t,r){return t=zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vg(e,t,r,s,a){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=fl(0),this.expirationTimes=fl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fl(0),this.identifierPrefix=s,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function Vc(e,t,r,s,a,i,l,o,c){return e=new Vg(e,t,r,o,c),t===1?(t=1,i===!0&&(t|=8)):t=0,i=zt(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:s,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cc(i),e}function Wg(e,t,r){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:On,key:s==null?null:""+s,children:e,containerInfo:t,implementation:r}}function cf(e){if(!e)return Yr;e=e._reactInternals;e:{if(Sn(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(gt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var r=e.type;if(gt(r))return om(e,r,t)}return t}function df(e,t,r,s,a,i,l,o,c){return e=Vc(r,s,!0,e,a,i,l,o,c),e.context=cf(null),r=e.current,s=dt(),a=Br(r),i=gr(s,a),i.callback=t??null,Fr(r,i,a),e.current.lanes=a,wa(e,a,s),vt(e,s),e}function Zi(e,t,r,s){var a=t.current,i=dt(),l=Br(a);return r=cf(r),t.context===null?t.context=r:t.pendingContext=r,t=gr(i,l),t.payload={element:e},s=s===void 0?null:s,s!==null&&(t.callback=s),e=Fr(a,t,l),e!==null&&(Kt(e,a,l,i),si(e,a,l)),l}function Ai(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 fu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Wc(e,t){fu(e,t),(e=e.alternate)&&fu(e,t)}function Hg(){return null}var uf=typeof reportError=="function"?reportError:function(e){console.error(e)};function Hc(e){this._internalRoot=e}el.prototype.render=Hc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));Zi(e,t,null,null)};el.prototype.unmount=Hc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;yn(function(){Zi(null,e,null,null)}),t[wr]=null}};function el(e){this._internalRoot=e}el.prototype.unstable_scheduleHydration=function(e){if(e){var t=Uh();e={blockedOn:null,target:e,priority:t};for(var r=0;r<zr.length&&t!==0&&t<zr[r].priority;r++);zr.splice(r,0,e),r===0&&Vh(e)}};function Kc(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function tl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function xu(){}function Kg(e,t,r,s,a){if(a){if(typeof s=="function"){var i=s;s=function(){var d=Ai(l);i.call(d)}}var l=df(t,s,e,0,null,!1,!1,"",xu);return e._reactRootContainer=l,e[wr]=l.current,aa(e.nodeType===8?e.parentNode:e),yn(),l}for(;a=e.lastChild;)e.removeChild(a);if(typeof s=="function"){var o=s;s=function(){var d=Ai(c);o.call(d)}}var c=Vc(e,0,!1,null,null,!1,!1,"",xu);return e._reactRootContainer=c,e[wr]=c.current,aa(e.nodeType===8?e.parentNode:e),yn(function(){Zi(t,c,r,s)}),c}function rl(e,t,r,s,a){var i=r._reactRootContainer;if(i){var l=i;if(typeof a=="function"){var o=a;a=function(){var c=Ai(l);o.call(c)}}Zi(t,l,e,a)}else l=Kg(r,t,e,a,s);return Ai(l)}$h=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=$s(t.pendingLanes);r!==0&&(uc(t,r|1),vt(t,Oe()),!(ue&6)&&(ds=Oe()+500,Zr()))}break;case 13:yn(function(){var s=br(e,1);if(s!==null){var a=dt();Kt(s,e,1,a)}}),Wc(e,1)}};hc=function(e){if(e.tag===13){var t=br(e,134217728);if(t!==null){var r=dt();Kt(t,e,134217728,r)}Wc(e,134217728)}};Fh=function(e){if(e.tag===13){var t=Br(e),r=br(e,t);if(r!==null){var s=dt();Kt(r,e,t,s)}Wc(e,t)}};Uh=function(){return pe};Bh=function(e,t){var r=pe;try{return pe=e,t()}finally{pe=r}};oo=function(e,t,r){switch(t){case"input":if(to(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var s=r[t];if(s!==e&&s.form===e.form){var a=Ki(s);if(!a)throw Error(U(90));yh(s),to(s,a)}}}break;case"textarea":bh(e,r);break;case"select":t=r.value,t!=null&&Yn(e,!!r.multiple,t,!1)}};Th=$c;Ph=yn;var Qg={usingClientEntryPoint:!1,Events:[ja,Un,Ki,Ch,Eh,$c]},Ds={findFiberByHostInstance:cn,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Yg={bundleType:Ds.bundleType,version:Ds.version,rendererPackageName:Ds.rendererPackageName,rendererConfig:Ds.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Nr.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Rh(e),e===null?null:e.stateNode},findFiberByHostInstance:Ds.findFiberByHostInstance||Hg,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 Ka=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ka.isDisabled&&Ka.supportsFiber)try{Bi=Ka.inject(Yg),sr=Ka}catch{}}kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qg;kt.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Kc(t))throw Error(U(200));return Wg(e,t,null,r)};kt.createRoot=function(e,t){if(!Kc(e))throw Error(U(299));var r=!1,s="",a=uf;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=Vc(e,1,!1,null,null,r,!1,s,a),e[wr]=t.current,aa(e.nodeType===8?e.parentNode:e),new Hc(t)};kt.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(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=Rh(t),e=e===null?null:e.stateNode,e};kt.flushSync=function(e){return yn(e)};kt.hydrate=function(e,t,r){if(!tl(t))throw Error(U(200));return rl(null,e,t,!0,r)};kt.hydrateRoot=function(e,t,r){if(!Kc(e))throw Error(U(405));var s=r!=null&&r.hydratedSources||null,a=!1,i="",l=uf;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(i=r.identifierPrefix),r.onRecoverableError!==void 0&&(l=r.onRecoverableError)),t=df(t,null,e,1,r??null,a,!1,i,l),e[wr]=t.current,aa(e),s)for(e=0;e<s.length;e++)r=s[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new el(t)};kt.render=function(e,t,r){if(!tl(t))throw Error(U(200));return rl(null,e,t,!1,r)};kt.unmountComponentAtNode=function(e){if(!tl(e))throw Error(U(40));return e._reactRootContainer?(yn(function(){rl(null,null,e,!1,function(){e._reactRootContainer=null,e[wr]=null})}),!0):!1};kt.unstable_batchedUpdates=$c;kt.unstable_renderSubtreeIntoContainer=function(e,t,r,s){if(!tl(r))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return rl(e,t,r,!1,s)};kt.version="18.3.1-next-f1338f8080-20240426";function hf(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hf)}catch(e){console.error(e)}}hf(),uh.exports=kt;var Qc=uh.exports;const mf=Zu(Qc);var pu=Qc;Yl.createRoot=pu.createRoot,Yl.hydrateRoot=pu.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 fa(){return fa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},fa.apply(this,arguments)}var Ir;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Ir||(Ir={}));const gu="popstate";function Gg(e){e===void 0&&(e={});function t(s,a){let{pathname:i,search:l,hash:o}=s.location;return Bo("",{pathname:i,search:l,hash:o},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function r(s,a){return typeof a=="string"?a:_i(a)}return Jg(t,r,null,e)}function _e(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ff(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Xg(){return Math.random().toString(36).substr(2,8)}function vu(e,t){return{usr:e.state,key:e.key,idx:t}}function Bo(e,t,r,s){return r===void 0&&(r=null),fa({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?ys(t):t,{state:r,key:t&&t.key||s||Xg()})}function _i(e){let{pathname:t="/",search:r="",hash:s=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),s&&s!=="#"&&(t+=s.charAt(0)==="#"?s:"#"+s),t}function ys(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let s=e.indexOf("?");s>=0&&(t.search=e.substr(s),e=e.substr(0,s)),e&&(t.pathname=e)}return t}function Jg(e,t,r,s){s===void 0&&(s={});let{window:a=document.defaultView,v5Compat:i=!1}=s,l=a.history,o=Ir.Pop,c=null,d=m();d==null&&(d=0,l.replaceState(fa({},l.state,{idx:d}),""));function m(){return(l.state||{idx:null}).idx}function u(){o=Ir.Pop;let j=m(),x=j==null?null:j-d;d=j,c&&c({action:o,location:v.location,delta:x})}function p(j,x){o=Ir.Push;let f=Bo(v.location,j,x);d=m()+1;let g=vu(f,d),N=v.createHref(f);try{l.pushState(g,"",N)}catch(C){if(C instanceof DOMException&&C.name==="DataCloneError")throw C;a.location.assign(N)}i&&c&&c({action:o,location:v.location,delta:1})}function y(j,x){o=Ir.Replace;let f=Bo(v.location,j,x);d=m();let g=vu(f,d),N=v.createHref(f);l.replaceState(g,"",N),i&&c&&c({action:o,location:v.location,delta:0})}function w(j){let x=a.location.origin!=="null"?a.location.origin:a.location.href,f=typeof j=="string"?j:_i(j);return f=f.replace(/ $/,"%20"),_e(x,"No window.location.(origin|href) available to create URL for href: "+f),new URL(f,x)}let v={get action(){return o},get location(){return e(a,l)},listen(j){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(gu,u),c=j,()=>{a.removeEventListener(gu,u),c=null}},createHref(j){return t(a,j)},createURL:w,encodeLocation(j){let x=w(j);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:p,replace:y,go(j){return l.go(j)}};return v}var yu;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(yu||(yu={}));function qg(e,t,r){return r===void 0&&(r="/"),Zg(e,t,r)}function Zg(e,t,r,s){let a=typeof t=="string"?ys(t):t,i=Yc(a.pathname||"/",r);if(i==null)return null;let l=xf(e);ev(l);let o=null;for(let c=0;o==null&&c<l.length;++c){let d=hv(i);o=cv(l[c],d)}return o}function xf(e,t,r,s){t===void 0&&(t=[]),r===void 0&&(r=[]),s===void 0&&(s="");let a=(i,l,o)=>{let c={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};c.relativePath.startsWith("/")&&(_e(c.relativePath.startsWith(s),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+s+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(s.length));let d=Wr([s,c.relativePath]),m=r.concat(c);i.children&&i.children.length>0&&(_e(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),xf(i.children,t,m,d)),!(i.path==null&&!i.index)&&t.push({path:d,score:lv(d,i.index),routesMeta:m})};return e.forEach((i,l)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))a(i,l);else for(let c of pf(i.path))a(i,l,c)}),t}function pf(e){let t=e.split("/");if(t.length===0)return[];let[r,...s]=t,a=r.endsWith("?"),i=r.replace(/\?$/,"");if(s.length===0)return a?[i,""]:[i];let l=pf(s.join("/")),o=[];return o.push(...l.map(c=>c===""?i:[i,c].join("/"))),a&&o.push(...l),o.map(c=>e.startsWith("/")&&c===""?"/":c)}function ev(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ov(t.routesMeta.map(s=>s.childrenIndex),r.routesMeta.map(s=>s.childrenIndex)))}const tv=/^:[\w-]+$/,rv=3,nv=2,sv=1,av=10,iv=-2,wu=e=>e==="*";function lv(e,t){let r=e.split("/"),s=r.length;return r.some(wu)&&(s+=iv),t&&(s+=nv),r.filter(a=>!wu(a)).reduce((a,i)=>a+(tv.test(i)?rv:i===""?sv:av),s)}function ov(e,t){return e.length===t.length&&e.slice(0,-1).every((s,a)=>s===t[a])?e[e.length-1]-t[t.length-1]:0}function cv(e,t,r){let{routesMeta:s}=e,a={},i="/",l=[];for(let o=0;o<s.length;++o){let c=s[o],d=o===s.length-1,m=i==="/"?t:t.slice(i.length)||"/",u=dv({path:c.relativePath,caseSensitive:c.caseSensitive,end:d},m),p=c.route;if(!u)return null;Object.assign(a,u.params),l.push({params:a,pathname:Wr([i,u.pathname]),pathnameBase:pv(Wr([i,u.pathnameBase])),route:p}),u.pathnameBase!=="/"&&(i=Wr([i,u.pathnameBase]))}return l}function dv(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,s]=uv(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let i=a[0],l=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:s.reduce((d,m,u)=>{let{paramName:p,isOptional:y}=m;if(p==="*"){let v=o[u]||"";l=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const w=o[u];return y&&!w?d[p]=void 0:d[p]=(w||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:l,pattern:e}}function uv(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ff(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 s=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,c)=>(s.push({paramName:o,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(s.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),s]}function hv(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ff(!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 Yc(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,s=e.charAt(r);return s&&s!=="/"?null:e.slice(r)||"/"}function mv(e,t){t===void 0&&(t="/");let{pathname:r,search:s="",hash:a=""}=typeof e=="string"?ys(e):e;return{pathname:r?r.startsWith("/")?r:fv(r,t):t,search:gv(s),hash:vv(a)}}function fv(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function Ll(e,t,r,s){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(s)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function xv(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function gf(e,t){let r=xv(e);return t?r.map((s,a)=>a===r.length-1?s.pathname:s.pathnameBase):r.map(s=>s.pathnameBase)}function vf(e,t,r,s){s===void 0&&(s=!1);let a;typeof e=="string"?a=ys(e):(a=fa({},e),_e(!a.pathname||!a.pathname.includes("?"),Ll("?","pathname","search",a)),_e(!a.pathname||!a.pathname.includes("#"),Ll("#","pathname","hash",a)),_e(!a.search||!a.search.includes("#"),Ll("#","search","hash",a)));let i=e===""||a.pathname==="",l=i?"/":a.pathname,o;if(l==null)o=r;else{let u=t.length-1;if(!s&&l.startsWith("..")){let p=l.split("/");for(;p[0]==="..";)p.shift(),u-=1;a.pathname=p.join("/")}o=u>=0?t[u]:"/"}let c=mv(a,o),d=l&&l!=="/"&&l.endsWith("/"),m=(i||l===".")&&r.endsWith("/");return!c.pathname.endsWith("/")&&(d||m)&&(c.pathname+="/"),c}const Wr=e=>e.join("/").replace(/\/\/+/g,"/"),pv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),gv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,vv=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function yv(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const yf=["post","put","patch","delete"];new Set(yf);const wv=["get",...yf];new Set(wv);/**
|
|
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 xa(){return xa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},xa.apply(this,arguments)}const Gc=h.createContext(null),bv=h.createContext(null),Cn=h.createContext(null),nl=h.createContext(null),en=h.createContext({outlet:null,matches:[],isDataRoute:!1}),wf=h.createContext(null);function jv(e,t){let{relative:r}=t===void 0?{}:t;ka()||_e(!1);let{basename:s,navigator:a}=h.useContext(Cn),{hash:i,pathname:l,search:o}=jf(e,{relative:r}),c=l;return s!=="/"&&(c=l==="/"?s:Wr([s,l])),a.createHref({pathname:c,search:o,hash:i})}function ka(){return h.useContext(nl)!=null}function Sa(){return ka()||_e(!1),h.useContext(nl).location}function bf(e){h.useContext(Cn).static||h.useLayoutEffect(e)}function En(){let{isDataRoute:e}=h.useContext(en);return e?Lv():Nv()}function Nv(){ka()||_e(!1);let e=h.useContext(Gc),{basename:t,future:r,navigator:s}=h.useContext(Cn),{matches:a}=h.useContext(en),{pathname:i}=Sa(),l=JSON.stringify(gf(a,r.v7_relativeSplatPath)),o=h.useRef(!1);return bf(()=>{o.current=!0}),h.useCallback(function(d,m){if(m===void 0&&(m={}),!o.current)return;if(typeof d=="number"){s.go(d);return}let u=vf(d,JSON.parse(l),i,m.relative==="path");e==null&&t!=="/"&&(u.pathname=u.pathname==="/"?t:Wr([t,u.pathname])),(m.replace?s.replace:s.push)(u,m.state,m)},[t,s,l,i,e])}function Xc(){let{matches:e}=h.useContext(en),t=e[e.length-1];return t?t.params:{}}function jf(e,t){let{relative:r}=t===void 0?{}:t,{future:s}=h.useContext(Cn),{matches:a}=h.useContext(en),{pathname:i}=Sa(),l=JSON.stringify(gf(a,s.v7_relativeSplatPath));return h.useMemo(()=>vf(e,JSON.parse(l),i,r==="path"),[e,l,i,r])}function kv(e,t){return Sv(e,t)}function Sv(e,t,r,s){ka()||_e(!1);let{navigator:a}=h.useContext(Cn),{matches:i}=h.useContext(en),l=i[i.length-1],o=l?l.params:{};l&&l.pathname;let c=l?l.pathnameBase:"/";l&&l.route;let d=Sa(),m;if(t){var u;let j=typeof t=="string"?ys(t):t;c==="/"||(u=j.pathname)!=null&&u.startsWith(c)||_e(!1),m=j}else m=d;let p=m.pathname||"/",y=p;if(c!=="/"){let j=c.replace(/^\//,"").split("/");y="/"+p.replace(/^\//,"").split("/").slice(j.length).join("/")}let w=qg(e,{pathname:y}),v=zv(w&&w.map(j=>Object.assign({},j,{params:Object.assign({},o,j.params),pathname:Wr([c,a.encodeLocation?a.encodeLocation(j.pathname).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?c:Wr([c,a.encodeLocation?a.encodeLocation(j.pathnameBase).pathname:j.pathnameBase])})),i,r,s);return t&&v?h.createElement(nl.Provider,{value:{location:xa({pathname:"/",search:"",hash:"",state:null,key:"default"},m),navigationType:Ir.Pop}},v):v}function Cv(){let e=Iv(),t=yv(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return h.createElement(h.Fragment,null,h.createElement("h2",null,"Unexpected Application Error!"),h.createElement("h3",{style:{fontStyle:"italic"}},t),r?h.createElement("pre",{style:a},r):null,null)}const Ev=h.createElement(Cv,null);class Tv extends h.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,r){return r.location!==t.location||r.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:r.error,location:r.location,revalidation:t.revalidation||r.revalidation}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error!==void 0?h.createElement(en.Provider,{value:this.props.routeContext},h.createElement(wf.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Pv(e){let{routeContext:t,match:r,children:s}=e,a=h.useContext(Gc);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),h.createElement(en.Provider,{value:t},s)}function zv(e,t,r,s){var a;if(t===void 0&&(t=[]),r===void 0&&(r=null),s===void 0&&(s=null),e==null){var i;if(!r)return null;if(r.errors)e=r.matches;else if((i=s)!=null&&i.v7_partialHydration&&t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let l=e,o=(a=r)==null?void 0:a.errors;if(o!=null){let m=l.findIndex(u=>u.route.id&&(o==null?void 0:o[u.route.id])!==void 0);m>=0||_e(!1),l=l.slice(0,Math.min(l.length,m+1))}let c=!1,d=-1;if(r&&s&&s.v7_partialHydration)for(let m=0;m<l.length;m++){let u=l[m];if((u.route.HydrateFallback||u.route.hydrateFallbackElement)&&(d=m),u.route.id){let{loaderData:p,errors:y}=r,w=u.route.loader&&p[u.route.id]===void 0&&(!y||y[u.route.id]===void 0);if(u.route.lazy||w){c=!0,d>=0?l=l.slice(0,d+1):l=[l[0]];break}}}return l.reduceRight((m,u,p)=>{let y,w=!1,v=null,j=null;r&&(y=o&&u.route.id?o[u.route.id]:void 0,v=u.route.errorElement||Ev,c&&(d<0&&p===0?(Ov("route-fallback"),w=!0,j=null):d===p&&(w=!0,j=u.route.hydrateFallbackElement||null)));let x=t.concat(l.slice(0,p+1)),f=()=>{let g;return y?g=v:w?g=j:u.route.Component?g=h.createElement(u.route.Component,null):u.route.element?g=u.route.element:g=m,h.createElement(Pv,{match:u,routeContext:{outlet:m,matches:x,isDataRoute:r!=null},children:g})};return r&&(u.route.ErrorBoundary||u.route.errorElement||p===0)?h.createElement(Tv,{location:r.location,revalidation:r.revalidation,component:v,error:y,children:f(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):f()},null)}var Nf=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Nf||{}),kf=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}(kf||{});function Dv(e){let t=h.useContext(Gc);return t||_e(!1),t}function Rv(e){let t=h.useContext(bv);return t||_e(!1),t}function Mv(e){let t=h.useContext(en);return t||_e(!1),t}function Sf(e){let t=Mv(),r=t.matches[t.matches.length-1];return r.route.id||_e(!1),r.route.id}function Iv(){var e;let t=h.useContext(wf),r=Rv(),s=Sf();return t!==void 0?t:(e=r.errors)==null?void 0:e[s]}function Lv(){let{router:e}=Dv(Nf.UseNavigateStable),t=Sf(kf.UseNavigateStable),r=h.useRef(!1);return bf(()=>{r.current=!0}),h.useCallback(function(a,i){i===void 0&&(i={}),r.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,xa({fromRouteId:t},i)))},[e,t])}const bu={};function Ov(e,t,r){bu[e]||(bu[e]=!0)}function Av(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function Ut(e){_e(!1)}function _v(e){let{basename:t="/",children:r=null,location:s,navigationType:a=Ir.Pop,navigator:i,static:l=!1,future:o}=e;ka()&&_e(!1);let c=t.replace(/^\/*/,"/"),d=h.useMemo(()=>({basename:c,navigator:i,static:l,future:xa({v7_relativeSplatPath:!1},o)}),[c,o,i,l]);typeof s=="string"&&(s=ys(s));let{pathname:m="/",search:u="",hash:p="",state:y=null,key:w="default"}=s,v=h.useMemo(()=>{let j=Yc(m,c);return j==null?null:{location:{pathname:j,search:u,hash:p,state:y,key:w},navigationType:a}},[c,m,u,p,y,w,a]);return v==null?null:h.createElement(Cn.Provider,{value:d},h.createElement(nl.Provider,{children:r,value:v}))}function $v(e){let{children:t,location:r}=e;return kv(Vo(t),r)}new Promise(()=>{});function Vo(e,t){t===void 0&&(t=[]);let r=[];return h.Children.forEach(e,(s,a)=>{if(!h.isValidElement(s))return;let i=[...t,a];if(s.type===h.Fragment){r.push.apply(r,Vo(s.props.children,i));return}s.type!==Ut&&_e(!1),!s.props.index||!s.props.children||_e(!1);let l={id:s.props.id||i.join("-"),caseSensitive:s.props.caseSensitive,element:s.props.element,Component:s.props.Component,index:s.props.index,path:s.props.path,loader:s.props.loader,action:s.props.action,errorElement:s.props.errorElement,ErrorBoundary:s.props.ErrorBoundary,hasErrorBoundary:s.props.ErrorBoundary!=null||s.props.errorElement!=null,shouldRevalidate:s.props.shouldRevalidate,handle:s.props.handle,lazy:s.props.lazy};s.props.children&&(l.children=Vo(s.props.children,i)),r.push(l)}),r}/**
|
|
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 Wo(){return Wo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},Wo.apply(this,arguments)}function Fv(e,t){if(e==null)return{};var r={},s=Object.keys(e),a,i;for(i=0;i<s.length;i++)a=s[i],!(t.indexOf(a)>=0)&&(r[a]=e[a]);return r}function Uv(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Bv(e,t){return e.button===0&&(!t||t==="_self")&&!Uv(e)}const Vv=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Wv="6";try{window.__reactRouterVersion=Wv}catch{}const Hv="startTransition",ju=rc[Hv];function Kv(e){let{basename:t,children:r,future:s,window:a}=e,i=h.useRef();i.current==null&&(i.current=Gg({window:a,v5Compat:!0}));let l=i.current,[o,c]=h.useState({action:l.action,location:l.location}),{v7_startTransition:d}=s||{},m=h.useCallback(u=>{d&&ju?ju(()=>c(u)):c(u)},[c,d]);return h.useLayoutEffect(()=>l.listen(m),[l,m]),h.useEffect(()=>Av(s),[s]),h.createElement(_v,{basename:t,children:r,location:o.location,navigationType:o.action,navigator:l,future:s})}const Qv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Yv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,es=h.forwardRef(function(t,r){let{onClick:s,relative:a,reloadDocument:i,replace:l,state:o,target:c,to:d,preventScrollReset:m,viewTransition:u}=t,p=Fv(t,Vv),{basename:y}=h.useContext(Cn),w,v=!1;if(typeof d=="string"&&Yv.test(d)&&(w=d,Qv))try{let g=new URL(window.location.href),N=d.startsWith("//")?new URL(g.protocol+d):new URL(d),C=Yc(N.pathname,y);N.origin===g.origin&&C!=null?d=C+N.search+N.hash:v=!0}catch{}let j=jv(d,{relative:a}),x=Gv(d,{replace:l,state:o,target:c,preventScrollReset:m,relative:a,viewTransition:u});function f(g){s&&s(g),g.defaultPrevented||x(g)}return h.createElement("a",Wo({},p,{href:w||j,onClick:v||i?s:f,ref:r,target:c}))});var Nu;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Nu||(Nu={}));var ku;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(ku||(ku={}));function Gv(e,t){let{target:r,replace:s,state:a,preventScrollReset:i,relative:l,viewTransition:o}=t===void 0?{}:t,c=En(),d=Sa(),m=jf(e,{relative:l});return h.useCallback(u=>{if(Bv(u,r)){u.preventDefault();let p=s!==void 0?s:_i(d)===_i(m);c(e,{replace:p,state:a,preventScrollReset:i,relative:l,viewTransition:o})}},[d,c,m,s,a,r,e,i,l,o])}function Xv(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const Jv=e=>{switch(e){case"success":return e0;case"info":return r0;case"warning":return t0;case"error":return n0;default:return null}},qv=Array(12).fill(0),Zv=({visible:e,className:t})=>V.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},V.createElement("div",{className:"sonner-spinner"},qv.map((r,s)=>V.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),e0=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.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"})),t0=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),r0=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),n0=V.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},V.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"})),s0=V.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"},V.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),V.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),a0=()=>{const[e,t]=V.useState(document.hidden);return V.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let Ho=1;class i0{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:s,...a}=t,i=typeof(t==null?void 0:t.id)=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:Ho++,l=this.toasts.find(c=>c.id===i),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),l?this.toasts=this.toasts.map(c=>c.id===i?(this.publish({...c,...t,id:i,title:s}),{...c,...t,id:i,dismissible:o,title:s}):c):this.addToast({title:s,...a,dismissible:o,id:i}),i},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(s=>s({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let s;r.loading!==void 0&&(s=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let i=s!==void 0,l;const o=a.then(async d=>{if(l=["resolve",d],V.isValidElement(d))i=!1,this.create({id:s,type:"default",message:d});else if(o0(d)&&!d.ok){i=!1;const u=typeof r.error=="function"?await r.error(`HTTP error! status: ${d.status}`):r.error,p=typeof r.description=="function"?await r.description(`HTTP error! status: ${d.status}`):r.description,w=typeof u=="object"&&!V.isValidElement(u)?u:{message:u};this.create({id:s,type:"error",description:p,...w})}else if(d instanceof Error){i=!1;const u=typeof r.error=="function"?await r.error(d):r.error,p=typeof r.description=="function"?await r.description(d):r.description,w=typeof u=="object"&&!V.isValidElement(u)?u:{message:u};this.create({id:s,type:"error",description:p,...w})}else if(r.success!==void 0){i=!1;const u=typeof r.success=="function"?await r.success(d):r.success,p=typeof r.description=="function"?await r.description(d):r.description,w=typeof u=="object"&&!V.isValidElement(u)?u:{message:u};this.create({id:s,type:"success",description:p,...w})}}).catch(async d=>{if(l=["reject",d],r.error!==void 0){i=!1;const m=typeof r.error=="function"?await r.error(d):r.error,u=typeof r.description=="function"?await r.description(d):r.description,y=typeof m=="object"&&!V.isValidElement(m)?m:{message:m};this.create({id:s,type:"error",description:u,...y})}}).finally(()=>{i&&(this.dismiss(s),s=void 0),r.finally==null||r.finally.call(r)}),c=()=>new Promise((d,m)=>o.then(()=>l[0]==="reject"?m(l[1]):d(l[1])).catch(m));return typeof s!="string"&&typeof s!="number"?{unwrap:c}:Object.assign(s,{unwrap:c})},this.custom=(t,r)=>{const s=(r==null?void 0:r.id)||Ho++;return this.create({jsx:t(s),id:s,...r}),s},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const mt=new i0,l0=(e,t)=>{const r=(t==null?void 0:t.id)||Ho++;return mt.addToast({title:e,...t,id:r}),r},o0=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",c0=l0,d0=()=>mt.toasts,u0=()=>mt.getActiveToasts(),D=Object.assign(c0,{success:mt.success,info:mt.info,warning:mt.warning,error:mt.error,custom:mt.custom,message:mt.message,promise:mt.promise,dismiss:mt.dismiss,loading:mt.loading},{getHistory:d0,getToasts:u0});Xv("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-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;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[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 rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[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-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[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-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[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][data-expanded=true]::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) * 0.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-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[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-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-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-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[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:first-child{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)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Qa(e){return e.label!==void 0}const h0=3,m0="24px",f0="16px",Su=4e3,x0=356,p0=14,g0=45,v0=200;function Jt(...e){return e.filter(Boolean).join(" ")}function y0(e){const[t,r]=e.split("-"),s=[];return t&&s.push(t),r&&s.push(r),s}const w0=e=>{var t,r,s,a,i,l,o,c,d;const{invert:m,toast:u,unstyled:p,interacting:y,setHeights:w,visibleToasts:v,heights:j,index:x,toasts:f,expanded:g,removeToast:N,defaultRichColors:C,closeButton:P,style:k,cancelButtonStyle:R,actionButtonStyle:J,className:W="",descriptionClassName:q="",duration:Y,position:te,gap:ee,expandByDefault:ie,classNames:X,icons:_,closeButtonAriaLabel:S="Close toast"}=e,[O,B]=V.useState(null),[z,b]=V.useState(null),[E,L]=V.useState(!1),[M,A]=V.useState(!1),[K,$]=V.useState(!1),[Z,de]=V.useState(!1),[we,ge]=V.useState(!1),[Ne,ve]=V.useState(0),[Gt,ir]=V.useState(0),lr=V.useRef(u.duration||Y||Su),Lt=V.useRef(null),Ye=V.useRef(null),Ot=x===0,bs=x+1<=v,$e=u.type,At=u.dismissible!==!1,rn=u.className||"",js=u.descriptionClassName||"",F=V.useMemo(()=>j.findIndex(se=>se.toastId===u.id)||0,[j,u.id]),Q=V.useMemo(()=>{var se;return(se=u.closeButton)!=null?se:P},[u.closeButton,P]),oe=V.useMemo(()=>u.duration||Y||Su,[u.duration,Y]),Ee=V.useRef(0),Fe=V.useRef(0),ye=V.useRef(0),Te=V.useRef(null),[Ns,I]=te.split("-"),G=V.useMemo(()=>j.reduce((se,He,et)=>et>=F?se:se+He.height,0),[j,F]),ne=a0(),We=u.invert||m,it=$e==="loading";Fe.current=V.useMemo(()=>F*ee+G,[F,G]),V.useEffect(()=>{lr.current=oe},[oe]),V.useEffect(()=>{L(!0)},[]),V.useEffect(()=>{const se=Ye.current;if(se){const He=se.getBoundingClientRect().height;return ir(He),w(et=>[{toastId:u.id,height:He,position:u.position},...et]),()=>w(et=>et.filter(yt=>yt.toastId!==u.id))}},[w,u.id]),V.useLayoutEffect(()=>{if(!E)return;const se=Ye.current,He=se.style.height;se.style.height="auto";const et=se.getBoundingClientRect().height;se.style.height=He,ir(et),w(yt=>yt.find(Ge=>Ge.toastId===u.id)?yt.map(Ge=>Ge.toastId===u.id?{...Ge,height:et}:Ge):[{toastId:u.id,height:et,position:u.position},...yt])},[E,u.title,u.description,w,u.id,u.jsx,u.action,u.cancel]);const fe=V.useCallback(()=>{A(!0),ve(Fe.current),w(se=>se.filter(He=>He.toastId!==u.id)),setTimeout(()=>{N(u)},v0)},[u,N,w,Fe]);V.useEffect(()=>{if(u.promise&&$e==="loading"||u.duration===1/0||u.type==="loading")return;let se;return g||y||ne?(()=>{if(ye.current<Ee.current){const yt=new Date().getTime()-Ee.current;lr.current=lr.current-yt}ye.current=new Date().getTime()})():(()=>{lr.current!==1/0&&(Ee.current=new Date().getTime(),se=setTimeout(()=>{u.onAutoClose==null||u.onAutoClose.call(u,u),fe()},lr.current))})(),()=>clearTimeout(se)},[g,y,u,$e,ne,fe]),V.useEffect(()=>{u.delete&&(fe(),u.onDismiss==null||u.onDismiss.call(u,u))},[fe,u.delete]);function or(){var se;if(_!=null&&_.loading){var He;return V.createElement("div",{className:Jt(X==null?void 0:X.loader,u==null||(He=u.classNames)==null?void 0:He.loader,"sonner-loader"),"data-visible":$e==="loading"},_.loading)}return V.createElement(Zv,{className:Jt(X==null?void 0:X.loader,u==null||(se=u.classNames)==null?void 0:se.loader),visible:$e==="loading"})}const jx=u.icon||(_==null?void 0:_[$e])||Jv($e);var ad,id;return V.createElement("li",{tabIndex:0,ref:Ye,className:Jt(W,rn,X==null?void 0:X.toast,u==null||(t=u.classNames)==null?void 0:t.toast,X==null?void 0:X.default,X==null?void 0:X[$e],u==null||(r=u.classNames)==null?void 0:r[$e]),"data-sonner-toast":"","data-rich-colors":(ad=u.richColors)!=null?ad:C,"data-styled":!(u.jsx||u.unstyled||p),"data-mounted":E,"data-promise":!!u.promise,"data-swiped":we,"data-removed":M,"data-visible":bs,"data-y-position":Ns,"data-x-position":I,"data-index":x,"data-front":Ot,"data-swiping":K,"data-dismissible":At,"data-type":$e,"data-invert":We,"data-swipe-out":Z,"data-swipe-direction":z,"data-expanded":!!(g||ie&&E),"data-testid":u.testId,style:{"--index":x,"--toasts-before":x,"--z-index":f.length-x,"--offset":`${M?Ne:Fe.current}px`,"--initial-height":ie?"auto":`${Gt}px`,...k,...u.style},onDragEnd:()=>{$(!1),B(null),Te.current=null},onPointerDown:se=>{se.button!==2&&(it||!At||(Lt.current=new Date,ve(Fe.current),se.target.setPointerCapture(se.pointerId),se.target.tagName!=="BUTTON"&&($(!0),Te.current={x:se.clientX,y:se.clientY})))},onPointerUp:()=>{var se,He,et;if(Z||!At)return;Te.current=null;const yt=Number(((se=Ye.current)==null?void 0:se.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ta=Number(((He=Ye.current)==null?void 0:He.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Ge=new Date().getTime()-((et=Lt.current)==null?void 0:et.getTime()),Ct=O==="x"?yt:Ta,Pa=Math.abs(Ct)/Ge;if(Math.abs(Ct)>=g0||Pa>.11){ve(Fe.current),u.onDismiss==null||u.onDismiss.call(u,u),b(O==="x"?yt>0?"right":"left":Ta>0?"down":"up"),fe(),de(!0);return}else{var _t,$t;(_t=Ye.current)==null||_t.style.setProperty("--swipe-amount-x","0px"),($t=Ye.current)==null||$t.style.setProperty("--swipe-amount-y","0px")}ge(!1),$(!1),B(null)},onPointerMove:se=>{var He,et,yt;if(!Te.current||!At||((He=window.getSelection())==null?void 0:He.toString().length)>0)return;const Ge=se.clientY-Te.current.y,Ct=se.clientX-Te.current.x;var Pa;const _t=(Pa=e.swipeDirections)!=null?Pa:y0(te);!O&&(Math.abs(Ct)>1||Math.abs(Ge)>1)&&B(Math.abs(Ct)>Math.abs(Ge)?"x":"y");let $t={x:0,y:0};const ld=nn=>1/(1.5+Math.abs(nn)/20);if(O==="y"){if(_t.includes("top")||_t.includes("bottom"))if(_t.includes("top")&&Ge<0||_t.includes("bottom")&&Ge>0)$t.y=Ge;else{const nn=Ge*ld(Ge);$t.y=Math.abs(nn)<Math.abs(Ge)?nn:Ge}}else if(O==="x"&&(_t.includes("left")||_t.includes("right")))if(_t.includes("left")&&Ct<0||_t.includes("right")&&Ct>0)$t.x=Ct;else{const nn=Ct*ld(Ct);$t.x=Math.abs(nn)<Math.abs(Ct)?nn:Ct}(Math.abs($t.x)>0||Math.abs($t.y)>0)&&ge(!0),(et=Ye.current)==null||et.style.setProperty("--swipe-amount-x",`${$t.x}px`),(yt=Ye.current)==null||yt.style.setProperty("--swipe-amount-y",`${$t.y}px`)}},Q&&!u.jsx&&$e!=="loading"?V.createElement("button",{"aria-label":S,"data-disabled":it,"data-close-button":!0,onClick:it||!At?()=>{}:()=>{fe(),u.onDismiss==null||u.onDismiss.call(u,u)},className:Jt(X==null?void 0:X.closeButton,u==null||(s=u.classNames)==null?void 0:s.closeButton)},(id=_==null?void 0:_.close)!=null?id:s0):null,($e||u.icon||u.promise)&&u.icon!==null&&((_==null?void 0:_[$e])!==null||u.icon)?V.createElement("div",{"data-icon":"",className:Jt(X==null?void 0:X.icon,u==null||(a=u.classNames)==null?void 0:a.icon)},u.promise||u.type==="loading"&&!u.icon?u.icon||or():null,u.type!=="loading"?jx:null):null,V.createElement("div",{"data-content":"",className:Jt(X==null?void 0:X.content,u==null||(i=u.classNames)==null?void 0:i.content)},V.createElement("div",{"data-title":"",className:Jt(X==null?void 0:X.title,u==null||(l=u.classNames)==null?void 0:l.title)},u.jsx?u.jsx:typeof u.title=="function"?u.title():u.title),u.description?V.createElement("div",{"data-description":"",className:Jt(q,js,X==null?void 0:X.description,u==null||(o=u.classNames)==null?void 0:o.description)},typeof u.description=="function"?u.description():u.description):null),V.isValidElement(u.cancel)?u.cancel:u.cancel&&Qa(u.cancel)?V.createElement("button",{"data-button":!0,"data-cancel":!0,style:u.cancelButtonStyle||R,onClick:se=>{Qa(u.cancel)&&At&&(u.cancel.onClick==null||u.cancel.onClick.call(u.cancel,se),fe())},className:Jt(X==null?void 0:X.cancelButton,u==null||(c=u.classNames)==null?void 0:c.cancelButton)},u.cancel.label):null,V.isValidElement(u.action)?u.action:u.action&&Qa(u.action)?V.createElement("button",{"data-button":!0,"data-action":!0,style:u.actionButtonStyle||J,onClick:se=>{Qa(u.action)&&(u.action.onClick==null||u.action.onClick.call(u.action,se),!se.defaultPrevented&&fe())},className:Jt(X==null?void 0:X.actionButton,u==null||(d=u.classNames)==null?void 0:d.actionButton)},u.action.label):null)};function Cu(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function b0(e,t){const r={};return[e,t].forEach((s,a)=>{const i=a===1,l=i?"--mobile-offset":"--offset",o=i?f0:m0;function c(d){["top","right","bottom","left"].forEach(m=>{r[`${l}-${m}`]=typeof d=="number"?`${d}px`:d})}typeof s=="number"||typeof s=="string"?c(s):typeof s=="object"?["top","right","bottom","left"].forEach(d=>{s[d]===void 0?r[`${l}-${d}`]=o:r[`${l}-${d}`]=typeof s[d]=="number"?`${s[d]}px`:s[d]}):c(o)}),r}const j0=V.forwardRef(function(t,r){const{id:s,invert:a,position:i="bottom-right",hotkey:l=["altKey","KeyT"],expand:o,closeButton:c,className:d,offset:m,mobileOffset:u,theme:p="light",richColors:y,duration:w,style:v,visibleToasts:j=h0,toastOptions:x,dir:f=Cu(),gap:g=p0,icons:N,containerAriaLabel:C="Notifications"}=t,[P,k]=V.useState([]),R=V.useMemo(()=>s?P.filter(E=>E.toasterId===s):P.filter(E=>!E.toasterId),[P,s]),J=V.useMemo(()=>Array.from(new Set([i].concat(R.filter(E=>E.position).map(E=>E.position)))),[R,i]),[W,q]=V.useState([]),[Y,te]=V.useState(!1),[ee,ie]=V.useState(!1),[X,_]=V.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),S=V.useRef(null),O=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),B=V.useRef(null),z=V.useRef(!1),b=V.useCallback(E=>{k(L=>{var M;return(M=L.find(A=>A.id===E.id))!=null&&M.delete||mt.dismiss(E.id),L.filter(({id:A})=>A!==E.id)})},[]);return V.useEffect(()=>mt.subscribe(E=>{if(E.dismiss){requestAnimationFrame(()=>{k(L=>L.map(M=>M.id===E.id?{...M,delete:!0}:M))});return}setTimeout(()=>{mf.flushSync(()=>{k(L=>{const M=L.findIndex(A=>A.id===E.id);return M!==-1?[...L.slice(0,M),{...L[M],...E},...L.slice(M+1)]:[E,...L]})})})}),[P]),V.useEffect(()=>{if(p!=="system"){_(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?_("dark"):_("light")),typeof window>"u")return;const E=window.matchMedia("(prefers-color-scheme: dark)");try{E.addEventListener("change",({matches:L})=>{_(L?"dark":"light")})}catch{E.addListener(({matches:M})=>{try{_(M?"dark":"light")}catch(A){console.error(A)}})}},[p]),V.useEffect(()=>{P.length<=1&&te(!1)},[P]),V.useEffect(()=>{const E=L=>{var M;if(l.every($=>L[$]||L.code===$)){var K;te(!0),(K=S.current)==null||K.focus()}L.code==="Escape"&&(document.activeElement===S.current||(M=S.current)!=null&&M.contains(document.activeElement))&&te(!1)};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[l]),V.useEffect(()=>{if(S.current)return()=>{B.current&&(B.current.focus({preventScroll:!0}),B.current=null,z.current=!1)}},[S.current]),V.createElement("section",{ref:r,"aria-label":`${C} ${O}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},J.map((E,L)=>{var M;const[A,K]=E.split("-");return R.length?V.createElement("ol",{key:E,dir:f==="auto"?Cu():f,tabIndex:-1,ref:S,className:d,"data-sonner-toaster":!0,"data-sonner-theme":X,"data-y-position":A,"data-x-position":K,style:{"--front-toast-height":`${((M=W[0])==null?void 0:M.height)||0}px`,"--width":`${x0}px`,"--gap":`${g}px`,...v,...b0(m,u)},onBlur:$=>{z.current&&!$.currentTarget.contains($.relatedTarget)&&(z.current=!1,B.current&&(B.current.focus({preventScroll:!0}),B.current=null))},onFocus:$=>{$.target instanceof HTMLElement&&$.target.dataset.dismissible==="false"||z.current||(z.current=!0,B.current=$.relatedTarget)},onMouseEnter:()=>te(!0),onMouseMove:()=>te(!0),onMouseLeave:()=>{ee||te(!1)},onDragEnd:()=>te(!1),onPointerDown:$=>{$.target instanceof HTMLElement&&$.target.dataset.dismissible==="false"||ie(!0)},onPointerUp:()=>ie(!1)},R.filter($=>!$.position&&L===0||$.position===E).map(($,Z)=>{var de,we;return V.createElement(w0,{key:$.id,icons:N,index:Z,toast:$,defaultRichColors:y,duration:(de=x==null?void 0:x.duration)!=null?de:w,className:x==null?void 0:x.className,descriptionClassName:x==null?void 0:x.descriptionClassName,invert:a,visibleToasts:j,closeButton:(we=x==null?void 0:x.closeButton)!=null?we:c,interacting:ee,position:E,style:x==null?void 0:x.style,unstyled:x==null?void 0:x.unstyled,classNames:x==null?void 0:x.classNames,cancelButtonStyle:x==null?void 0:x.cancelButtonStyle,actionButtonStyle:x==null?void 0:x.actionButtonStyle,closeButtonAriaLabel:x==null?void 0:x.closeButtonAriaLabel,removeToast:b,toasts:R.filter(ge=>ge.position==$.position),heights:W.filter(ge=>ge.position==$.position),setHeights:q,expandByDefault:o,gap:g,expanded:Y,swipeDirections:t.swipeDirections})})):null}))});/**
|
|
68
|
-
* @license lucide-react v0.294.0 - ISC
|
|
69
|
-
*
|
|
70
|
-
* This source code is licensed under the ISC license.
|
|
71
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/var N0={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"};/**
|
|
73
|
-
* @license lucide-react v0.294.0 - ISC
|
|
74
|
-
*
|
|
75
|
-
* This source code is licensed under the ISC license.
|
|
76
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const k0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),re=(e,t)=>{const r=h.forwardRef(({color:s="currentColor",size:a=24,strokeWidth:i=2,absoluteStrokeWidth:l,className:o="",children:c,...d},m)=>h.createElement("svg",{ref:m,...N0,width:a,height:a,stroke:s,strokeWidth:l?Number(i)*24/Number(a):i,className:["lucide",`lucide-${k0(e)}`,o].join(" "),...d},[...t.map(([u,p])=>h.createElement(u,p)),...Array.isArray(c)?c:[c]]));return r.displayName=`${e}`,r};/**
|
|
78
|
-
* @license lucide-react v0.294.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const cr=re("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"}]]);/**
|
|
83
|
-
* @license lucide-react v0.294.0 - ISC
|
|
84
|
-
*
|
|
85
|
-
* This source code is licensed under the ISC license.
|
|
86
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const pa=re("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
|
|
88
|
-
* @license lucide-react v0.294.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const Mn=re("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
|
|
93
|
-
* @license lucide-react v0.294.0 - ISC
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the ISC license.
|
|
96
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const Eu=re("Ban",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m4.9 4.9 14.2 14.2",key:"1m5liu"}]]);/**
|
|
98
|
-
* @license lucide-react v0.294.0 - ISC
|
|
99
|
-
*
|
|
100
|
-
* This source code is licensed under the ISC license.
|
|
101
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const Ko=re("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"}]]);/**
|
|
103
|
-
* @license lucide-react v0.294.0 - ISC
|
|
104
|
-
*
|
|
105
|
-
* This source code is licensed under the ISC license.
|
|
106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const S0=re("Bell",[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}]]);/**
|
|
108
|
-
* @license lucide-react v0.294.0 - ISC
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the ISC license.
|
|
111
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const Le=re("Building2",[["path",{d:"M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z",key:"1b4qmf"}],["path",{d:"M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2",key:"i71pzd"}],["path",{d:"M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2",key:"10jefs"}],["path",{d:"M10 6h4",key:"1itunk"}],["path",{d:"M10 10h4",key:"tcdvrf"}],["path",{d:"M10 14h4",key:"kelpxr"}],["path",{d:"M10 18h4",key:"1ulq68"}]]);/**
|
|
113
|
-
* @license lucide-react v0.294.0 - ISC
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the ISC license.
|
|
116
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const $i=re("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
|
|
118
|
-
* @license lucide-react v0.294.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const Ue=re("CheckCircle",[["path",{d:"M22 11.08V12a10 10 0 1 1-5.93-9.14",key:"g774vq"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
123
|
-
* @license lucide-react v0.294.0 - ISC
|
|
124
|
-
*
|
|
125
|
-
* This source code is licensed under the ISC license.
|
|
126
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const C0=re("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
128
|
-
* @license lucide-react v0.294.0 - ISC
|
|
129
|
-
*
|
|
130
|
-
* This source code is licensed under the ISC license.
|
|
131
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const Cf=re("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
133
|
-
* @license lucide-react v0.294.0 - ISC
|
|
134
|
-
*
|
|
135
|
-
* This source code is licensed under the ISC license.
|
|
136
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const E0=re("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
138
|
-
* @license lucide-react v0.294.0 - ISC
|
|
139
|
-
*
|
|
140
|
-
* This source code is licensed under the ISC license.
|
|
141
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const T0=re("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
143
|
-
* @license lucide-react v0.294.0 - ISC
|
|
144
|
-
*
|
|
145
|
-
* This source code is licensed under the ISC license.
|
|
146
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const P0=re("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
148
|
-
* @license lucide-react v0.294.0 - ISC
|
|
149
|
-
*
|
|
150
|
-
* This source code is licensed under the ISC license.
|
|
151
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const pr=re("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
|
|
153
|
-
* @license lucide-react v0.294.0 - ISC
|
|
154
|
-
*
|
|
155
|
-
* This source code is licensed under the ISC license.
|
|
156
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const Ie=re("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
|
|
158
|
-
* @license lucide-react v0.294.0 - ISC
|
|
159
|
-
*
|
|
160
|
-
* This source code is licensed under the ISC license.
|
|
161
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const Ef=re("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
|
|
163
|
-
* @license lucide-react v0.294.0 - ISC
|
|
164
|
-
*
|
|
165
|
-
* This source code is licensed under the ISC license.
|
|
166
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const sl=re("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
|
|
168
|
-
* @license lucide-react v0.294.0 - ISC
|
|
169
|
-
*
|
|
170
|
-
* This source code is licensed under the ISC license.
|
|
171
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const Jc=re("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]);/**
|
|
173
|
-
* @license lucide-react v0.294.0 - ISC
|
|
174
|
-
*
|
|
175
|
-
* This source code is licensed under the ISC license.
|
|
176
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const ln=re("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
178
|
-
* @license lucide-react v0.294.0 - ISC
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the ISC license.
|
|
181
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const Rs=re("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
|
|
183
|
-
* @license lucide-react v0.294.0 - ISC
|
|
184
|
-
*
|
|
185
|
-
* This source code is licensed under the ISC license.
|
|
186
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
-
*/const z0=re("Key",[["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["path",{d:"m15.5 7.5 3 3L22 7l-3-3",key:"1rn1fs"}]]);/**
|
|
188
|
-
* @license lucide-react v0.294.0 - ISC
|
|
189
|
-
*
|
|
190
|
-
* This source code is licensed under the ISC license.
|
|
191
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/const D0=re("LayoutDashboard",[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]);/**
|
|
193
|
-
* @license lucide-react v0.294.0 - ISC
|
|
194
|
-
*
|
|
195
|
-
* This source code is licensed under the ISC license.
|
|
196
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
-
*/const st=re("Loader",[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]]);/**
|
|
198
|
-
* @license lucide-react v0.294.0 - ISC
|
|
199
|
-
*
|
|
200
|
-
* This source code is licensed under the ISC license.
|
|
201
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
-
*/const Ol=re("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
203
|
-
* @license lucide-react v0.294.0 - ISC
|
|
204
|
-
*
|
|
205
|
-
* This source code is licensed under the ISC license.
|
|
206
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/const Et=re("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/**
|
|
208
|
-
* @license lucide-react v0.294.0 - ISC
|
|
209
|
-
*
|
|
210
|
-
* This source code is licensed under the ISC license.
|
|
211
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/const R0=re("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
|
|
213
|
-
* @license lucide-react v0.294.0 - ISC
|
|
214
|
-
*
|
|
215
|
-
* This source code is licensed under the ISC license.
|
|
216
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
-
*/const M0=re("MoreHorizontal",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
|
|
218
|
-
* @license lucide-react v0.294.0 - ISC
|
|
219
|
-
*
|
|
220
|
-
* This source code is licensed under the ISC license.
|
|
221
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
-
*/const wn=re("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"}]]);/**
|
|
223
|
-
* @license lucide-react v0.294.0 - ISC
|
|
224
|
-
*
|
|
225
|
-
* This source code is licensed under the ISC license.
|
|
226
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
-
*/const Lr=re("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
228
|
-
* @license lucide-react v0.294.0 - ISC
|
|
229
|
-
*
|
|
230
|
-
* This source code is licensed under the ISC license.
|
|
231
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
-
*/const Tu=re("Puzzle",[["path",{d:"M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z",key:"i0oyt7"}]]);/**
|
|
233
|
-
* @license lucide-react v0.294.0 - ISC
|
|
234
|
-
*
|
|
235
|
-
* This source code is licensed under the ISC license.
|
|
236
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
-
*/const Pu=re("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"}]]);/**
|
|
238
|
-
* @license lucide-react v0.294.0 - ISC
|
|
239
|
-
*
|
|
240
|
-
* This source code is licensed under the ISC license.
|
|
241
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
-
*/const Gr=re("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
|
|
243
|
-
* @license lucide-react v0.294.0 - ISC
|
|
244
|
-
*
|
|
245
|
-
* This source code is licensed under the ISC license.
|
|
246
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
-
*/const zu=re("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
|
|
248
|
-
* @license lucide-react v0.294.0 - ISC
|
|
249
|
-
*
|
|
250
|
-
* This source code is licensed under the ISC license.
|
|
251
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
-
*/const ts=re("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"}]]);/**
|
|
253
|
-
* @license lucide-react v0.294.0 - ISC
|
|
254
|
-
*
|
|
255
|
-
* This source code is licensed under the ISC license.
|
|
256
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
-
*/const dr=re("Shield",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}]]);/**
|
|
258
|
-
* @license lucide-react v0.294.0 - ISC
|
|
259
|
-
*
|
|
260
|
-
* This source code is licensed under the ISC license.
|
|
261
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
-
*/const I0=re("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
263
|
-
* @license lucide-react v0.294.0 - ISC
|
|
264
|
-
*
|
|
265
|
-
* This source code is licensed under the ISC license.
|
|
266
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
-
*/const fn=re("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"}]]);/**
|
|
268
|
-
* @license lucide-react v0.294.0 - ISC
|
|
269
|
-
*
|
|
270
|
-
* This source code is licensed under the ISC license.
|
|
271
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
-
*/const Du=re("UserMinus",[["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"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
|
|
273
|
-
* @license lucide-react v0.294.0 - ISC
|
|
274
|
-
*
|
|
275
|
-
* This source code is licensed under the ISC license.
|
|
276
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
-
*/const Hr=re("UserPlus",[["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"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]);/**
|
|
278
|
-
* @license lucide-react v0.294.0 - ISC
|
|
279
|
-
*
|
|
280
|
-
* This source code is licensed under the ISC license.
|
|
281
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
-
*/const Xs=re("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"}]]);/**
|
|
283
|
-
* @license lucide-react v0.294.0 - ISC
|
|
284
|
-
*
|
|
285
|
-
* This source code is licensed under the ISC license.
|
|
286
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
287
|
-
*/const he=re("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"}]]);/**
|
|
288
|
-
* @license lucide-react v0.294.0 - ISC
|
|
289
|
-
*
|
|
290
|
-
* This source code is licensed under the ISC license.
|
|
291
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
292
|
-
*/const on=re("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"}]]);/**
|
|
293
|
-
* @license lucide-react v0.294.0 - ISC
|
|
294
|
-
*
|
|
295
|
-
* This source code is licensed under the ISC license.
|
|
296
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
297
|
-
*/const be=re("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
|
|
298
|
-
* @license lucide-react v0.294.0 - ISC
|
|
299
|
-
*
|
|
300
|
-
* This source code is licensed under the ISC license.
|
|
301
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
302
|
-
*/const ui=re("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),Tf=h.createContext(void 0);function L0({children:e}){const[t,r]=h.useState({users:0,organizations:0,sessions:0,teams:0}),[s,a]=h.useState(!0),i=async()=>{try{const c=await(await fetch("/api/counts")).json();r(c)}catch(o){console.error("Failed to fetch counts:",o)}finally{a(!1)}},l=async()=>{a(!0),await i()};return h.useEffect(()=>{i()},[]),n.jsx(Tf.Provider,{value:{counts:t,loading:s,refetchCounts:l},children:e})}function qc(){const e=h.useContext(Tf);if(e===void 0)throw new Error("useCounts must be used within a CountsProvider");return e}var Ru=1,O0=.9,A0=.8,_0=.17,Al=.1,_l=.999,$0=.9999,F0=.99,U0=/[\\\/_+.#"@\[\(\{&]/,B0=/[\\\/_+.#"@\[\(\{&]/g,V0=/[\s-]/,Pf=/[\s-]/g;function Qo(e,t,r,s,a,i,l){if(i===t.length)return a===e.length?Ru:F0;var o=`${a},${i}`;if(l[o]!==void 0)return l[o];for(var c=s.charAt(i),d=r.indexOf(c,a),m=0,u,p,y,w;d>=0;)u=Qo(e,t,r,s,d+1,i+1,l),u>m&&(d===a?u*=Ru:U0.test(e.charAt(d-1))?(u*=A0,y=e.slice(a,d-1).match(B0),y&&a>0&&(u*=Math.pow(_l,y.length))):V0.test(e.charAt(d-1))?(u*=O0,w=e.slice(a,d-1).match(Pf),w&&a>0&&(u*=Math.pow(_l,w.length))):(u*=_0,a>0&&(u*=Math.pow(_l,d-a))),e.charAt(d)!==t.charAt(i)&&(u*=$0)),(u<Al&&r.charAt(d-1)===s.charAt(i+1)||s.charAt(i+1)===s.charAt(i)&&r.charAt(d-1)!==s.charAt(i))&&(p=Qo(e,t,r,s,d+1,i+2,l),p*Al>u&&(u=p*Al)),u>m&&(m=u),d=r.indexOf(c,d+1);return l[o]=m,m}function Mu(e){return e.toLowerCase().replace(Pf," ")}function W0(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Qo(e,t,Mu(e),Mu(t),0,0,{})}function Kr(e,t,{checkForDefaultPrevented:r=!0}={}){return function(a){if(e==null||e(a),r===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}function Iu(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function bn(...e){return t=>{let r=!1;const s=e.map(a=>{const i=Iu(a,t);return!r&&typeof i=="function"&&(r=!0),i});if(r)return()=>{for(let a=0;a<s.length;a++){const i=s[a];typeof i=="function"?i():Iu(e[a],null)}}}}function Tn(...e){return h.useCallback(bn(...e),e)}function H0(e,t){const r=h.createContext(t),s=i=>{const{children:l,...o}=i,c=h.useMemo(()=>o,Object.values(o));return n.jsx(r.Provider,{value:c,children:l})};s.displayName=e+"Provider";function a(i){const l=h.useContext(r);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[s,a]}function K0(e,t=[]){let r=[];function s(i,l){const o=h.createContext(l),c=r.length;r=[...r,l];const d=u=>{var x;const{scope:p,children:y,...w}=u,v=((x=p==null?void 0:p[e])==null?void 0:x[c])||o,j=h.useMemo(()=>w,Object.values(w));return n.jsx(v.Provider,{value:j,children:y})};d.displayName=i+"Provider";function m(u,p){var v;const y=((v=p==null?void 0:p[e])==null?void 0:v[c])||o,w=h.useContext(y);if(w)return w;if(l!==void 0)return l;throw new Error(`\`${u}\` must be used within \`${i}\``)}return[d,m]}const a=()=>{const i=r.map(l=>h.createContext(l));return function(o){const c=(o==null?void 0:o[e])||i;return h.useMemo(()=>({[`__scope${e}`]:{...o,[e]:c}}),[o,c])}};return a.scopeName=e,[s,Q0(a,...t)]}function Q0(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const s=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const l=s.reduce((o,{useScope:c,scopeName:d})=>{const u=c(i)[`__scope${d}`];return{...o,...u}},{});return h.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return r.scopeName=t.scopeName,r}var ga=globalThis!=null&&globalThis.document?h.useLayoutEffect:()=>{},Y0=rc[" useId ".trim().toString()]||(()=>{}),G0=0;function vr(e){const[t,r]=h.useState(Y0());return ga(()=>{r(s=>s??String(G0++))},[e]),t?`radix-${t}`:""}var X0=rc[" useInsertionEffect ".trim().toString()]||ga;function J0({prop:e,defaultProp:t,onChange:r=()=>{},caller:s}){const[a,i,l]=q0({defaultProp:t,onChange:r}),o=e!==void 0,c=o?e:a;{const m=h.useRef(e!==void 0);h.useEffect(()=>{const u=m.current;u!==o&&console.warn(`${s} is changing from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=o},[o,s])}const d=h.useCallback(m=>{var u;if(o){const p=Z0(m)?m(e):m;p!==e&&((u=l.current)==null||u.call(l,p))}else i(m)},[o,e,i,l]);return[c,d]}function q0({defaultProp:e,onChange:t}){const[r,s]=h.useState(e),a=h.useRef(r),i=h.useRef(t);return X0(()=>{i.current=t},[t]),h.useEffect(()=>{var l;a.current!==r&&((l=i.current)==null||l.call(i,r),a.current=r)},[r,a]),[r,s,i]}function Z0(e){return typeof e=="function"}function Zc(e){const t=ty(e),r=h.forwardRef((s,a)=>{const{children:i,...l}=s,o=h.Children.toArray(i),c=o.find(ny);if(c){const d=c.props.children,m=o.map(u=>u===c?h.Children.count(d)>1?h.Children.only(null):h.isValidElement(d)?d.props.children:null:u);return n.jsx(t,{...l,ref:a,children:h.isValidElement(d)?h.cloneElement(d,void 0,m):null})}return n.jsx(t,{...l,ref:a,children:i})});return r.displayName=`${e}.Slot`,r}var ey=Zc("Slot");function ty(e){const t=h.forwardRef((r,s)=>{const{children:a,...i}=r;if(h.isValidElement(a)){const l=ay(a),o=sy(i,a.props);return a.type!==h.Fragment&&(o.ref=s?bn(s,l):l),h.cloneElement(a,o)}return h.Children.count(a)>1?h.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ry=Symbol("radix.slottable");function ny(e){return h.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ry}function sy(e,t){const r={...t};for(const s in t){const a=e[s],i=t[s];/^on[A-Z]/.test(s)?a&&i?r[s]=(...o)=>{const c=i(...o);return a(...o),c}:a&&(r[s]=a):s==="style"?r[s]={...a,...i}:s==="className"&&(r[s]=[a,i].filter(Boolean).join(" "))}return{...e,...r}}function ay(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var iy=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ze=iy.reduce((e,t)=>{const r=Zc(`Primitive.${t}`),s=h.forwardRef((a,i)=>{const{asChild:l,...o}=a,c=l?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),n.jsx(c,{...o,ref:i})});return s.displayName=`Primitive.${t}`,{...e,[t]:s}},{});function ly(e,t){e&&Qc.flushSync(()=>e.dispatchEvent(t))}function va(e){const t=h.useRef(e);return h.useEffect(()=>{t.current=e}),h.useMemo(()=>(...r)=>{var s;return(s=t.current)==null?void 0:s.call(t,...r)},[])}function oy(e,t=globalThis==null?void 0:globalThis.document){const r=va(e);h.useEffect(()=>{const s=a=>{a.key==="Escape"&&r(a)};return t.addEventListener("keydown",s,{capture:!0}),()=>t.removeEventListener("keydown",s,{capture:!0})},[r,t])}var cy="DismissableLayer",Yo="dismissableLayer.update",dy="dismissableLayer.pointerDownOutside",uy="dismissableLayer.focusOutside",Lu,zf=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Df=h.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:o,...c}=e,d=h.useContext(zf),[m,u]=h.useState(null),p=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,y]=h.useState({}),w=Tn(t,k=>u(k)),v=Array.from(d.layers),[j]=[...d.layersWithOutsidePointerEventsDisabled].slice(-1),x=v.indexOf(j),f=m?v.indexOf(m):-1,g=d.layersWithOutsidePointerEventsDisabled.size>0,N=f>=x,C=fy(k=>{const R=k.target,J=[...d.branches].some(W=>W.contains(R));!N||J||(a==null||a(k),l==null||l(k),k.defaultPrevented||o==null||o())},p),P=xy(k=>{const R=k.target;[...d.branches].some(W=>W.contains(R))||(i==null||i(k),l==null||l(k),k.defaultPrevented||o==null||o())},p);return oy(k=>{f===d.layers.size-1&&(s==null||s(k),!k.defaultPrevented&&o&&(k.preventDefault(),o()))},p),h.useEffect(()=>{if(m)return r&&(d.layersWithOutsidePointerEventsDisabled.size===0&&(Lu=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),d.layersWithOutsidePointerEventsDisabled.add(m)),d.layers.add(m),Ou(),()=>{r&&d.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Lu)}},[m,p,r,d]),h.useEffect(()=>()=>{m&&(d.layers.delete(m),d.layersWithOutsidePointerEventsDisabled.delete(m),Ou())},[m,d]),h.useEffect(()=>{const k=()=>y({});return document.addEventListener(Yo,k),()=>document.removeEventListener(Yo,k)},[]),n.jsx(Ze.div,{...c,ref:w,style:{pointerEvents:g?N?"auto":"none":void 0,...e.style},onFocusCapture:Kr(e.onFocusCapture,P.onFocusCapture),onBlurCapture:Kr(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:Kr(e.onPointerDownCapture,C.onPointerDownCapture)})});Df.displayName=cy;var hy="DismissableLayerBranch",my=h.forwardRef((e,t)=>{const r=h.useContext(zf),s=h.useRef(null),a=Tn(t,s);return h.useEffect(()=>{const i=s.current;if(i)return r.branches.add(i),()=>{r.branches.delete(i)}},[r.branches]),n.jsx(Ze.div,{...e,ref:a})});my.displayName=hy;function fy(e,t=globalThis==null?void 0:globalThis.document){const r=va(e),s=h.useRef(!1),a=h.useRef(()=>{});return h.useEffect(()=>{const i=o=>{if(o.target&&!s.current){let c=function(){Rf(dy,r,d,{discrete:!0})};const d={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=c,t.addEventListener("click",a.current,{once:!0})):c()}else t.removeEventListener("click",a.current);s.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,r]),{onPointerDownCapture:()=>s.current=!0}}function xy(e,t=globalThis==null?void 0:globalThis.document){const r=va(e),s=h.useRef(!1);return h.useEffect(()=>{const a=i=>{i.target&&!s.current&&Rf(uy,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Ou(){const e=new CustomEvent(Yo);document.dispatchEvent(e)}function Rf(e,t,r,{discrete:s}){const a=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&a.addEventListener(e,t,{once:!0}),s?ly(a,i):a.dispatchEvent(i)}var $l="focusScope.autoFocusOnMount",Fl="focusScope.autoFocusOnUnmount",Au={bubbles:!1,cancelable:!0},py="FocusScope",Mf=h.forwardRef((e,t)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...l}=e,[o,c]=h.useState(null),d=va(a),m=va(i),u=h.useRef(null),p=Tn(t,v=>c(v)),y=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(s){let v=function(g){if(y.paused||!o)return;const N=g.target;o.contains(N)?u.current=N:Er(u.current,{select:!0})},j=function(g){if(y.paused||!o)return;const N=g.relatedTarget;N!==null&&(o.contains(N)||Er(u.current,{select:!0}))},x=function(g){if(document.activeElement===document.body)for(const C of g)C.removedNodes.length>0&&Er(o)};document.addEventListener("focusin",v),document.addEventListener("focusout",j);const f=new MutationObserver(x);return o&&f.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",j),f.disconnect()}}},[s,o,y.paused]),h.useEffect(()=>{if(o){$u.add(y);const v=document.activeElement;if(!o.contains(v)){const x=new CustomEvent($l,Au);o.addEventListener($l,d),o.dispatchEvent(x),x.defaultPrevented||(gy(jy(If(o)),{select:!0}),document.activeElement===v&&Er(o))}return()=>{o.removeEventListener($l,d),setTimeout(()=>{const x=new CustomEvent(Fl,Au);o.addEventListener(Fl,m),o.dispatchEvent(x),x.defaultPrevented||Er(v??document.body,{select:!0}),o.removeEventListener(Fl,m),$u.remove(y)},0)}}},[o,d,m,y]);const w=h.useCallback(v=>{if(!r&&!s||y.paused)return;const j=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,x=document.activeElement;if(j&&x){const f=v.currentTarget,[g,N]=vy(f);g&&N?!v.shiftKey&&x===N?(v.preventDefault(),r&&Er(g,{select:!0})):v.shiftKey&&x===g&&(v.preventDefault(),r&&Er(N,{select:!0})):x===f&&v.preventDefault()}},[r,s,y.paused]);return n.jsx(Ze.div,{tabIndex:-1,...l,ref:p,onKeyDown:w})});Mf.displayName=py;function gy(e,{select:t=!1}={}){const r=document.activeElement;for(const s of e)if(Er(s,{select:t}),document.activeElement!==r)return}function vy(e){const t=If(e),r=_u(t,e),s=_u(t.reverse(),e);return[r,s]}function If(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const a=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||a?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function _u(e,t){for(const r of e)if(!yy(r,{upTo:t}))return r}function yy(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function wy(e){return e instanceof HTMLInputElement&&"select"in e}function Er(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&wy(e)&&t&&e.select()}}var $u=by();function by(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Fu(e,t),e.unshift(t)},remove(t){var r;e=Fu(e,t),(r=e[0])==null||r.resume()}}}function Fu(e,t){const r=[...e],s=r.indexOf(t);return s!==-1&&r.splice(s,1),r}function jy(e){return e.filter(t=>t.tagName!=="A")}var Ny="Portal",Lf=h.forwardRef((e,t)=>{var o;const{container:r,...s}=e,[a,i]=h.useState(!1);ga(()=>i(!0),[]);const l=r||a&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return l?mf.createPortal(n.jsx(Ze.div,{...s,ref:t}),l):null});Lf.displayName=Ny;function ky(e,t){return h.useReducer((r,s)=>t[r][s]??r,e)}var al=e=>{const{present:t,children:r}=e,s=Sy(t),a=typeof r=="function"?r({present:s.isPresent}):h.Children.only(r),i=Tn(s.ref,Cy(a));return typeof r=="function"||s.isPresent?h.cloneElement(a,{ref:i}):null};al.displayName="Presence";function Sy(e){const[t,r]=h.useState(),s=h.useRef(null),a=h.useRef(e),i=h.useRef("none"),l=e?"mounted":"unmounted",[o,c]=ky(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const d=Ya(s.current);i.current=o==="mounted"?d:"none"},[o]),ga(()=>{const d=s.current,m=a.current;if(m!==e){const p=i.current,y=Ya(d);e?c("MOUNT"):y==="none"||(d==null?void 0:d.display)==="none"?c("UNMOUNT"):c(m&&p!==y?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,c]),ga(()=>{if(t){let d;const m=t.ownerDocument.defaultView??window,u=y=>{const v=Ya(s.current).includes(CSS.escape(y.animationName));if(y.target===t&&v&&(c("ANIMATION_END"),!a.current)){const j=t.style.animationFillMode;t.style.animationFillMode="forwards",d=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=j)})}},p=y=>{y.target===t&&(i.current=Ya(s.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{m.clearTimeout(d),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:h.useCallback(d=>{s.current=d?getComputedStyle(d):null,r(d)},[])}}function Ya(e){return(e==null?void 0:e.animationName)||"none"}function Cy(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Ul=0;function Ey(){h.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Uu()),document.body.insertAdjacentElement("beforeend",e[1]??Uu()),Ul++,()=>{Ul===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ul--}},[])}function Uu(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var nr=function(){return nr=Object.assign||function(t){for(var r,s=1,a=arguments.length;s<a;s++){r=arguments[s];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},nr.apply(this,arguments)};function Of(e,t){var r={};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&t.indexOf(s)<0&&(r[s]=e[s]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,s=Object.getOwnPropertySymbols(e);a<s.length;a++)t.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(e,s[a])&&(r[s[a]]=e[s[a]]);return r}function Ty(e,t,r){if(r||arguments.length===2)for(var s=0,a=t.length,i;s<a;s++)(i||!(s in t))&&(i||(i=Array.prototype.slice.call(t,0,s)),i[s]=t[s]);return e.concat(i||Array.prototype.slice.call(t))}var hi="right-scroll-bar-position",mi="width-before-scroll-bar",Py="with-scroll-bars-hidden",zy="--removed-body-scroll-bar-size";function Bl(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Dy(e,t){var r=h.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(s){var a=r.value;a!==s&&(r.value=s,r.callback(s,a))}}}})[0];return r.callback=t,r.facade}var Ry=typeof window<"u"?h.useLayoutEffect:h.useEffect,Bu=new WeakMap;function My(e,t){var r=Dy(null,function(s){return e.forEach(function(a){return Bl(a,s)})});return Ry(function(){var s=Bu.get(r);if(s){var a=new Set(s),i=new Set(e),l=r.current;a.forEach(function(o){i.has(o)||Bl(o,null)}),i.forEach(function(o){a.has(o)||Bl(o,l)})}Bu.set(r,e)},[e]),r}function Iy(e){return e}function Ly(e,t){t===void 0&&(t=Iy);var r=[],s=!1,a={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var l=t(i,s);return r.push(l),function(){r=r.filter(function(o){return o!==l})}},assignSyncMedium:function(i){for(s=!0;r.length;){var l=r;r=[],l.forEach(i)}r={push:function(o){return i(o)},filter:function(){return r}}},assignMedium:function(i){s=!0;var l=[];if(r.length){var o=r;r=[],o.forEach(i),l=r}var c=function(){var m=l;l=[],m.forEach(i)},d=function(){return Promise.resolve().then(c)};d(),r={push:function(m){l.push(m),d()},filter:function(m){return l=l.filter(m),r}}}};return a}function Oy(e){e===void 0&&(e={});var t=Ly(null);return t.options=nr({async:!0,ssr:!1},e),t}var Af=function(e){var t=e.sideCar,r=Of(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=t.read();if(!s)throw new Error("Sidecar medium not found");return h.createElement(s,nr({},r))};Af.isSideCarExport=!0;function Ay(e,t){return e.useMedium(t),Af}var _f=Oy(),Vl=function(){},il=h.forwardRef(function(e,t){var r=h.useRef(null),s=h.useState({onScrollCapture:Vl,onWheelCapture:Vl,onTouchMoveCapture:Vl}),a=s[0],i=s[1],l=e.forwardProps,o=e.children,c=e.className,d=e.removeScrollBar,m=e.enabled,u=e.shards,p=e.sideCar,y=e.noRelative,w=e.noIsolation,v=e.inert,j=e.allowPinchZoom,x=e.as,f=x===void 0?"div":x,g=e.gapMode,N=Of(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,P=My([r,t]),k=nr(nr({},N),a);return h.createElement(h.Fragment,null,m&&h.createElement(C,{sideCar:_f,removeScrollBar:d,shards:u,noRelative:y,noIsolation:w,inert:v,setCallbacks:i,allowPinchZoom:!!j,lockRef:r,gapMode:g}),l?h.cloneElement(h.Children.only(o),nr(nr({},k),{ref:P})):h.createElement(f,nr({},k,{className:c,ref:P}),o))});il.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};il.classNames={fullWidth:mi,zeroRight:hi};var _y=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function $y(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_y();return t&&e.setAttribute("nonce",t),e}function Fy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Uy(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var By=function(){var e=0,t=null;return{add:function(r){e==0&&(t=$y())&&(Fy(t,r),Uy(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Vy=function(){var e=By();return function(t,r){h.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},$f=function(){var e=Vy(),t=function(r){var s=r.styles,a=r.dynamic;return e(s,a),null};return t},Wy={left:0,top:0,right:0,gap:0},Wl=function(e){return parseInt(e||"",10)||0},Hy=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],s=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[Wl(r),Wl(s),Wl(a)]},Ky=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Wy;var t=Hy(e),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,s-r+t[2]-t[0])}},Qy=$f(),rs="data-scroll-locked",Yy=function(e,t,r,s){var a=e.left,i=e.top,l=e.right,o=e.gap;return r===void 0&&(r="margin"),`
|
|
303
|
-
.`.concat(Py,` {
|
|
304
|
-
overflow: hidden `).concat(s,`;
|
|
305
|
-
padding-right: `).concat(o,"px ").concat(s,`;
|
|
306
|
-
}
|
|
307
|
-
body[`).concat(rs,`] {
|
|
308
|
-
overflow: hidden `).concat(s,`;
|
|
309
|
-
overscroll-behavior: contain;
|
|
310
|
-
`).concat([t&&"position: relative ".concat(s,";"),r==="margin"&&`
|
|
311
|
-
padding-left: `.concat(a,`px;
|
|
312
|
-
padding-top: `).concat(i,`px;
|
|
313
|
-
padding-right: `).concat(l,`px;
|
|
314
|
-
margin-left:0;
|
|
315
|
-
margin-top:0;
|
|
316
|
-
margin-right: `).concat(o,"px ").concat(s,`;
|
|
317
|
-
`),r==="padding"&&"padding-right: ".concat(o,"px ").concat(s,";")].filter(Boolean).join(""),`
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
.`).concat(hi,` {
|
|
321
|
-
right: `).concat(o,"px ").concat(s,`;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
.`).concat(mi,` {
|
|
325
|
-
margin-right: `).concat(o,"px ").concat(s,`;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
.`).concat(hi," .").concat(hi,` {
|
|
329
|
-
right: 0 `).concat(s,`;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.`).concat(mi," .").concat(mi,` {
|
|
333
|
-
margin-right: 0 `).concat(s,`;
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
body[`).concat(rs,`] {
|
|
337
|
-
`).concat(zy,": ").concat(o,`px;
|
|
338
|
-
}
|
|
339
|
-
`)},Vu=function(){var e=parseInt(document.body.getAttribute(rs)||"0",10);return isFinite(e)?e:0},Gy=function(){h.useEffect(function(){return document.body.setAttribute(rs,(Vu()+1).toString()),function(){var e=Vu()-1;e<=0?document.body.removeAttribute(rs):document.body.setAttribute(rs,e.toString())}},[])},Xy=function(e){var t=e.noRelative,r=e.noImportant,s=e.gapMode,a=s===void 0?"margin":s;Gy();var i=h.useMemo(function(){return Ky(a)},[a]);return h.createElement(Qy,{styles:Yy(i,!t,a,r?"":"!important")})},Go=!1;if(typeof window<"u")try{var Ga=Object.defineProperty({},"passive",{get:function(){return Go=!0,!0}});window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{Go=!1}var zn=Go?{passive:!1}:!1,Jy=function(e){return e.tagName==="TEXTAREA"},Ff=function(e,t){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!Jy(e)&&r[t]==="visible")},qy=function(e){return Ff(e,"overflowY")},Zy=function(e){return Ff(e,"overflowX")},Wu=function(e,t){var r=t.ownerDocument,s=t;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var a=Uf(e,s);if(a){var i=Bf(e,s),l=i[1],o=i[2];if(l>o)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},ew=function(e){var t=e.scrollTop,r=e.scrollHeight,s=e.clientHeight;return[t,r,s]},tw=function(e){var t=e.scrollLeft,r=e.scrollWidth,s=e.clientWidth;return[t,r,s]},Uf=function(e,t){return e==="v"?qy(t):Zy(t)},Bf=function(e,t){return e==="v"?ew(t):tw(t)},rw=function(e,t){return e==="h"&&t==="rtl"?-1:1},nw=function(e,t,r,s,a){var i=rw(e,window.getComputedStyle(t).direction),l=i*s,o=r.target,c=t.contains(o),d=!1,m=l>0,u=0,p=0;do{if(!o)break;var y=Bf(e,o),w=y[0],v=y[1],j=y[2],x=v-j-i*w;(w||x)&&Uf(e,o)&&(u+=x,p+=w);var f=o.parentNode;o=f&&f.nodeType===Node.DOCUMENT_FRAGMENT_NODE?f.host:f}while(!c&&o!==document.body||c&&(t.contains(o)||t===o));return(m&&Math.abs(u)<1||!m&&Math.abs(p)<1)&&(d=!0),d},Xa=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hu=function(e){return[e.deltaX,e.deltaY]},Ku=function(e){return e&&"current"in e?e.current:e},sw=function(e,t){return e[0]===t[0]&&e[1]===t[1]},aw=function(e){return`
|
|
340
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
341
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
342
|
-
`)},iw=0,Dn=[];function lw(e){var t=h.useRef([]),r=h.useRef([0,0]),s=h.useRef(),a=h.useState(iw++)[0],i=h.useState($f)[0],l=h.useRef(e);h.useEffect(function(){l.current=e},[e]),h.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var v=Ty([e.lockRef.current],(e.shards||[]).map(Ku),!0).filter(Boolean);return v.forEach(function(j){return j.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),v.forEach(function(j){return j.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var o=h.useCallback(function(v,j){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!l.current.allowPinchZoom;var x=Xa(v),f=r.current,g="deltaX"in v?v.deltaX:f[0]-x[0],N="deltaY"in v?v.deltaY:f[1]-x[1],C,P=v.target,k=Math.abs(g)>Math.abs(N)?"h":"v";if("touches"in v&&k==="h"&&P.type==="range")return!1;var R=Wu(k,P);if(!R)return!0;if(R?C=k:(C=k==="v"?"h":"v",R=Wu(k,P)),!R)return!1;if(!s.current&&"changedTouches"in v&&(g||N)&&(s.current=C),!C)return!0;var J=s.current||C;return nw(J,j,v,J==="h"?g:N)},[]),c=h.useCallback(function(v){var j=v;if(!(!Dn.length||Dn[Dn.length-1]!==i)){var x="deltaY"in j?Hu(j):Xa(j),f=t.current.filter(function(C){return C.name===j.type&&(C.target===j.target||j.target===C.shadowParent)&&sw(C.delta,x)})[0];if(f&&f.should){j.cancelable&&j.preventDefault();return}if(!f){var g=(l.current.shards||[]).map(Ku).filter(Boolean).filter(function(C){return C.contains(j.target)}),N=g.length>0?o(j,g[0]):!l.current.noIsolation;N&&j.cancelable&&j.preventDefault()}}},[]),d=h.useCallback(function(v,j,x,f){var g={name:v,delta:j,target:x,should:f,shadowParent:ow(x)};t.current.push(g),setTimeout(function(){t.current=t.current.filter(function(N){return N!==g})},1)},[]),m=h.useCallback(function(v){r.current=Xa(v),s.current=void 0},[]),u=h.useCallback(function(v){d(v.type,Hu(v),v.target,o(v,e.lockRef.current))},[]),p=h.useCallback(function(v){d(v.type,Xa(v),v.target,o(v,e.lockRef.current))},[]);h.useEffect(function(){return Dn.push(i),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:p}),document.addEventListener("wheel",c,zn),document.addEventListener("touchmove",c,zn),document.addEventListener("touchstart",m,zn),function(){Dn=Dn.filter(function(v){return v!==i}),document.removeEventListener("wheel",c,zn),document.removeEventListener("touchmove",c,zn),document.removeEventListener("touchstart",m,zn)}},[]);var y=e.removeScrollBar,w=e.inert;return h.createElement(h.Fragment,null,w?h.createElement(i,{styles:aw(a)}):null,y?h.createElement(Xy,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function ow(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const cw=Ay(_f,lw);var Vf=h.forwardRef(function(e,t){return h.createElement(il,nr({},e,{ref:t,sideCar:cw}))});Vf.classNames=il.classNames;var dw=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Rn=new WeakMap,Ja=new WeakMap,qa={},Hl=0,Wf=function(e){return e&&(e.host||Wf(e.parentNode))},uw=function(e,t){return t.map(function(r){if(e.contains(r))return r;var s=Wf(r);return s&&e.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},hw=function(e,t,r,s){var a=uw(t,Array.isArray(e)?e:[e]);qa[r]||(qa[r]=new WeakMap);var i=qa[r],l=[],o=new Set,c=new Set(a),d=function(u){!u||o.has(u)||(o.add(u),d(u.parentNode))};a.forEach(d);var m=function(u){!u||c.has(u)||Array.prototype.forEach.call(u.children,function(p){if(o.has(p))m(p);else try{var y=p.getAttribute(s),w=y!==null&&y!=="false",v=(Rn.get(p)||0)+1,j=(i.get(p)||0)+1;Rn.set(p,v),i.set(p,j),l.push(p),v===1&&w&&Ja.set(p,!0),j===1&&p.setAttribute(r,"true"),w||p.setAttribute(s,"true")}catch(x){console.error("aria-hidden: cannot operate on ",p,x)}})};return m(t),o.clear(),Hl++,function(){l.forEach(function(u){var p=Rn.get(u)-1,y=i.get(u)-1;Rn.set(u,p),i.set(u,y),p||(Ja.has(u)||u.removeAttribute(s),Ja.delete(u)),y||u.removeAttribute(r)}),Hl--,Hl||(Rn=new WeakMap,Rn=new WeakMap,Ja=new WeakMap,qa={})}},mw=function(e,t,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),a=dw(e);return a?(s.push.apply(s,Array.from(a.querySelectorAll("[aria-live], script"))),hw(s,a,r,"aria-hidden")):function(){return null}},ll="Dialog",[Hf]=K0(ll),[fw,Yt]=Hf(ll),Kf=e=>{const{__scopeDialog:t,children:r,open:s,defaultOpen:a,onOpenChange:i,modal:l=!0}=e,o=h.useRef(null),c=h.useRef(null),[d,m]=J0({prop:s,defaultProp:a??!1,onChange:i,caller:ll});return n.jsx(fw,{scope:t,triggerRef:o,contentRef:c,contentId:vr(),titleId:vr(),descriptionId:vr(),open:d,onOpenChange:m,onOpenToggle:h.useCallback(()=>m(u=>!u),[m]),modal:l,children:r})};Kf.displayName=ll;var Qf="DialogTrigger",xw=h.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Yt(Qf,r),i=Tn(t,a.triggerRef);return n.jsx(Ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":rd(a.open),...s,ref:i,onClick:Kr(e.onClick,a.onOpenToggle)})});xw.displayName=Qf;var ed="DialogPortal",[pw,Yf]=Hf(ed,{forceMount:void 0}),Gf=e=>{const{__scopeDialog:t,forceMount:r,children:s,container:a}=e,i=Yt(ed,t);return n.jsx(pw,{scope:t,forceMount:r,children:h.Children.map(s,l=>n.jsx(al,{present:r||i.open,children:n.jsx(Lf,{asChild:!0,container:a,children:l})}))})};Gf.displayName=ed;var Fi="DialogOverlay",Xf=h.forwardRef((e,t)=>{const r=Yf(Fi,e.__scopeDialog),{forceMount:s=r.forceMount,...a}=e,i=Yt(Fi,e.__scopeDialog);return i.modal?n.jsx(al,{present:s||i.open,children:n.jsx(vw,{...a,ref:t})}):null});Xf.displayName=Fi;var gw=Zc("DialogOverlay.RemoveScroll"),vw=h.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Yt(Fi,r);return n.jsx(Vf,{as:gw,allowPinchZoom:!0,shards:[a.contentRef],children:n.jsx(Ze.div,{"data-state":rd(a.open),...s,ref:t,style:{pointerEvents:"auto",...s.style}})})}),jn="DialogContent",Jf=h.forwardRef((e,t)=>{const r=Yf(jn,e.__scopeDialog),{forceMount:s=r.forceMount,...a}=e,i=Yt(jn,e.__scopeDialog);return n.jsx(al,{present:s||i.open,children:i.modal?n.jsx(yw,{...a,ref:t}):n.jsx(ww,{...a,ref:t})})});Jf.displayName=jn;var yw=h.forwardRef((e,t)=>{const r=Yt(jn,e.__scopeDialog),s=h.useRef(null),a=Tn(t,r.contentRef,s);return h.useEffect(()=>{const i=s.current;if(i)return mw(i)},[]),n.jsx(qf,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Kr(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:Kr(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,o=l.button===0&&l.ctrlKey===!0;(l.button===2||o)&&i.preventDefault()}),onFocusOutside:Kr(e.onFocusOutside,i=>i.preventDefault())})}),ww=h.forwardRef((e,t)=>{const r=Yt(jn,e.__scopeDialog),s=h.useRef(!1),a=h.useRef(!1);return n.jsx(qf,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var l,o;(l=e.onCloseAutoFocus)==null||l.call(e,i),i.defaultPrevented||(s.current||(o=r.triggerRef.current)==null||o.focus(),i.preventDefault()),s.current=!1,a.current=!1},onInteractOutside:i=>{var c,d;(c=e.onInteractOutside)==null||c.call(e,i),i.defaultPrevented||(s.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=i.target;((d=r.triggerRef.current)==null?void 0:d.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),qf=h.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:s,onOpenAutoFocus:a,onCloseAutoFocus:i,...l}=e,o=Yt(jn,r),c=h.useRef(null),d=Tn(t,c);return Ey(),n.jsxs(n.Fragment,{children:[n.jsx(Mf,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:a,onUnmountAutoFocus:i,children:n.jsx(Df,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":rd(o.open),...l,ref:d,onDismiss:()=>o.onOpenChange(!1)})}),n.jsxs(n.Fragment,{children:[n.jsx(kw,{titleId:o.titleId}),n.jsx(Cw,{contentRef:c,descriptionId:o.descriptionId})]})]})}),td="DialogTitle",bw=h.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Yt(td,r);return n.jsx(Ze.h2,{id:a.titleId,...s,ref:t})});bw.displayName=td;var Zf="DialogDescription",jw=h.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Yt(Zf,r);return n.jsx(Ze.p,{id:a.descriptionId,...s,ref:t})});jw.displayName=Zf;var ex="DialogClose",Nw=h.forwardRef((e,t)=>{const{__scopeDialog:r,...s}=e,a=Yt(ex,r);return n.jsx(Ze.button,{type:"button",...s,ref:t,onClick:Kr(e.onClick,()=>a.onOpenChange(!1))})});Nw.displayName=ex;function rd(e){return e?"open":"closed"}var tx="DialogTitleWarning",[_b,rx]=H0(tx,{contentName:jn,titleName:td,docsSlug:"dialog"}),kw=({titleId:e})=>{const t=rx(tx),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
343
|
-
|
|
344
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
345
|
-
|
|
346
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return h.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Sw="DialogDescriptionWarning",Cw=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rx(Sw).contentName}}.`;return h.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},Ew=Kf,Tw=Gf,Pw=Xf,zw=Jf,Ms='[cmdk-group=""]',Kl='[cmdk-group-items=""]',Dw='[cmdk-group-heading=""]',nx='[cmdk-item=""]',Qu=`${nx}:not([aria-disabled="true"])`,Xo="cmdk-item-select",In="data-value",Rw=(e,t,r)=>W0(e,t,r),sx=h.createContext(void 0),Ca=()=>h.useContext(sx),ax=h.createContext(void 0),nd=()=>h.useContext(ax),ix=h.createContext(void 0),lx=h.forwardRef((e,t)=>{let r=Ln(()=>{var b,E;return{search:"",value:(E=(b=e.value)!=null?b:e.defaultValue)!=null?E:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),s=Ln(()=>new Set),a=Ln(()=>new Map),i=Ln(()=>new Map),l=Ln(()=>new Set),o=ox(e),{label:c,children:d,value:m,onValueChange:u,filter:p,shouldFilter:y,loop:w,disablePointerSelection:v=!1,vimBindings:j=!0,...x}=e,f=vr(),g=vr(),N=vr(),C=h.useRef(null),P=Vw();Nn(()=>{if(m!==void 0){let b=m.trim();r.current.value=b,k.emit()}},[m]),Nn(()=>{P(6,te)},[]);let k=h.useMemo(()=>({subscribe:b=>(l.current.add(b),()=>l.current.delete(b)),snapshot:()=>r.current,setState:(b,E,L)=>{var M,A,K,$;if(!Object.is(r.current[b],E)){if(r.current[b]=E,b==="search")Y(),W(),P(1,q);else if(b==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Z=document.getElementById(N);Z?Z.focus():(M=document.getElementById(f))==null||M.focus()}if(P(7,()=>{var Z;r.current.selectedItemId=(Z=ee())==null?void 0:Z.id,k.emit()}),L||P(5,te),((A=o.current)==null?void 0:A.value)!==void 0){let Z=E??"";($=(K=o.current).onValueChange)==null||$.call(K,Z);return}}k.emit()}},emit:()=>{l.current.forEach(b=>b())}}),[]),R=h.useMemo(()=>({value:(b,E,L)=>{var M;E!==((M=i.current.get(b))==null?void 0:M.value)&&(i.current.set(b,{value:E,keywords:L}),r.current.filtered.items.set(b,J(E,L)),P(2,()=>{W(),k.emit()}))},item:(b,E)=>(s.current.add(b),E&&(a.current.has(E)?a.current.get(E).add(b):a.current.set(E,new Set([b]))),P(3,()=>{Y(),W(),r.current.value||q(),k.emit()}),()=>{i.current.delete(b),s.current.delete(b),r.current.filtered.items.delete(b);let L=ee();P(4,()=>{Y(),(L==null?void 0:L.getAttribute("id"))===b&&q(),k.emit()})}),group:b=>(a.current.has(b)||a.current.set(b,new Set),()=>{i.current.delete(b),a.current.delete(b)}),filter:()=>o.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:f,inputId:N,labelId:g,listInnerRef:C}),[]);function J(b,E){var L,M;let A=(M=(L=o.current)==null?void 0:L.filter)!=null?M:Rw;return b?A(b,r.current.search,E):0}function W(){if(!r.current.search||o.current.shouldFilter===!1)return;let b=r.current.filtered.items,E=[];r.current.filtered.groups.forEach(M=>{let A=a.current.get(M),K=0;A.forEach($=>{let Z=b.get($);K=Math.max(Z,K)}),E.push([M,K])});let L=C.current;ie().sort((M,A)=>{var K,$;let Z=M.getAttribute("id"),de=A.getAttribute("id");return((K=b.get(de))!=null?K:0)-(($=b.get(Z))!=null?$:0)}).forEach(M=>{let A=M.closest(Kl);A?A.appendChild(M.parentElement===A?M:M.closest(`${Kl} > *`)):L.appendChild(M.parentElement===L?M:M.closest(`${Kl} > *`))}),E.sort((M,A)=>A[1]-M[1]).forEach(M=>{var A;let K=(A=C.current)==null?void 0:A.querySelector(`${Ms}[${In}="${encodeURIComponent(M[0])}"]`);K==null||K.parentElement.appendChild(K)})}function q(){let b=ie().find(L=>L.getAttribute("aria-disabled")!=="true"),E=b==null?void 0:b.getAttribute(In);k.setState("value",E||void 0)}function Y(){var b,E,L,M;if(!r.current.search||o.current.shouldFilter===!1){r.current.filtered.count=s.current.size;return}r.current.filtered.groups=new Set;let A=0;for(let K of s.current){let $=(E=(b=i.current.get(K))==null?void 0:b.value)!=null?E:"",Z=(M=(L=i.current.get(K))==null?void 0:L.keywords)!=null?M:[],de=J($,Z);r.current.filtered.items.set(K,de),de>0&&A++}for(let[K,$]of a.current)for(let Z of $)if(r.current.filtered.items.get(Z)>0){r.current.filtered.groups.add(K);break}r.current.filtered.count=A}function te(){var b,E,L;let M=ee();M&&(((b=M.parentElement)==null?void 0:b.firstChild)===M&&((L=(E=M.closest(Ms))==null?void 0:E.querySelector(Dw))==null||L.scrollIntoView({block:"nearest"})),M.scrollIntoView({block:"nearest"}))}function ee(){var b;return(b=C.current)==null?void 0:b.querySelector(`${nx}[aria-selected="true"]`)}function ie(){var b;return Array.from(((b=C.current)==null?void 0:b.querySelectorAll(Qu))||[])}function X(b){let E=ie()[b];E&&k.setState("value",E.getAttribute(In))}function _(b){var E;let L=ee(),M=ie(),A=M.findIndex($=>$===L),K=M[A+b];(E=o.current)!=null&&E.loop&&(K=A+b<0?M[M.length-1]:A+b===M.length?M[0]:M[A+b]),K&&k.setState("value",K.getAttribute(In))}function S(b){let E=ee(),L=E==null?void 0:E.closest(Ms),M;for(;L&&!M;)L=b>0?Uw(L,Ms):Bw(L,Ms),M=L==null?void 0:L.querySelector(Qu);M?k.setState("value",M.getAttribute(In)):_(b)}let O=()=>X(ie().length-1),B=b=>{b.preventDefault(),b.metaKey?O():b.altKey?S(1):_(1)},z=b=>{b.preventDefault(),b.metaKey?X(0):b.altKey?S(-1):_(-1)};return h.createElement(Ze.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:b=>{var E;(E=x.onKeyDown)==null||E.call(x,b);let L=b.nativeEvent.isComposing||b.keyCode===229;if(!(b.defaultPrevented||L))switch(b.key){case"n":case"j":{j&&b.ctrlKey&&B(b);break}case"ArrowDown":{B(b);break}case"p":case"k":{j&&b.ctrlKey&&z(b);break}case"ArrowUp":{z(b);break}case"Home":{b.preventDefault(),X(0);break}case"End":{b.preventDefault(),O();break}case"Enter":{b.preventDefault();let M=ee();if(M){let A=new Event(Xo);M.dispatchEvent(A)}}}}},h.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:Hw},c),ol(e,b=>h.createElement(ax.Provider,{value:k},h.createElement(sx.Provider,{value:R},b))))}),Mw=h.forwardRef((e,t)=>{var r,s;let a=vr(),i=h.useRef(null),l=h.useContext(ix),o=Ca(),c=ox(e),d=(s=(r=c.current)==null?void 0:r.forceMount)!=null?s:l==null?void 0:l.forceMount;Nn(()=>{if(!d)return o.item(a,l==null?void 0:l.id)},[d]);let m=cx(a,i,[e.value,e.children,i],e.keywords),u=nd(),p=Xr(P=>P.value&&P.value===m.current),y=Xr(P=>d||o.filter()===!1?!0:P.search?P.filtered.items.get(a)>0:!0);h.useEffect(()=>{let P=i.current;if(!(!P||e.disabled))return P.addEventListener(Xo,w),()=>P.removeEventListener(Xo,w)},[y,e.onSelect,e.disabled]);function w(){var P,k;v(),(k=(P=c.current).onSelect)==null||k.call(P,m.current)}function v(){u.setState("value",m.current,!0)}if(!y)return null;let{disabled:j,value:x,onSelect:f,forceMount:g,keywords:N,...C}=e;return h.createElement(Ze.div,{ref:bn(i,t),...C,id:a,"cmdk-item":"",role:"option","aria-disabled":!!j,"aria-selected":!!p,"data-disabled":!!j,"data-selected":!!p,onPointerMove:j||o.getDisablePointerSelection()?void 0:v,onClick:j?void 0:w},e.children)}),Iw=h.forwardRef((e,t)=>{let{heading:r,children:s,forceMount:a,...i}=e,l=vr(),o=h.useRef(null),c=h.useRef(null),d=vr(),m=Ca(),u=Xr(y=>a||m.filter()===!1?!0:y.search?y.filtered.groups.has(l):!0);Nn(()=>m.group(l),[]),cx(l,o,[e.value,e.heading,c]);let p=h.useMemo(()=>({id:l,forceMount:a}),[a]);return h.createElement(Ze.div,{ref:bn(o,t),...i,"cmdk-group":"",role:"presentation",hidden:u?void 0:!0},r&&h.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:d},r),ol(e,y=>h.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?d:void 0},h.createElement(ix.Provider,{value:p},y))))}),Lw=h.forwardRef((e,t)=>{let{alwaysRender:r,...s}=e,a=h.useRef(null),i=Xr(l=>!l.search);return!r&&!i?null:h.createElement(Ze.div,{ref:bn(a,t),...s,"cmdk-separator":"",role:"separator"})}),Ow=h.forwardRef((e,t)=>{let{onValueChange:r,...s}=e,a=e.value!=null,i=nd(),l=Xr(d=>d.search),o=Xr(d=>d.selectedItemId),c=Ca();return h.useEffect(()=>{e.value!=null&&i.setState("search",e.value)},[e.value]),h.createElement(Ze.input,{ref:t,...s,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":o,id:c.inputId,type:"text",value:a?e.value:l,onChange:d=>{a||i.setState("search",d.target.value),r==null||r(d.target.value)}})}),Aw=h.forwardRef((e,t)=>{let{children:r,label:s="Suggestions",...a}=e,i=h.useRef(null),l=h.useRef(null),o=Xr(d=>d.selectedItemId),c=Ca();return h.useEffect(()=>{if(l.current&&i.current){let d=l.current,m=i.current,u,p=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let y=d.offsetHeight;m.style.setProperty("--cmdk-list-height",y.toFixed(1)+"px")})});return p.observe(d),()=>{cancelAnimationFrame(u),p.unobserve(d)}}},[]),h.createElement(Ze.div,{ref:bn(i,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":s,id:c.listId},ol(e,d=>h.createElement("div",{ref:bn(l,c.listInnerRef),"cmdk-list-sizer":""},d)))}),_w=h.forwardRef((e,t)=>{let{open:r,onOpenChange:s,overlayClassName:a,contentClassName:i,container:l,...o}=e;return h.createElement(Ew,{open:r,onOpenChange:s},h.createElement(Tw,{container:l},h.createElement(Pw,{"cmdk-overlay":"",className:a}),h.createElement(zw,{"aria-label":e.label,"cmdk-dialog":"",className:i},h.createElement(lx,{ref:t,...o}))))}),$w=h.forwardRef((e,t)=>Xr(r=>r.filtered.count===0)?h.createElement(Ze.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Fw=h.forwardRef((e,t)=>{let{progress:r,children:s,label:a="Loading...",...i}=e;return h.createElement(Ze.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},ol(e,l=>h.createElement("div",{"aria-hidden":!0},l)))}),Is=Object.assign(lx,{List:Aw,Item:Mw,Input:Ow,Group:Iw,Separator:Lw,Dialog:_w,Empty:$w,Loading:Fw});function Uw(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Bw(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function ox(e){let t=h.useRef(e);return Nn(()=>{t.current=e}),t}var Nn=typeof window>"u"?h.useEffect:h.useLayoutEffect;function Ln(e){let t=h.useRef();return t.current===void 0&&(t.current=e()),t}function Xr(e){let t=nd(),r=()=>e(t.snapshot());return h.useSyncExternalStore(t.subscribe,r,r)}function cx(e,t,r,s=[]){let a=h.useRef(),i=Ca();return Nn(()=>{var l;let o=(()=>{var d;for(let m of r){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(d=m.current.textContent)==null?void 0:d.trim():a.current}})(),c=s.map(d=>d.trim());i.value(e,o,c),(l=t.current)==null||l.setAttribute(In,o),a.current=o}),a}var Vw=()=>{let[e,t]=h.useState(),r=Ln(()=>new Map);return Nn(()=>{r.current.forEach(s=>s()),r.current=new Map},[e]),(s,a)=>{r.current.set(s,a),t({})}};function Ww(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ol({asChild:e,children:t},r){return e&&h.isValidElement(t)?h.cloneElement(Ww(t),{ref:t.ref},r(t.props.children)):r(t)}var Hw={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Kw({isOpen:e,onClose:t}){const r=En(),[s,a]=h.useState(""),o=[{id:"users",title:"Users",description:"Manage users and their accounts",icon:he,action:()=>r("/users"),category:"Navigation",keywords:["user","account","profile"]},{id:"organizations",title:"Organizations",description:"Manage organizations and teams",icon:Le,action:()=>r("/organizations"),category:"Navigation",keywords:["org","company","team"]},{id:"sessions",title:"Sessions",description:"View active user sessions",icon:Ko,action:()=>r("/sessions"),category:"Navigation",keywords:["session","login","active"]},{id:"settings",title:"Settings",description:"Configure Better Auth Studio",icon:ts,action:()=>r("/settings"),category:"Navigation",keywords:["config","setup","preferences"]},{id:"dashboard",title:"Dashboard",description:"View overview and statistics",icon:Ko,action:()=>r("/"),category:"Navigation",keywords:["overview","stats","home"]},{id:"create-user",title:"Create User",description:"Add a new user to the system",icon:Hr,action:()=>r("/users"),category:"Actions",keywords:["add","new","register"]},{id:"create-organization",title:"Create Organization",description:"Create a new organization",icon:Lr,action:()=>r("/organizations"),category:"Actions",keywords:["add","new","org"]},{id:"invite-user",title:"Invite User",description:"Send invitation to join organization",icon:Et,action:()=>r("/organizations"),category:"Actions",keywords:["invite","email","send"]}].filter(c=>{var m;const d=s.toLowerCase();return c.title.toLowerCase().includes(d)||c.description.toLowerCase().includes(d)||((m=c.keywords)==null?void 0:m.some(u=>u.toLowerCase().includes(d)))}).reduce((c,d)=>(c[d.category]||(c[d.category]=[]),c[d.category].push(d),c),{});return h.useEffect(()=>{const c=d=>{(d.metaKey||d.ctrlKey)&&d.key==="k"&&d.preventDefault()};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[]),h.useEffect(()=>{const c=d=>{d.key==="Escape"&&t()};if(e)return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[e,t]),e?n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-start justify-center pt-[20vh] z-50",children:n.jsx("div",{className:"bg-black/90 border border-dashed border-white/20 rounded-none w-full max-w-2xl mx-4",children:n.jsxs(Is,{className:"p-2",children:[n.jsxs("div",{className:"flex items-center border-b border-dashed border-white/10 px-3 pb-3",children:[n.jsx(Gr,{className:"w-4 h-4 text-gray-400 mr-3"}),n.jsx(Is.Input,{value:s,onValueChange:a,placeholder:"Search for actions, pages, or commands...",className:"flex-1 bg-transparent text-white placeholder-gray-400 outline-none",autoFocus:!0}),n.jsx("kbd",{className:"hidden sm:inline-flex items-center px-2 py-1 text-xs text-gray-400 border border-dashed border-white/20 rounded-sm",children:"ESC"})]}),n.jsx(Is.List,{className:"max-h-96 overflow-y-auto p-2",children:Object.keys(o).length===0?n.jsxs("div",{className:"text-center py-8 text-gray-400",children:[n.jsx(Gr,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),n.jsx("p",{children:"No results found"}),n.jsx("p",{className:"text-sm",children:"Try a different search term"})]}):Object.entries(o).map(([c,d])=>n.jsx("div",{className:"mb-4",children:n.jsx(Is.Group,{heading:c,className:"text-xs text-gray-400 font-medium mb-2 px-2",children:d.map(m=>{const u=m.icon;return n.jsxs(Is.Item,{value:m.id,onSelect:()=>{m.action(),t()},className:"flex items-center space-x-3 px-3 py-2 rounded-none hover:bg-white/5 cursor-pointer transition-colors",children:[n.jsx(u,{className:"w-4 h-4 text-white"}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:"text-white font-light",children:m.title}),n.jsx("div",{className:"text-sm text-gray-400",children:m.description})]}),n.jsx(Mn,{className:"w-4 h-4 text-gray-400"})]},m.id)})})},c))}),n.jsx("div",{className:"border-t border-dashed border-white/10 px-3 py-2 text-xs text-gray-400",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("span",{children:["Press"," ",n.jsx("kbd",{className:"px-1 py-0.5 border border-dashed border-white/20 rounded-sm",children:"↑↓"})," ","to navigate"]}),n.jsxs("span",{children:["Press"," ",n.jsx("kbd",{className:"px-1 py-0.5 border border-dashed border-white/20 rounded-sm",children:"Enter"})," ","to select"]})]})})]})})}):null}function dx(e){var t,r,s="";if(typeof e=="string"||typeof e=="number")s+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=dx(e[t]))&&(s&&(s+=" "),s+=r)}else for(r in e)e[r]&&(s&&(s+=" "),s+=r);return s}function ux(){for(var e,t,r=0,s="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=dx(e))&&(s&&(s+=" "),s+=t);return s}const Yu=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Gu=ux,hx=(e,t)=>r=>{var s;if((t==null?void 0:t.variants)==null)return Gu(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:a,defaultVariants:i}=t,l=Object.keys(a).map(d=>{const m=r==null?void 0:r[d],u=i==null?void 0:i[d];if(m===null)return null;const p=Yu(m)||Yu(u);return a[d][p]}),o=r&&Object.entries(r).reduce((d,m)=>{let[u,p]=m;return p===void 0||(d[u]=p),d},{}),c=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((d,m)=>{let{class:u,className:p,...y}=m;return Object.entries(y).every(w=>{let[v,j]=w;return Array.isArray(j)?j.includes({...i,...o}[v]):{...i,...o}[v]===j})?[...d,u,p]:d},[]);return Gu(e,l,c,r==null?void 0:r.class,r==null?void 0:r.className)},sd="-",Qw=e=>{const t=Gw(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=e;return{getClassGroupId:l=>{const o=l.split(sd);return o[0]===""&&o.length!==1&&o.shift(),mx(o,t)||Yw(l)},getConflictingClassGroupIds:(l,o)=>{const c=r[l]||[];return o&&s[l]?[...c,...s[l]]:c}}},mx=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const r=e[0],s=t.nextPart.get(r),a=s?mx(e.slice(1),s):void 0;if(a)return a;if(t.validators.length===0)return;const i=e.join(sd);return(l=t.validators.find(({validator:o})=>o(i)))==null?void 0:l.classGroupId},Xu=/^\[(.+)\]$/,Yw=e=>{if(Xu.test(e)){const t=Xu.exec(e)[1],r=t==null?void 0:t.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},Gw=e=>{const{theme:t,prefix:r}=e,s={nextPart:new Map,validators:[]};return Jw(Object.entries(e.classGroups),r).forEach(([i,l])=>{Jo(l,s,i,t)}),s},Jo=(e,t,r,s)=>{e.forEach(a=>{if(typeof a=="string"){const i=a===""?t:Ju(t,a);i.classGroupId=r;return}if(typeof a=="function"){if(Xw(a)){Jo(a(s),t,r,s);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([i,l])=>{Jo(l,Ju(t,i),r,s)})})},Ju=(e,t)=>{let r=e;return t.split(sd).forEach(s=>{r.nextPart.has(s)||r.nextPart.set(s,{nextPart:new Map,validators:[]}),r=r.nextPart.get(s)}),r},Xw=e=>e.isThemeGetter,Jw=(e,t)=>t?e.map(([r,s])=>{const a=s.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([l,o])=>[t+l,o])):i);return[r,a]}):e,qw=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,s=new Map;const a=(i,l)=>{r.set(i,l),t++,t>e&&(t=0,s=r,r=new Map)};return{get(i){let l=r.get(i);if(l!==void 0)return l;if((l=s.get(i))!==void 0)return a(i,l),l},set(i,l){r.has(i)?r.set(i,l):a(i,l)}}},fx="!",Zw=e=>{const{separator:t,experimentalParseClassName:r}=e,s=t.length===1,a=t[0],i=t.length,l=o=>{const c=[];let d=0,m=0,u;for(let j=0;j<o.length;j++){let x=o[j];if(d===0){if(x===a&&(s||o.slice(j,j+i)===t)){c.push(o.slice(m,j)),m=j+i;continue}if(x==="/"){u=j;continue}}x==="["?d++:x==="]"&&d--}const p=c.length===0?o:o.substring(m),y=p.startsWith(fx),w=y?p.substring(1):p,v=u&&u>m?u-m:void 0;return{modifiers:c,hasImportantModifier:y,baseClassName:w,maybePostfixModifierPosition:v}};return r?o=>r({className:o,parseClassName:l}):l},eb=e=>{if(e.length<=1)return e;const t=[];let r=[];return e.forEach(s=>{s[0]==="["?(t.push(...r.sort(),s),r=[]):r.push(s)}),t.push(...r.sort()),t},tb=e=>({cache:qw(e.cacheSize),parseClassName:Zw(e),...Qw(e)}),rb=/\s+/,nb=(e,t)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:a}=t,i=[],l=e.trim().split(rb);let o="";for(let c=l.length-1;c>=0;c-=1){const d=l[c],{modifiers:m,hasImportantModifier:u,baseClassName:p,maybePostfixModifierPosition:y}=r(d);let w=!!y,v=s(w?p.substring(0,y):p);if(!v){if(!w){o=d+(o.length>0?" "+o:o);continue}if(v=s(p),!v){o=d+(o.length>0?" "+o:o);continue}w=!1}const j=eb(m).join(":"),x=u?j+fx:j,f=x+v;if(i.includes(f))continue;i.push(f);const g=a(v,w);for(let N=0;N<g.length;++N){const C=g[N];i.push(x+C)}o=d+(o.length>0?" "+o:o)}return o};function sb(){let e=0,t,r,s="";for(;e<arguments.length;)(t=arguments[e++])&&(r=xx(t))&&(s&&(s+=" "),s+=r);return s}const xx=e=>{if(typeof e=="string")return e;let t,r="";for(let s=0;s<e.length;s++)e[s]&&(t=xx(e[s]))&&(r&&(r+=" "),r+=t);return r};function ab(e,...t){let r,s,a,i=l;function l(c){const d=t.reduce((m,u)=>u(m),e());return r=tb(d),s=r.cache.get,a=r.cache.set,i=o,o(c)}function o(c){const d=s(c);if(d)return d;const m=nb(c,r);return a(c,m),m}return function(){return i(sb.apply(null,arguments))}}const ke=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},px=/^\[(?:([a-z-]+):)?(.+)\]$/i,ib=/^\d+\/\d+$/,lb=new Set(["px","full","screen"]),ob=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,cb=/\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$/,db=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ub=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,hb=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ur=e=>ns(e)||lb.has(e)||ib.test(e),Sr=e=>ws(e,"length",wb),ns=e=>!!e&&!Number.isNaN(Number(e)),Ql=e=>ws(e,"number",ns),Ls=e=>!!e&&Number.isInteger(Number(e)),mb=e=>e.endsWith("%")&&ns(e.slice(0,-1)),ae=e=>px.test(e),Cr=e=>ob.test(e),fb=new Set(["length","size","percentage"]),xb=e=>ws(e,fb,gx),pb=e=>ws(e,"position",gx),gb=new Set(["image","url"]),vb=e=>ws(e,gb,jb),yb=e=>ws(e,"",bb),Os=()=>!0,ws=(e,t,r)=>{const s=px.exec(e);return s?s[1]?typeof t=="string"?s[1]===t:t.has(s[1]):r(s[2]):!1},wb=e=>cb.test(e)&&!db.test(e),gx=()=>!1,bb=e=>ub.test(e),jb=e=>hb.test(e),Nb=()=>{const e=ke("colors"),t=ke("spacing"),r=ke("blur"),s=ke("brightness"),a=ke("borderColor"),i=ke("borderRadius"),l=ke("borderSpacing"),o=ke("borderWidth"),c=ke("contrast"),d=ke("grayscale"),m=ke("hueRotate"),u=ke("invert"),p=ke("gap"),y=ke("gradientColorStops"),w=ke("gradientColorStopPositions"),v=ke("inset"),j=ke("margin"),x=ke("opacity"),f=ke("padding"),g=ke("saturate"),N=ke("scale"),C=ke("sepia"),P=ke("skew"),k=ke("space"),R=ke("translate"),J=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",ae,t],Y=()=>[ae,t],te=()=>["",ur,Sr],ee=()=>["auto",ns,ae],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],X=()=>["solid","dashed","dotted","double","none"],_=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],S=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",ae],B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[ns,ae];return{cacheSize:500,separator:":",theme:{colors:[Os],spacing:[ur,Sr],blur:["none","",Cr,ae],brightness:z(),borderColor:[e],borderRadius:["none","","full",Cr,ae],borderSpacing:Y(),borderWidth:te(),contrast:z(),grayscale:O(),hueRotate:z(),invert:O(),gap:Y(),gradientColorStops:[e],gradientColorStopPositions:[mb,Sr],inset:q(),margin:q(),opacity:z(),padding:Y(),saturate:z(),scale:z(),sepia:O(),skew:z(),space:Y(),translate:Y()},classGroups:{aspect:[{aspect:["auto","square","video",ae]}],container:["container"],columns:[{columns:[Cr]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...ie(),ae]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:J()}],"overscroll-x":[{"overscroll-x":J()}],"overscroll-y":[{"overscroll-y":J()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Ls,ae]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ae]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",Ls,ae]}],"grid-cols":[{"grid-cols":[Os]}],"col-start-end":[{col:["auto",{span:["full",Ls,ae]},ae]}],"col-start":[{"col-start":ee()}],"col-end":[{"col-end":ee()}],"grid-rows":[{"grid-rows":[Os]}],"row-start-end":[{row:["auto",{span:[Ls,ae]},ae]}],"row-start":[{"row-start":ee()}],"row-end":[{"row-end":ee()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ae]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ae]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...S()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...S(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...S(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[f]}],px:[{px:[f]}],py:[{py:[f]}],ps:[{ps:[f]}],pe:[{pe:[f]}],pt:[{pt:[f]}],pr:[{pr:[f]}],pb:[{pb:[f]}],pl:[{pl:[f]}],m:[{m:[j]}],mx:[{mx:[j]}],my:[{my:[j]}],ms:[{ms:[j]}],me:[{me:[j]}],mt:[{mt:[j]}],mr:[{mr:[j]}],mb:[{mb:[j]}],ml:[{ml:[j]}],"space-x":[{"space-x":[k]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[k]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ae,t]}],"min-w":[{"min-w":[ae,t,"min","max","fit"]}],"max-w":[{"max-w":[ae,t,"none","full","min","max","fit","prose",{screen:[Cr]},Cr]}],h:[{h:[ae,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ae,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ae,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Cr,Sr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ql]}],"font-family":[{font:[Os]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",ae]}],"line-clamp":[{"line-clamp":["none",ns,Ql]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ur,ae]}],"list-image":[{"list-image":["none",ae]}],"list-style-type":[{list:["none","disc","decimal",ae]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...X(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ur,Sr]}],"underline-offset":[{"underline-offset":["auto",ur,ae]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:Y()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae]}],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",ae]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ie(),pb]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",xb]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},vb]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[y]}],"gradient-via":[{via:[y]}],"gradient-to":[{to:[y]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...X(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:X()}],"border-color":[{border:[a]}],"border-color-x":[{"border-x":[a]}],"border-color-y":[{"border-y":[a]}],"border-color-s":[{"border-s":[a]}],"border-color-e":[{"border-e":[a]}],"border-color-t":[{"border-t":[a]}],"border-color-r":[{"border-r":[a]}],"border-color-b":[{"border-b":[a]}],"border-color-l":[{"border-l":[a]}],"divide-color":[{divide:[a]}],"outline-style":[{outline:["",...X()]}],"outline-offset":[{"outline-offset":[ur,ae]}],"outline-w":[{outline:[ur,Sr]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:te()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[ur,Sr]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Cr,yb]}],"shadow-color":[{shadow:[Os]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[..._(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[s]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Cr,ae]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[u]}],saturate:[{saturate:[g]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[g]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ae]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",ae]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",ae]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[Ls,ae]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[P]}],"skew-y":[{"skew-y":[P]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ae]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":Y()}],"scroll-mx":[{"scroll-mx":Y()}],"scroll-my":[{"scroll-my":Y()}],"scroll-ms":[{"scroll-ms":Y()}],"scroll-me":[{"scroll-me":Y()}],"scroll-mt":[{"scroll-mt":Y()}],"scroll-mr":[{"scroll-mr":Y()}],"scroll-mb":[{"scroll-mb":Y()}],"scroll-ml":[{"scroll-ml":Y()}],"scroll-p":[{"scroll-p":Y()}],"scroll-px":[{"scroll-px":Y()}],"scroll-py":[{"scroll-py":Y()}],"scroll-ps":[{"scroll-ps":Y()}],"scroll-pe":[{"scroll-pe":Y()}],"scroll-pt":[{"scroll-pt":Y()}],"scroll-pr":[{"scroll-pr":Y()}],"scroll-pb":[{"scroll-pb":Y()}],"scroll-pl":[{"scroll-pl":Y()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ur,Sr,Ql]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},kb=ab(Nb);function tn(...e){return kb(ux(e))}const Sb=hx("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-white text-black hover:bg-white",secondary:"border-transparent bg-gray-800 text-white hover:bg-gray-800 border border-gray-600",destructive:"border-transparent bg-red-500 text-white hover:bg-red-600",outline:"text-gray-300 border-gray-600",success:"border-transparent bg-green-900 text-green-300",warning:"border-transparent bg-yellow-900 text-yellow-300",error:"border-transparent bg-red-900 text-red-300",info:"border-transparent bg-gray-800 text-white border border-gray-600"}},defaultVariants:{variant:"default"}});function le({className:e,variant:t,...r}){return n.jsx("div",{className:tn(Sb({variant:t}),e),...r})}const Cb=hx("inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-white text-black hover:bg-white shadow",destructive:"bg-red-500 text-white hover:bg-red-600 shadow",outline:"border border-white bg-black hover:bg-black hover:text-white",secondary:"bg-black text-white hover:bg-black shadow border border-white",ghost:"hover:bg-black text-white hover:text-white",link:"text-white underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),T=h.forwardRef(({className:e,variant:t,size:r,asChild:s=!1,...a},i)=>{const l=s?ey:"button";return n.jsx(l,{className:tn(Cb({variant:t,size:r,className:e})),ref:i,...a})});T.displayName="Button";function Eb({children:e}){const t=Sa(),{counts:r,loading:s}=qc(),[a,i]=h.useState(!1),[l,o]=h.useState("v1.0.0");h.useEffect(()=>{const m=u=>{(u.metaKey||u.ctrlKey)&&u.key==="k"&&(u.preventDefault(),i(!0))};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[]),h.useEffect(()=>{(async()=>{var u;try{const y=await(await fetch("/api/config")).json();(u=y.studio)!=null&&u.version&&o(`v${y.studio.version}`)}catch(p){console.warn("Failed to fetch studio version:",p)}})()},[]);const c=m=>m>=1e3?(m/1e3).toFixed(1).replace(/\.0$/,"")+"k":m.toString(),d=[{name:"Dashboard",href:"/",icon:D0},{name:"Users",href:"/users",icon:he,badge:s?"...":c(r.users)},{name:"Organizations",href:"/organizations",icon:Le,badge:s?"...":c(r.organizations)},{name:"Settings",href:"/settings",icon:ts}];return n.jsxs("div",{className:"min-h-screen bg-black",children:[n.jsx("div",{className:"bg-black/70 border-b border-white/15",children:n.jsxs("div",{className:"flex items-center justify-between px-6 py-4",children:[n.jsx("div",{className:"flex items-center space-x-4",children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("div",{className:"w-8 h-8 bg-white rounded-lg flex items-center justify-center",children:n.jsx("span",{className:"text-black font-bold text-lg",children:"⚡"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-xl font-bold text-white",children:"Better Auth Studio"}),n.jsx("p",{className:"text-xs text-gray-300",children:l})]})]})}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"relative",children:[n.jsx(Gr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),n.jsx("input",{type:"text",placeholder:"Search...",onClick:()=>i(!0),className:"pl-10 pr-4 py-2 bg-black border rounded-none border-gray-600 text-white border-dashed focus:ring-2 focus:ring-white focus:border-transparent transition-colors placeholder-gray-400 cursor-pointer",readOnly:!0}),n.jsx("kbd",{className:"absolute right-3 top-1/2 transform -translate-y-1/2 text-xs text-gray-400 border border-dashed border-white/20 rounded-sm px-1.5 py-0.5",children:"⌘K"})]}),n.jsx("a",{href:"https://better-auth.com/docs",target:"_blank",rel:"noopener",children:n.jsx(T,{variant:"ghost",className:"text-gray-300 bg-transparent hover:bg-transparent hover:bg-gray-900 border-dashed",children:"Docs"})}),n.jsx("a",{href:"https://better-auth.com/support",target:"_blank",rel:"noopener",children:n.jsx(T,{variant:"ghost",className:"text-gray-300 bg-transparent hover:bg-transparent hover:bg-gray-900 border-dashed",children:"Support"})})]})]})}),n.jsx("div",{className:"bg-black/50 border-b border-white/10",children:n.jsx("div",{className:"px-6",children:n.jsx("nav",{className:"flex space-x-8",children:d.map(m=>{const u=t.pathname===m.href;return n.jsxs(es,{to:m.href,className:`flex items-center space-x-2 px-3 py-4 text-sm font-medium border-b-2 transition-all duration-200 ${u?"border-white text-white":"border-transparent text-gray-400 hover:text-white hover:border-gray-300"}`,children:[n.jsx(m.icon,{className:"w-4 h-4"}),n.jsx("span",{children:m.name}),m.badge&&n.jsx(le,{variant:"secondary",className:"text-xs bg-white/10 border border-white/20 rounded-sm",children:m.badge})]},m.name)})})})}),n.jsx("div",{className:"flex-1 p-0",children:e}),n.jsx(Kw,{isOpen:a,onClose:()=>i(!1)})]})}const ot=h.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:tn("rounded-lg border border-gray-700 bg-gray-900 text-white shadow-sm",e),...t}));ot.displayName="Card";const qt=h.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:tn("flex flex-col space-y-1.5 p-6",e),...t}));qt.displayName="CardHeader";const Zt=h.forwardRef(({className:e,...t},r)=>n.jsx("h3",{ref:r,className:tn("text-2xl font-semibold leading-none tracking-tight text-white",e),...t}));Zt.displayName="CardTitle";const er=h.forwardRef(({className:e,...t},r)=>n.jsx("p",{ref:r,className:tn("text-sm text-gray-300",e),...t}));er.displayName="CardDescription";const ct=h.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:tn("p-6 pt-0",e),...t}));ct.displayName="CardContent";const Tb=h.forwardRef(({className:e,...t},r)=>n.jsx("div",{ref:r,className:tn("flex items-center p-6 pt-0",e),...t}));Tb.displayName="CardFooter";function us({title:e="Seeding Terminal",lines:t,isRunning:r=!1,className:s="",defaultCollapsed:a=!1}){const[i,l]=h.useState(a),o=m=>{switch(m.type){case"success":return n.jsx(Ue,{className:"w-3 h-3 text-green-400"});case"error":return n.jsx(on,{className:"w-3 h-3 text-red-400"});case"progress":return m.status==="running"?n.jsx(st,{className:"w-3 h-3 text-blue-400 animate-spin"}):m.status==="completed"?n.jsx(Ue,{className:"w-3 h-3 text-green-400"}):m.status==="failed"?n.jsx(on,{className:"w-3 h-3 text-red-400"}):n.jsx("div",{className:"w-3 h-3 border border-gray-500 rounded-full"});default:return n.jsx("div",{className:"w-3 h-3 border border-gray-500 rounded-full"})}},c=m=>{switch(m.type){case"success":return"text-green-400";case"error":return"text-red-400";case"progress":return m.status==="running"?"text-blue-400":m.status==="completed"?"text-green-400":m.status==="failed"?"text-red-400":"text-gray-400";default:return"text-gray-300"}},d=m=>m.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})+"."+m.getMilliseconds().toString().padStart(3,"0");return n.jsxs("div",{className:`bg-black/90 border border-dashed border-white/20 rounded-none font-mono text-xs ${s}`,children:[n.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-dashed border-white/10",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(I0,{className:"w-3 h-3 text-green-400"}),n.jsx("span",{className:"text-green-400 font-medium text-xs",children:e})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[r&&n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("div",{className:"w-1.5 h-1.5 bg-green-400 rounded-full animate-pulse"}),n.jsx("span",{className:"text-green-400 text-xs",children:"RUNNING"})]}),n.jsxs("div",{className:"text-gray-400 text-xs",children:[t.length," / ",t.length]}),n.jsx("button",{onClick:()=>l(!i),className:"text-gray-400 hover:text-white transition-colors",children:i?n.jsx(Cf,{className:"w-3 h-3"}):n.jsx(P0,{className:"w-3 h-3"})})]})]}),!i&&n.jsxs("div",{className:"p-3 space-y-0.5 h-56 overflow-y-auto",children:[t.length===0?n.jsxs("div",{className:"text-gray-500 italic text-xs",children:[n.jsx("span",{className:"text-green-400",children:"$"})," Waiting for operations..."]}):t.map(m=>n.jsxs("div",{className:`flex items-start space-x-3 py-1 ${c(m)} text-xs`,children:[n.jsx("span",{className:"text-gray-500 text-xs w-20 flex-shrink-0",children:d(m.timestamp)}),n.jsx("span",{className:"text-green-400 flex-shrink-0",children:"$"}),n.jsx("div",{className:"flex-shrink-0 mt-0.5",children:o(m)}),n.jsx("span",{className:"flex-1 min-w-0 break-words",children:m.message})]},m.id)),r&&n.jsxs("div",{className:"flex items-start space-x-3 py-1 text-green-400 text-xs",children:[n.jsx("span",{className:"text-gray-500 text-xs w-20 flex-shrink-0",children:d(new Date)}),n.jsx("span",{className:"text-green-400 flex-shrink-0",children:"$"}),n.jsx("div",{className:"w-3 h-3 flex-shrink-0 mt-0.5"}),n.jsx("span",{className:"flex-1 flex items-center",children:n.jsx("span",{className:"animate-pulse",children:"█"})})]})]}),!i&&n.jsx("div",{className:"px-3 py-1.5 border-t border-dashed border-white/10 bg-black/50",children:n.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-400",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("span",{children:["Status: ",r?"Active":"Idle"]}),n.jsxs("span",{children:["Lines: ",t.length]})]}),n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("div",{className:"w-1.5 h-1.5 bg-green-400 rounded-full"}),n.jsx("span",{children:"Better Auth Studio"})]})]})})]})}const vx=document.createElement("style");vx.textContent=`
|
|
347
|
-
@keyframes fadeIn {
|
|
348
|
-
from {
|
|
349
|
-
opacity: 0;
|
|
350
|
-
transform: translateX(-10px);
|
|
351
|
-
}
|
|
352
|
-
to {
|
|
353
|
-
opacity: 1;
|
|
354
|
-
transform: translateX(0);
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
|
|
358
|
-
.animate-fadeIn {
|
|
359
|
-
animation: fadeIn 0.3s ease-out forwards;
|
|
360
|
-
}
|
|
361
|
-
`;document.head.appendChild(vx);const me=h.forwardRef(({className:e,type:t,...r},s)=>n.jsx("input",{type:t,className:`flex h-10 w-full border border-dashed border-white/20 bg-black/30 px-3 py-2 text-sm text-white placeholder:text-gray-400 focus:outline-none focus:ring-1 focus:ring-white focus:border-white/40 disabled:cursor-not-allowed disabled:opacity-50 rounded-none ${e}`,ref:s,...r}));me.displayName="Input";const xe=h.forwardRef(({className:e,...t},r)=>n.jsx("label",{className:`text-sm font-light text-white ${e}`,ref:r,...t}));xe.displayName="Label";function yx({currentPage:e,totalPages:t,onPageChange:r,totalItems:s,startIndex:a,endIndex:i}){const l=()=>{const d=[],m=[];for(let u=Math.max(2,e-2);u<=Math.min(t-1,e+2);u++)d.push(u);return e-2>2?m.push(1,"..."):m.push(1),m.push(...d),e+2<t-1?m.push("...",t):t>1&&m.push(t),m};if(t<=1)return null;const o=l();return n.jsxs("div",{className:"flex items-center justify-between mt-6",children:[n.jsxs("div",{className:"text-sm text-gray-400",children:["Showing ",a+1," to ",Math.min(i,s)," of ",s," items"]}),n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsxs(T,{variant:"outline",size:"sm",onClick:()=>r(e-1),disabled:e===1,className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:[n.jsx(E0,{className:"w-4 h-4"}),"Previous"]}),o.map((c,d)=>{if(c==="...")return n.jsx(T,{variant:"outline",size:"sm",disabled:!0,className:"border border-dashed border-white/20 text-white rounded-none",children:n.jsx(M0,{className:"w-4 h-4"})},`dots-${d}`);const m=c,u=e===m;return n.jsx(T,{variant:u?"default":"outline",size:"sm",onClick:()=>r(m),className:u?"bg-white text-black rounded-none":"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:m},m)}),n.jsxs(T,{variant:"outline",size:"sm",onClick:()=>r(e+1),disabled:e===t,className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:["Next",n.jsx(T0,{className:"w-4 h-4"})]})]})]})}const Ea=h.createContext({isOpen:!1,setIsOpen:()=>{}}),hs=h.forwardRef(({className:e,value:t,onValueChange:r,children:s,...a},i)=>{const[l,o]=h.useState(!1);return n.jsx(Ea.Provider,{value:{value:t,onValueChange:r,isOpen:l,setIsOpen:o},children:n.jsx("div",{ref:i,className:`relative ${e}`,...a,children:s})})});hs.displayName="Select";const ms=h.forwardRef(({className:e,children:t,...r},s)=>{const{isOpen:a,setIsOpen:i}=h.useContext(Ea);return n.jsxs("button",{ref:s,type:"button",className:`flex h-10 w-full items-center justify-between border border-dashed border-white/20 bg-black/30 px-3 py-2 text-sm text-white focus:outline-none focus:ring-1 focus:ring-white focus:border-white/40 disabled:cursor-not-allowed disabled:opacity-50 rounded-none ${e}`,onClick:()=>i(!a),...r,children:[t,n.jsx(Cf,{className:`h-4 w-4 text-gray-400 transition-transform ${a?"rotate-180":""}`})]})});ms.displayName="SelectTrigger";const fs=h.forwardRef(({className:e,placeholder:t,...r},s)=>{const{value:a}=h.useContext(Ea);return n.jsx("span",{ref:s,className:`text-sm text-white ${e}`,...r,children:a||t})});fs.displayName="SelectValue";const xs=h.forwardRef(({className:e,children:t,...r},s)=>{const{isOpen:a}=h.useContext(Ea);return a?n.jsx("div",{ref:s,className:`absolute top-full left-0 right-0 z-50 mt-1 border border-dashed border-white/20 bg-black/90 rounded-none shadow-lg ${e}`,...r,children:t}):null});xs.displayName="SelectContent";const Dt=h.forwardRef(({className:e,children:t,value:r,...s},a)=>{const{onValueChange:i,setIsOpen:l}=h.useContext(Ea);return n.jsx("div",{ref:a,className:`px-3 py-2 text-sm text-white hover:bg-white/10 cursor-pointer ${e}`,onClick:()=>{i==null||i(r),l(!1)},...s,children:t})});Dt.displayName="SelectItem";function wx(){const e=En(),{refetchCounts:t}=qc(),[r,s]=h.useState([]),[a,i]=h.useState(!0),[l,o]=h.useState(null),[c,d]=h.useState(""),[m,u]=h.useState("all"),[p,y]=h.useState(1),[w]=h.useState(20),[v,j]=h.useState(!1),[x,f]=h.useState(!1),[g,N]=h.useState(!1),[C,P]=h.useState(!1),[k,R]=h.useState(!1),[J,W]=h.useState(!1),[q,Y]=h.useState(null),[te,ee]=h.useState([]),[ie,X]=h.useState(!1),[_,S]=h.useState({name:"",slug:""}),[O,B]=h.useState({name:"",organizationId:""}),[z,b]=h.useState({name:"",slug:""});h.useEffect(()=>{$()},[]);const E=F=>F.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,""),L=F=>{const Q=E(F);S({name:F,slug:Q})},M=F=>{S(Q=>({...Q,slug:E(F)}))},A=F=>{const Q=E(F);b({name:F,slug:Q})},K=F=>{b(Q=>({...Q,slug:E(F)}))},$=async()=>{try{const Q=await(await fetch("/api/plugins")).json(),oe=(Q==null?void 0:Q.plugins).find(Ee=>Ee.id==="organization");o({enabled:!!oe,availablePlugins:(Q==null?void 0:Q.plugins).map(Ee=>Ee.id),configPath:Q.configPath,organizationPlugin:(Q==null?void 0:Q.plugins).find(Ee=>Ee.id==="organization")}),oe?await Z():i(!1)}catch(F){console.error("Failed to check plugin status:",F),o({enabled:!1,error:"Failed to check plugin status"}),i(!1)}},Z=async()=>{try{const Q=await(await fetch("/api/organizations?limit=10000")).json();s(Q.organizations||[])}catch(F){console.error("Failed to fetch organizations:",F),D.error("Failed to fetch organizations")}finally{i(!1)}},de=async F=>{ee([]),X(!0),ee([{id:"start",type:"info",message:`Starting organization seeding process for ${F} organizations...`,timestamp:new Date}]);try{const oe=await(await fetch("/api/seed/organizations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:F})})).json();if(oe.success){const Ee=oe.results.map((ye,Te)=>ye.success?{id:`org-${Te}`,type:"progress",message:`Creating organization: ${ye.organization.name} (${ye.organization.slug})`,timestamp:new Date,status:"completed"}:{id:`org-${Te}`,type:"error",message:`Failed to create organization ${Te+1}: ${ye.error}`,timestamp:new Date});ee(ye=>[...ye,...Ee]);const Fe=oe.results.filter(ye=>ye.success).length;ee(ye=>[...ye,{id:"complete",type:"success",message:`✅ Seeding completed! Created ${Fe}/${F} organizations successfully`,timestamp:new Date}]),await Z(),await t()}else ee(Ee=>[...Ee,{id:"error",type:"error",message:`❌ Seeding failed: ${oe.error||"Unknown error"}`,timestamp:new Date}])}catch(Q){ee(oe=>[...oe,{id:"error",type:"error",message:`❌ Network error: ${Q}`,timestamp:new Date}])}finally{X(!1)}},we=async F=>{ee([]),X(!0),ee([{id:"start",type:"info",message:`Starting team seeding process for ${F} teams...`,timestamp:new Date}]);try{const oe=await(await fetch("/api/seed/teams",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:F})})).json();if(oe.success){const Ee=oe.results.map((ye,Te)=>ye.success?{id:`team-${Te}`,type:"progress",message:`Creating team: ${ye.team.name}`,timestamp:new Date,status:"completed"}:{id:`team-${Te}`,type:"error",message:`Failed to create team ${Te+1}: ${ye.error}`,timestamp:new Date});ee(ye=>[...ye,...Ee]);const Fe=oe.results.filter(ye=>ye.success).length;ee(ye=>[...ye,{id:"complete",type:"success",message:`✅ Seeding completed! Created ${Fe}/${F} teams successfully`,timestamp:new Date}]),await Z(),await t()}else ee(Ee=>[...Ee,{id:"error",type:"error",message:`❌ Seeding failed: ${oe.error||"Unknown error"}`,timestamp:new Date}])}catch(Q){ee(oe=>[...oe,{id:"error",type:"error",message:`❌ Network error: ${Q}`,timestamp:new Date}])}finally{X(!1)}},ge=F=>{Y(F),R(!0)},Ne=F=>{Y(F),b({name:F.name,slug:F.slug}),N(!0)},ve=F=>{Y(F),P(!0)},Gt=async()=>{if(!_.name){D.error("Please fill in the organization name");return}const F=D.loading("Creating organization...");try{const oe=await(await fetch("/api/organizations",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:_.name,slug:_.slug})})).json();oe.success?(await Z(),j(!1),S({name:"",slug:""}),D.success("Organization created successfully!",{id:F})):D.error(`Error creating organization: ${oe.error||"Unknown error"}`,{id:F})}catch(Q){console.error("Error creating organization:",Q),D.error("Error creating organization",{id:F})}},ir=async()=>{if(!O.name){D.error("Please fill in the team name");return}if(!O.organizationId){D.error("Please select an organization");return}const F=D.loading("Creating team...");try{const oe=await(await fetch("/api/teams",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:O.name,organizationId:O.organizationId})})).json();oe.success?(f(!1),B({name:"",organizationId:""}),D.success("Team created successfully!",{id:F})):D.error(`Error creating team: ${oe.error||"Unknown error"}`,{id:F})}catch(Q){console.error("Error creating team:",Q),D.error("Error creating team",{id:F})}},lr=async()=>{if(!q){D.error("No organization selected");return}if(!z.name){D.error("Please fill in the organization name");return}const F=D.loading("Updating organization...");try{const oe=await(await fetch(`/api/organizations/${q.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:z.name,slug:z.slug})})).json();oe.success?(await Z(),N(!1),Y(null),b({name:"",slug:""}),D.success("Organization updated successfully!",{id:F})):D.error(`Error updating organization: ${oe.error||"Unknown error"}`,{id:F})}catch(Q){console.error("Error updating organization:",Q),D.error("Error updating organization",{id:F})}},Lt=async()=>{if(!q){D.error("No organization selected");return}const F=D.loading("Deleting organization...");try{const oe=await(await fetch(`/api/organizations/${q.id}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})).json();oe.success?(await Z(),await t(),P(!1),Y(null),D.success("Organization deleted successfully!",{id:F})):D.error(`Error deleting organization: ${oe.error||"Unknown error"}`,{id:F})}catch(Q){console.error("Error deleting organization:",Q),D.error("Error deleting organization",{id:F})}},Ye=()=>{if(r.length===0){D.error("No organizations to export");return}const F=["ID","Name","Slug","Created At","Updated At"],Q=r.map(Te=>[Te.id,Te.name||"",Te.slug||"",new Date(Te.createdAt).toLocaleString(),new Date(Te.updatedAt).toLocaleString()]),oe=[F.join(","),...Q.map(Te=>Te.map(Ns=>`"${Ns}"`).join(","))].join(`
|
|
362
|
-
`),Ee=new Blob([oe],{type:"text/csv;charset=utf-8;"}),Fe=document.createElement("a"),ye=URL.createObjectURL(Ee);Fe.setAttribute("href",ye),Fe.setAttribute("download",`organizations-export-${new Date().toISOString().split("T")[0]}.csv`),Fe.style.visibility="hidden",document.body.appendChild(Fe),Fe.click(),document.body.removeChild(Fe),D.success(`Exported ${r.length} organizations to CSV`)},Ot=r.filter(F=>{var Ee;const Q=F.name.toLowerCase().includes(c.toLowerCase())||F.slug.toLowerCase().includes(c.toLowerCase()),oe=m==="all"||((Ee=F.metadata)==null?void 0:Ee.status)===m;return Q&&oe}),bs=Math.ceil(Ot.length/w),$e=(p-1)*w,At=$e+w,rn=Ot.slice($e,At),js=F=>{y(F)};return a?n.jsx("div",{className:"flex items-center justify-center h-32",children:n.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[n.jsx(st,{className:"w-6 h-6 text-white animate-spin"}),n.jsx("div",{className:"text-white text-sm",children:"Loading organizations..."})]})}):l&&!l.enabled?n.jsxs("div",{className:"space-y-6 p-6",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl text-white font-light",children:"Organizations"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"Manage your application organizations"})]})}),n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-8",children:n.jsxs("div",{className:"flex items-start space-x-4",children:[n.jsx("div",{className:"flex-shrink-0",children:n.jsx(Le,{className:"w-12 h-12 text-white"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h3",{className:"text-xl text-white font-light mb-2",children:"Organization Plugin Required"}),n.jsx("p",{className:"text-gray-300 mb-6",children:"To use Organizations in Better Auth Studio, you need to enable the organization plugin in your Better Auth configuration."}),n.jsxs("div",{className:"bg-black/50 border border-dashed border-white/20 rounded-none p-4 mb-6",children:[n.jsx("h4",{className:"text-white font-light mb-3",children:"Follow these steps:"}),n.jsx("ol",{className:"text-gray-300 space-y-2 text-sm list-decimal list-inside",children:n.jsxs("li",{children:["Import the plugin in your auth configuration file",l.configPath&&n.jsxs("span",{className:"text-gray-400",children:[" (",l.configPath,")"]}),":"]})}),n.jsx("div",{className:"mt-4 bg-black/70 border border-dashed border-white/10 rounded-none p-3 overflow-x-auto",children:n.jsxs("pre",{className:"text-sm text-gray-300",children:[n.jsx("span",{className:"text-blue-400",children:"import"})," ","{ betterAuth }"," ",n.jsx("span",{className:"text-blue-400",children:"from"})," ",n.jsx("span",{className:"text-green-400",children:'"better-auth"'})," ",n.jsx("br",{}),n.jsx("span",{className:"text-blue-400",children:"import"})," ","{ organization }"," ",n.jsx("span",{className:"text-blue-400",children:"from"})," ",n.jsx("span",{className:"text-green-400",children:'"better-auth/plugins/organization"'})," ",n.jsx("br",{}),n.jsx("span",{className:"text-blue-400",children:"export const"})," ",n.jsx("span",{className:"text-yellow-300",children:"auth"})," ="," ",n.jsx("span",{className:"text-yellow-300",children:"betterAuth"}),"(","{"," ",n.jsx("br",{}),n.jsx("span",{className:"text-gray-500 pl-10",children:"// ... your existing configuration"})," ",n.jsx("br",{}),n.jsx("span",{className:"text-red-300 pl-10",children:"plugins"}),": [ ",n.jsx("br",{}),n.jsxs("span",{className:"text-yellow-300 pl-12",children:["organization(",")"]}),n.jsx("br",{}),n.jsx("span",{className:"pl-10",children:"]"})," ",n.jsx("br",{}),"}",") ",n.jsx("br",{})]})}),n.jsx("div",{className:"mt-4",children:n.jsx("p",{className:"text-gray-400 text-sm",children:"2. Do migrations to create the organizations table"})}),n.jsx("div",{className:"mt-2",children:n.jsx("p",{className:"text-gray-400 text-sm",children:"3. Restart your application to apply the changes"})})]}),l.availablePlugins&&l.availablePlugins.length>0&&n.jsx("div",{className:"mb-4",children:n.jsxs("p",{className:"text-gray-400 text-sm",children:["Currently enabled plugins: ",l.availablePlugins.join(", ")]})}),n.jsx(T,{onClick:()=>window.location.reload(),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Check Again"}),n.jsxs("div",{className:"mt-4 text-xs text-gray-500",children:["Need help? Check the"," ",n.jsx("a",{href:"https://better-auth.com/docs/plugins/organization",target:"_blank",rel:"noopener noreferrer",className:"text-white hover:underline",children:"Better Auth Organization Plugin Documentation"})]})]})]})})]}):n.jsxs("div",{className:"space-y-6 p-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs("h1",{className:"text-2xl text-white font-light",children:["Organizations (",r.length,")"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"Manage your organizations and teams"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs(T,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",onClick:Ye,children:[n.jsx(Ef,{className:"w-4 h-4 mr-2"}),"Export CSV"]}),n.jsxs(T,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",onClick:()=>W(!0),children:[n.jsx(Ie,{className:"w-4 h-4 mr-2"}),"Seed"]}),n.jsxs(T,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",onClick:()=>f(!0),children:[n.jsx(Lr,{className:"w-4 h-4 mr-2"}),"Create Team"]}),n.jsxs(T,{className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",onClick:()=>j(!0),children:[n.jsx(Lr,{className:"w-4 h-4 mr-2"}),"Add Organization"]})]})]}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"flex-1 relative",children:[n.jsx(Gr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),n.jsx(me,{placeholder:"Search organizations...",value:c,onChange:F=>d(F.target.value),className:"pl-10 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Jc,{className:"w-4 h-4 text-gray-400"}),n.jsxs(hs,{value:m,onValueChange:u,children:[n.jsx(ms,{children:n.jsx(fs,{})}),n.jsxs(xs,{children:[n.jsx(Dt,{value:"all",children:"All"}),n.jsx(Dt,{value:"active",children:"Active"}),n.jsx(Dt,{value:"inactive",children:"Inactive"})]})]})]})]}),n.jsxs("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none",children:[n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-dashed border-white/10",children:[n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Organization"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Slug"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Created"}),n.jsx("th",{className:"text-right py-4 px-4 text-white font-light",children:"Actions"})]})}),n.jsx("tbody",{children:Ot.length===0?n.jsx("tr",{children:n.jsx("td",{colSpan:4,className:"py-12 px-4 text-center",children:n.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[n.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:n.jsx(Le,{className:"w-8 h-8 text-white/50"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-white font-medium text-lg",children:"No organizations found"}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:c||m!=="all"?"Try adjusting your search or filter criteria":"Get started by creating your first organization"})]}),!c&&m==="all"&&n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs(T,{onClick:()=>j(!0),className:"bg-white text-black hover:bg-gray-200 rounded-none",children:[n.jsx(Lr,{className:"w-4 h-4 mr-2"}),"Create Organization"]}),n.jsxs(T,{onClick:()=>W(!0),className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",children:[n.jsx(Ie,{className:"w-4 h-4 mr-2"}),"Seed Data"]})]})]})})}):rn.map(F=>n.jsxs("tr",{className:"border-b border-dashed border-white/5 hover:bg-white/5 cursor-pointer",onClick:()=>e(`/organizations/${F.id}`),children:[n.jsx("td",{className:"py-4 px-4",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-10 h-10 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:n.jsx(Le,{className:"w-5 h-5 text-white"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:F.name}),n.jsxs("div",{className:"text-sm text-gray-400",children:["ID: ",F.id]})]})]})}),n.jsx("td",{className:"py-4 px-4 text-white",children:F.slug}),n.jsx("td",{className:"py-4 px-4 text-sm text-gray-400",children:n.jsxs("div",{className:"flex flex-col",children:[new Date(F.createdAt).toLocaleDateString(),n.jsx("p",{className:"text-xs",children:new Date(F.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})]})}),n.jsx("td",{className:"py-4 px-4 text-right",children:n.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[n.jsx(T,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:Q=>{Q.stopPropagation(),ge(F)},children:n.jsx(sl,{className:"w-4 h-4"})}),n.jsx(T,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:Q=>{Q.stopPropagation(),Ne(F)},children:n.jsx(wn,{className:"w-4 h-4"})}),n.jsx(T,{variant:"ghost",size:"sm",className:"text-red-400 hover:text-red-300 rounded-none",onClick:Q=>{Q.stopPropagation(),ve(F)},children:n.jsx(fn,{className:"w-4 h-4"})})]})})]},F.id))})]})}),n.jsx(yx,{currentPage:p,totalPages:bs,onPageChange:js,totalItems:Ot.length,startIndex:$e,endIndex:At})]}),J&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-2xl rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Seed Data"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>W(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Le,{className:"w-5 h-5 text-white"}),n.jsx("h4",{className:"text-white font-light",children:"Seed Organizations"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(xe,{htmlFor:"organization-count",className:"text-sm text-gray-400 font-light",children:"Number of organizations"}),n.jsx(me,{id:"organization-count",type:"number",min:"1",max:"100",defaultValue:"5",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsx(T,{onClick:()=>{var Q;const F=parseInt(((Q=document.getElementById("organization-count"))==null?void 0:Q.value)||"5");de(F)},disabled:ie,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:ie?n.jsxs(n.Fragment,{children:[n.jsx(st,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Ie,{className:"w-3 h-3 mr-2"}),"Seed Organizations"]})})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Lr,{className:"w-5 h-5 text-white"}),n.jsx("h4",{className:"text-white font-light",children:"Seed Teams"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(xe,{htmlFor:"team-count",className:"text-sm text-gray-400 font-light",children:"Number of teams"}),n.jsx(me,{id:"team-count",type:"number",min:"1",max:"100",defaultValue:"5",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsx(T,{onClick:()=>{var Q;const F=parseInt(((Q=document.getElementById("team-count"))==null?void 0:Q.value)||"5");we(F)},disabled:ie,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:ie?n.jsxs(n.Fragment,{children:[n.jsx(st,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Ie,{className:"w-3 h-3 mr-2"}),"Seed Teams"]})})]})]}),te.length>0&&n.jsx("div",{className:"mt-6",children:n.jsx(us,{title:"Organization Seeding Terminal",lines:te,isRunning:ie,className:"w-full",defaultCollapsed:!0})})]}),n.jsx("div",{className:"flex justify-end mt-6 pt-6 border-t border-dashed border-white/10",children:n.jsx(T,{variant:"outline",onClick:()=>W(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})}),x&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Create Team"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>f(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"team-name",className:"text-sm text-gray-400 font-light",children:"Team Name"}),n.jsx(me,{id:"team-name",value:O.name,onChange:F=>B(Q=>({...Q,name:F.target.value})),placeholder:"Enter team name",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"team-organization",className:"text-sm text-gray-400 font-light",children:"Organization"}),n.jsxs(hs,{value:O.organizationId,onValueChange:F=>B(Q=>({...Q,organizationId:F})),children:[n.jsx(ms,{className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none",children:n.jsx(fs,{placeholder:"Select organization"})}),n.jsx(xs,{children:r.map(F=>n.jsx(Dt,{value:F.id,children:F.name},F.id))})]})]})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>{f(!1),B({name:"",organizationId:""})},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:ir,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Create"})]})]})}),v&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Create Organization"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>j(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"create-name",className:"text-sm text-gray-400 font-light",children:"Name"}),n.jsx(me,{id:"create-name",value:_.name,onChange:F=>L(F.target.value),placeholder:"e.g. Acme Corp",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"create-slug",className:"text-sm text-gray-400 font-light",children:"Slug"}),n.jsx(me,{id:"create-slug",value:_.slug,onChange:F=>M(F.target.value),placeholder:"e.g. acme-corp",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Auto-generated from name. You can edit it manually."})]})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>{j(!1),S({name:"",slug:""})},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:Gt,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Create"})]})]})}),g&&q&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Edit Organization"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>N(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:n.jsx(Le,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:q.name}),n.jsx("div",{className:"text-sm text-gray-400",children:q.slug})]})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"edit-name",className:"text-sm text-gray-400 font-light",children:"Name"}),n.jsx(me,{id:"edit-name",value:z.name,onChange:F=>A(F.target.value),placeholder:"e.g. Acme Corp",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"edit-slug",className:"text-sm text-gray-400 font-light",children:"Slug"}),n.jsx(me,{id:"edit-slug",value:z.slug,onChange:F=>K(F.target.value),placeholder:"e.g. acme-corp",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"}),n.jsx("p",{className:"text-xs text-gray-500 mt-1",children:"Auto-generated from name. You can edit it manually."})]})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>{N(!1),b({name:"",slug:""})},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:lr,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update"})]})]})}),C&&q&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Delete Organization"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>P(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:n.jsx(Le,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:q.name}),n.jsx("div",{className:"text-sm text-gray-400",children:q.slug})]})]}),n.jsx("p",{className:"text-gray-400",children:"Are you sure you want to delete this organization? This action cannot be undone."})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>P(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:Lt,className:"bg-red-600 hover:bg-red-700 text-white border border-red-600 rounded-none",children:"Delete"})]})]})}),k&&q&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Organization Details"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>R(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:n.jsx(Le,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:q.name}),n.jsx("div",{className:"text-sm text-gray-400",children:q.slug})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"ID:"}),n.jsx("span",{className:"text-white text-sm",children:q.id})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"Created:"}),n.jsx("span",{className:"text-white text-sm",children:new Date(q.createdAt).toLocaleString()})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"Updated:"}),n.jsx("span",{className:"text-white text-sm",children:new Date(q.updatedAt).toLocaleString()})]})]})]}),n.jsx("div",{className:"flex justify-end mt-6",children:n.jsx(T,{onClick:()=>R(!1),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Close"})})]})})]})}function bx(){const e=En(),{refetchCounts:t}=qc(),[r,s]=h.useState([]),[a,i]=h.useState(!0),[l,o]=h.useState(""),[c,d]=h.useState("all"),[m,u]=h.useState(1),[p]=h.useState(20),[y,w]=h.useState(!1),[v,j]=h.useState(!1),[x,f]=h.useState(!1),[g,N]=h.useState(!1),[C,P]=h.useState(!1),[k,R]=h.useState(null),[J,W]=h.useState([]),[q,Y]=h.useState(!1);h.useEffect(()=>{te()},[]);const te=async()=>{try{const Z=await(await fetch("/api/users?limit=10000")).json();s(Z.users||[])}catch($){console.error("Failed to fetch users:",$)}finally{i(!1)}},ee=async $=>{W([]),Y(!0),W([{id:"start",type:"info",message:`Starting user seeding process for ${$} users...`,timestamp:new Date}]);try{const de=await(await fetch("/api/seed/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:$})})).json();if(de.success){const we=de.results.map((Ne,ve)=>Ne.success?{id:`user-${ve}`,type:"progress",message:`Creating user: ${Ne.user.name} (${Ne.user.email})`,timestamp:new Date,status:"completed"}:{id:`user-${ve}`,type:"error",message:`Failed to create user ${ve+1}: ${Ne.error}`,timestamp:new Date});W(Ne=>[...Ne,...we]);const ge=de.results.filter(Ne=>Ne.success).length;W(Ne=>[...Ne,{id:"complete",type:"success",message:`✅ Seeding completed! Created ${ge}/${$} users successfully`,timestamp:new Date}]),await te(),await t()}else W(we=>[...we,{id:"error",type:"error",message:`❌ Seeding failed: ${de.error||"Unknown error"}`,timestamp:new Date}])}catch(Z){W(de=>[...de,{id:"error",type:"error",message:`❌ Network error: ${Z}`,timestamp:new Date}])}finally{Y(!1)}},ie=$=>{R($),N(!0)},X=$=>{R($),j(!0)},_=$=>{R($),f(!0)},S=async()=>{var ge,Ne,ve;const $=(ge=document.getElementById("create-name"))==null?void 0:ge.value,Z=(Ne=document.getElementById("create-email"))==null?void 0:Ne.value,de=(ve=document.getElementById("create-password"))==null?void 0:ve.value;if(!$||!Z||!de){D.error("Please fill in all fields");return}const we=D.loading("Creating user...");try{const ir=await(await fetch("/api/users",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:$,email:Z,password:de})})).json();ir.success?(await te(),w(!1),document.getElementById("create-name").value="",document.getElementById("create-email").value="",document.getElementById("create-password").value="",D.success("User created successfully!",{id:we})):D.error(`Error creating user: ${ir.error||"Unknown error"}`,{id:we})}catch(Gt){console.error("Error creating user:",Gt),D.error("Error creating user",{id:we})}},O=async()=>{var we,ge;if(!k){D.error("No user selected");return}const $=(we=document.getElementById("edit-name"))==null?void 0:we.value,Z=(ge=document.getElementById("edit-email"))==null?void 0:ge.value;if(!$||!Z){D.error("Please fill in all fields");return}const de=D.loading("Updating user...");try{const ve=await(await fetch(`/api/users/${k.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:$,email:Z})})).json();ve.success?(await te(),j(!1),R(null),D.success("User updated successfully!",{id:de})):D.error(`Error updating user: ${ve.error||"Unknown error"}`,{id:de})}catch(Ne){console.error("Error updating user:",Ne),D.error("Error updating user",{id:de})}},B=async()=>{if(!k){D.error("No user selected");return}const $=D.loading("Deleting user...");try{const de=await(await fetch(`/api/users/${k.id}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})).json();de.success?(await te(),await t(),f(!1),R(null),D.success("User deleted successfully!",{id:$})):D.error(`Error deleting user: ${de.error||"Unknown error"}`,{id:$})}catch(Z){console.error("Error deleting user:",Z),D.error("Error deleting user",{id:$})}},z=()=>{if(r.length===0){D.error("No users to export");return}const $=["ID","Name","Email","Email Verified","Created At","Updated At"],Z=r.map(ve=>[ve.id,ve.name||"",ve.email||"",!!ve.emailVerified,new Date(ve.createdAt).toLocaleString(),new Date(ve.updatedAt).toLocaleString()]),de=[$.join(","),...Z.map(ve=>ve.map(Gt=>`"${Gt}"`).join(","))].join(`
|
|
363
|
-
`),we=new Blob([de],{type:"text/csv;charset=utf-8;"}),ge=document.createElement("a"),Ne=URL.createObjectURL(we);ge.setAttribute("href",Ne),ge.setAttribute("download",`users-export-${new Date().toISOString().split("T")[0]}.csv`),ge.style.visibility="hidden",document.body.appendChild(ge),ge.click(),document.body.removeChild(ge),D.success(`Exported ${r.length} users to CSV`)},b=r.filter($=>($.name.toLowerCase().includes(l.toLowerCase())||$.email.toLowerCase().includes(l.toLowerCase()))&&c==="all"),E=Math.ceil(b.length/p),L=(m-1)*p,M=L+p,A=b.slice(L,M),K=$=>{u($)};return a?n.jsx("div",{className:"flex items-center justify-center h-32",children:n.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[n.jsx(st,{className:"w-6 h-6 text-white animate-spin"}),n.jsx("div",{className:"text-white text-sm",children:"Loading users..."})]})}):n.jsxs("div",{className:"space-y-6 p-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs("h1",{className:"text-2xl text-white font-light",children:["Users (",r.length,")"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"Manage your application users"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs(T,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",onClick:z,children:[n.jsx(Ef,{className:"w-4 h-4 mr-2"}),"Export CSV"]}),n.jsxs(T,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",onClick:()=>P(!0),children:[n.jsx(Ie,{className:"w-4 h-4 mr-2"}),"Seed"]}),n.jsxs(T,{className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",onClick:()=>w(!0),children:[n.jsx(Hr,{className:"w-4 h-4 mr-2"}),"Add User"]})]})]}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"flex-1 relative",children:[n.jsx(Gr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),n.jsx(me,{placeholder:"Search users...",value:l,onChange:$=>o($.target.value),className:"pl-10 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Jc,{className:"w-4 h-4 text-gray-400"}),n.jsxs(hs,{value:c,onValueChange:d,children:[n.jsx(ms,{children:n.jsx(fs,{})}),n.jsxs(xs,{children:[n.jsx(Dt,{value:"all",children:"All"}),n.jsx(Dt,{value:"active",children:"Active"}),n.jsx(Dt,{value:"inactive",children:"Inactive"})]})]})]})]}),n.jsxs("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none",children:[n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-dashed border-white/10",children:[n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"User"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Email"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Email Verified"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Created"}),n.jsx("th",{className:"text-right py-4 px-4 text-white font-light",children:"Actions"})]})}),n.jsx("tbody",{children:A.length===0?n.jsx("tr",{children:n.jsx("td",{colSpan:5,className:"py-12 px-4 text-center",children:n.jsxs("div",{className:"flex flex-col items-center space-y-4",children:[n.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:n.jsx(he,{className:"w-8 h-8 text-white/50"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-white font-medium text-lg",children:"No users found"}),n.jsx("p",{className:"text-gray-400 text-sm mt-1",children:l||c!=="all"?"Try adjusting your search or filter criteria":"Get started by creating your first user or seeding some data"})]}),!l&&c==="all"&&n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs(T,{onClick:()=>w(!0),className:"bg-white text-black hover:bg-gray-200 rounded-none",children:[n.jsx(Hr,{className:"w-4 h-4 mr-2"}),"Create User"]}),n.jsxs(T,{onClick:()=>P(!0),className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",children:[n.jsx(Ie,{className:"w-4 h-4 mr-2"}),"Seed Data"]})]})]})})}):A.map($=>n.jsxs("tr",{className:"border-b border-dashed border-white/5 hover:bg-white/5 cursor-pointer",onClick:()=>e(`/users/${$.id}`),children:[n.jsx("td",{className:"py-4 px-4",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("img",{src:$.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${$.id}`,alt:$.name,className:"w-10 h-10 rounded-none border border-dashed border-white/20"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:$.name}),n.jsxs("div",{className:"text-sm text-gray-400",children:["ID: ",$.id]})]})]})}),n.jsx("td",{className:"py-4 px-4 text-white",children:$.email}),n.jsx("td",{className:"py-4 px-4",children:n.jsxs("div",{className:"flex items-center space-x-2",children:[$.emailVerified?n.jsx(C0,{className:"w-4 h-4 text-green-400"}):n.jsx(Et,{className:"w-4 h-4 text-yellow-400"}),n.jsx("span",{className:"text-sm text-gray-400",children:$.emailVerified?"Verified":"Not Verified"})]})}),n.jsx("td",{className:"py-4 px-4 text-sm text-gray-400",children:n.jsxs("div",{className:"flex flex-col",children:[new Date($.createdAt).toLocaleDateString(),n.jsx("p",{className:"text-xs",children:new Date($.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})})]})}),n.jsx("td",{className:"py-4 px-4 text-right",children:n.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[n.jsx(T,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:Z=>{Z.stopPropagation(),ie($)},children:n.jsx(sl,{className:"w-4 h-4"})}),n.jsx(T,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:Z=>{Z.stopPropagation(),X($)},children:n.jsx(wn,{className:"w-4 h-4"})}),n.jsx(T,{variant:"ghost",size:"sm",className:"text-red-400 hover:text-red-300 rounded-none",onClick:Z=>{Z.stopPropagation(),_($)},children:n.jsx(fn,{className:"w-4 h-4"})})]})})]},$.id))})]})}),n.jsx(yx,{currentPage:m,totalPages:E,onPageChange:K,totalItems:b.length,startIndex:L,endIndex:M})]}),C&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-2xl rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Seed Data"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>P(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(he,{className:"w-5 h-5 text-white"}),n.jsx("h4",{className:"text-white font-light",children:"Seed Users"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(xe,{htmlFor:"user-count",className:"text-sm text-gray-400 font-light",children:"Number of users"}),n.jsx(me,{id:"user-count",type:"number",min:"1",max:"100",defaultValue:"5",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsx(T,{onClick:()=>{var Z;const $=parseInt(((Z=document.getElementById("user-count"))==null?void 0:Z.value)||"5");ee($)},disabled:q,className:"bg-transparent hover:bg-white/90 bg-white text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:q?n.jsxs(n.Fragment,{children:[n.jsx(st,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Ie,{className:"w-3 h-3 mr-2"}),"Seed Users"]})})]})]}),J.length>0&&n.jsx("div",{className:"mt-6",children:n.jsx(us,{title:"User Seeding Terminal",lines:J,isRunning:q,className:"w-full",defaultCollapsed:!0})})]}),n.jsx("div",{className:"flex justify-end mt-6 pt-6 border-t border-dashed border-white/10",children:n.jsx(T,{variant:"outline",onClick:()=>P(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})}),y&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Create User"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>w(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"create-name",className:"text-sm text-gray-400 font-light",children:"Name"}),n.jsx(me,{id:"create-name",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"create-email",className:"text-sm text-gray-400 font-light",children:"Email"}),n.jsx(me,{id:"create-email",type:"email",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"create-password",className:"text-sm text-gray-400 font-light",children:"Password"}),n.jsx(me,{id:"create-password",type:"password",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>w(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:S,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Create"})]})]})}),v&&k&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Edit User"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>j(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("img",{src:k.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${k.id}`,alt:k.name,className:"w-16 h-16 rounded-none border border-dashed border-white/20"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:k.name}),n.jsx("div",{className:"text-sm text-gray-400",children:k.email})]})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"edit-name",className:"text-sm text-gray-400 font-light",children:"Name"}),n.jsx(me,{id:"edit-name",defaultValue:k.name,className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"edit-email",className:"text-sm text-gray-400 font-light",children:"Email"}),n.jsx(me,{id:"edit-email",type:"email",defaultValue:k.email,className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>j(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:O,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update"})]})]})}),x&&k&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Delete User"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>f(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("img",{src:k.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${k.id}`,alt:k.name,className:"w-16 h-16 rounded-none border border-dashed border-white/20"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:k.name}),n.jsx("div",{className:"text-sm text-gray-400",children:k.email})]})]}),n.jsx("p",{className:"text-gray-400",children:"Are you sure you want to delete this user? This action cannot be undone."})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>f(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:B,className:"bg-red-600 hover:bg-red-700 text-white border border-red-600 rounded-none",children:"Delete"})]})]})}),g&&k&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"User Details"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>N(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("img",{src:k.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${k.id}`,alt:k.name,className:"w-16 h-16 rounded-none border border-dashed border-white/20"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:k.name}),n.jsx("div",{className:"text-sm text-gray-400",children:k.email})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"ID:"}),n.jsx("span",{className:"text-white text-sm",children:k.id})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"Email Verified:"}),n.jsx("span",{className:"text-white text-sm",children:k.emailVerified?"Yes":"No"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"Created:"}),n.jsx("span",{className:"text-white text-sm",children:new Date(k.createdAt).toLocaleString()})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"Updated:"}),n.jsx("span",{className:"text-white text-sm",children:new Date(k.updatedAt).toLocaleString()})]})]})]}),n.jsx("div",{className:"flex justify-end mt-6",children:n.jsx(T,{onClick:()=>N(!1),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Close"})})]})})]})}function Pb(){const[e,t]=h.useState("overview"),r=()=>n.jsxs("div",{className:"space-y-8 animate-fade-in px-6 py-8",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl text-white font-normal",children:"Better Auth Studio"}),n.jsx("p",{className:"text-gray-400 mt-1 font-light",children:"Manage your authentication system"})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:[n.jsx(ot,{className:"border border-dashed border-white/20 bg-black/30 rounded-none hover:bg-black/50 transition-colors",children:n.jsxs(ct,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("div",{className:"p-3 bg-white/10 rounded-none",children:n.jsx(he,{className:"w-6 h-6 text-white"})}),n.jsx(le,{className:"bg-white/10 text-white border border-dashed border-white/20 rounded-none",children:"Active"})]}),n.jsx("h3",{className:"text-lg text-white font-light mb-2",children:"User Management"}),n.jsx("p",{className:"text-gray-400 font-light mb-4",children:"Manage user accounts, profiles, and permissions"}),n.jsxs(T,{onClick:()=>t("users"),className:"w-full bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:["Manage Users",n.jsx(Mn,{className:"w-4 h-4 ml-2"})]})]})}),n.jsx(ot,{className:"border border-dashed border-white/20 bg-black/30 rounded-none hover:bg-black/50 transition-colors",children:n.jsxs(ct,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("div",{className:"p-3 bg-white/10 rounded-none",children:n.jsx(Le,{className:"w-6 h-6 text-white"})}),n.jsx(le,{className:"bg-white/10 text-white border border-dashed border-white/20 rounded-none",children:"Active"})]}),n.jsx("h3",{className:"text-lg text-white font-light mb-2",children:"Organizations"}),n.jsx("p",{className:"text-gray-400 font-light mb-4",children:"Manage organizations, teams, and memberships"}),n.jsxs(T,{onClick:()=>t("organizations"),className:"w-full bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:["Manage Organizations",n.jsx(Mn,{className:"w-4 h-4 ml-2"})]})]})}),n.jsx(ot,{className:"border border-dashed border-white/20 bg-black/30 rounded-none hover:bg-black/50 transition-colors",children:n.jsxs(ct,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("div",{className:"p-3 bg-white/10 rounded-none",children:n.jsx(ts,{className:"w-6 h-6 text-white"})}),n.jsx(le,{className:"bg-white/10 text-white border border-dashed border-white/20 rounded-none",children:"Configured"})]}),n.jsx("h3",{className:"text-lg text-white font-light mb-2",children:"Configuration"}),n.jsx("p",{className:"text-gray-400 font-light mb-4",children:"View and manage auth configuration"}),n.jsxs(T,{variant:"outline",className:"w-full border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:["View Config",n.jsx(Mn,{className:"w-4 h-4 ml-2"})]})]})}),n.jsx(ot,{className:"border border-dashed border-white/20 bg-black/30 rounded-none hover:bg-black/50 transition-colors",children:n.jsxs(ct,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("div",{className:"p-3 bg-white/10 rounded-none",children:n.jsx(Ko,{className:"w-6 h-6 text-white"})}),n.jsx(le,{className:"bg-white/10 text-white border border-dashed border-white/20 rounded-none",children:"Coming Soon"})]}),n.jsx("h3",{className:"text-lg text-white font-light mb-2",children:"Analytics"}),n.jsx("p",{className:"text-gray-400 font-light mb-4",children:"View authentication analytics and insights"}),n.jsxs(T,{variant:"outline",disabled:!0,className:"w-full border border-dashed border-white/20 text-gray-400 rounded-none",children:["View Analytics",n.jsx(Mn,{className:"w-4 h-4 ml-2"})]})]})}),n.jsx(ot,{className:"border border-dashed border-white/20 bg-black/30 rounded-none hover:bg-black/50 transition-colors",children:n.jsxs(ct,{className:"p-6",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("div",{className:"p-3 bg-white/10 rounded-none",children:n.jsx(ui,{className:"w-6 h-6 text-white"})}),n.jsx(le,{className:"bg-white/10 text-white border border-dashed border-white/20 rounded-none",children:"Available"})]}),n.jsx("h3",{className:"text-lg text-white font-light mb-2",children:"Quick Actions"}),n.jsx("p",{className:"text-gray-400 font-light mb-4",children:"Common tasks and shortcuts"}),n.jsxs(T,{variant:"outline",className:"w-full border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:["View Actions",n.jsx(Mn,{className:"w-4 h-4 ml-2"})]})]})})]})]});return n.jsx("div",{className:"min-h-screen bg-black text-white",children:e==="overview"?r():e==="users"?n.jsx(bx,{}):e==="organizations"?n.jsx(wx,{}):r()})}function zb(){const{orgId:e}=Xc(),t=En(),[r,s]=h.useState(null),[a,i]=h.useState([]),[l,o]=h.useState([]),[c,d]=h.useState([]),[m,u]=h.useState(!0),[p,y]=h.useState("details"),[w,v]=h.useState(!1),[j,x]=h.useState(!1),[f,g]=h.useState(!1),[N,C]=h.useState(!1),[P,k]=h.useState(!1),[R,J]=h.useState(!1),[W,q]=h.useState(!1),[Y,te]=h.useState(!1),[ee,ie]=h.useState(null),[X,_]=h.useState(""),[S,O]=h.useState(""),[B,z]=h.useState([]),[b,E]=h.useState({name:""}),[L,M]=h.useState(!1),[A,K]=h.useState([]),[$,Z]=h.useState(!1),[de,we]=h.useState([]),[ge,Ne]=h.useState(!1);h.useEffect(()=>{e&&(Gt(),lr(),ir(),Ye(),Ot(),Lt())},[e]),h.useEffect(()=>{w&&e&&Lt()},[]),h.useEffect(()=>{p==="members"&&e&&Ot()},[p,e]),h.useEffect(()=>{p==="invitations"&&e&&Ye()},[p,e]);const ve=I=>{E({name:I})},Gt=async()=>{try{const G=await(await fetch(`/api/organizations/${e}`)).json();G.success&&G.organization||G.organization?s(G.organization):D.error("Organization not found")}catch(I){console.error("Failed to fetch organization:",I),D.error("Failed to load organization")}finally{u(!1)}},ir=async()=>{try{const G=await(await fetch("/api/plugins/teams/status")).json();v(G.organizationPlugin.options.teams.enabled)}catch(I){console.error("Failed to check teams status:",I),v(!1)}},lr=async()=>{try{const G=await(await fetch("/api/plugins/organization/status")).json();x(G.enabled)}catch(I){console.error("Failed to check organization status:",I),x(!1)}},Lt=async()=>{try{const G=await(await fetch(`/api/organizations/${e}/teams`)).json();G.success&&i(G.teams||[])}catch(I){console.error("Failed to fetch teams:",I),D.error("Failed to load teams")}},Ye=async()=>{try{const G=await(await fetch(`/api/organizations/${e}/invitations`)).json();G.success&&o(G.invitations||[])}catch(I){console.error("Failed to fetch invitations:",I),D.error("Failed to load invitations")}},Ot=async()=>{try{const G=await(await fetch(`/api/organizations/${e}/members`)).json();G.success&&d(G.members||[])}catch(I){console.error("Failed to fetch members:",I),D.error("Failed to load members")}},bs=async I=>{K([]),Z(!0),K([{id:"start",type:"info",message:`Starting member seeding process for ${I} members...`,timestamp:new Date}]);try{const ne=await(await fetch(`/api/organizations/${e}/seed-members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:I})})).json();if(ne.success){const We=ne.results.map((fe,or)=>fe.success?{id:`member-${or}`,type:"progress",message:`Adding member: ${fe.member.user.name} (${fe.member.user.email})`,timestamp:new Date,status:"completed"}:{id:`member-${or}`,type:"error",message:`Failed to add member ${or+1}: ${fe.error}`,timestamp:new Date});K(fe=>[...fe,...We]);const it=ne.results.filter(fe=>fe.success).length;K(fe=>[...fe,{id:"complete",type:"success",message:`✅ Seeding completed! Added ${it}/${I} members successfully`,timestamp:new Date}]),await Ot(),D.success(`Successfully added ${it} members!`)}else K(We=>[...We,{id:"error",type:"error",message:`❌ Seeding failed: ${ne.error||"Unknown error"}`,timestamp:new Date}]),D.error(ne.error||"Failed to seed members")}catch(G){K(ne=>[...ne,{id:"error",type:"error",message:`❌ Network error: ${G}`,timestamp:new Date}]),D.error("Failed to seed members")}finally{Z(!1)}},$e=async I=>{we([]),Ne(!0),we([{id:"start",type:"info",message:`Starting team seeding process for ${I} teams...`,timestamp:new Date}]);try{const ne=await(await fetch(`/api/organizations/${e}/seed-teams`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:I})})).json();if(ne.success){const We=ne.results.map((fe,or)=>fe.success?{id:`team-${or}`,type:"progress",message:`Creating team: ${fe.team.name}`,timestamp:new Date,status:"completed"}:{id:`team-${or}`,type:"error",message:`Failed to create team ${or+1}: ${fe.error}`,timestamp:new Date});we(fe=>[...fe,...We]);const it=ne.results.filter(fe=>fe.success).length;we(fe=>[...fe,{id:"complete",type:"success",message:`✅ Seeding completed! Created ${it}/${I} teams successfully`,timestamp:new Date}]),await Lt(),D.success(`Successfully created ${it} teams!`)}else we(We=>[...We,{id:"error",type:"error",message:`❌ Seeding failed: ${ne.error||"Unknown error"}`,timestamp:new Date}]),D.error(ne.error||"Failed to seed teams")}catch(G){we(ne=>[...ne,{id:"error",type:"error",message:`❌ Network error: ${G}`,timestamp:new Date}]),D.error("Failed to seed teams")}finally{Ne(!1)}},At=async()=>{try{const G=await(await fetch("/api/users/all")).json();G.success&&z(G.users||[])}catch(I){console.error("Failed to fetch users:",I)}},rn=()=>{At(),g(!0)},js=async()=>{if(!X){D.error("Please enter an email address");return}if(!S){D.error("Please select an inviter");return}M(!0);const I=D.loading("Sending invitation...");try{const ne=await(await fetch(`/api/organizations/${e}/invitations`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:X,role:"member",inviterId:S})})).json();ne.success?(await Ye(),g(!1),_(""),O(""),D.success("Invitation sent successfully!",{id:I})):D.error(`Error sending invitation: ${ne.error||"Unknown error"}`,{id:I})}catch(G){console.error("Error sending invitation:",G),D.error("Error sending invitation",{id:I})}finally{M(!1)}},F=async I=>{const G=D.loading("Cancelling invitation...");try{const We=await(await fetch(`/api/invitations/${I}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})).json();We.success?(await Ye(),D.success("Invitation cancelled successfully!",{id:G})):D.error(`Error cancelling invitation: ${We.error||"Unknown error"}`,{id:G})}catch(ne){console.error("Error cancelling invitation:",ne),D.error("Error cancelling invitation",{id:G})}},Q=async(I,G)=>{const ne=D.loading("Resending invitation...");try{const it=await(await fetch(`/api/invitations/${I}/resend`,{method:"POST",headers:{"Content-Type":"application/json"}})).json();it.success?(await Ye(),D.success(`Invitation resent to ${G}!`,{id:ne})):D.error(`Error resending invitation: ${it.error||"Unknown error"}`,{id:ne})}catch(We){console.error("Error resending invitation:",We),D.error("Error resending invitation",{id:ne})}},oe=async(I,G)=>{const ne=D.loading(`Removing ${G}...`);try{const it=await(await fetch(`/api/members/${I}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})).json();it.success?(await Ot(),D.success(`${G} removed from organization!`,{id:ne})):D.error(`Error removing member: ${it.error||"Unknown error"}`,{id:ne})}catch(We){console.error("Error removing member:",We),D.error("Error removing member",{id:ne})}},Ee=async()=>{if(!b.name){D.error("Please enter a team name");return}const I=D.loading("Creating team...");try{const ne=await(await fetch(`/api/organizations/${e}/teams`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:b.name,organizationId:e})})).json();ne.success?(await Lt(),J(!1),E({name:""}),D.success("Team created successfully!",{id:I})):D.error(`Error creating team: ${ne.error||"Unknown error"}`,{id:I})}catch(G){console.error("Error creating team:",G),D.error("Error creating team",{id:I})}},Fe=async()=>{if(!ee||!b.name){D.error("Please enter a team name");return}const I=D.loading("Updating team...");try{const ne=await(await fetch(`/api/teams/${ee.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:b.name})})).json();ne.success?(await Lt(),q(!1),ie(null),E({name:""}),D.success("Team updated successfully!",{id:I})):D.error(`Error updating team: ${ne.error||"Unknown error"}`,{id:I})}catch(G){console.error("Error updating team:",G),D.error("Error updating team",{id:I})}},ye=async()=>{if(!ee){D.error("No team selected");return}const I=D.loading("Deleting team...");try{const ne=await(await fetch(`/api/teams/${ee.id}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})).json();ne.success?(await Lt(),te(!1),ie(null),D.success("Team deleted successfully!",{id:I})):D.error(`Error deleting team: ${ne.error||"Unknown error"}`,{id:I})}catch(G){console.error("Error deleting team:",G),D.error("Error deleting team",{id:I})}},Te=I=>{ie(I),E({name:I.name}),q(!0)},Ns=I=>{ie(I),te(!0)};return m?n.jsx("div",{className:"flex items-center justify-center h-32",children:n.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[n.jsx(st,{className:"w-6 h-6 text-white animate-spin"}),n.jsx("div",{className:"text-white text-sm",children:"Loading organization details..."})]})}):r?n.jsxs("div",{className:"space-y-6 p-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"flex items-center space-x-4",children:n.jsx(es,{to:"/organizations",children:n.jsxs(T,{variant:"ghost",className:"text-gray-400 hover:text-white rounded-none",children:[n.jsx(pa,{className:"w-4 h-4 mr-2"}),"Back to Organizations"]})})}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs(T,{onClick:()=>C(!0),className:"border border-dashed border-white/20 text-white bg-transparent hover:bg-white/10 rounded-none",children:[n.jsx(he,{className:"w-4 h-4 mr-2"}),"Seed Members"]}),n.jsxs(T,{onClick:rn,className:"border border-dashed border-white/20 text-white bg-transparent hover:bg-white/10 rounded-none",children:[n.jsx(Et,{className:"w-4 h-4 mr-2"}),"Invite User"]}),n.jsxs(T,{className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:[n.jsx(wn,{className:"w-4 h-4 mr-2"}),"Edit Organization"]})]})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-12 h-12 bg-white/10 border border-dashed border-white/20 rounded-none flex items-center justify-center",children:n.jsx(Le,{className:"w-6 h-6 text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl text-white font-light",children:r.name}),n.jsx("p",{className:"text-gray-400",children:r.slug})]})]}),n.jsx("div",{className:"border-b border-white/10",children:n.jsxs("nav",{className:"flex space-x-8",children:[n.jsxs("button",{onClick:()=>y("details"),className:`flex items-center space-x-2 px-3 py-4 text-sm font-medium border-b-2 transition-all duration-200 ${p==="details"?"border-white text-white":"border-transparent text-gray-400 hover:text-white hover:border-gray-300"}`,children:[n.jsx(Le,{className:"w-4 h-4"}),n.jsx("span",{children:"Details"}),n.jsx(le,{variant:"secondary",className:"text-xs bg-white/10 border border-white/20 rounded-sm",children:c.length+l.length+a.length})]}),n.jsxs("button",{onClick:()=>y("members"),className:`flex items-center space-x-2 px-3 py-4 text-sm font-medium border-b-2 transition-all duration-200 ${p==="members"?"border-white text-white":"border-transparent text-gray-400 hover:text-white hover:border-gray-300"}`,children:[n.jsx(he,{className:"w-4 h-4"}),n.jsx("span",{children:"Members"}),c.length>0&&n.jsx(le,{variant:"secondary",className:"text-xs bg-white/10 border border-white/20 rounded-sm",children:c.length})]}),n.jsxs("button",{onClick:()=>y("invitations"),className:`flex items-center space-x-2 px-3 py-4 text-sm font-medium border-b-2 transition-all duration-200 ${p==="invitations"?"border-white text-white":"border-transparent text-gray-400 hover:text-white hover:border-gray-300"}`,children:[n.jsx(Et,{className:"w-4 h-4"}),n.jsx("span",{children:"Invitations"}),l.length>0&&n.jsx(le,{variant:"secondary",className:"text-xs bg-white/10 border border-white/20 rounded-sm",children:l.length})]}),n.jsxs("button",{onClick:()=>y("teams"),className:`flex items-center space-x-2 px-3 py-4 text-sm font-medium border-b-2 transition-all duration-200 ${p==="teams"?"border-white text-white":"border-transparent text-gray-400 hover:text-white hover:border-gray-300"}`,children:[n.jsx(he,{className:"w-4 h-4"}),n.jsx("span",{children:"Teams"}),a.length>0&&n.jsx(le,{variant:"secondary",className:"text-xs bg-white/10 border border-white/20 rounded-sm",children:a.length})]})]})}),p==="details"&&n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-6",children:[n.jsx("h3",{className:"text-lg text-white font-light mb-4",children:"Organization Information"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-sm text-gray-400 font-light",children:"Name"}),n.jsx("p",{className:"text-white mt-1",children:r.name})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-sm text-gray-400 font-light",children:"Slug"}),n.jsx("p",{className:"text-white mt-1",children:r.slug})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-sm text-gray-400 font-light",children:"Created"}),n.jsx("p",{className:"text-white mt-1",children:new Date(r.createdAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-sm text-gray-400 font-light",children:"Last Updated"}),n.jsx("p",{className:"text-white mt-1",children:new Date(r.updatedAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-6",children:[n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-6",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(he,{className:"w-8 h-8 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-2xl text-white font-light",children:c.length}),n.jsx("p",{className:"text-sm text-gray-400",children:"Members"})]})]})}),n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-6",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(he,{className:"w-8 h-8 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-2xl text-white font-light",children:a.length}),n.jsx("p",{className:"text-sm text-gray-400",children:"Teams"})]})]})}),n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-6",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Et,{className:"w-8 h-8 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-2xl text-white font-light",children:l.length}),n.jsx("p",{className:"text-sm text-gray-400",children:"Invitations"})]})]})}),n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-6",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx($i,{className:"w-8 h-8 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-2xl text-white font-light",children:Math.ceil((new Date().getTime()-new Date(r.createdAt).getTime())/(1e3*60*60*24))}),n.jsx("p",{className:"text-sm text-gray-400",children:"Days Active"})]})]})})]})]}),p==="teams"&&n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs("h3",{className:"text-lg text-white font-light",children:["Teams (",a.length,")"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"Manage teams within this organization"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs(T,{onClick:()=>k(!0),className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",children:[n.jsx(Ie,{className:"w-4 h-4 mr-2"}),"Seed Teams"]}),n.jsxs(T,{onClick:()=>J(!0),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:[n.jsx(Hr,{className:"w-4 h-4 mr-2"}),"Create Team"]})]})]}),w?a.length>0?n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none",children:n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-dashed border-white/10",children:[n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Team"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Members"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Created"}),n.jsx("th",{className:"text-right py-4 px-4 text-white font-light",children:"Actions"})]})}),n.jsx("tbody",{children:a.map(I=>n.jsxs("tr",{className:"border-b border-dashed border-white/5 hover:bg-white/5 cursor-pointer",onClick:()=>t(`/organizations/${e}/teams/${I.id}`),children:[n.jsx("td",{className:"py-4 px-4",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-10 h-10 bg-white/10 border border-dashed border-white/20 rounded-none flex items-center justify-center",children:n.jsx(he,{className:"w-5 h-5 text-white"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:I.name}),n.jsxs("div",{className:"text-sm text-gray-400",children:["Team ID: ",I.id]})]})]})}),n.jsx("td",{className:"py-4 px-4 text-white",children:I.memberCount||0}),n.jsx("td",{className:"py-4 px-4 text-sm text-gray-400",children:new Date(I.createdAt).toLocaleDateString()}),n.jsx("td",{className:"py-4 px-4 text-right",children:n.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[n.jsxs(T,{variant:"outline",size:"sm",className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",onClick:G=>{G.stopPropagation(),Te(I)},children:[n.jsx(wn,{className:"w-4 h-4 mr-1"}),"Edit"]}),n.jsxs(T,{variant:"outline",size:"sm",className:"border border-dashed border-red-400/50 text-red-400 hover:bg-red-400/10 rounded-none",onClick:G=>{G.stopPropagation(),Ns(I)},children:[n.jsx(fn,{className:"w-4 h-4 mr-1"}),"Delete"]})]})})]},I.id))})]})})}):n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-12",children:n.jsxs("div",{className:"text-center",children:[n.jsx(he,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("h3",{className:"text-xl text-white font-light mb-2",children:"No Teams Yet"}),n.jsx("p",{className:"text-gray-400 mb-6",children:"Create your first team to start organizing members within this organization."}),n.jsxs(T,{onClick:()=>J(!0),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:[n.jsx(Hr,{className:"w-4 h-4 mr-2"}),"Create First Team"]})]})}):n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-8",children:n.jsxs("div",{className:"flex items-start space-x-4",children:[n.jsx("div",{className:"flex-shrink-0",children:n.jsx(he,{className:"w-12 h-12 text-white"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h3",{className:"text-xl text-white font-light mb-2",children:"Teams Feature Required"}),n.jsx("p",{className:"text-gray-300 mb-6",children:"To use Teams in Better Auth Studio, you need to enable the teams feature in your organization plugin configuration."}),n.jsxs("div",{className:"bg-black/50 border border-dashed border-white/20 rounded-none p-4 mb-6",children:[n.jsx("h4",{className:"text-white font-light mb-3",children:"Follow these steps:"}),n.jsx("ol",{className:"text-gray-300 space-y-2 text-sm list-decimal list-inside",children:n.jsx("li",{children:"Update your auth configuration file to enable teams:"})}),n.jsx("div",{className:"mt-4 bg-black/70 border border-dashed border-white/10 rounded-none p-3 overflow-x-auto",children:n.jsxs("pre",{className:"text-sm text-gray-300",children:[n.jsx("span",{className:"text-blue-400",children:"import"})," ","{ betterAuth }"," ",n.jsx("span",{className:"text-blue-400",children:"from"})," ",n.jsx("span",{className:"text-green-400",children:'"better-auth"'})," ",n.jsx("br",{}),n.jsx("span",{className:"text-blue-400",children:"import"})," ","{ organization }"," ",n.jsx("span",{className:"text-blue-400",children:"from"})," ",n.jsx("span",{className:"text-green-400",children:'"better-auth/plugins/organization"'})," ",n.jsx("br",{}),n.jsx("span",{className:"text-blue-400",children:"export const"})," ",n.jsx("span",{className:"text-yellow-300",children:"auth"})," ="," ",n.jsx("span",{className:"text-yellow-300",children:"betterAuth"}),"(","{"," ",n.jsx("br",{}),n.jsx("span",{className:"text-gray-500 pl-10",children:"// ... your existing configuration"})," ",n.jsx("br",{}),n.jsx("span",{className:"text-red-300 pl-10",children:"plugins"}),": [ ",n.jsx("br",{}),n.jsx("span",{className:"text-yellow-300 pl-12",children:"organization"}),"(","{"," ",n.jsx("br",{}),n.jsx("span",{className:"text-red-300 pl-16",children:"teams"}),": ","{"," ",n.jsx("br",{}),n.jsx("span",{className:"text-yellow-300 pl-20",children:"enabled"}),":"," ",n.jsx("span",{className:"text-blue-400",children:"true"})," ",n.jsx("br",{}),n.jsx("span",{className:"pl-16",children:"}"})," ",n.jsx("br",{}),n.jsx("span",{className:"pl-12",children:"})"})," ",n.jsx("br",{}),n.jsx("span",{className:"pl-10",children:"]"})," ",n.jsx("br",{}),"}",") ",n.jsx("br",{})]})}),n.jsx("div",{className:"mt-4",children:n.jsx("p",{className:"text-gray-400 text-sm",children:"2. Run migrations to create the teams table"})}),n.jsx("div",{className:"mt-2",children:n.jsx("p",{className:"text-gray-400 text-sm",children:"3. Restart your application to apply the changes"})})]}),n.jsx(T,{onClick:()=>window.location.reload(),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Check Again"}),n.jsxs("div",{className:"mt-4 text-xs text-gray-500",children:["Need help? Check the"," ",n.jsx("a",{href:"https://better-auth.com/docs/plugins/organization",target:"_blank",rel:"noopener noreferrer",className:"text-white hover:underline",children:"Better Auth Organization Plugin Documentation"})]})]})]})})]}),p==="members"&&n.jsxs("div",{className:"space-y-6",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("div",{children:[n.jsxs("h3",{className:"text-lg text-white font-light",children:["Members (",c.length,")"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"Manage organization members and their roles"})]})}),c.length>0?n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none",children:n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-dashed border-white/10",children:[n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"User"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Email"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Role"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Joined"}),n.jsx("th",{className:"text-right py-4 px-4 text-white font-light",children:"Actions"})]})}),n.jsx("tbody",{children:c.map(I=>n.jsxs("tr",{className:"border-b border-dashed border-white/5 hover:bg-white/5",children:[n.jsx("td",{className:"py-4 px-4",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("img",{src:I.user.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${I.user.id}`,alt:I.user.name,className:"w-10 h-10 rounded-none border border-dashed border-white/20"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:I.user.name}),n.jsxs("div",{className:"text-sm text-gray-400",children:["ID: ",I.user.id]})]})]})}),n.jsx("td",{className:"py-4 px-4 text-white",children:I.user.email}),n.jsx("td",{className:"py-4 px-4",children:n.jsx(le,{variant:"secondary",className:"text-xs bg-blue-900/10 border border-dashed rounded-none border-blue-500/30 text-blue-400/70 capitalize",children:I.role})}),n.jsx("td",{className:"py-4 px-4 text-sm text-gray-400",children:new Date(I.joinedAt).toLocaleDateString()}),n.jsx("td",{className:"py-4 px-4 text-right",children:n.jsx("div",{className:"flex items-center justify-end space-x-2",children:n.jsxs(T,{variant:"outline",size:"sm",className:"border border-dashed border-red-400/50 text-red-400 hover:bg-red-400/10 rounded-none",onClick:()=>oe(I.id,I.user.name),children:[n.jsx(fn,{className:"w-4 h-4 mr-1"}),"Remove"]})})})]},I.id))})]})})}):n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-12",children:n.jsxs("div",{className:"text-center",children:[n.jsx(he,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("h3",{className:"text-xl text-white font-light mb-2",children:"No Members Yet"}),n.jsx("p",{className:"text-gray-400 mb-6",children:"Invite users or seed members from existing users to get started."}),n.jsxs("div",{className:"flex items-center justify-center space-x-3",children:[n.jsxs(T,{onClick:()=>C(!0),className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",children:[n.jsx(he,{className:"w-4 h-4 mr-2"}),"Seed Members"]}),n.jsxs(T,{onClick:rn,className:"bg-white text-white hover:bg-white/90 bg-transparent border border-white/20 rounded-none",children:[n.jsx(Et,{className:"w-4 h-4 mr-2"}),"Invite User"]})]})]})})]}),p==="invitations"&&n.jsxs("div",{className:"space-y-6",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("div",{children:[n.jsxs("h3",{className:"text-lg text-white font-light",children:["Invitations (",l.length,")"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"Manage pending invitations to this organization"})]})}),l.length>0?n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none",children:n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-dashed border-white/10",children:[n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Email"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Role"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Status"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Expires"}),n.jsx("th",{className:"text-right py-4 px-4 text-white font-light",children:"Actions"})]})}),n.jsx("tbody",{children:l.map(I=>n.jsxs("tr",{className:"border-b border-dashed border-white/5 hover:bg-white/5",children:[n.jsx("td",{className:"py-4 px-4",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-10 h-10 bg-white/10 border border-dashed border-white/20 rounded-none flex items-center justify-center",children:n.jsx(Et,{className:"w-5 h-5 text-white"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:I.email}),n.jsxs("div",{className:"text-sm text-gray-400",children:["Expires on"," ",new Date(I.expiresAt).toLocaleDateString("en-US",{month:"short",year:"numeric",day:"numeric"})]})]})]})}),n.jsx("td",{className:"py-4 px-4 text-white capitalize",children:I.role}),n.jsx("td",{className:"py-4 px-4",children:n.jsxs(le,{variant:"secondary",className:`text-xs font-normal rounded-none border-dashed flex items-center gap-1 w-fit ${I.status==="pending"?"bg-yellow-900/10 border border-yellow-500/30 text-yellow-400/70":I.status==="accepted"?"bg-green-900/10 border border-green-500/30 text-green-400/70":"bg-red-900/10 border border-red-500/30 text-red-400/70"}`,children:[I.status==="pending"&&n.jsx(pr,{className:"w-3 h-3"}),I.status==="accepted"&&n.jsx(Ue,{className:"w-3 h-3"}),I.status==="expired"&&n.jsx(be,{className:"w-3 h-3"}),I.status]})}),n.jsxs("td",{className:"py-4 px-4 text-sm text-gray-400",children:[new Date(I.expiresAt).toLocaleDateString(),n.jsx("br",{}),n.jsx("span",{className:"text-xs text-gray-400",children:new Date(I.expiresAt).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),n.jsx("td",{className:"py-4 px-4 text-right",children:n.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[n.jsxs(T,{variant:"outline",size:"sm",className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",onClick:()=>Q(I.id,I.email),children:[n.jsx(zu,{className:"w-4 h-4 mr-1"}),"Resend"]}),n.jsxs(T,{variant:"outline",size:"sm",className:"border border-dashed border-red-400/50 text-red-400 hover:bg-red-400/10 rounded-none",onClick:()=>F(I.id),children:[n.jsx(fn,{className:"w-4 h-4 mr-1"}),"Cancel"]})]})})]},I.id))})]})})}):n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-12",children:n.jsxs("div",{className:"text-center",children:[n.jsx(Et,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("h3",{className:"text-xl text-white font-light mb-2",children:"No Invitations"}),n.jsx("p",{className:"text-gray-400 mb-6",children:"Start inviting users to join this organization."}),n.jsxs(T,{onClick:rn,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:[n.jsx(Et,{className:"w-4 h-4 mr-2"}),"Send First Invitation"]})]})})]}),f&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Invite User"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>{g(!1),_(""),O("")},className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"invite-email",className:"text-sm text-gray-400 font-light",children:"Email Address"}),n.jsx(me,{id:"invite-email",type:"email",value:X,onChange:I=>_(I.target.value),placeholder:"user@example.com",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"inviter-select",className:"text-sm text-gray-400 font-light",children:"Inviter"}),n.jsxs(hs,{value:S,onValueChange:O,children:[n.jsx(ms,{children:n.jsx(fs,{placeholder:"Select an inviter..."})}),n.jsx(xs,{children:B.map(I=>n.jsx(Dt,{value:I.id,children:n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx("img",{src:I.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${I.id}`,alt:I.name,className:"w-6 h-6 rounded-none border border-dashed border-white/20"}),n.jsxs("span",{children:[I.name," (",I.email,")"]})]})},I.id))})]})]})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>{g(!1),_(""),O("")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsxs(T,{onClick:js,disabled:L,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none disabled:opacity-50",children:[L?n.jsx(st,{className:"w-3 h-3 mr-2 animate-spin"}):n.jsx(zu,{className:"w-4 h-4 mr-2"}),L?"Sending...":"Send Invitation"]})]})]})}),R&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Create Team"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>{J(!1),E({name:""})},className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsx("div",{className:"space-y-4",children:n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"team-name",className:"text-sm text-gray-400 font-light",children:"Team Name"}),n.jsx(me,{id:"team-name",value:b.name,onChange:I=>ve(I.target.value),placeholder:"e.g. Development Team",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]})}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>{J(!1),E({name:""})},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:Ee,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Create Team"})]})]})}),W&&ee&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Edit Team"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>{q(!1),E({name:""})},className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-16 h-16 bg-white/10 border border-dashed border-white/20 rounded-none flex items-center justify-center",children:n.jsx(he,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:ee.name}),n.jsxs("div",{className:"text-sm text-gray-400",children:["Team ID: ",ee.id]})]})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"edit-team-name",className:"text-sm text-gray-400 font-light",children:"Team Name"}),n.jsx(me,{id:"edit-team-name",value:b.name,onChange:I=>ve(I.target.value),placeholder:"e.g. Development Team",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>{q(!1),E({name:""})},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:Fe,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update Team"})]})]})}),Y&&ee&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Delete Team"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>te(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-16 h-16 bg-white/10 border border-dashed border-white/20 rounded-none flex items-center justify-center",children:n.jsx(he,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:ee.name}),n.jsxs("div",{className:"text-sm text-gray-400",children:["Team ID: ",ee.id]})]})]}),n.jsx("p",{className:"text-gray-400",children:"Are you sure you want to delete this team? This action cannot be undone."})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>te(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:ye,className:"bg-red-600 hover:bg-red-700 text-white border border-red-600 rounded-none",children:"Delete Team"})]})]})}),N&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-2xl rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Seed Members"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>C(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(he,{className:"w-5 h-5 text-white"}),n.jsx("h4",{className:"text-white font-light",children:"Add Members from Existing Users"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(xe,{htmlFor:"member-count",className:"text-sm text-gray-400 font-light",children:"Number of members to add"}),n.jsx(me,{id:"member-count",type:"number",min:"1",max:"50",defaultValue:"5",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsx(T,{onClick:()=>{var G;const I=parseInt(((G=document.getElementById("member-count"))==null?void 0:G.value)||"5");bs(I)},disabled:$,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:$?n.jsxs(n.Fragment,{children:[n.jsx(st,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):n.jsxs(n.Fragment,{children:[n.jsx(he,{className:"w-3 h-3 mr-2"}),"Seed Members"]})})]})]}),A.length>0&&n.jsx("div",{className:"mt-6",children:n.jsx(us,{title:"Member Seeding Terminal",lines:A,isRunning:$,className:"w-full",defaultCollapsed:!0})})]}),n.jsx("div",{className:"flex justify-end mt-6 pt-6 border-t border-dashed border-white/10",children:n.jsx(T,{variant:"outline",onClick:()=>C(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})}),P&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-2xl rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Seed Teams"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>k(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Le,{className:"w-5 h-5 text-white"}),n.jsx("h4",{className:"text-white font-light",children:"Create Teams"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(xe,{htmlFor:"team-count",className:"text-sm text-gray-400 font-light",children:"Number of teams to create"}),n.jsx(me,{id:"team-count",type:"number",min:"1",max:"20",defaultValue:"3",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsx(T,{onClick:()=>{var G;const I=parseInt(((G=document.getElementById("team-count"))==null?void 0:G.value)||"3");$e(I)},disabled:ge,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:ge?n.jsxs(n.Fragment,{children:[n.jsx(st,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Le,{className:"w-3 h-3 mr-2"}),"Seed Teams"]})})]})]}),de.length>0&&n.jsx("div",{className:"mt-6",children:n.jsx(us,{title:"Team Seeding Terminal",lines:de,isRunning:ge,className:"w-full",defaultCollapsed:!0})})]}),n.jsx("div",{className:"flex justify-end mt-6 pt-6 border-t border-dashed border-white/10",children:n.jsx(T,{variant:"outline",onClick:()=>k(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})})]}):n.jsxs("div",{className:"space-y-6 p-6",children:[n.jsx("div",{className:"flex items-center space-x-4",children:n.jsx(es,{to:"/organizations",children:n.jsxs(T,{variant:"ghost",className:"text-gray-400 hover:text-white rounded-none",children:[n.jsx(pa,{className:"w-4 h-4 mr-2"}),"Back to Organizations"]})})}),n.jsx("br",{}),n.jsxs("div",{className:"text-center py-12",children:[n.jsx(Le,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("h2",{className:"text-xl text-white font-light mb-2",children:"Organization Not Found"}),n.jsx("p",{className:"text-gray-400",children:"The organization you're looking for doesn't exist."})]})]})}function Db(){const[e,t]=h.useState([]),[r,s]=h.useState(!0),[a,i]=h.useState(""),[l,o]=h.useState("all"),[c,d]=h.useState(!1),[m,u]=h.useState(!1),[p,y]=h.useState(!1),[w,v]=h.useState(!1),[j,x]=h.useState(!1),[f,g]=h.useState(null),[N,C]=h.useState([]),[P,k]=h.useState(!1);h.useEffect(()=>{R()},[]);const R=async()=>{try{const O=await(await fetch("/api/sessions")).json();t(O.sessions||[])}catch(S){console.error("Failed to fetch sessions:",S)}finally{s(!1)}},J=async S=>{C([]),k(!0),C([{id:"start",type:"info",message:`Starting session seeding process for ${S} sessions...`,timestamp:new Date}]);try{const B=await(await fetch("/api/seed/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:S})})).json();if(B.success){const z=B.results.map((E,L)=>E.success?{id:`session-${L}`,type:"progress",message:`Creating session: ${E.session.id}`,timestamp:new Date,status:"completed"}:{id:`session-${L}`,type:"error",message:`Failed to create session ${L+1}: ${E.error}`,timestamp:new Date});C(E=>[...E,...z]);const b=B.results.filter(E=>E.success).length;C(E=>[...E,{id:"complete",type:"success",message:`✅ Seeding completed! Created ${b}/${S} sessions successfully`,timestamp:new Date}]),await R()}else C(z=>[...z,{id:"error",type:"error",message:`❌ Seeding failed: ${B.error||"Unknown error"}`,timestamp:new Date}])}catch(O){C(B=>[...B,{id:"error",type:"error",message:`❌ Network error: ${O}`,timestamp:new Date}])}finally{k(!1)}},W=async S=>{C([]),k(!0),C([{id:"start",type:"info",message:`Starting account seeding process for ${S} accounts...`,timestamp:new Date}]);try{const B=await(await fetch("/api/seed/accounts",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:S})})).json();if(B.success){const z=B.results.map((E,L)=>E.success?{id:`account-${L}`,type:"progress",message:`Creating account: ${E.account.provider}`,timestamp:new Date,status:"completed"}:{id:`account-${L}`,type:"error",message:`Failed to create account ${L+1}: ${E.error}`,timestamp:new Date});C(E=>[...E,...z]);const b=B.results.filter(E=>E.success).length;C(E=>[...E,{id:"complete",type:"success",message:`✅ Seeding completed! Created ${b}/${S} accounts successfully`,timestamp:new Date}]),await R()}else C(z=>[...z,{id:"error",type:"error",message:`❌ Seeding failed: ${B.error||"Unknown error"}`,timestamp:new Date}])}catch(O){C(B=>[...B,{id:"error",type:"error",message:`❌ Network error: ${O}`,timestamp:new Date}])}finally{k(!1)}},q=S=>{g(S),v(!0)},Y=S=>{g(S),u(!0)},te=S=>{g(S),y(!0)},ee=async S=>{console.log("Creating session:",S),d(!1)},ie=async S=>{console.log("Updating session:",S),u(!1)},X=async()=>{console.log("Deleting session:",f==null?void 0:f.id),y(!1)},_=e.filter(S=>{const O=S.id.toLowerCase().includes(a.toLowerCase())||S.userId.toLowerCase().includes(a.toLowerCase()),B=l==="all"||l==="active"&&new Date(S.expiresAt)>new Date||l==="expired"&&new Date(S.expiresAt)<=new Date;return O&&B});return r?n.jsx("div",{className:"flex items-center justify-center h-32",children:n.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[n.jsx(st,{className:"w-6 h-6 text-white animate-spin"}),n.jsx("div",{className:"text-white text-sm",children:"Loading sessions..."})]})}):n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsxs("h1",{className:"text-2xl text-white font-light",children:["Sessions (",e.length,")"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"Manage user sessions and accounts"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs(T,{className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",onClick:()=>x(!0),children:[n.jsx(Ie,{className:"w-4 h-4 mr-2"}),"Seed"]}),n.jsxs(T,{className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",onClick:()=>d(!0),children:[n.jsx(Lr,{className:"w-4 h-4 mr-2"}),"Add Session"]})]})]}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"flex-1 relative",children:[n.jsx(Gr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),n.jsx(me,{placeholder:"Search sessions...",value:a,onChange:S=>i(S.target.value),className:"pl-10 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Jc,{className:"w-4 h-4 text-gray-400"}),n.jsxs(hs,{value:l,onValueChange:o,children:[n.jsx(ms,{children:n.jsx(fs,{})}),n.jsxs(xs,{children:[n.jsx(Dt,{value:"all",children:"All"}),n.jsx(Dt,{value:"active",children:"Active"}),n.jsx(Dt,{value:"expired",children:"Expired"})]})]})]})]}),n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none",children:n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-dashed border-white/10",children:[n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Session"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"User ID"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Status"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Expires"}),n.jsx("th",{className:"text-right py-4 px-4 text-white font-light",children:"Actions"})]})}),n.jsx("tbody",{children:_.map(S=>n.jsxs("tr",{className:"border-b border-dashed border-white/5 hover:bg-white/5",children:[n.jsx("td",{className:"py-4 px-4",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-10 h-10 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:n.jsx(Ie,{className:"w-5 h-5 text-white"})}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-white font-light",children:["Session ",S.id.slice(0,8),"..."]}),n.jsxs("div",{className:"text-sm text-gray-400",children:["ID: ",S.id]})]})]})}),n.jsx("td",{className:"py-4 px-4 text-white",children:S.userId}),n.jsx("td",{className:"py-4 px-4",children:n.jsxs("div",{className:"flex items-center space-x-2",children:[new Date(S.expiresAt)>new Date?n.jsx("div",{className:"w-2 h-2 bg-green-400 rounded-full"}):n.jsx("div",{className:"w-2 h-2 bg-red-400 rounded-full"}),n.jsx("span",{className:"text-sm text-gray-400",children:new Date(S.expiresAt)>new Date?"Active":"Expired"})]})}),n.jsx("td",{className:"py-4 px-4 text-sm text-gray-400",children:new Date(S.expiresAt).toLocaleDateString()}),n.jsx("td",{className:"py-4 px-4 text-right",children:n.jsxs("div",{className:"flex items-center justify-end space-x-2",children:[n.jsx(T,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:()=>q(S),children:n.jsx(sl,{className:"w-4 h-4"})}),n.jsx(T,{variant:"ghost",size:"sm",className:"text-gray-400 hover:text-white rounded-none",onClick:()=>Y(S),children:n.jsx(wn,{className:"w-4 h-4"})}),n.jsx(T,{variant:"ghost",size:"sm",className:"text-red-400 hover:text-red-300 rounded-none",onClick:()=>te(S),children:n.jsx(fn,{className:"w-4 h-4"})})]})})]},S.id))})]})})}),j&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-2xl rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Seed Data"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>x(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Ie,{className:"w-5 h-5 text-white"}),n.jsx("h4",{className:"text-white font-light",children:"Seed Sessions"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(xe,{htmlFor:"session-count",className:"text-sm text-gray-400 font-light",children:"Number of sessions"}),n.jsx(me,{id:"session-count",type:"number",min:"1",max:"100",defaultValue:"5",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsx(T,{onClick:()=>{var O;const S=parseInt(((O=document.getElementById("session-count"))==null?void 0:O.value)||"5");J(S)},disabled:P,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:P?n.jsxs(n.Fragment,{children:[n.jsx(st,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Ie,{className:"w-3 h-3 mr-2"}),"Seed Sessions"]})})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(Xs,{className:"w-5 h-5 text-white"}),n.jsx("h4",{className:"text-white font-light",children:"Seed Accounts"})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs("div",{className:"flex-1",children:[n.jsx(xe,{htmlFor:"account-count",className:"text-sm text-gray-400 font-light",children:"Number of accounts"}),n.jsx(me,{id:"account-count",type:"number",min:"1",max:"100",defaultValue:"5",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsx(T,{onClick:()=>{var O;const S=parseInt(((O=document.getElementById("account-count"))==null?void 0:O.value)||"5");W(S)},disabled:P,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none mt-6 disabled:opacity-50",children:P?n.jsxs(n.Fragment,{children:[n.jsx(st,{className:"w-3 h-3 mr-2 animate-spin"}),"Seeding..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Xs,{className:"w-3 h-3 mr-2"}),"Seed Accounts"]})})]})]}),N.length>0&&n.jsx("div",{className:"mt-6",children:n.jsx(us,{title:"Session Seeding Terminal",lines:N,isRunning:P,className:"w-full",defaultCollapsed:!0})})]}),n.jsx("div",{className:"flex justify-end mt-6 pt-6 border-t border-dashed border-white/10",children:n.jsx(T,{variant:"outline",onClick:()=>x(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Close"})})]})}),c&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Create Session"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>d(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"create-user-id",className:"text-sm text-gray-400 font-light",children:"User ID"}),n.jsx(me,{id:"create-user-id",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"create-expires",className:"text-sm text-gray-400 font-light",children:"Expires At"}),n.jsx(me,{id:"create-expires",type:"datetime-local",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>d(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:()=>ee({}),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Create"})]})]})}),m&&f&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Edit Session"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>u(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:n.jsx(Ie,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-white font-light",children:["Session ",f.id.slice(0,8),"..."]}),n.jsx("div",{className:"text-sm text-gray-400",children:f.userId})]})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"edit-user-id",className:"text-sm text-gray-400 font-light",children:"User ID"}),n.jsx(me,{id:"edit-user-id",defaultValue:f.userId,className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"edit-expires",className:"text-sm text-gray-400 font-light",children:"Expires At"}),n.jsx(me,{id:"edit-expires",type:"datetime-local",defaultValue:new Date(f.expiresAt).toISOString().slice(0,16),className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>u(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:()=>ie({}),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update"})]})]})}),p&&f&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Delete Session"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>y(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:n.jsx(Ie,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-white font-light",children:["Session ",f.id.slice(0,8),"..."]}),n.jsx("div",{className:"text-sm text-gray-400",children:f.userId})]})]}),n.jsx("p",{className:"text-gray-400",children:"Are you sure you want to delete this session? This action cannot be undone."})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>y(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:X,className:"bg-red-600 hover:bg-red-700 text-white border border-red-600 rounded-none",children:"Delete"})]})]})}),w&&f&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Session Details"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>v(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-16 h-16 rounded-none border border-dashed border-white/20 bg-white/10 flex items-center justify-center",children:n.jsx(Ie,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{children:[n.jsxs("div",{className:"text-white font-light",children:["Session ",f.id.slice(0,8),"..."]}),n.jsx("div",{className:"text-sm text-gray-400",children:f.userId})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"ID:"}),n.jsx("span",{className:"text-white text-sm",children:f.id})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"User ID:"}),n.jsx("span",{className:"text-white text-sm",children:f.userId})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"Status:"}),n.jsx("span",{className:"text-white text-sm",children:new Date(f.expiresAt)>new Date?"Active":"Expired"})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"Expires:"}),n.jsx("span",{className:"text-white text-sm",children:new Date(f.expiresAt).toLocaleString()})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"Created:"}),n.jsx("span",{className:"text-white text-sm",children:new Date(f.createdAt).toLocaleString()})]}),n.jsxs("div",{className:"flex justify-between",children:[n.jsx("span",{className:"text-gray-400",children:"Updated:"}),n.jsx("span",{className:"text-white text-sm",children:new Date(f.updatedAt).toLocaleString()})]})]})]}),n.jsx("div",{className:"flex justify-end mt-6",children:n.jsx(T,{onClick:()=>v(!1),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Close"})})]})})]})}function Rb(e){const t=h.useRef(null),r=h.useRef(null),s=h.useRef(0),a=5;h.useEffect(()=>{const i=()=>{try{const o=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}`;console.log("🔌 Attempting to connect to WebSocket:",o),t.current=new WebSocket(o),t.current.onopen=()=>{console.log("✅ WebSocket connected successfully"),s.current=0,r.current&&(clearTimeout(r.current),r.current=null)},t.current.onmessage=c=>{try{const d=JSON.parse(c.data);console.log("📨 WebSocket message received:",d),e(d)}catch(d){console.error("❌ Failed to parse WebSocket message:",d)}},t.current.onclose=c=>{if(console.log("🔌 WebSocket disconnected:",c.code,c.reason),c.code===1006||c.code===1001){console.log("ℹ️ WebSocket server not available (running in normal mode)");return}if(s.current<a){s.current++;const d=Math.min(1e3*2**s.current,1e4);console.log(`🔄 Attempting to reconnect in ${d}ms (attempt ${s.current}/${a})`),r.current=setTimeout(()=>{i()},d)}else console.log("❌ Max reconnection attempts reached")},t.current.onerror=c=>{console.error("❌ WebSocket error:",c)}}catch(l){console.error("❌ Failed to connect WebSocket:",l)}};return i(),()=>{t.current&&t.current.close(),r.current&&clearTimeout(r.current)}},[e])}function Mb(){var v,j,x,f,g,N,C,P,k,R,J,W,q,Y,te,ee,ie,X,_,S,O,B,z,b,E,L,M;const[e,t]=h.useState(null),[r,s]=h.useState(null),[a,i]=h.useState(null),[l,o]=h.useState(!0),[c,d]=h.useState(null);Rb(A=>{A.type==="config_changed"?(console.log("🔄 Config changed, refreshing data..."),setTimeout(()=>{m(),u(),p()},500)):A.type==="connected"&&console.log("✅ Connected to Better Auth Studio WebSocket")}),h.useEffect(()=>{m(),u(),p()},[]);const m=async()=>{var A;try{const $=await(await fetch("/api/config")).json();(A=$.studio)!=null&&A.version&&d(`v${$.studio.version}`),t($)}catch(K){console.error("Failed to fetch config:",K)}finally{o(!1)}},u=async()=>{try{const K=await(await fetch("/api/health")).json();s(K.system||{studioVersion:c||"v1.0.0",nodeVersion:process.version,platform:navigator.platform,uptime:"2h 15m"})}catch(A){console.error("Failed to fetch system info:",A),s({studioVersion:c||"v1.0.0",nodeVersion:"v18.0.0",platform:"macOS",uptime:"2h 15m"})}},p=async()=>{try{const K=await(await fetch("/api/plugins")).json();i(K)}catch(A){console.error("Failed to fetch plugins:",A),i({plugins:[],configPath:null,totalPlugins:0,error:"Failed to fetch plugins"})}},y=A=>{switch(A==null?void 0:A.toLowerCase()){case"postgresql":case"postgres":return n.jsxs(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:[n.jsx(Ue,{className:"w-3 h-3"}),"Connected"]});case"mysql":return n.jsxs(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:[n.jsx(Ue,{className:"w-3 h-3"}),"Connected"]});case"sqlite":return n.jsxs(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:[n.jsx(Rs,{className:"w-3 h-3"}),"Local"]});default:return n.jsxs(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:[n.jsx(cr,{className:"w-3 h-3"}),"Unknown"]})}},w=A=>{switch(A.toLowerCase()){case"google":return n.jsx(ln,{className:"w-5 h-5 text-white"});case"github":return n.jsx(dr,{className:"w-5 h-5 text-white"});case"discord":return n.jsx(ln,{className:"w-5 h-5 text-white"});case"twitter":return n.jsx(ln,{className:"w-5 h-5 text-white"});default:return n.jsx(ln,{className:"w-5 h-5 text-white"})}};return l?n.jsx("div",{className:"flex items-center justify-center h-64",children:n.jsx("div",{className:"animate-spin rounded-full h-8 w-8 border-b-2 border-white"})}):n.jsxs("div",{className:"space-y-8 animate-fade-in",children:[n.jsx("div",{className:"flex items-center justify-between p-5 pt-7",children:n.jsxs("div",{children:[n.jsx("h1",{className:"text-3xl font-normal text-white tracking-tight",children:"Settings"}),n.jsx("p",{className:"text-gray-300 mt-2",children:"Configure your Better Auth application"})]})}),n.jsx("hr",{className:"w-full border-white/15 h-px"}),n.jsx("hr",{className:"w-full border-white/15 h-px"}),n.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 p-5",children:[n.jsxs(ot,{className:"border-white/15 bg-black/70 px-0 sm:px-0 md:px-0 lg:px-0 xl:px-0 rounded-none",children:[n.jsxs(qt,{children:[n.jsxs(Zt,{className:"text-white flex items-center space-x-2",children:[n.jsx(ts,{className:"w-5 h-5 text-white"}),n.jsx("span",{children:"Application"})]}),n.jsx(er,{children:"Basic application configuration"})]}),n.jsx("hr",{className:"w-full border-white/15 h-px -mt-3 mb-1"}),n.jsxs(ct,{className:"space-y-0 px-0 pb-0 border-b-none",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(ln,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"App Name"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Application display name"})]})]}),n.jsx("div",{className:"text-right",children:n.jsx("p",{className:"text-sm font-medium text-white",children:(e==null?void 0:e.appName)||"Better Auth"})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(z0,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Base URL"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Application base URL"})]})]}),n.jsx("div",{className:"text-right",children:n.jsx("p",{className:"text-sm font-mono font-medium text-white",children:(e==null?void 0:e.baseURL)||"http://localhost:3000"})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Ol,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Base Path"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Auth API base path"})]})]}),n.jsx("div",{className:"text-right",children:n.jsx("p",{className:"text-sm font-mono font-medium text-white",children:(e==null?void 0:e.basePath)||"/api/auth"})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(dr,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Secret"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Encryption secret"})]})]}),n.jsx("div",{className:"text-right",children:n.jsx("p",{className:"text-sm font-medium text-white",children:(e==null?void 0:e.secret)==="Configured"?"Configured":"Not set"})})]})]})]}),n.jsxs(ot,{className:"border-white/15 bg-black/70 px-0 sm:px-0 md:px-0 lg:px-0 xl:px-0 rounded-none",children:[n.jsxs(qt,{children:[n.jsxs(Zt,{className:"text-white flex items-center space-x-2",children:[n.jsx(Ie,{className:"w-5 h-5 text-white"}),n.jsx("span",{children:"Database"})]}),n.jsx(er,{children:"Database connection and configuration"})]}),n.jsx("hr",{className:"w-full border-white/15 h-px -mt-3 mb-1"}),n.jsxs(ct,{className:"space-y-0 px-0 pb-0 border-b-none",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Ie,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:((v=e==null?void 0:e.database)==null?void 0:v.type)&&((j=e==null?void 0:e.database)==null?void 0:j.type.charAt(0).toUpperCase())+((x=e==null?void 0:e.database)==null?void 0:x.type.slice(1))||"Unknown"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Database Type"})]})]}),((f=e==null?void 0:e.database)==null?void 0:f.type)&&y(e.database.type)]}),((g=e==null?void 0:e.database)==null?void 0:g.dialect)&&n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Ie,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Dialect"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Database dialect"})]})]}),n.jsx("div",{className:"text-right",children:n.jsx("p",{className:"text-sm font-medium text-white",children:e.database.dialect})})]}),((N=e==null?void 0:e.database)==null?void 0:N.casing)&&n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(ts,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Casing"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Table name casing"})]})]}),n.jsx("div",{className:"text-right",children:n.jsx("p",{className:"text-sm font-medium text-white capitalize",children:e.database.casing})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Pu,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Debug Logs"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Database debug logging"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(C=e==null?void 0:e.database)!=null&&C.debugLogs?n.jsxs(n.Fragment,{children:[n.jsx(cr,{className:"w-3 h-3"}),"Enabled"]}):n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Disabled"]})})]})]})]}),n.jsxs(ot,{className:"border-white/15 bg-black rounded-none",children:[n.jsxs(qt,{className:"border-b border-white/15",children:[n.jsxs(Zt,{className:"text-white flex items-center space-x-2",children:[n.jsx(dr,{className:"w-5 h-5 text-white"}),n.jsx("span",{children:"Providers"})]}),n.jsx(er,{children:"Configured authentication providers"})]}),n.jsx(ct,{className:"p-0",children:e!=null&&e.socialProviders&&e.socialProviders.length>0?e.socialProviders.map((A,K)=>n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15 last:border-b-0",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[w(A.type),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white capitalize",children:A.type}),n.jsx("p",{className:"text-xs text-gray-400",children:A.clientId?"Configured":"Not configured"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:A.clientId?n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Active"]}):n.jsxs(n.Fragment,{children:[n.jsx(cr,{className:"w-3 h-3"}),"Setup Required"]})})]},K)):n.jsxs("div",{className:"text-center py-8",children:[n.jsx(dr,{className:"w-8 h-8 text-white mx-auto mb-2"}),n.jsx("p",{className:"text-sm text-gray-400",children:"No providers configured"})]})})]}),n.jsxs(ot,{className:"border-white/15 bg-black rounded-none",children:[n.jsxs(qt,{className:"border-b border-white/15",children:[n.jsxs(Zt,{className:"text-white flex items-center space-x-2",children:[n.jsx(Et,{className:"w-5 h-5 text-white"}),n.jsx("span",{children:"Email & Password"})]}),n.jsx(er,{children:"Email authentication settings"})]}),n.jsxs(ct,{className:"p-0",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Et,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Email Authentication"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Allow users to sign up with email"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(P=e==null?void 0:e.emailAndPassword)!=null&&P.enabled?n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Enabled"]}):n.jsxs(n.Fragment,{children:[n.jsx(on,{className:"w-3 h-3"}),"Disabled"]})})]}),((k=e==null?void 0:e.emailAndPassword)==null?void 0:k.enabled)&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(he,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Sign Up"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Allow new user registration"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(R=e==null?void 0:e.emailAndPassword)!=null&&R.disableSignUp?n.jsxs(n.Fragment,{children:[n.jsx(on,{className:"w-3 h-3"}),"Disabled"]}):n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Enabled"]})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(dr,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Email Verification"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Require email verification"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(J=e==null?void 0:e.emailAndPassword)!=null&&J.requireEmailVerification?n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Required"]}):n.jsxs(n.Fragment,{children:[n.jsx(cr,{className:"w-3 h-3"}),"Optional"]})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Ol,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Password Length"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Min/Max password length"})]})]}),n.jsx("div",{className:"text-right",children:n.jsxs("p",{className:"text-sm font-medium text-white",children:[((W=e==null?void 0:e.emailAndPassword)==null?void 0:W.minPasswordLength)||8," -"," ",((q=e==null?void 0:e.emailAndPassword)==null?void 0:q.maxPasswordLength)||128]})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15 last:border-b-0",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(ui,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Auto Sign In"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Auto sign in after registration"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(Y=e==null?void 0:e.emailAndPassword)!=null&&Y.autoSignIn?n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Enabled"]}):n.jsxs(n.Fragment,{children:[n.jsx(cr,{className:"w-3 h-3"}),"Disabled"]})})]})]})]})]}),n.jsxs(ot,{className:"border-white/15 bg-black rounded-none",children:[n.jsxs(qt,{className:"border-b border-white/15",children:[n.jsxs(Zt,{className:"text-white flex items-center space-x-2",children:[n.jsx(pr,{className:"w-5 h-5 text-white"}),n.jsx("span",{children:"Session"})]}),n.jsx(er,{children:"Session management settings"})]}),n.jsxs(ct,{className:"p-0",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(pr,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Session Duration"}),n.jsx("p",{className:"text-xs text-gray-400",children:"How long sessions last"})]})]}),n.jsxs("div",{className:"text-right",children:[n.jsx("p",{className:"text-sm font-medium text-white",children:(te=e==null?void 0:e.session)!=null&&te.expiresIn?`${Math.floor(e.session.expiresIn/(60*60*24))} days`:"7 days"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Default"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Pu,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Update Age"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Session refresh interval"})]})]}),n.jsx("div",{className:"text-right",children:n.jsx("p",{className:"text-sm font-medium text-white",children:(ee=e==null?void 0:e.session)!=null&&ee.updateAge?`${Math.floor(e.session.updateAge/(60*60))} hours`:"24 hours"})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(ui,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Session Refresh"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Auto refresh sessions"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(ie=e==null?void 0:e.session)!=null&&ie.disableSessionRefresh?n.jsxs(n.Fragment,{children:[n.jsx(on,{className:"w-3 h-3"}),"Disabled"]}):n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Enabled"]})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15 last:border-b-0",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Ie,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Store in Database"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Store sessions in database"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(X=e==null?void 0:e.session)!=null&&X.storeSessionInDatabase?n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Enabled"]}):n.jsxs(n.Fragment,{children:[n.jsx(Rs,{className:"w-3 h-3"}),"Secondary Storage"]})})]})]})]}),n.jsxs(ot,{className:"border-white/15 bg-black rounded-none",children:[n.jsxs(qt,{className:"border-b border-white/15",children:[n.jsxs(Zt,{className:"text-white flex items-center space-x-2",children:[n.jsx(dr,{className:"w-5 h-5 text-white"}),n.jsx("span",{children:"Rate Limiting"})]}),n.jsx(er,{children:"API rate limiting configuration"})]}),n.jsxs(ct,{className:"p-0",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(dr,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Rate Limiting"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Enable rate limiting"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(_=e==null?void 0:e.rateLimit)!=null&&_.enabled?n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Enabled"]}):n.jsxs(n.Fragment,{children:[n.jsx(cr,{className:"w-3 h-3"}),"Disabled"]})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(pr,{className:"w-5 h-5 text-red-400"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Rate Limit Window"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Time window for rate limiting"})]})]}),n.jsxs("div",{className:"text-right",children:[n.jsx("p",{className:"text-sm font-medium text-white",children:(S=e==null?void 0:e.rateLimit)!=null&&S.window?`${e.rateLimit.window} seconds`:"10 seconds"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Window"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(dr,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Max Requests"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Maximum requests per window"})]})]}),n.jsxs("div",{className:"text-right",children:[n.jsx("p",{className:"text-sm font-medium text-white",children:((O=e==null?void 0:e.rateLimit)==null?void 0:O.max)||100}),n.jsx("p",{className:"text-xs text-gray-400",children:"Requests"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15 last:border-b-0",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Ie,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Storage"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Rate limit storage type"})]})]}),n.jsx("div",{className:"text-right",children:n.jsx("p",{className:"text-sm font-medium text-white capitalize",children:((B=e==null?void 0:e.rateLimit)==null?void 0:B.storage)||"memory"})})]})]})]}),n.jsxs(ot,{className:"border-white/15 bg-black rounded-none",children:[n.jsxs(qt,{className:"border-b border-white/15",children:[n.jsxs(Zt,{className:"text-white flex items-center space-x-2",children:[n.jsx(ts,{className:"w-5 h-5 text-white"}),n.jsx("span",{children:"Advanced"})]}),n.jsx(er,{children:"Advanced configuration options"})]}),n.jsxs(ct,{className:"p-0",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Ol,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Secure Cookies"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Use secure cookies"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(z=e==null?void 0:e.advanced)!=null&&z.useSecureCookies?n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Enabled"]}):n.jsxs(n.Fragment,{children:[n.jsx(cr,{className:"w-3 h-3"}),"Disabled"]})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(dr,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"CSRF Check"}),n.jsx("p",{className:"text-xs text-gray-400",children:"CSRF protection"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(b=e==null?void 0:e.advanced)!=null&&b.disableCSRFCheck?n.jsxs(n.Fragment,{children:[n.jsx(on,{className:"w-3 h-3"}),"Disabled"]}):n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Enabled"]})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(sl,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"IP Tracking"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Track IP addresses"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(L=(E=e==null?void 0:e.advanced)==null?void 0:E.ipAddress)!=null&&L.disableIpTracking?n.jsxs(n.Fragment,{children:[n.jsx(on,{className:"w-3 h-3"}),"Disabled"]}):n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Enabled"]})})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15 last:border-b-0",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(S0,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Telemetry"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Usage analytics"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs group-hover:bg-white group-hover:border-black group-hover:text-black bg-black/70 border border-white/15 rounded-none border-dashed flex items-center gap-1",children:(M=e==null?void 0:e.telemetry)!=null&&M.enabled?n.jsxs(n.Fragment,{children:[n.jsx(cr,{className:"w-3 h-3"}),"Enabled"]}):n.jsxs(n.Fragment,{children:[n.jsx(Ue,{className:"w-3 h-3"}),"Disabled"]})})]})]})]}),n.jsxs(ot,{className:"border-white/15 bg-black rounded-none",children:[n.jsxs(qt,{className:"border-b border-white/15",children:[n.jsxs(Zt,{className:"text-white flex items-center space-x-2",children:[n.jsx(Rs,{className:"w-5 h-5 text-white"}),n.jsx("span",{children:"System Info"})]}),n.jsx(er,{children:"Better Auth Studio system information"})]}),n.jsxs(ct,{className:"p-0",children:[n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(ui,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Studio Version"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Better Auth Studio"})]})]}),n.jsxs("div",{className:"text-right",children:[n.jsx("p",{className:"text-sm font-medium text-white",children:c||"v1.0.0"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Latest"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Rs,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Node.js Version"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Runtime environment"})]})]}),n.jsxs("div",{className:"text-right",children:[n.jsx("p",{className:"text-sm font-medium text-white",children:(r==null?void 0:r.nodeVersion)||"v18.0.0"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Current"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(ln,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Platform"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Operating system"})]})]}),n.jsxs("div",{className:"text-right",children:[n.jsx("p",{className:"text-sm font-medium text-white",children:(r==null?void 0:r.platform)||"macOS"}),n.jsx("p",{className:"text-xs text-gray-400",children:"System"})]})]}),n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15 last:border-b-0",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(pr,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Uptime"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Service uptime"})]})]}),n.jsxs("div",{className:"text-right",children:[n.jsx("p",{className:"text-sm font-medium text-white",children:(r==null?void 0:r.uptime)||"2h 15m"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Running"})]})]})]})]}),n.jsxs(ot,{className:"border-white/15 bg-black/70 px-0 sm:px-0 md:px-0 lg:px-0 xl:px-0 rounded-none lg:col-span-2",children:[n.jsxs(qt,{children:[n.jsxs(Zt,{className:"text-white flex items-center space-x-2",children:[n.jsx(Tu,{className:"w-5 h-5 text-white"}),n.jsx("span",{children:"Plugins"})]}),n.jsx(er,{children:"Better Auth plugins enabled in your configuration"})]}),n.jsx("hr",{className:"w-full border-white/15 h-px -mt-3 mb-1"}),n.jsx(ct,{className:"space-y-0 px-0 pb-0 border-b-none",children:a!=null&&a.plugins&&a.plugins.length>0?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"flex items-center justify-between p-4 px-5 border-b border-white/15",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Rs,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"Total Plugins"}),n.jsx("p",{className:"text-xs text-gray-400",children:"Currently enabled plugins"})]})]}),n.jsxs("div",{className:"text-right",children:[n.jsx("p",{className:"text-sm font-medium text-white",children:a.totalPlugins}),n.jsx("p",{className:"text-xs text-gray-400",children:"Active"})]})]}),a.plugins.map((A,K)=>n.jsxs("div",{className:`flex items-center justify-between p-4 px-5 ${K<a.plugins.length-1?"border-b border-white/15":""}`,children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Tu,{className:"w-5 h-5 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:A.name.slice(0,1).toUpperCase()+A.name.slice(1).replace("-"," ")}),n.jsx("p",{className:"text-xs text-gray-400",children:A.description})]})]}),n.jsx("div",{className:"text-right flex items-center space-x-2",children:n.jsxs(le,{variant:"secondary",className:"text-xs bg-green-900/50 border border-dashed rounded-none border-green-500/30 text-green-400 flex items-center gap-1",children:[n.jsx(Ue,{className:"w-3 h-3"}),"Enabled"]})})]},A.id)),a.configPath&&n.jsx("div",{className:"p-4 px-5 bg-black/30 border-t border-white/10",children:n.jsxs("p",{className:"text-xs text-gray-400",children:["Config file:"," ",n.jsx("span",{className:"text-white font-mono",children:a.configPath})]})})]}):n.jsxs("div",{className:"flex items-center justify-between p-4 px-5",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(cr,{className:"w-5 h-5 text-yellow-400"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-sm font-medium text-white",children:"No Plugins Enabled"}),n.jsx("p",{className:"text-xs text-gray-400",children:(a==null?void 0:a.error)||"No plugins are currently configured in your Better Auth setup"})]})]}),n.jsx(le,{variant:"secondary",className:"text-xs bg-yellow-900/50 border border-yellow-500/30 text-yellow-400 rounded-sm",children:"None"})]})})]})]})]})}function qu(){var ie,X;const{orgId:e,teamId:t}=Xc(),[r,s]=h.useState(null),[a,i]=h.useState([]),[l,o]=h.useState(!0),[c,d]=h.useState("details"),[m,u]=h.useState(!1),[p,y]=h.useState(!1),[w,v]=h.useState(""),[j,x]=h.useState([]),[f,g]=h.useState([]),[N,C]=h.useState({name:""});h.useEffect(()=>{t&&(P(),k())},[t]);const P=async()=>{try{const S=await(await fetch(`/api/teams/${t}`)).json();S.success&&S.team?(s(S.team),C({name:S.team.name})):S.team?(s(S.team),C({name:S.team.name})):D.error("Team not found")}catch(_){console.error("Failed to fetch team:",_),D.error("Failed to load team")}finally{o(!1)}},k=async()=>{try{const S=await(await fetch(`/api/teams/${t}/members`)).json();S.success&&i(S.members||[])}catch(_){console.error("Failed to fetch team members:",_),D.error("Failed to load team members")}},R=async()=>{try{const S=await(await fetch("/api/users?limit=10000")).json(),O=a.map(z=>z.userId),B=(S.users||[]).filter(z=>!O.includes(z.id));x(B)}catch(_){console.error("Failed to fetch available users:",_),D.error("Failed to load users")}},J=async()=>{if(!N.name){D.error("Please enter a team name");return}const _=D.loading("Updating team...");try{const O=await(await fetch(`/api/teams/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:N.name})})).json();O.success?(await P(),y(!1),D.success("Team updated successfully!",{id:_})):D.error(`Error updating team: ${O.error||"Unknown error"}`,{id:_})}catch(S){console.error("Error updating team:",S),D.error("Error updating team",{id:_})}},W=async()=>{if(f.length===0){D.error("Please select at least one user");return}const _=D.loading(`Adding ${f.length} members...`);try{const O=await(await fetch(`/api/teams/${t}/members`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userIds:f})})).json();O.success?(await k(),u(!1),g([]),v(""),D.success(`Successfully added ${f.length} members!`,{id:_})):D.error(`Error adding members: ${O.error||"Unknown error"}`,{id:_})}catch(S){console.error("Error adding members:",S),D.error("Error adding members",{id:_})}},q=async(_,S)=>{const O=D.loading(`Removing ${S}...`);try{const z=await(await fetch(`/api/team-members/${_}`,{method:"DELETE",headers:{"Content-Type":"application/json"}})).json();z.success?(await k(),D.success(`${S} removed from team!`,{id:O})):D.error(`Error removing member: ${z.error||"Unknown error"}`,{id:O})}catch(B){console.error("Error removing team member:",B),D.error("Error removing team member",{id:O})}},Y=()=>{R(),u(!0)},te=_=>{g(S=>S.includes(_)?S.filter(O=>O!==_):[...S,_])},ee=j.filter(_=>_.name.toLowerCase().includes(w.toLowerCase())||_.email.toLowerCase().includes(w.toLowerCase()));return l?n.jsx("div",{className:"flex items-center justify-center h-32",children:n.jsxs("div",{className:"flex flex-col items-center space-y-3",children:[n.jsx(st,{className:"w-6 h-6 text-white animate-spin"}),n.jsx("div",{className:"text-white text-sm",children:"Loading team details..."})]})}):r?n.jsxs("div",{className:"space-y-6 p-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("div",{className:"flex items-center space-x-4",children:n.jsx(es,{to:`/organizations/${r.organizationId}`,children:n.jsxs(T,{variant:"ghost",className:"text-gray-400 hover:text-white rounded-none",children:[n.jsx(pa,{className:"w-4 h-4 mr-2"}),"Back to Organization"]})})}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsxs(T,{onClick:Y,className:"border border-dashed border-white/20 text-white hover:bg-white/10 bg-transparent rounded-none",children:[n.jsx(Hr,{className:"w-4 h-4 mr-2"}),"Add Members"]}),n.jsxs(T,{onClick:()=>y(!0),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:[n.jsx(wn,{className:"w-4 h-4 mr-2"}),"Edit Team"]})]})]}),n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-12 h-12 bg-white/10 border border-dashed border-white/20 rounded-none flex items-center justify-center",children:n.jsx(he,{className:"w-6 h-6 text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl text-white font-light",children:r.name}),n.jsx("div",{className:"flex items-center space-x-2",children:r.organization&&n.jsxs(es,{to:`/organizations/${r.organizationId}`,className:"text-gray-400 hover:text-white text-sm",children:[n.jsx(Le,{className:"w-4 h-4 inline mr-1"}),r.organization.name]})})]})]}),n.jsx("div",{className:"border-b border-white/10",children:n.jsxs("nav",{className:"flex space-x-8",children:[n.jsxs("button",{onClick:()=>d("details"),className:`flex items-center space-x-2 px-3 py-4 text-sm font-medium border-b-2 transition-all duration-200 ${c==="details"?"border-white text-white":"border-transparent text-gray-400 hover:text-white hover:border-gray-300"}`,children:[n.jsx(he,{className:"w-4 h-4"}),n.jsx("span",{children:"Details"})]}),n.jsxs("button",{onClick:()=>d("members"),className:`flex items-center space-x-2 px-3 py-4 text-sm font-medium border-b-2 transition-all duration-200 ${c==="members"?"border-white text-white":"border-transparent text-gray-400 hover:text-white hover:border-gray-300"}`,children:[n.jsx(he,{className:"w-4 h-4"}),n.jsx("span",{children:"Members"}),a.length>0&&n.jsx(le,{variant:"secondary",className:"text-xs bg-white/10 border border-white/20 rounded-sm",children:a.length})]})]})}),c==="details"&&n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-6",children:[n.jsx("h3",{className:"text-lg text-white font-light mb-4",children:"Team Information"}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs("div",{children:[n.jsx("label",{className:"text-sm text-gray-400 font-light",children:"Name"}),n.jsx("p",{className:"text-white mt-1",children:r.name})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-sm text-gray-400 font-light",children:"Organization"}),n.jsx("p",{className:"text-white mt-1",children:((ie=r.organization)==null?void 0:ie.name)||"Unknown"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-sm text-gray-400 font-light",children:"Created"}),n.jsx("p",{className:"text-white mt-1",children:new Date(r.createdAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]}),n.jsxs("div",{children:[n.jsx("label",{className:"text-sm text-gray-400 font-light",children:"Last Updated"}),n.jsx("p",{className:"text-white mt-1",children:new Date(r.updatedAt).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"})})]})]})]}),n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-6",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(he,{className:"w-8 h-8 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-2xl text-white font-light",children:a.length}),n.jsx("p",{className:"text-sm text-gray-400",children:"Members"})]})]})}),n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-6",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx($i,{className:"w-8 h-8 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-2xl text-white font-light",children:Math.ceil((new Date().getTime()-new Date(r.createdAt).getTime())/(1e3*60*60*24))}),n.jsx("p",{className:"text-sm text-gray-400",children:"Days Active"})]})]})}),n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-6",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx(Le,{className:"w-8 h-8 text-white"}),n.jsxs("div",{children:[n.jsx("p",{className:"text-2xl text-white font-light",children:"1"}),n.jsx("p",{className:"text-sm text-gray-400",children:"Organization"})]})]})})]})]}),c==="members"&&n.jsxs("div",{className:"space-y-6",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("div",{children:[n.jsxs("h3",{className:"text-lg text-white font-light",children:["Team Members (",a.length,")"]}),n.jsx("p",{className:"text-gray-400 mt-1",children:"Manage members of this team"})]})}),a.length>0?n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none",children:n.jsx("div",{className:"overflow-x-auto",children:n.jsxs("table",{className:"w-full",children:[n.jsx("thead",{children:n.jsxs("tr",{className:"border-b border-dashed border-white/10",children:[n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"User"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Email"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Role"}),n.jsx("th",{className:"text-left py-4 px-4 text-white font-light",children:"Joined"}),n.jsx("th",{className:"text-right py-4 px-4 text-white font-light",children:"Actions"})]})}),n.jsx("tbody",{children:a.map(_=>n.jsxs("tr",{className:"border-b border-dashed border-white/5 hover:bg-white/5",children:[n.jsx("td",{className:"py-4 px-4",children:n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("img",{src:_.user.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${_.user.id}`,alt:_.user.name,className:"w-10 h-10 rounded-none border border-dashed border-white/20"}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:_.user.name}),n.jsxs("div",{className:"text-sm text-gray-400",children:["ID: ",_.user.id]})]})]})}),n.jsx("td",{className:"py-4 px-4 text-white",children:_.user.email}),n.jsx("td",{className:"py-4 px-4",children:n.jsx(le,{variant:"secondary",className:"text-xs bg-blue-900/10 border border-dashed border-blue-500/30 text-blue-400/70 rounded-none capitalize",children:_.role})}),n.jsx("td",{className:"py-4 px-4 text-sm text-gray-400",children:new Date(_.joinedAt).toLocaleDateString()}),n.jsx("td",{className:"py-4 px-4 text-right",children:n.jsx("div",{className:"flex items-center justify-end space-x-2",children:n.jsxs(T,{variant:"outline",size:"sm",className:"border border-dashed border-red-400/50 text-red-400 hover:bg-red-400/10 rounded-none",onClick:()=>q(_.id,_.user.name),children:[n.jsx(fn,{className:"w-4 h-4 mr-1"}),"Remove"]})})})]},_.id))})]})})}):n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-12",children:n.jsxs("div",{className:"text-center",children:[n.jsx(he,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("h3",{className:"text-xl text-white font-light mb-2",children:"No Members Yet"}),n.jsx("p",{className:"text-gray-400 mb-6",children:"Add members to this team to get started."}),n.jsxs(T,{onClick:Y,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:[n.jsx(Hr,{className:"w-4 h-4 mr-2"}),"Add First Members"]})]})})]}),m&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-2xl rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Add Team Members"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>{u(!1),g([]),v("")},className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"relative",children:[n.jsx(Gr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),n.jsx(me,{placeholder:"Search users by name or email...",value:w,onChange:_=>v(_.target.value),className:"pl-10 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),f.length>0&&n.jsx("div",{className:"bg-blue-900/20 border border-blue-500/30 rounded-none p-3",children:n.jsxs("p",{className:"text-blue-400 text-sm",children:[f.length," user",f.length!==1?"s":""," selected"]})}),n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none max-h-96 overflow-y-auto",children:ee.length>0?n.jsx("div",{className:"divide-y divide-white/5",children:ee.map(_=>n.jsxs("div",{className:`flex items-center space-x-3 p-4 cursor-pointer hover:bg-white/5 ${f.includes(_.id)?"bg-blue-900/20":""}`,onClick:()=>te(_.id),children:[n.jsx("input",{type:"checkbox",checked:f.includes(_.id),onChange:()=>te(_.id),className:"rounded border-gray-300"}),n.jsx("img",{src:_.image||`https://api.dicebear.com/7.x/avataaars/svg?seed=${_.id}`,alt:_.name,className:"w-10 h-10 rounded-none border border-dashed border-white/20"}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:"text-white font-light",children:_.name}),n.jsx("div",{className:"text-sm text-gray-400",children:_.email})]})]},_.id))}):n.jsx("div",{className:"p-8 text-center",children:n.jsx("p",{className:"text-gray-400",children:"No users found matching your search."})})})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>{u(!1),g([]),v("")},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsxs(T,{onClick:W,disabled:f.length===0,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none disabled:opacity-50",children:[n.jsx(Hr,{className:"w-4 h-4 mr-2"}),"Add ",f.length," Member",f.length!==1?"s":""]})]})]})}),p&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-md rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Edit Team"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>y(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-16 h-16 bg-white/10 border border-dashed border-white/20 rounded-none flex items-center justify-center",children:n.jsx(he,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{children:[n.jsx("div",{className:"text-white font-light",children:r.name}),n.jsx("div",{className:"text-sm text-gray-400",children:(X=r.organization)==null?void 0:X.name})]})]}),n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"edit-team-name",className:"text-sm text-gray-400 font-light",children:"Team Name"}),n.jsx(me,{id:"edit-team-name",value:N.name,onChange:_=>C({name:_.target.value}),placeholder:"e.g. Development Team",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]})]}),n.jsxs("div",{className:"flex justify-end space-x-3 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>y(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:J,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update Team"})]})]})})]}):n.jsxs("div",{className:"space-y-6 p-6",children:[n.jsx("div",{className:"flex items-center space-x-4",children:n.jsx(es,{to:`/organizations/${e}`,children:n.jsxs(T,{variant:"ghost",className:"text-gray-400 hover:text-white rounded-none",children:[n.jsx(pa,{className:"w-4 h-4 mr-2"}),"Back to Organization"]})})}),n.jsxs("div",{className:"text-center py-12",children:[n.jsx(he,{className:"w-16 h-16 text-gray-400 mx-auto mb-4"}),n.jsx("h2",{className:"text-xl text-white font-light mb-2",children:"Team Not Found"}),n.jsx("p",{className:"text-gray-400",children:"The team you're looking for doesn't exist."})]})]})}function Ib(){const e=En(),[t,r]=h.useState([]),[s,a]=h.useState(!0),[i,l]=h.useState(null),[o,c]=h.useState(""),[d,m]=h.useState("all"),[u,p]=h.useState(1),[y]=h.useState(20);h.useEffect(()=>{w()},[]);const w=async()=>{try{const P=await(await fetch("/api/plugins")).json(),k=(P==null?void 0:P.plugins).find(R=>R.id==="teams");l({enabled:!!k,availablePlugins:(P==null?void 0:P.plugins).map(R=>R.id),configPath:P.configPath,teamsPlugin:(P==null?void 0:P.plugins).find(R=>R.id==="teams")}),k?await v():a(!1)}catch(C){console.error("Failed to check teams plugin status:",C),l({enabled:!1,error:"Failed to check plugin status"}),a(!1)}},v=async()=>{try{const P=await(await fetch("/api/teams")).json();P.success&&r(P.teams||[])}catch(C){console.error("Failed to fetch teams:",C),D.error("Failed to load teams")}finally{a(!1)}},j=t.filter(C=>{var k;const P=C.name.toLowerCase().includes(o.toLowerCase())||((k=C.organization)==null?void 0:k.name.toLowerCase().includes(o.toLowerCase()));if(d==="all")return P;if(d==="recent"){const R=new Date;return R.setDate(R.getDate()-7),P&&new Date(C.createdAt)>R}return P}),x=u*y,f=x-y,g=j.slice(f,x),N=Math.ceil(j.length/y);return s?n.jsx("div",{className:"flex items-center justify-center min-h-screen",children:n.jsx(st,{className:"w-8 h-8 animate-spin text-white"})}):i!=null&&i.enabled?n.jsxs("div",{className:"p-6 space-y-6",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl font-light tracking-tight text-white",children:"Teams"}),n.jsxs("p",{className:"text-gray-400 mt-1",children:[j.length," team",j.length!==1?"s":""," found"]})]}),n.jsx("div",{className:"flex items-center space-x-3",children:n.jsxs(T,{onClick:()=>e("/teams/new"),className:"bg-white text-black hover:bg-gray-200 border-dashed",children:[n.jsx(Lr,{className:"w-4 h-4 mr-2"}),"Create Team"]})})]}),n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsxs("div",{className:"relative flex-1 max-w-md",children:[n.jsx(Gr,{className:"absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"}),n.jsx(me,{type:"text",placeholder:"Search teams...",value:o,onChange:C=>c(C.target.value),className:"pl-10 bg-black border-dashed border-white/20 text-white placeholder-gray-400 focus:ring-2 focus:ring-white focus:border-transparent"})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(T,{variant:d==="all"?"default":"outline",size:"sm",onClick:()=>m("all"),className:d==="all"?"bg-white text-black":"border-dashed border-white/20 text-white hover:bg-white/10",children:"All"}),n.jsx(T,{variant:d==="recent"?"default":"outline",size:"sm",onClick:()=>m("recent"),className:d==="recent"?"bg-white text-black":"border-dashed border-white/20 text-white hover:bg-white/10",children:"Recent"})]})]}),g.length===0?n.jsxs("div",{className:"text-center py-12",children:[n.jsx(he,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),n.jsx("h3",{className:"text-lg font-light text-white mb-2",children:"No teams found"}),n.jsx("p",{className:"text-gray-400 mb-6",children:o?"Try adjusting your search terms":"Get started by creating your first team"}),!o&&n.jsxs(T,{onClick:()=>e("/teams/new"),className:"bg-white text-black hover:bg-gray-200 border-dashed",children:[n.jsx(Lr,{className:"w-4 h-4 mr-2"}),"Create Team"]})]}):n.jsx("div",{className:"grid gap-4",children:g.map(C=>{var P;return n.jsx("div",{className:"bg-black/30 border border-white/15 rounded-none p-4 hover:bg-black/40 transition-colors cursor-pointer",onClick:()=>e(`/teams/${C.id}`),children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx("div",{className:"w-10 h-10 bg-white/10 rounded-none flex items-center justify-center",children:n.jsx(he,{className:"w-5 h-5 text-white"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-white font-medium",children:C.name}),n.jsxs("p",{className:"text-gray-400 text-sm",children:[(P=C.organization)==null?void 0:P.name," • ",C.memberCount||0," members"]})]})]}),n.jsx("div",{className:"flex items-center space-x-2",children:n.jsx(le,{variant:"secondary",className:"text-xs bg-green-900/50 border border-dashed rounded-none border-green-500/30 text-green-400",children:"Active"})})]})},C.id)})}),N>1&&n.jsxs("div",{className:"flex items-center justify-center space-x-2",children:[n.jsx(T,{variant:"outline",size:"sm",onClick:()=>p(Math.max(1,u-1)),disabled:u===1,className:"border-dashed border-white/20 text-white hover:bg-white/10 disabled:opacity-50",children:"Previous"}),n.jsxs("span",{className:"text-gray-400 text-sm",children:["Page ",u," of ",N]}),n.jsx(T,{variant:"outline",size:"sm",onClick:()=>p(Math.min(N,u+1)),disabled:u===N,className:"border-dashed border-white/20 text-white hover:bg-white/10 disabled:opacity-50",children:"Next"})]})]}):n.jsxs("div",{className:"space-y-6 p-6",children:[n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("div",{children:[n.jsx("h1",{className:"text-2xl text-white font-light",children:"Teams"}),n.jsx("p",{className:"text-gray-400 mt-1",children:"Manage your application organizations"})]})}),n.jsx("div",{className:"bg-black/30 border border-dashed border-white/20 rounded-none p-8",children:n.jsxs("div",{className:"flex items-start space-x-4",children:[n.jsx("div",{className:"flex-shrink-0",children:n.jsx(Le,{className:"w-12 h-12 text-white"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h3",{className:"text-xl text-white font-light mb-2",children:"Organization Plugin Required"}),n.jsx("p",{className:"text-gray-300 mb-6",children:"To use Organizations in Better Auth Studio, you need to enable the organization plugin in your Better Auth configuration."}),n.jsxs("div",{className:"bg-black/50 border border-dashed border-white/20 rounded-none p-4 mb-6",children:[n.jsx("h4",{className:"text-white font-light mb-3",children:"Follow these steps:"}),n.jsx("ol",{className:"text-gray-300 space-y-2 text-sm list-decimal list-inside",children:n.jsxs("li",{children:["Import the plugin in your auth configuration file",(i==null?void 0:i.configPath)&&n.jsxs("span",{className:"text-gray-400",children:[" (",i.configPath,")"]}),":"]})}),n.jsx("div",{className:"mt-4 bg-black/70 border border-dashed border-white/10 rounded-none p-3 overflow-x-auto",children:n.jsxs("pre",{className:"text-sm text-gray-300",children:[n.jsx("span",{className:"text-blue-400",children:"import"})," ","{ betterAuth }"," ",n.jsx("span",{className:"text-blue-400",children:"from"})," ",n.jsx("span",{className:"text-green-400",children:'"better-auth"'})," ",n.jsx("br",{}),n.jsx("span",{className:"text-blue-400",children:"import"})," ","{ organization }"," ",n.jsx("span",{className:"text-blue-400",children:"from"})," ",n.jsx("span",{className:"text-green-400",children:'"better-auth/plugins/organization"'})," ",n.jsx("br",{}),n.jsx("span",{className:"text-blue-400",children:"export const"})," ",n.jsx("span",{className:"text-yellow-300",children:"auth"})," ="," ",n.jsx("span",{className:"text-yellow-300",children:"betterAuth"}),"(","{"," ",n.jsx("br",{}),n.jsx("span",{className:"text-gray-500 pl-10",children:"// ... your existing configuration"})," ",n.jsx("br",{}),n.jsx("span",{className:"text-red-300 pl-10",children:"plugins"}),": [ ",n.jsx("br",{}),n.jsxs("span",{className:"text-yellow-300 pl-12",children:["organization(",")"]}),n.jsx("br",{}),n.jsx("span",{className:"pl-10",children:"]"})," ",n.jsx("br",{}),"}",") ",n.jsx("br",{})]})}),n.jsx("div",{className:"mt-4",children:n.jsx("p",{className:"text-gray-400 text-sm",children:"2. Do migrations to create the organizations table"})}),n.jsx("div",{className:"mt-2",children:n.jsx("p",{className:"text-gray-400 text-sm",children:"3. Restart your application to apply the changes"})})]}),(i==null?void 0:i.availablePlugins)&&i.availablePlugins.length>0&&n.jsx("div",{className:"mb-4",children:n.jsxs("p",{className:"text-gray-400 text-sm",children:["Currently enabled plugins: ",i.availablePlugins.join(", ")]})}),n.jsx(T,{onClick:()=>window.location.reload(),className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Check Again"}),n.jsxs("div",{className:"mt-4 text-xs text-gray-500",children:["Need help? Check the"," ",n.jsx("a",{href:"https://better-auth.com/docs/plugins/organization",target:"_blank",rel:"noopener noreferrer",className:"text-white hover:underline",children:"Better Auth Organization Plugin Documentation"})]})]})]})})]})}function Lb(){const{userId:e}=Xc(),t=En(),[r,s]=h.useState(null),[a,i]=h.useState([]),[l,o]=h.useState([]),[c,d]=h.useState([]),[m,u]=h.useState(!0),[p,y]=h.useState("details"),[w,v]=h.useState(!1),[j,x]=h.useState(!1),[f,g]=h.useState(!1),[N,C]=h.useState([]),[P,k]=h.useState(!1),[R,J]=h.useState({});h.useEffect(()=>{e&&(te(),ee())},[e]);const W=async z=>{try{const b=await fetch("/api/geo/resolve",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({ipAddress:z})});if(b.ok){const E=await b.json();if(E.success&&E.location)return E.location}return null}catch(b){return console.error("Failed to resolve IP location:",b),null}},q=async z=>{const b=z.map(async M=>{if(!R[M.id]){const A=await W(M.ipAddress);if(A)return{sessionId:M.id,location:A}}return null}),E=await Promise.all(b),L={};E.forEach(M=>{M&&(L[M.sessionId]=M.location)}),Object.keys(L).length>0&&J(M=>({...M,...L}))},Y=z=>{if(!z)return"🌍";const b=z.toUpperCase().split("").map(E=>127397+E.charCodeAt(0));return String.fromCodePoint(...b)},te=async()=>{try{const z=await fetch(`/api/users/${e}`);if(z.ok){const b=await z.json();s(b.user)}else D.error("Failed to fetch user details"),t("/users")}catch(z){console.error("Failed to fetch user details:",z),D.error("Failed to fetch user details"),t("/users")}finally{u(!1)}},ee=async()=>{try{const[z,b,E]=await Promise.all([fetch(`/api/users/${e}/organizations`),fetch(`/api/users/${e}/teams`),fetch(`/api/users/${e}/sessions`)]);if(z.ok){const L=await z.json();i(L.memberships||[])}if(b.ok){const L=await b.json();o(L.memberships||[])}if(E.ok){const M=(await E.json()).sessions||[];d(M),q(M)}}catch(z){console.error("Failed to fetch user memberships:",z)}},ie=async()=>{var L,M;if(!r)return;const z=(L=document.getElementById("edit-name"))==null?void 0:L.value,b=(M=document.getElementById("edit-email"))==null?void 0:M.value;if(!z||!b){D.error("Please fill in all fields");return}const E=D.loading("Updating user...");try{const K=await(await fetch(`/api/users/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:z,email:b})})).json();K.success?(s({...r,name:z,email:b}),v(!1),D.success("User updated successfully!",{id:E})):D.error(`Error updating user: ${K.error||"Unknown error"}`,{id:E})}catch(A){console.error("Error updating user:",A),D.error("Error updating user",{id:E})}},X=async()=>{if(!r)return;const z=D.loading("Banning user...");try{const E=await(await fetch(`/api/users/${e}/ban`,{method:"POST"})).json();E.success?(D.success("User banned successfully!",{id:z}),t("/users")):D.error(`Error banning user: ${E.error||"Unknown error"}`,{id:z})}catch(b){console.error("Error banning user:",b),D.error("Error banning user",{id:z})}},_=async z=>{const b=D.loading("Removing user from organization...");try{const L=await(await fetch(`/api/organizations/members/${z}`,{method:"DELETE"})).json();L.success?(i(M=>M.filter(A=>A.id!==z)),D.success("User removed from organization!",{id:b})):D.error(`Error removing user: ${L.error||"Unknown error"}`,{id:b})}catch(E){console.error("Error removing user from organization:",E),D.error("Error removing user from organization",{id:b})}},S=async z=>{const b=D.loading("Removing user from team...");try{const L=await(await fetch(`/api/teams/members/${z}`,{method:"DELETE"})).json();L.success?(o(M=>M.filter(A=>A.id!==z)),D.success("User removed from team!",{id:b})):D.error(`Error removing user: ${L.error||"Unknown error"}`,{id:b})}catch(E){console.error("Error removing user from team:",E),D.error("Error removing user from team",{id:b})}},O=async z=>{const b=D.loading("Deleting session...");try{const L=await(await fetch(`/api/sessions/${z}`,{method:"DELETE"})).json();L.success?(d(M=>M.filter(A=>A.id!==z)),D.success("Session deleted successfully!",{id:b})):D.error(`Error deleting session: ${L.error||"Unknown error"}`,{id:b})}catch(E){console.error("Error deleting session:",E),D.error("Error deleting session",{id:b})}},B=async(z=3)=>{if(e){C([]),k(!0),C([{id:"start",type:"info",message:`Starting session seeding process for ${z} sessions...`,timestamp:new Date}]);try{const E=await(await fetch(`/api/users/${e}/seed-sessions`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:z})})).json();if(E.success){const L=E.results.map((A,K)=>A.success?{id:`session-${K}`,type:"progress",message:`Creating session ${K+1}: ${A.session.token.substring(0,20)}... from ${A.session.ipAddress}`,timestamp:new Date,status:"completed"}:{id:`session-${K}`,type:"error",message:`Failed to create session ${K+1}: ${A.error}`,timestamp:new Date});C(A=>[...A,...L]);const M=E.results.filter(A=>A.success).length;C(A=>[...A,{id:"complete",type:"success",message:`✅ Session seeding completed! Created ${M}/${z} sessions successfully`,timestamp:new Date}]),ee()}else C(L=>[...L,{id:"error",type:"error",message:`❌ Session seeding failed: ${E.error||"Unknown error"}`,timestamp:new Date}])}catch(b){C(E=>[...E,{id:"error",type:"error",message:`❌ Network error: ${b}`,timestamp:new Date}])}finally{k(!1)}}};return m?n.jsx("div",{className:"min-h-screen bg-black flex items-center justify-center",children:n.jsx("div",{className:"text-white text-lg",children:"Loading user details..."})}):r?n.jsxs("div",{className:"min-h-screen bg-black w-full",children:[n.jsxs("div",{className:"w-full px-6 py-8",children:[n.jsxs("div",{className:"mb-8",children:[n.jsxs(T,{variant:"outline",onClick:()=>t("/users"),className:"mb-4 border-none text-white",children:[n.jsx(pa,{className:"w-4 h-4 mr-2"}),"Back to Users"]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx("div",{className:"w-16 h-16 bg-gray-800 border border-dashed border-white/20 flex items-center justify-center",children:r.image?n.jsx("img",{src:r.image,alt:r.name,className:"w-16 h-16 object-cover"}):n.jsx(Xs,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{children:[n.jsx("h1",{className:"text-3xl font-bold text-white",children:r.name}),n.jsx("p",{className:"text-gray-400",children:r.email}),n.jsx("div",{className:"flex items-center space-x-2 mt-2",children:n.jsx(le,{variant:r.emailVerified?"default":"destructive",className:"rounded-none",children:r.emailVerified?"Verified":"Unverified"})})]})]}),n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsxs(T,{variant:"outline",onClick:()=>v(!0),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:[n.jsx(wn,{className:"w-4 h-4 mr-2"}),"Edit User"]}),n.jsxs(T,{variant:"outline",onClick:()=>x(!0),className:"border border-dashed border-red-400/50 text-red-400 hover:bg-red-400/10 rounded-none",children:[n.jsx(Eu,{className:"w-4 h-4 mr-2"}),"Ban User"]})]})]})]}),n.jsxs("div",{className:"border border-dashed border-white/10 rounded-none",children:[n.jsx("div",{className:"border-b border-dashed border-white/10",children:n.jsx("nav",{className:"flex space-x-8 px-6",children:[{id:"details",name:"Details",icon:Xs},{id:"organizations",name:"Organizations",icon:Le,count:a.length},{id:"teams",name:"Teams",icon:he,count:l.length},{id:"sessions",name:"Sessions",icon:pr,count:c.length}].map(z=>n.jsxs("button",{onClick:()=>y(z.id),className:`flex items-center space-x-2 py-4 px-2 border-b-2 font-medium text-sm ${p===z.id?"border-white text-white":"border-transparent text-gray-400 hover:text-white hover:border-white/50"}`,children:[n.jsx(z.icon,{className:"w-4 h-4"}),n.jsx("span",{children:z.name}),z.count!==void 0&&n.jsx(le,{variant:"outline",className:"rounded-none text-xs",children:z.count})]},z.id))})}),n.jsxs("div",{className:"p-6",children:[p==="details"&&n.jsx("div",{className:"space-y-6",children:n.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Name"}),n.jsx("div",{className:"text-white",children:r.name})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Email"}),n.jsxs("div",{className:"text-white flex items-center space-x-2",children:[n.jsx(Et,{className:"w-4 h-4"}),n.jsx("span",{children:r.email})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Email Status"}),n.jsx(le,{variant:r.emailVerified?"default":"destructive",className:"rounded-none",children:r.emailVerified?"Verified":"Unverified"})]})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Created"}),n.jsxs("div",{className:"text-white flex items-center space-x-2",children:[n.jsx($i,{className:"w-4 h-4"}),n.jsx("span",{children:new Date(r.createdAt).toLocaleDateString()})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Last Updated"}),n.jsxs("div",{className:"text-white flex items-center space-x-2",children:[n.jsx($i,{className:"w-4 h-4"}),n.jsx("span",{children:new Date(r.updatedAt).toLocaleDateString()})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"User ID"}),n.jsx("div",{className:"text-white font-mono text-sm",children:r.id})]})]})]})}),p==="organizations"&&n.jsx("div",{className:"space-y-4",children:a.length===0?n.jsxs("div",{className:"text-center py-12",children:[n.jsx(Le,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),n.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Organizations"}),n.jsx("p",{className:"text-gray-400",children:"This user is not a member of any organizations."})]}):n.jsx("div",{className:"grid gap-4",children:a.map(z=>n.jsx("div",{className:"border border-dashed border-white/10 rounded-none p-4 hover:bg-white/5 transition-colors",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx("div",{className:"w-12 h-12 bg-gray-800 border border-dashed border-white/20 flex items-center justify-center",children:z.organization.image?n.jsx("img",{src:z.organization.image,alt:z.organization.name,className:"w-12 h-12 object-cover"}):n.jsx(Le,{className:"w-6 h-6 text-white"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-white font-medium",children:z.organization.name}),n.jsxs("p",{className:"text-gray-400 text-sm",children:["@",z.organization.slug]}),n.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[n.jsx(le,{variant:"outline",className:"rounded-none text-xs",children:z.role}),n.jsxs("span",{className:"text-gray-400 text-xs",children:["Joined ",new Date(z.joinedAt).toLocaleDateString()]})]})]})]}),n.jsxs(T,{variant:"outline",size:"sm",onClick:()=>_(z.id),className:"border border-dashed border-red-400/50 text-red-400 hover:bg-red-400/10 rounded-none",children:[n.jsx(Du,{className:"w-4 h-4 mr-1"}),"Remove"]})]})},z.id))})}),p==="teams"&&n.jsx("div",{className:"space-y-4",children:l.length===0?n.jsxs("div",{className:"text-center py-12",children:[n.jsx(he,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),n.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Teams"}),n.jsx("p",{className:"text-gray-400",children:"This user is not a member of any teams."})]}):n.jsx("div",{className:"grid gap-4",children:l.map(z=>n.jsx("div",{className:"border border-dashed border-white/10 rounded-none p-4 hover:bg-white/5 transition-colors",children:n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-4",children:[n.jsx("div",{className:"w-12 h-12 bg-black/80 border border-dashed border-white/20 flex items-center justify-center",children:n.jsx(he,{className:"w-6 h-6 text-white"})}),n.jsxs("div",{children:[n.jsx("h3",{className:"text-white font-medium",children:z.team.name}),n.jsxs("p",{className:"text-gray-400 text-sm",children:["in ",z.team.organizationName]}),n.jsxs("div",{className:"flex items-center space-x-2 mt-1",children:[n.jsx(le,{variant:"outline",className:"rounded-none text-xs",children:z.role}),n.jsxs("span",{className:"text-gray-400 text-xs",children:["Joined ",new Date(z.joinedAt).toLocaleDateString()]})]})]})]}),n.jsxs(T,{variant:"outline",size:"sm",onClick:()=>S(z.id),className:"border border-dashed border-red-400/50 text-red-400 hover:bg-red-400/10 rounded-none",children:[n.jsx(Du,{className:"w-4 h-4 mr-1"}),"Remove"]})]})},z.id))})}),p==="sessions"&&n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsxs("div",{children:[n.jsx("h3",{className:"text-lg font-medium text-white",children:"Sessions"}),n.jsx("p",{className:"text-gray-400 text-sm",children:"Manage user authentication sessions"})]}),n.jsxs(T,{variant:"outline",onClick:()=>{C([]),k(!1),g(!0)},className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:[n.jsx(Ie,{className:"w-4 h-4 mr-2"}),"Seed Sessions"]})]}),c.length===0?n.jsxs("div",{className:"text-center py-12",children:[n.jsx(pr,{className:"w-12 h-12 text-gray-400 mx-auto mb-4"}),n.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No Sessions"}),n.jsx("p",{className:"text-gray-400",children:"This user has no active sessions."})]}):n.jsx("div",{className:"grid gap-4",children:c.map(z=>{var b,E,L,M;return n.jsx("div",{className:"border border-dashed border-white/10 rounded-none p-4 hover:bg-white/5 transition-colors",children:n.jsx("div",{className:"flex items-center justify-between",children:n.jsxs("div",{className:"flex items-center space-x-4 flex-1",children:[n.jsx("div",{className:"w-12 -mt-2 h-12 bg-black/80 border border-dashed border-white/20 flex items-center justify-center rounded-none",children:n.jsx(R0,{className:"w-6 h-6 text-white"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("div",{className:"flex items-center space-x-3 mb-2",children:n.jsxs("h3",{className:"text-white font-medium",children:["Session ",z.id.substring(0,8),"..."]})}),n.jsxs("div",{className:"flex items-center space-x-4 mb-1",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(ln,{className:"w-4 h-4 text-white"}),n.jsx("span",{className:"text-white text-sm",children:z.ipAddress})]}),n.jsxs("div",{className:"flex items-center space-x-1",children:[n.jsx("span",{className:"text-gray-400 text-xs",children:"📍"}),n.jsxs("span",{className:"text-gray-300 text-sm",children:[((b=R[z.id])==null?void 0:b.city)||"...",","," ",((E=R[z.id])==null?void 0:E.country)||"..."]}),((L=R[z.id])==null?void 0:L.countryCode)&&n.jsx("span",{className:"text-sm ml-1",children:Y((M=R[z.id])==null?void 0:M.countryCode)})]})]}),n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(pr,{className:"w-4 h-4 text-white"}),n.jsx("span",{className:"text-gray-400 text-sm",children:"Expires:"}),n.jsx("span",{className:"text-white text-sm",children:new Date(z.expiresAt).toLocaleDateString("en-US",{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hour12:!0})})]}),n.jsxs(T,{variant:"outline",size:"sm",onClick:()=>O(z.id),className:"border border-dashed border-red-400/50 text-red-400 hover:bg-red-400/10 rounded-none",children:[n.jsx(Eu,{className:"w-4 h-4 mr-1"}),"Revoke"]})]})]})]})})},z.id)})})]})]})]})]}),w&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 rounded-none p-6 w-full max-w-md",children:[n.jsxs("div",{className:"flex items-center justify-between mb-4",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Edit User"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>v(!1),className:"text-gray-400 hover:text-white rounded-none",children:"×"})]}),n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-3",children:[n.jsx("div",{className:"w-16 h-16 bg-black/80 border border-dashed border-white/20 flex items-center justify-center",children:r!=null&&r.image?n.jsx("img",{src:r.image,alt:r.name,className:"w-16 h-16 object-cover"}):n.jsx(Xs,{className:"w-8 h-8 text-white"})}),n.jsxs("div",{className:"flex-1",children:[n.jsx("h4",{className:"text-white font-medium",children:r==null?void 0:r.name}),n.jsx("p",{className:"text-gray-400 text-sm",children:r==null?void 0:r.email})]})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Name"}),n.jsx("input",{id:"edit-name",type:"text",defaultValue:(r==null?void 0:r.name)||"",className:"w-full px-3 py-2 bg-gray-800 border border-dashed border-white/20 rounded-none text-white placeholder-gray-400 focus:outline-none focus:border-white/50"})]}),n.jsxs("div",{children:[n.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Email"}),n.jsx("input",{id:"edit-email",type:"email",defaultValue:(r==null?void 0:r.email)||"",className:"w-full px-3 py-2 bg-gray-800 border border-dashed border-white/20 rounded-none text-white placeholder-gray-400 focus:outline-none focus:border-white/50"})]})]}),n.jsxs("div",{className:"flex justify-end space-x-2 mt-6",children:[n.jsx(T,{variant:"outline",onClick:()=>v(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:ie,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none",children:"Update"})]})]})}),j&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black border border-dashed border-red-400/50 rounded-none p-6 w-full max-w-md",children:[n.jsx("h2",{className:"text-xl font-bold text-white mb-4",children:"Ban User"}),n.jsxs("p",{className:"text-gray-400 mb-6",children:["Are you sure you want to ban ",n.jsx("strong",{children:r.name}),"? This will prevent them from accessing the system."]}),n.jsxs("div",{className:"flex justify-end space-x-2",children:[n.jsx(T,{variant:"outline",onClick:()=>x(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:X,className:"bg-red-600 text-white hover:bg-red-700 rounded-none",children:"Ban User"})]})]})}),f&&n.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:n.jsxs("div",{className:"bg-black/90 border border-dashed border-white/20 p-6 w-full max-w-2xl rounded-none",children:[n.jsxs("div",{className:"flex items-center justify-between mb-6",children:[n.jsx("h3",{className:"text-lg text-white font-light",children:"Seed Sessions"}),n.jsx(T,{variant:"ghost",size:"sm",onClick:()=>g(!1),className:"text-gray-400 hover:text-white rounded-none",children:n.jsx(be,{className:"w-4 h-4"})})]}),n.jsxs("div",{className:"space-y-6",children:[n.jsxs("div",{className:"space-y-4",children:[n.jsxs("div",{className:"flex items-center space-x-2",children:[n.jsx(pr,{className:"w-5 h-5 text-white"}),n.jsxs("h4",{className:"text-white font-light",children:["Create Sessions for ",r==null?void 0:r.name]})]}),n.jsxs("div",{className:"space-y-3",children:[n.jsxs("div",{children:[n.jsx(xe,{htmlFor:"session-count",className:"text-sm text-gray-400 font-light",children:"Number of sessions"}),n.jsx(me,{id:"session-count",type:"number",min:"1",max:"50",defaultValue:"3",className:"mt-1 border border-dashed border-white/20 bg-black/30 text-white rounded-none"})]}),n.jsx("p",{className:"text-xs text-gray-400",children:"Each session will have a unique token, IP address, and 7-day expiration."})]})]}),N.length>0&&n.jsx("div",{className:"mt-6",children:n.jsx(us,{title:"Session Seeding Terminal",lines:N,isRunning:P,className:"w-full",defaultCollapsed:!1})})]}),n.jsxs("div",{className:"flex justify-end space-x-2 mt-6 pt-6 border-t border-dashed border-white/10",children:[n.jsx(T,{variant:"outline",onClick:()=>g(!1),className:"border border-dashed border-white/20 text-white hover:bg-white/10 rounded-none",children:"Cancel"}),n.jsx(T,{onClick:()=>{var b;const z=parseInt(((b=document.getElementById("session-count"))==null?void 0:b.value)||"3");B(z)},disabled:P,className:"bg-white hover:bg-white/90 text-black border border-white/20 rounded-none disabled:opacity-50",children:P?n.jsxs(n.Fragment,{children:[n.jsx(st,{className:"w-4 h-4 mr-2 animate-spin"}),"Seeding..."]}):n.jsxs(n.Fragment,{children:[n.jsx(Ie,{className:"w-4 h-4 mr-2"}),"Seed Sessions"]})})]})]})})]}):n.jsx("div",{className:"min-h-screen bg-black flex items-center justify-center",children:n.jsx("div",{className:"text-white text-lg",children:"User not found"})})}function Ob(){return n.jsx(L0,{children:n.jsxs(Kv,{children:[n.jsx(Eb,{children:n.jsxs($v,{children:[n.jsx(Ut,{path:"/",element:n.jsx(Pb,{})}),n.jsx(Ut,{path:"/users",element:n.jsx(bx,{})}),n.jsx(Ut,{path:"/users/:userId",element:n.jsx(Lb,{})}),n.jsx(Ut,{path:"/organizations",element:n.jsx(wx,{})}),n.jsx(Ut,{path:"/organizations/:orgId",element:n.jsx(zb,{})}),n.jsx(Ut,{path:"/teams",element:n.jsx(Ib,{})}),n.jsx(Ut,{path:"/teams/:teamId",element:n.jsx(qu,{})}),n.jsx(Ut,{path:"/organizations/:orgId/teams/:teamId",element:n.jsx(qu,{})}),n.jsx(Ut,{path:"/sessions",element:n.jsx(Db,{})}),n.jsx(Ut,{path:"/settings",element:n.jsx(Mb,{})})]})}),n.jsx(j0,{theme:"dark",position:"top-right",richColors:!0,closeButton:!0})]})})}Yl.createRoot(document.getElementById("root")).render(n.jsx(V.StrictMode,{children:n.jsx(Ob,{})}));
|